PostId
int64
4
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
1
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-55
461k
OwnerUndeletedAnswerCountAtPostTime
int64
0
21.5k
Title
stringlengths
3
250
BodyMarkdown
stringlengths
5
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
70,169
09/16/2008 07:48:51
184
08/03/2008 05:34:19
2,260
42
How to highlight source code in HTML?
I want to highlight C/C++/Java/C# etc source codes in my website. How can I do this? Is there a library I can use? Is it a CPU intensive job to highlight the source code?
html
syntax-highlighting
sourcecode
null
null
null
open
How to highlight source code in HTML? === I want to highlight C/C++/Java/C# etc source codes in my website. How can I do this? Is there a library I can use? Is it a CPU intensive job to highlight the source code?
0
70,170
09/16/2008 07:49:07
518
08/06/2008 14:07:17
109
25
In a client-server application: How to send to the DB the user's application password?
I have an Java desktop application wich connects directly with the DB (an Oracle). The application has multiple user accounts. What is the correct method to send the user's password (not DB password) over the network? I don't want to send it in plain text
java
oracle
passwords
null
null
null
open
In a client-server application: How to send to the DB the user's application password? === I have an Java desktop application wich connects directly with the DB (an Oracle). The application has multiple user accounts. What is the correct method to send the user's password (not DB password) over the network? I don't want to send it in plain text
0
70,197
09/16/2008 07:52:36
11,420
09/16/2008 07:50:06
1
0
vb6 to vb.net declaration
HOW TO DECLARE "AS ANY" IN VB.NET OR WHAT IS THE EQUIVALENT OF AS ANY IN VB.NET?
vb6
to
vb.net
declaration
null
null
open
vb6 to vb.net declaration === HOW TO DECLARE "AS ANY" IN VB.NET OR WHAT IS THE EQUIVALENT OF AS ANY IN VB.NET?
0
70,216
09/16/2008 07:55:20
11,429
09/16/2008 07:55:20
1
0
What's the purpose of META-INF?
In Java, you often see a META-INF folder containing some meta files. What is the purpose of this folder and what can I put there?
java
meta-inf
null
null
null
null
open
What's the purpose of META-INF? === In Java, you often see a META-INF folder containing some meta files. What is the purpose of this folder and what can I put there?
0
70,258
09/16/2008 08:06:21
1,068
08/12/2008 08:44:09
140
6
compiling gdb
I am trying to build gdb for armv6 architecture. I will be compiling this package on a Fedora Linux-Intel x86 box. I read the process of installing the gdb , like 1.) Download the source pachage 2.) run configure -host 3.) make But i got lost in the process because i was not able to make out what will be the host , target, needed for teh configure script. I need to basically be able to debug programs running on armv6 architecture board which runs linux kernel 2.6.21.5-cfs-v19. The gdb executable which i intend to obtain after compilation of the source,also needs to be able to run on above mentioned configuration. Now to get a working gdb executable for this configuration what steps should i follow? -AD.
gdb
null
null
null
null
null
open
compiling gdb === I am trying to build gdb for armv6 architecture. I will be compiling this package on a Fedora Linux-Intel x86 box. I read the process of installing the gdb , like 1.) Download the source pachage 2.) run configure -host 3.) make But i got lost in the process because i was not able to make out what will be the host , target, needed for teh configure script. I need to basically be able to debug programs running on armv6 architecture board which runs linux kernel 2.6.21.5-cfs-v19. The gdb executable which i intend to obtain after compilation of the source,also needs to be able to run on above mentioned configuration. Now to get a working gdb executable for this configuration what steps should i follow? -AD.
0
70,269
09/16/2008 08:10:04
5,007
09/07/2008 10:20:37
1
1
Silverlight 2 Drag and Drop tutorials
I'm wondering if people can suggest the best tutorial that will walk me through the best way to do Drag and Drop with control collision detection etc, using MS Silverlight V2. I've done the [Jesse Liberty tutorials][1] at Silverlight.net, and they were a good introduction, but I'm looking for something a bit deeper. Suggestions? [1]: http://silverlight.net/learn/tutorials.aspx
silverlight
null
null
null
null
null
open
Silverlight 2 Drag and Drop tutorials === I'm wondering if people can suggest the best tutorial that will walk me through the best way to do Drag and Drop with control collision detection etc, using MS Silverlight V2. I've done the [Jesse Liberty tutorials][1] at Silverlight.net, and they were a good introduction, but I'm looking for something a bit deeper. Suggestions? [1]: http://silverlight.net/learn/tutorials.aspx
0
70,272
09/16/2008 08:10:53
1,500
08/15/2008 22:44:05
11
1
Single Form Hide on Startup
I have an application with one form in it, and on the Load mehtod i need to hide the form. The form will display itself when it has need to (think along the lines of a outlook 2003 style popup), but i cant for the life of me work out how to hide the form on load without something messy. Any suggestions?
vb.net
winforms
null
null
null
null
open
Single Form Hide on Startup === I have an application with one form in it, and on the Load mehtod i need to hide the form. The form will display itself when it has need to (think along the lines of a outlook 2003 style popup), but i cant for the life of me work out how to hide the form on load without something messy. Any suggestions?
0
70,292
09/16/2008 08:15:45
4,491
09/04/2008 06:44:23
401
10
When should you use standard html tags/inputs and when yould you use the asp.net controls?
I began my journey writing websites using other technologies besides asp.net. Half the time I could use the webforms controls and the standard html inputs interchangeably. When this is the case what is the lure of the webforms controls?
asp.net
c#
webforms
html
visual-studio
null
open
When should you use standard html tags/inputs and when yould you use the asp.net controls? === I began my journey writing websites using other technologies besides asp.net. Half the time I could use the webforms controls and the standard html inputs interchangeably. When this is the case what is the lure of the webforms controls?
0
70,303
09/16/2008 08:17:43
3,834
08/31/2008 06:25:52
160
19
How do you implement GetHashCode for this structure?
I have a structure in C#: public struct UserInfo { public string str1 { get; set; } public string str2 {get; set; } } The only rule is that UserInfo(str1="AA", str2="BB").Equals(UserInfo(str1="BB", str2="AA")) How to override the GetHashCode function for this structure?
c#
hashtable
null
null
null
null
open
How do you implement GetHashCode for this structure? === I have a structure in C#: public struct UserInfo { public string str1 { get; set; } public string str2 {get; set; } } The only rule is that UserInfo(str1="AA", str2="BB").Equals(UserInfo(str1="BB", str2="AA")) How to override the GetHashCode function for this structure?
0
70,318
09/16/2008 08:22:03
11,477
09/16/2008 08:22:03
1
0
rake db:migrate doesn't detect new migration ?
Experienced with Rails / ActiveRecord 2.1.1 * You create a first version with (for example) ruby script\generate scaffold product title:string description:text image_url:string * This create (for example) a migration file called 20080910122415\_create\_products.rb * You apply the migration with rake db:migrate * Now, you add a field to the product table with ruby script\generate migration add\_price\_to\_product price:decimal * This create a migration file called 20080910125745\_add\_price\_to\_product.rb * If you try to run rake db:migrate, it will actually revert the first migration, not apply the next one! So your product table will get destroyed! * But if you ran rake alone, it would have told you that one migration was pending Pls note that applying rake db:migrate (once the table has been destroyed) will apply all migrations in order. The only workaround I found is to specify the version of the new migration as in: rake db:migrate version=20080910125745 So I'm wondering: is this an expected new behavior? Thanks, Rollo
ruby-on-rails
activerecord
migration
null
null
null
open
rake db:migrate doesn't detect new migration ? === Experienced with Rails / ActiveRecord 2.1.1 * You create a first version with (for example) ruby script\generate scaffold product title:string description:text image_url:string * This create (for example) a migration file called 20080910122415\_create\_products.rb * You apply the migration with rake db:migrate * Now, you add a field to the product table with ruby script\generate migration add\_price\_to\_product price:decimal * This create a migration file called 20080910125745\_add\_price\_to\_product.rb * If you try to run rake db:migrate, it will actually revert the first migration, not apply the next one! So your product table will get destroyed! * But if you ran rake alone, it would have told you that one migration was pending Pls note that applying rake db:migrate (once the table has been destroyed) will apply all migrations in order. The only workaround I found is to specify the version of the new migration as in: rake db:migrate version=20080910125745 So I'm wondering: is this an expected new behavior? Thanks, Rollo
0
70,324
09/16/2008 08:22:35
11,193
09/16/2008 06:02:43
11
0
Java inner class and nested class
What is the main difference between a inner class and a nested class in Java? Does design /implementation play a role in choosing any of these?
java
null
null
null
null
null
open
Java inner class and nested class === What is the main difference between a inner class and a nested class in Java? Does design /implementation play a role in choosing any of these?
0
70,347
09/16/2008 08:25:33
3,279
08/27/2008 16:46:21
1,374
52
Zlib-compatible compression streams?
Are System.IO.Compression.GZipStream or System.IO.Compression.Deflate compatible with zlib compression?
c#
compression
zlib
null
null
null
open
Zlib-compatible compression streams? === Are System.IO.Compression.GZipStream or System.IO.Compression.Deflate compatible with zlib compression?
0
70,361
09/16/2008 08:29:06
832
08/09/2008 06:51:40
3,935
251
ASP.NET Custom Control Styling
I am in the process of beginning work on several ASP.NET custom controls. I was wondering if I could get some input on your guys/girls thoughts on how you apply styling to your controls. I would rather push it so CSS, so for the few controls I have done in the past, I have simply stuck a string property which allows you so type in the string which in then slung in a "*style*" attribute when rendering. I know I could also use the "**CSSClass**" property and apply the "*class*" attribute. I have not done much in the way of creating a "proper" **Style** property (in which you actually save the style object, and use the designer to specify its values). This to me seems like a lot of work, and TBH, I hate the Style editor UI and would much rather type in the CSS/class name to apply.. ##What are your thoughts on this? _ _ _ **Note:** This is kind of subjective - so to be clear: **The accepted answer will be the one that:** * Offers the pro's and con's of the various approaches. * Opinions are welcome, but a good answer should be constructive. * Backs it up with some real-world knowledge/experience. There is **nothing** wrong *with* subjectivity. There **is a problem** with people *being* subjective and not thinking, being constructive or actually providing some insight and experience. **>>DO NOT<<** tag this as "subjective" - that tag is a waste of time. "subjective" is not a technology or a category that people will look for. Fix the question rather than brush it off.
asp.net
custom-server-controls
styles
null
null
null
open
ASP.NET Custom Control Styling === I am in the process of beginning work on several ASP.NET custom controls. I was wondering if I could get some input on your guys/girls thoughts on how you apply styling to your controls. I would rather push it so CSS, so for the few controls I have done in the past, I have simply stuck a string property which allows you so type in the string which in then slung in a "*style*" attribute when rendering. I know I could also use the "**CSSClass**" property and apply the "*class*" attribute. I have not done much in the way of creating a "proper" **Style** property (in which you actually save the style object, and use the designer to specify its values). This to me seems like a lot of work, and TBH, I hate the Style editor UI and would much rather type in the CSS/class name to apply.. ##What are your thoughts on this? _ _ _ **Note:** This is kind of subjective - so to be clear: **The accepted answer will be the one that:** * Offers the pro's and con's of the various approaches. * Opinions are welcome, but a good answer should be constructive. * Backs it up with some real-world knowledge/experience. There is **nothing** wrong *with* subjectivity. There **is a problem** with people *being* subjective and not thinking, being constructive or actually providing some insight and experience. **>>DO NOT<<** tag this as "subjective" - that tag is a waste of time. "subjective" is not a technology or a category that people will look for. Fix the question rather than brush it off.
0
70,366
09/16/2008 08:30:42
7,873
09/15/2008 14:35:39
1
3
cvs error on checkin
When trying to commit to cvs I get this error Assertion failed: key != NULL, file hash.c, line 317 Any idea how to fix it so I can check my code in?
cvs
null
null
null
null
null
open
cvs error on checkin === When trying to commit to cvs I get this error Assertion failed: key != NULL, file hash.c, line 317 Any idea how to fix it so I can check my code in?
0
70,371
09/16/2008 08:31:30
11,334
09/16/2008 07:13:16
1
1
Asp.net MVC routing ambiguous, two paths for same page
I'm trying out ASP.NET MVC routing and have of course stumbled across a problem. I have a section, /Admin/Pages/, and this is also accessible through /Pages/, which it shouldn't. What could I be missing? The routing code in global.asax: public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Pages", // Route name "Admin/Pages/{action}/{id}", // URL with parameters new { controller = "Pages", action = "Index", id = "" } // Parameter defaults ); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); } Thanks!
asp.net-mvc
routing
null
null
null
null
open
Asp.net MVC routing ambiguous, two paths for same page === I'm trying out ASP.NET MVC routing and have of course stumbled across a problem. I have a section, /Admin/Pages/, and this is also accessible through /Pages/, which it shouldn't. What could I be missing? The routing code in global.asax: public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Pages", // Route name "Admin/Pages/{action}/{id}", // URL with parameters new { controller = "Pages", action = "Index", id = "" } // Parameter defaults ); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); } Thanks!
0
70,377
09/16/2008 08:32:09
11,387
09/16/2008 07:32:15
1
0
Remove VSMacros80 directory
Is there any way to prevent Visual Studio from creating a VSMacros80 folder in my default project directory?
visual-studio
vs2005
null
null
null
null
open
Remove VSMacros80 directory === Is there any way to prevent Visual Studio from creating a VSMacros80 folder in my default project directory?
0
70,386
09/16/2008 08:34:36
11,449
09/16/2008 08:03:12
1
2
Icons on menus of MFC Feature Pack classes
There are three places where menus show up in the new MFC functionality (Feature Pack): - In menu bars (CMFCMenuBar) - In popup menus (CMFCPopupMenu) - In the 'dropdown menu' version of CMFCButton I want to put icons (high-color and with transparancy) in the menus in all of them. I have found CFrameWndEx::OnDrawMenuImage() which I can use to custom draw the icons in front of the menu bar items. It's not very convenient, having to implement icon drawing in 2008, but it works. For the others I haven't found a solution yet. Is there an automagic way to set icons for menus?
mfc
null
null
null
null
null
open
Icons on menus of MFC Feature Pack classes === There are three places where menus show up in the new MFC functionality (Feature Pack): - In menu bars (CMFCMenuBar) - In popup menus (CMFCPopupMenu) - In the 'dropdown menu' version of CMFCButton I want to put icons (high-color and with transparancy) in the menus in all of them. I have found CFrameWndEx::OnDrawMenuImage() which I can use to custom draw the icons in front of the menu bar items. It's not very convenient, having to implement icon drawing in 2008, but it works. For the others I haven't found a solution yet. Is there an automagic way to set icons for menus?
0
70,389
09/16/2008 08:34:53
8,633
09/15/2008 16:30:34
1
0
What is the Simplest Tomcat/Apache Connector (Windows)?
I have apache 2.2 and tomcat 5.5 running on a Windows XP machine. Which tomcat/apache connector is the easiest to set up and is well documented?
windows
apache
tomcat
connector
null
null
open
What is the Simplest Tomcat/Apache Connector (Windows)? === I have apache 2.2 and tomcat 5.5 running on a Windows XP machine. Which tomcat/apache connector is the easiest to set up and is well documented?
0
70,392
09/16/2008 08:35:24
11,438
09/16/2008 07:58:12
1
1
Is there a distributed VCS that can manage large files?
Is there a distributed version control system (git, bazaar, mercurial, darcs etc.) that can handle files larger than available RAM? I need to be able to commit large binary files (i.e. datasets, source video/images, archives), so I don't need to be able to diff them, just be able to commit and then update when the file changes. I last looked at this about a year ago, and none of the obvious candidates allowed this, since they're all designed to diff in memory for speed. That left me with a VCS for managing code and something else ("asset management" software or just rsync and scripts) for large files, which is pretty ugly when the directory structures of the two overlap.
dvcs
vcs
null
null
null
null
open
Is there a distributed VCS that can manage large files? === Is there a distributed version control system (git, bazaar, mercurial, darcs etc.) that can handle files larger than available RAM? I need to be able to commit large binary files (i.e. datasets, source video/images, archives), so I don't need to be able to diff them, just be able to commit and then update when the file changes. I last looked at this about a year ago, and none of the obvious candidates allowed this, since they're all designed to diff in memory for speed. That left me with a VCS for managing code and something else ("asset management" software or just rsync and scripts) for large files, which is pretty ugly when the directory structures of the two overlap.
0
70,397
09/16/2008 08:36:12
11,284
09/16/2008 06:50:26
1
0
How should Rails models containing database and non-database datasources be broken up?
So I'm working on a Rails app to get the feeling for the whole thing. I've got a `Product` model that's a standard ActiveRecord model. However, I also want to get some additional product info from Amazon ECS. So my complete model gets some of its info from the database and some from the web service. My question is, should I: 1. Make two models a Product and a ProductAWS, and then tie them together at the controller level. 2. Have the Product ActiveRecord model contain a ProductAWS object that does all the AWS stuff? 3. Just add all the AWS functionality to my Product model. 4. ???
ruby
ruby-on-rails
null
null
null
null
open
How should Rails models containing database and non-database datasources be broken up? === So I'm working on a Rails app to get the feeling for the whole thing. I've got a `Product` model that's a standard ActiveRecord model. However, I also want to get some additional product info from Amazon ECS. So my complete model gets some of its info from the database and some from the web service. My question is, should I: 1. Make two models a Product and a ProductAWS, and then tie them together at the controller level. 2. Have the Product ActiveRecord model contain a ProductAWS object that does all the AWS stuff? 3. Just add all the AWS functionality to my Product model. 4. ???
0
405,560
01/01/2009 22:15:11
28,343
10/15/2008 18:38:42
157
13
How to get t4 files to build in visual studio?
When I build my c# solution the .tt files will not create the .cs file outputs. But if I right click the .tt files one at a time in solution explorer and select "Run Custom Tool" the .cs is generated, so the build tool setting is correct. What do I do to get the overall solution build to force the custom tool to run on the .tt files?
visual-studio
t4
null
null
null
null
open
How to get t4 files to build in visual studio? === When I build my c# solution the .tt files will not create the .cs file outputs. But if I right click the .tt files one at a time in solution explorer and select "Run Custom Tool" the .cs is generated, so the build tool setting is correct. What do I do to get the overall solution build to force the custom tool to run on the .tt files?
0
405,776
01/02/2009 01:05:49
4,653
09/05/2008 00:53:33
1,232
14
64bit upgrade
Whats the best resource to look at for when migrating dotnet applications from 32bit to 64bit.
c#
upgrade
null
null
null
null
open
64bit upgrade === Whats the best resource to look at for when migrating dotnet applications from 32bit to 64bit.
0
406,640
01/02/2009 12:17:29
27,294
10/13/2008 02:02:03
1,933
110
Vertical center an anchor tag within a fieldset
I am trying to vertically center an anchor within a fieldset using CSS but it always appears to align to bottom. Is there any tricks to this?
css
fieldset
anchor
html
null
null
open
Vertical center an anchor tag within a fieldset === I am trying to vertically center an anchor within a fieldset using CSS but it always appears to align to bottom. Is there any tricks to this?
0
70,402
09/16/2008 08:37:52
1,721
08/18/2008 09:58:47
113
12
Why is quicksort better than mergesort?
I was asked this question during an interview. They're both O(nlogn) and yet most people use Quicksort instead of Mergesort. Why is that?
language-agnostic
algorithm
null
null
null
null
open
Why is quicksort better than mergesort? === I was asked this question during an interview. They're both O(nlogn) and yet most people use Quicksort instead of Mergesort. Why is that?
0
70,405
09/16/2008 08:38:15
432
08/05/2008 17:18:46
1,035
44
Does C# have a String Tokenizer like Java's?
I'm doing simple string input parsing and I am in need of a string tokenizer. I am new to C# but have programmed Java, and it seems natural that C# should have a string tokenizer. Does it? Where is it? How do I use it?
c#
string
parsing
null
null
null
open
Does C# have a String Tokenizer like Java's? === I'm doing simple string input parsing and I am in need of a string tokenizer. I am new to C# but have programmed Java, and it seems natural that C# should have a string tokenizer. Does it? Where is it? How do I use it?
0
70,417
09/16/2008 08:40:16
11,498
09/16/2008 08:38:54
1
0
MS Access - Controlling another database in VBA
I have the following code: Dim obj As New Access.Application obj.OpenCurrentDatabase (CurrentProject.Path & "\Working.mdb") obj.Run "Routine" obj.CloseCurrentDatabase Set obj = Nothing The problem I'm experimenting is a pop-up that tells me Access can't set the focus on the other database. As you can see from the code, I want to run a Subroutine in another mdb. Any other way to achieve this will be appreciated. I'm working with MS Access 2003 Cheers
vba
access
ms
null
null
null
open
MS Access - Controlling another database in VBA === I have the following code: Dim obj As New Access.Application obj.OpenCurrentDatabase (CurrentProject.Path & "\Working.mdb") obj.Run "Routine" obj.CloseCurrentDatabase Set obj = Nothing The problem I'm experimenting is a pop-up that tells me Access can't set the focus on the other database. As you can see from the code, I want to run a Subroutine in another mdb. Any other way to achieve this will be appreciated. I'm working with MS Access 2003 Cheers
0
70,446
09/16/2008 08:46:33
10,322
09/15/2008 22:25:40
207
15
Which ruby interpreter are you looking forward to?
There are multiple Ruby implementations in the works right now. Which are you looking forward to and why? Do you actively use a non-MRI implementation in production? Some of the options include: - [Ruby MRI (original 1.8 branch)][1] - [YARV (official 1.9)][2] - [JRuby][3] - [Rubinius][4] (homepage appeared down at time of posting) - [IronRuby][5] [1]: http://en.wikipedia.org/wiki/Ruby_MRI [2]: http://www.atdot.net/yarv/ [3]: http://jruby.codehaus.org/ [4]: http://en.wikipedia.org/wiki/Rubinius [5]: http://ironruby.rubyforge.org/
ruby
ironruby
rubinius
yarv
jruby
null
open
Which ruby interpreter are you looking forward to? === There are multiple Ruby implementations in the works right now. Which are you looking forward to and why? Do you actively use a non-MRI implementation in production? Some of the options include: - [Ruby MRI (original 1.8 branch)][1] - [YARV (official 1.9)][2] - [JRuby][3] - [Rubinius][4] (homepage appeared down at time of posting) - [IronRuby][5] [1]: http://en.wikipedia.org/wiki/Ruby_MRI [2]: http://www.atdot.net/yarv/ [3]: http://jruby.codehaus.org/ [4]: http://en.wikipedia.org/wiki/Rubinius [5]: http://ironruby.rubyforge.org/
0
70,450
09/16/2008 08:47:28
8,446
09/15/2008 16:03:14
34
4
Is it worth encrypting email addresses in the database?
I'm already using [salted hashing][1] to store passwords in my database, which means that I should be immune to [rainbow table][2] attacks. I had a thought, though: what if someone does get hold of my database? It contains the users' email addresses. I can't really hash these, because I'll be using them to send notification emails, etc.. Should I encrypt them? [1]: http://www.matasano.com/log/958/enough-with-the-rainbow-tables-what-you-need-to-know-about-secure-password-schemes/ [2]: http://en.wikipedia.org/wiki/Rainbow_table
email
encryption
hash
null
null
null
open
Is it worth encrypting email addresses in the database? === I'm already using [salted hashing][1] to store passwords in my database, which means that I should be immune to [rainbow table][2] attacks. I had a thought, though: what if someone does get hold of my database? It contains the users' email addresses. I can't really hash these, because I'll be using them to send notification emails, etc.. Should I encrypt them? [1]: http://www.matasano.com/log/958/enough-with-the-rainbow-tables-what-you-need-to-know-about-secure-password-schemes/ [2]: http://en.wikipedia.org/wiki/Rainbow_table
0
70,453
09/16/2008 08:47:52
11,372
09/16/2008 07:29:09
6
0
Which Scripting language is best?
For writing scripts for process automisation in Linux platform, which scripting language will be better? Shell script, Perl or Python or is there anything else? I am new to all of them. So, am just thinking to which one to go for?
scripting
language
null
null
null
09/13/2011 12:52:57
not constructive
Which Scripting language is best? === For writing scripts for process automisation in Linux platform, which scripting language will be better? Shell script, Perl or Python or is there anything else? I am new to all of them. So, am just thinking to which one to go for?
4
70,455
09/16/2008 08:48:57
11,333
09/16/2008 07:13:03
18
3
Cross-server SQL
I want to port data from one server's database to another server's database. The databases are both on a different mssql 2005 server. Replication is probably not an option since the destination database is generated from scratch on a [time interval] basis. Preferebly I would do something like insert * from db1/table1 into db2/table2 where rule1 = true It's obvious that connection credentials would go in somehwere in this script.
sql
sql-server
tsql
cross-server
null
null
open
Cross-server SQL === I want to port data from one server's database to another server's database. The databases are both on a different mssql 2005 server. Replication is probably not an option since the destination database is generated from scratch on a [time interval] basis. Preferebly I would do something like insert * from db1/table1 into db2/table2 where rule1 = true It's obvious that connection credentials would go in somehwere in this script.
0
70,460
09/16/2008 08:49:52
1,721
08/18/2008 09:58:47
133
13
Can we achieve 100% decoupling?
Can we achieve 100% decoupling between components of a system or different systems that communicate with each other? I don't think its possible. If two systems communicate with each other then there should be some degree of coupling between them. Am I right?
language-agnostic
design
null
null
null
null
open
Can we achieve 100% decoupling? === Can we achieve 100% decoupling between components of a system or different systems that communicate with each other? I don't think its possible. If two systems communicate with each other then there should be some degree of coupling between them. Am I right?
0
70,471
09/16/2008 08:52:01
227
08/03/2008 17:53:19
1,368
64
(no) Properties in Java?
So, I have willfully kept myself a Java n00b until recently, and my first real exposure brought about a minor shock: Java does not have C# style properties! Ok, I can live with that. However, I can also swear that I have seen property getter/setter code in Java in one codebase, but I cannot remember where. How was that achieved? Is there a language extension for that? Is it related to NetBeans or something? Help a total idiot pls, thx.
java
null
null
null
null
null
open
(no) Properties in Java? === So, I have willfully kept myself a Java n00b until recently, and my first real exposure brought about a minor shock: Java does not have C# style properties! Ok, I can live with that. However, I can also swear that I have seen property getter/setter code in Java in one codebase, but I cannot remember where. How was that achieved? Is there a language extension for that? Is it related to NetBeans or something? Help a total idiot pls, thx.
0
70,482
09/16/2008 08:53:33
9,784
09/15/2008 19:57:35
1
0
How do you unit-test code that interacts with and instantiates third-party COM objects?
One of the biggest issues currently holding me back from diving full steam into unit testing is that a really large percentage of the code I write is heavily dependent on third-party COM objects from different sources that also tend to interact with each other (I'm writing add-ins for Microsoft Office using several helper libraries if you need to know). I know I should probably use mock objects but how exactly would I go about that in this case? I can see that it's relatively easy when I just have to pass a reference to an already existing object but some of my routines instantiate external COM objects themselves and then sometimes pass them on to some other external COM-object from yet a different library. What is the best-practice approach here? Should I have my testing code temporarily change the COM registration information in the registry so the tested code will instantiate one of my mock objects instead? Should I inject modified type library units? What other approaches are there? I would be especially grateful for examples or tools for Delphi but would be just as happy with more general advice and higher-level explanations just as well. Thanks, Oliver
unit-testing
delphi
com
mocking
null
null
open
How do you unit-test code that interacts with and instantiates third-party COM objects? === One of the biggest issues currently holding me back from diving full steam into unit testing is that a really large percentage of the code I write is heavily dependent on third-party COM objects from different sources that also tend to interact with each other (I'm writing add-ins for Microsoft Office using several helper libraries if you need to know). I know I should probably use mock objects but how exactly would I go about that in this case? I can see that it's relatively easy when I just have to pass a reference to an already existing object but some of my routines instantiate external COM objects themselves and then sometimes pass them on to some other external COM-object from yet a different library. What is the best-practice approach here? Should I have my testing code temporarily change the COM registration information in the registry so the tested code will instantiate one of my mock objects instead? Should I inject modified type library units? What other approaches are there? I would be especially grateful for examples or tools for Delphi but would be just as happy with more general advice and higher-level explanations just as well. Thanks, Oliver
0
70,487
09/16/2008 08:54:01
11,432
09/16/2008 07:56:30
1
0
Mono's DateTime Serialization
if you uses Mono Remoting on Linux, what's your work-around for DateTime marshalling incompatibility between Mono and .NET Remoting? i'm using WinForms on Windows using .NET 2.0 runtime, using Remoting on Linux using Mono. i cannot yet use Mono runtime on both ends as Mono's DataGridView isn't yet working fully on Mono
.net
datetime
mono
remoting
null
null
open
Mono's DateTime Serialization === if you uses Mono Remoting on Linux, what's your work-around for DateTime marshalling incompatibility between Mono and .NET Remoting? i'm using WinForms on Windows using .NET 2.0 runtime, using Remoting on Linux using Mono. i cannot yet use Mono runtime on both ends as Mono's DataGridView isn't yet working fully on Mono
0
70,501
09/16/2008 08:55:38
7,724
09/15/2008 14:17:56
16
3
Exposing nested arrays to COM from .NET
I have a method in .NET (C#) which returns string[][]. When using RegAsm or TlbExp (from the .NET 2.0 SDK) to create a COM type library for the containing assembly, I get the following warning: > WARNING: There is no marshaling support for nested arrays. This warning results in the method in question not being exported into the generated type library. I've been told there's ways around this using Variant as the COM return type, and then casting/etc on the COM client side. For this particular assembly, the target client audience is VB6. <b>But how do you actually do this on the .NET side?</b> <i>Note</i>: I have an existing legacy DLL (with its exported type library) where the return type is Variant, but this DLL (and the .tlb) is generated using pre-.NET legacy tools, so I can't use them. Would it help at all if the assembly was written in VB.NET instead?
.net
vb6
com
marshaling
tlbexp
null
open
Exposing nested arrays to COM from .NET === I have a method in .NET (C#) which returns string[][]. When using RegAsm or TlbExp (from the .NET 2.0 SDK) to create a COM type library for the containing assembly, I get the following warning: > WARNING: There is no marshaling support for nested arrays. This warning results in the method in question not being exported into the generated type library. I've been told there's ways around this using Variant as the COM return type, and then casting/etc on the COM client side. For this particular assembly, the target client audience is VB6. <b>But how do you actually do this on the .NET side?</b> <i>Note</i>: I have an existing legacy DLL (with its exported type library) where the return type is Variant, but this DLL (and the .tlb) is generated using pre-.NET legacy tools, so I can't use them. Would it help at all if the assembly was written in VB.NET instead?
0
70,516
09/16/2008 08:57:04
966
08/11/2008 07:35:55
58
5
What is the correct way of getting the start and end date of a ISO week number in TSQL?
I have the ISO week and year but how do I correctly convert that into two dates representing the start and end of that week?
tsql
datetime-operation
iso
null
null
null
open
What is the correct way of getting the start and end date of a ISO week number in TSQL? === I have the ISO week and year but how do I correctly convert that into two dates representing the start and end of that week?
0
70,524
09/16/2008 08:58:58
4,787
09/05/2008 15:36:12
27
1
How does a Rails developer talk to Flex front ends?
I'm looking at Rails development as a backend to a Flex application and am trying to figure out the communication layer between the Rails app and the Flash Player. All of the things I am finding suggest using SOAP web services to communicate. However, Flash supports AMF which is nice and fast (and native). Is there any way of communicating over AMF from a Rails app, whilst supporting all the "nice" things about AMF (automatic type conversion, data push etc).
ruby-on-rails
flex
null
null
null
null
open
How does a Rails developer talk to Flex front ends? === I'm looking at Rails development as a backend to a Flex application and am trying to figure out the communication layer between the Rails app and the Flash Player. All of the things I am finding suggest using SOAP web services to communicate. However, Flash supports AMF which is nice and fast (and native). Is there any way of communicating over AMF from a Rails app, whilst supporting all the "nice" things about AMF (automatic type conversion, data push etc).
0
70,528
09/16/2008 08:59:32
10,078
09/15/2008 21:06:11
36
15
Why are Python's 'private' methods not actually private?
Python gives us the ability to create 'private' methods and variables within a class by prepending double underscores to the name, like so: *__myPrivateMethod()*. How, then, can one explain this <pre><code>>>> class MyClass: ... def myPublicMethod(self): ... print 'public method' ... def __myPrivateMethod(self): ... print 'this is private!!' ... >>> obj = MyClass() >>> obj.myPublicMethod() public method >>> obj.__myPrivateMethod() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: MyClass instance has no attribute '__myPrivateMethod' >>> dir(obj) ['_MyClass__myPrivateMethod', '__doc__', '__module__', 'myPublicMethod'] >>> obj._MyClass__myPrivateMethod() this is private!! </code></pre> What's the deal?! I'll explain this a little for those who didn't quite get that. <pre><code>>>> class MyClass: ... def myPublicMethod(self): ... print 'public method' ... def __myPrivateMethod(self): ... print 'this is private!!' ... >>> obj = MyClass() </code></pre> What I did there is create a class with a public method and a private method and instantiate it. Next, I call it's public method. <pre><code>>>> obj.myPublicMethod() public method </code></pre> Next, I try and call it's private method. <pre><code>>>> obj.__myPrivateMethod() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: MyClass instance has no attribute '__myPrivateMethod' </code></pre> Everything looks good here; we're unable to call it. It is, in fact, 'private'. Well, actually it isn't. Running _dir()_ on the object reveals a new magical method that python creates magically for all of your 'private' methods. <pre><code>>>> dir(obj) ['_MyClass__myPrivateMethod', '__doc__', '__module__', 'myPublicMethod'] </code></pre> This new method's name is always an underscore, followed by the class name, followed by the method name. <pre><code>>>> obj._MyClass__myPrivateMethod() this is private!! </code></pre> So much for encapsulation, eh? In any case, I'd always heard Python doesn't support encapsulation, so why even try? What gives?
python
encapsulation
information-hiding
null
null
null
open
Why are Python's 'private' methods not actually private? === Python gives us the ability to create 'private' methods and variables within a class by prepending double underscores to the name, like so: *__myPrivateMethod()*. How, then, can one explain this <pre><code>>>> class MyClass: ... def myPublicMethod(self): ... print 'public method' ... def __myPrivateMethod(self): ... print 'this is private!!' ... >>> obj = MyClass() >>> obj.myPublicMethod() public method >>> obj.__myPrivateMethod() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: MyClass instance has no attribute '__myPrivateMethod' >>> dir(obj) ['_MyClass__myPrivateMethod', '__doc__', '__module__', 'myPublicMethod'] >>> obj._MyClass__myPrivateMethod() this is private!! </code></pre> What's the deal?! I'll explain this a little for those who didn't quite get that. <pre><code>>>> class MyClass: ... def myPublicMethod(self): ... print 'public method' ... def __myPrivateMethod(self): ... print 'this is private!!' ... >>> obj = MyClass() </code></pre> What I did there is create a class with a public method and a private method and instantiate it. Next, I call it's public method. <pre><code>>>> obj.myPublicMethod() public method </code></pre> Next, I try and call it's private method. <pre><code>>>> obj.__myPrivateMethod() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: MyClass instance has no attribute '__myPrivateMethod' </code></pre> Everything looks good here; we're unable to call it. It is, in fact, 'private'. Well, actually it isn't. Running _dir()_ on the object reveals a new magical method that python creates magically for all of your 'private' methods. <pre><code>>>> dir(obj) ['_MyClass__myPrivateMethod', '__doc__', '__module__', 'myPublicMethod'] </code></pre> This new method's name is always an underscore, followed by the class name, followed by the method name. <pre><code>>>> obj._MyClass__myPrivateMethod() this is private!! </code></pre> So much for encapsulation, eh? In any case, I'd always heard Python doesn't support encapsulation, so why even try? What gives?
0
70,529
09/16/2008 08:59:57
6,984
09/15/2008 12:57:10
35
1
Counting occurrences in vim
In order to know how many times a pattern exists in current buffer, I do: :%s/pattern-here/pattern-here/g It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status. Is there a more elegant way to count?
vim
null
null
null
null
null
open
Counting occurrences in vim === In order to know how many times a pattern exists in current buffer, I do: :%s/pattern-here/pattern-here/g It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status. Is there a more elegant way to count?
0
70,537
09/16/2008 09:00:27
11,193
09/16/2008 06:02:43
20
0
Cheat single inheritance in Java
I have heard there is a way to cheat single inheritance and implement multiple inheritance in Java. Does anyone know how to implement this?
java
null
null
null
null
null
open
Cheat single inheritance in Java === I have heard there is a way to cheat single inheritance and implement multiple inheritance in Java. Does anyone know how to implement this?
0
70,554
09/16/2008 09:03:43
2,846
08/25/2008 14:06:29
51
6
How to conduct blackbox testing on an AJAX application?
What's the best, crossplatform way to perform blackbox tests on AJAX web applications? Ideally, the solution should have the following attributes: <ul> <li>Able to integrate into a continuous integration build loop</li> <li>Cross platform so I you can run it on Windows laptops and Linux continuous integration servers</li> <li>Easy way to script the interactions</li> <li>Free-as-in-freedom so you can adapt it into your tool chain if necessary</li> </ul> I've looked into HttpUnit but I'm not conviced it can handle AJAX-heavy websites.
.net
java
javascript
testing
ajax
null
open
How to conduct blackbox testing on an AJAX application? === What's the best, crossplatform way to perform blackbox tests on AJAX web applications? Ideally, the solution should have the following attributes: <ul> <li>Able to integrate into a continuous integration build loop</li> <li>Cross platform so I you can run it on Windows laptops and Linux continuous integration servers</li> <li>Easy way to script the interactions</li> <li>Free-as-in-freedom so you can adapt it into your tool chain if necessary</li> </ul> I've looked into HttpUnit but I'm not conviced it can handle AJAX-heavy websites.
0
70,560
09/16/2008 09:04:44
2,077
08/20/2008 07:26:21
444
9
How do I compare phrases for similarity?
When entering a question, stackoverflow presents you with a list of questions that it thinks likely to cover the same topic. I have seen similar features on other sites or in other programs, too (Help file systems, for example), but I've never programmed something like this myself. Now I'm curious to know what sort of algorithm one would use for that. The first approach that comes to my mind is splitting the phrase into words and look for phrases containing these words. Before you do that, you probably want to throw away insignificant words (like 'the', 'a', 'does' etc), and then you will want to rank the results. Hey, wait - let's do that for web pages, and then we can have a ... watchamacallit ... - a "search engine", and then we can sell ads, and then ... No, seriously, what are the common ways to solve this problem?
algorithm
full-text-search
null
null
null
null
open
How do I compare phrases for similarity? === When entering a question, stackoverflow presents you with a list of questions that it thinks likely to cover the same topic. I have seen similar features on other sites or in other programs, too (Help file systems, for example), but I've never programmed something like this myself. Now I'm curious to know what sort of algorithm one would use for that. The first approach that comes to my mind is splitting the phrase into words and look for phrases containing these words. Before you do that, you probably want to throw away insignificant words (like 'the', 'a', 'does' etc), and then you will want to rank the results. Hey, wait - let's do that for web pages, and then we can have a ... watchamacallit ... - a "search engine", and then we can sell ads, and then ... No, seriously, what are the common ways to solve this problem?
0
70,573
09/16/2008 09:07:42
11,372
09/16/2008 07:29:09
13
0
Best online source to learn Perl?
For a beginner, What is the best online resource to learn Perl?
perl
null
null
null
null
09/21/2011 06:56:52
not constructive
Best online source to learn Perl? === For a beginner, What is the best online resource to learn Perl?
4
70,575
09/16/2008 09:07:49
11,554
09/16/2008 09:07:49
1
0
Virtual Constructors.
Is there any need of a Virtual Constructors? If so can any one post a scenario?
virtual
constructor
scenarios
null
null
null
open
Virtual Constructors. === Is there any need of a Virtual Constructors? If so can any one post a scenario?
0
70,577
09/16/2008 09:08:47
11,372
09/16/2008 07:29:09
11
0
Best online resource to learn Python?
For a beginner, What is the best online resource to learn Python?
python
null
null
null
null
06/28/2011 12:21:03
not constructive
Best online resource to learn Python? === For a beginner, What is the best online resource to learn Python?
4
70,587
09/16/2008 09:10:11
11,505
09/16/2008 08:41:36
1
2
What are your most important console aliases?
Which one alias would you choose to keep if your .bash_alias/.bashrc/etc could only contain one line?
bash
console
alias
null
null
null
open
What are your most important console aliases? === Which one alias would you choose to keep if your .bash_alias/.bashrc/etc could only contain one line?
0
70,602
09/16/2008 09:11:44
6,910
09/15/2008 12:48:35
31
7
What is the minimum client footprint required to connect C# to an Oracle database?
I have successfully connected to an Oracle database (10g) from C# (Visual Studio 2008) by downloading and installing the client administration tools and Visual Studio 2008 on my laptop. The installation footprint for Oracle Client tools was over 200Mb, and quite long winded. Does anyone know what the minimum workable footprint is? I am hoping that it's a single DLL and a register command, but I have the feeling I need to install an oracle home, and set various environment variables. I am using Oracle.DataAccess in my code.
c#
oracle
client
null
null
null
open
What is the minimum client footprint required to connect C# to an Oracle database? === I have successfully connected to an Oracle database (10g) from C# (Visual Studio 2008) by downloading and installing the client administration tools and Visual Studio 2008 on my laptop. The installation footprint for Oracle Client tools was over 200Mb, and quite long winded. Does anyone know what the minimum workable footprint is? I am hoping that it's a single DLL and a register command, but I have the feeling I need to install an oracle home, and set various environment variables. I am using Oracle.DataAccess in my code.
0
70,614
09/16/2008 09:12:43
6,414
09/15/2008 09:37:56
11
5
GNU Screen Suvival Guide
What do people think are not only the essential things you need to know about screen but the things that you'd teach someone from the ground up. I've just introduce a friend to Screen and they're having a hard time getting used to it. So analogies and handy tips for remembering binds etc would be awesome. Thanks
screen
suvivalguide
null
null
null
null
open
GNU Screen Suvival Guide === What do people think are not only the essential things you need to know about screen but the things that you'd teach someone from the ground up. I've just introduce a friend to Screen and they're having a hard time getting used to it. So analogies and handy tips for remembering binds etc would be awesome. Thanks
0
70,625
09/16/2008 09:13:33
11,574
09/16/2008 09:13:33
1
0
Refactoring two basic classes
How would you refactor these two classes to abstract out the similarities? An abstract class? Simple inheritance? What would the refactored class(es) look like? public class LanguageCode { /// <summary> /// Get the lowercase two-character ISO 639-1 language code. /// </summary> public readonly string Value; public LanguageCode(string language) { this.Value = new CultureInfo(language).TwoLetterISOLanguageName; } public static LanguageCode TryParse(string language) { if (language == null) { return null; } if (language.Length > 2) { language = language.Substring(0, 2); } try { return new LanguageCode(language); } catch (ArgumentException) { return null; } } } public class RegionCode { /// <summary> /// Get the uppercase two-character ISO 3166 region/country code. /// </summary> public readonly string Value; public RegionCode(string region) { this.Value = new RegionInfo(region).TwoLetterISORegionName; } public static RegionCode TryParse(string region) { if (region == null) { return null; } if (region.Length > 2) { region = region.Substring(0, 2); } try { return new RegionCode(region); } catch (ArgumentException) { return null; } } }
cultureinfo
regioninfo
null
null
null
null
open
Refactoring two basic classes === How would you refactor these two classes to abstract out the similarities? An abstract class? Simple inheritance? What would the refactored class(es) look like? public class LanguageCode { /// <summary> /// Get the lowercase two-character ISO 639-1 language code. /// </summary> public readonly string Value; public LanguageCode(string language) { this.Value = new CultureInfo(language).TwoLetterISOLanguageName; } public static LanguageCode TryParse(string language) { if (language == null) { return null; } if (language.Length > 2) { language = language.Substring(0, 2); } try { return new LanguageCode(language); } catch (ArgumentException) { return null; } } } public class RegionCode { /// <summary> /// Get the uppercase two-character ISO 3166 region/country code. /// </summary> public readonly string Value; public RegionCode(string region) { this.Value = new RegionInfo(region).TwoLetterISORegionName; } public static RegionCode TryParse(string region) { if (region == null) { return null; } if (region.Length > 2) { region = region.Substring(0, 2); } try { return new RegionCode(region); } catch (ArgumentException) { return null; } } }
0
70,643
09/16/2008 09:16:02
5,025
09/07/2008 12:35:30
1
0
Setting Excel Number Format via xlcFormatNumber in an xll
I'm trying to set the number format of a cell but the call to xlcFormatNumber fails leaving the cell number format as "General". I can successfully set the value of the cell using xlSet. XLOPER xRet; XLOPER xRef; //try to set the format of cell A1 xRef.xltype = xltypeSRef; xRef.val.sref.count = 1; xRef.val.sref.ref.rwFirst = 0; xRef.val.sref.ref.rwLast = 0; xRef.val.sref.ref.colFirst = 0; xRef.val.sref.ref.colLast = 0; XLOPER xFormat; xFormat.xltype = xltypeStr; xFormat.val.str = "\4#.00"; //I've tried various formats Excel4( xlcFormatNumber, &xRet, 2, (LPXLOPER)&xRef, (LPXLOPER)&xFormat); I haven't managed to find any documentation regarding the usage of this command. Any help here would be greatly appreciated.
c++
excel
null
null
null
null
open
Setting Excel Number Format via xlcFormatNumber in an xll === I'm trying to set the number format of a cell but the call to xlcFormatNumber fails leaving the cell number format as "General". I can successfully set the value of the cell using xlSet. XLOPER xRet; XLOPER xRef; //try to set the format of cell A1 xRef.xltype = xltypeSRef; xRef.val.sref.count = 1; xRef.val.sref.ref.rwFirst = 0; xRef.val.sref.ref.rwLast = 0; xRef.val.sref.ref.colFirst = 0; xRef.val.sref.ref.colLast = 0; XLOPER xFormat; xFormat.xltype = xltypeStr; xFormat.val.str = "\4#.00"; //I've tried various formats Excel4( xlcFormatNumber, &xRet, 2, (LPXLOPER)&xRef, (LPXLOPER)&xFormat); I haven't managed to find any documentation regarding the usage of this command. Any help here would be greatly appreciated.
0
70,653
09/16/2008 09:17:41
11,563
09/16/2008 09:10:41
1
1
Python Authentication API:
I'm looking for a python library that will help me to create an authentication method for a desktop app I'm writing. I have found several method in web framework such as django or turbogears. I just want a kind of username-password association stored into a local file. I can write it by myself, but I'm really it already exists and will be a better solution (I'm not very fluent with encryption). Thanks in advance for your help Bertrand Cachet
python
authentication
null
null
null
null
open
Python Authentication API: === I'm looking for a python library that will help me to create an authentication method for a desktop app I'm writing. I have found several method in web framework such as django or turbogears. I just want a kind of username-password association stored into a local file. I can write it by myself, but I'm really it already exists and will be a better solution (I'm not very fluent with encryption). Thanks in advance for your help Bertrand Cachet
0
70,668
09/16/2008 09:21:16
11,538
09/16/2008 08:59:15
1
0
VMWare Server: Best way to backup images
What is the best way to backup VMWare Servers (1.0.x)? The virtual machines in question are our development environment, and run isololated from the main network (so you can't just copy data from virtual to real servers). The image files are normally in use and locked when the server is running, so it is difficult to back these up with the machines running. Currently: I manually pause the servers when I leave and have a scheduled task that runs at midnight to robocopy the images to a remote NAS. Is there a better way to do this, ideally without having to remember to pause the virtual machines?
vmware
backup
virtualization
null
null
null
open
VMWare Server: Best way to backup images === What is the best way to backup VMWare Servers (1.0.x)? The virtual machines in question are our development environment, and run isololated from the main network (so you can't just copy data from virtual to real servers). The image files are normally in use and locked when the server is running, so it is difficult to back these up with the machines running. Currently: I manually pause the servers when I leave and have a scheduled task that runs at midnight to robocopy the images to a remote NAS. Is there a better way to do this, ideally without having to remember to pause the virtual machines?
0
70,681
09/16/2008 09:22:36
11,596
09/16/2008 09:22:36
1
0
Python Psycopg error and connection handling (v MySQLdb)
I have a frequent problem with python's psycopg2, stackoverflow may be meant to deal w/ these little problems. Specifically, when I try to add a long sequence to a table, something like each element of a ="""you're an old man, mr grinch""".split() .. I lose my database connection on "you're", probably because of the apostrophe. The particular application is focused on texts with 30,000,000 entries, I don't care about losing the occasional weird word, but does anyone know how to make psycopg and postgres deal with errors without having to reestablish the connection, like MySQLdb? What I do now is: <pre> try: psycopg2.addthings else: psycopg2.connect cursor = sameAsAbove.cursor() keep doing as above </pre> I feel like this slows things down, the postgres version of this particular program is much much slower than the mysqldb version, but faster when retrieving certain things. Could anyone give a suggestion for passing over postgres errors?
python
mysql
psycopg2
null
null
null
open
Python Psycopg error and connection handling (v MySQLdb) === I have a frequent problem with python's psycopg2, stackoverflow may be meant to deal w/ these little problems. Specifically, when I try to add a long sequence to a table, something like each element of a ="""you're an old man, mr grinch""".split() .. I lose my database connection on "you're", probably because of the apostrophe. The particular application is focused on texts with 30,000,000 entries, I don't care about losing the occasional weird word, but does anyone know how to make psycopg and postgres deal with errors without having to reestablish the connection, like MySQLdb? What I do now is: <pre> try: psycopg2.addthings else: psycopg2.connect cursor = sameAsAbove.cursor() keep doing as above </pre> I feel like this slows things down, the postgres version of this particular program is much much slower than the mysqldb version, but faster when retrieving certain things. Could anyone give a suggestion for passing over postgres errors?
0
70,682
09/16/2008 09:22:46
8,516
09/15/2008 16:12:48
1
0
What is the VTable Layout and VTable Pointer Location in C++ Objects in GCC 3.x and 4.x?
I am looking for details of the VTable structure, order and contents, and the location of the vtable pointers within objects. Ideally, this will cover single inheritance, multiple inheritance, and virtual inheritance. References to external documentation would also be appreciated
c++
g++
null
null
null
null
open
What is the VTable Layout and VTable Pointer Location in C++ Objects in GCC 3.x and 4.x? === I am looking for details of the VTable structure, order and contents, and the location of the vtable pointers within objects. Ideally, this will cover single inheritance, multiple inheritance, and virtual inheritance. References to external documentation would also be appreciated
0
70,685
09/16/2008 09:23:54
384
08/05/2008 11:03:36
411
24
Getting Generated HTML in a WCF service.
In the WCF application that I am working on, I need to access the generated source of a particular webpage (after all the AJAX calls on the page are made). I have tried using `System.Net.WebRequest` but it just brings me back the original source of the page. Is there a way to execute a page and then get the source? Else, is there a way to execute Javascript from within a WCF service? I could use the javascript and JSON response to create the HTML page from within my webservice then!
c#
wcf
null
null
null
null
open
Getting Generated HTML in a WCF service. === In the WCF application that I am working on, I need to access the generated source of a particular webpage (after all the AJAX calls on the page are made). I have tried using `System.Net.WebRequest` but it just brings me back the original source of the page. Is there a way to execute a page and then get the source? Else, is there a way to execute Javascript from within a WCF service? I could use the javascript and JSON response to create the HTML page from within my webservice then!
0
70,689
09/16/2008 09:24:28
11,581
09/16/2008 09:16:14
1
0
Best singleton implementation
Can any one give us a best singlton implementation?
design-patterns
patterns
null
null
null
null
open
Best singleton implementation === Can any one give us a best singlton implementation?
0
70,694
09/16/2008 09:24:39
8,741
09/15/2008 16:46:16
1
0
Task Scheduler Problem Starting MSSQLSERVER
I am trying to create a Task Scheduler task to start my SQL Server 2005 instance every morning, because something stops it every night. This is a temporary solution until I can diagnose the stoppage. I created a task to run under my admin user, and to start the program, *cmd* with the arguments */c net start mssqlserver*. When I manually run the command, in a console under my admin user, it runs, but when I try to manually execute the task, it logs the following message, and the service remains stopped: *action "C:\Windows\system32\cmd.EXE" with return code 2*. Any suggestions?
sql-server
taskscheduler
mssqlserver
null
null
null
open
Task Scheduler Problem Starting MSSQLSERVER === I am trying to create a Task Scheduler task to start my SQL Server 2005 instance every morning, because something stops it every night. This is a temporary solution until I can diagnose the stoppage. I created a task to run under my admin user, and to start the program, *cmd* with the arguments */c net start mssqlserver*. When I manually run the command, in a console under my admin user, it runs, but when I try to manually execute the task, it logs the following message, and the service remains stopped: *action "C:\Windows\system32\cmd.EXE" with return code 2*. Any suggestions?
0
70,705
09/16/2008 09:26:08
6,314
09/14/2008 00:12:43
1
3
How to write a linter?
In my day job I, and others on my team write a lot of hardware models in Verilog-AMS, a language supported primarily by commercial vendors and a few opensource simulator projects. One thing that would make supporting each others code more helpful would be a LINTER that would check our code for common problems and assist with enforcing a shared code formatting style. I of course want to be able to add my own rules and, after I prove their utility to myself, promote them to the rest of the team.. I don't mind doing the work that has to be done, but of course also want to leverage the work of other existing projects. Does having the allowed language syntax in a yacc or bison format give me a leg up? or should I just suck each language statement into a perl string, and use pattern matching to find the things I don't like? (most syntax and compilation errors are easily caught by the commercial tools.. but we have some of our own extentions.)
code-style
verilog
syntax-checking
null
null
null
open
How to write a linter? === In my day job I, and others on my team write a lot of hardware models in Verilog-AMS, a language supported primarily by commercial vendors and a few opensource simulator projects. One thing that would make supporting each others code more helpful would be a LINTER that would check our code for common problems and assist with enforcing a shared code formatting style. I of course want to be able to add my own rules and, after I prove their utility to myself, promote them to the rest of the team.. I don't mind doing the work that has to be done, but of course also want to leverage the work of other existing projects. Does having the allowed language syntax in a yacc or bison format give me a leg up? or should I just suck each language statement into a perl string, and use pattern matching to find the things I don't like? (most syntax and compilation errors are easily caught by the commercial tools.. but we have some of our own extentions.)
0
70,713
09/16/2008 09:27:33
11,583
09/16/2008 09:17:47
1
0
Pentaho BI Platform: Best Getting Started Guide?
I'm looking at Pentaho BI Platform to extract information from Mantis, but I don't find any tutorial to setup a full working environment (without preloaded data). Do you know any tutorial? Maybe another way to develop reports from Mantis data? Thanks!
business-intelligence
pentaho
null
null
null
08/15/2011 20:37:45
not constructive
Pentaho BI Platform: Best Getting Started Guide? === I'm looking at Pentaho BI Platform to extract information from Mantis, but I don't find any tutorial to setup a full working environment (without preloaded data). Do you know any tutorial? Maybe another way to develop reports from Mantis data? Thanks!
4
70,721
09/16/2008 09:30:02
11,612
09/16/2008 09:30:01
1
0
Oracle Client Upgrade from 9 to 10
Last Friday where i work, an oracle client was upgarded and our IIS server from version 9 to version 10. Now that its on version 10, we are seeing a lot of connections being open up to the database. It is opening up so many connections that we cannot log onto the database using tools like PlSQL developer or Toad. We never had an issue like this when the oracle client was at version 9. Because of the number of clients that exists on this particular box, i dont think it will be possible to revert back to the Oracle 9 client. Is anyone aware of this problem or know of any possible work arounds? Any help is greatly appreciated
database
oracle
connections
10
9
null
open
Oracle Client Upgrade from 9 to 10 === Last Friday where i work, an oracle client was upgarded and our IIS server from version 9 to version 10. Now that its on version 10, we are seeing a lot of connections being open up to the database. It is opening up so many connections that we cannot log onto the database using tools like PlSQL developer or Toad. We never had an issue like this when the oracle client was at version 9. Because of the number of clients that exists on this particular box, i dont think it will be possible to revert back to the Oracle 9 client. Is anyone aware of this problem or know of any possible work arounds? Any help is greatly appreciated
0
70,724
09/16/2008 09:30:18
7,094
09/15/2008 13:09:58
1
2
Packaging up Tomcat
In my job we have to deploy an application on various environments. It's a standard WAR file which needs a bit of configuration, deployed on Tomcat 6. Is there any way of creating a 'deployment package' with Tomcat so that you just extract it and it sets up Tomcat as well as your application? I'm not sure that creating a .zip file with the Tomcat folder would work! It certainly wouldn't install the service. Suggestions welcome! Thanks, Phill
java
web-applications
tomcat
null
null
null
open
Packaging up Tomcat === In my job we have to deploy an application on various environments. It's a standard WAR file which needs a bit of configuration, deployed on Tomcat 6. Is there any way of creating a 'deployment package' with Tomcat so that you just extract it and it sets up Tomcat as well as your application? I'm not sure that creating a .zip file with the Tomcat folder would work! It certainly wouldn't install the service. Suggestions welcome! Thanks, Phill
0
70,728
09/16/2008 09:31:13
11,473
09/16/2008 08:19:24
1
1
How do you keep search engines from indexing text ads?
Is there any way to keep search engines from indexing text ads? These are basically stylized links. I have thought about generating images with text or using javascript to write them into a DIV. What is the best and most accepted way?
search-engine
ads
null
null
null
null
open
How do you keep search engines from indexing text ads? === Is there any way to keep search engines from indexing text ads? These are basically stylized links. I have thought about generating images with text or using javascript to write them into a DIV. What is the best and most accepted way?
0
70,732
09/16/2008 09:32:02
1,730
08/18/2008 11:09:24
86
14
Implements several interfaces with conflict in signatures
Lasty, I tried to implements an hybrid structure in Java, something that looks like: public class MapOfSet<K, V extends HasKey<K>> implements Set<V>, Map<K, Set<V>> Where HasKey is the following interface: public interface HasKey<K> { public K getKey(); } Unfortunately, there are some conflicts between methos signature of the Set interface and the Map interface in Java. I've finally chosen to implements only the Set interface and to add the Map method without implementing this interface. Do you see a nicer solution?
java
collections
implementation
null
null
null
open
Implements several interfaces with conflict in signatures === Lasty, I tried to implements an hybrid structure in Java, something that looks like: public class MapOfSet<K, V extends HasKey<K>> implements Set<V>, Map<K, Set<V>> Where HasKey is the following interface: public interface HasKey<K> { public K getKey(); } Unfortunately, there are some conflicts between methos signature of the Set interface and the Map interface in Java. I've finally chosen to implements only the Set interface and to add the Map method without implementing this interface. Do you see a nicer solution?
0
70,742
09/16/2008 09:34:03
6,910
09/15/2008 12:48:35
31
8
How do I list Oracle Apps profile options in PL/SQL?
I administrate several Oracle Apps environment, and currently check profile options in lots of environments by loading up forms in each environment, and manually checking each variable, which requires a lot of time. Is there a snippet of code which will list profile options and at what level and who they are applied to?
c#
oracle
configuration
apps
null
null
open
How do I list Oracle Apps profile options in PL/SQL? === I administrate several Oracle Apps environment, and currently check profile options in lots of environments by loading up forms in each environment, and manually checking each variable, which requires a lot of time. Is there a snippet of code which will list profile options and at what level and who they are applied to?
0
70,753
09/16/2008 09:36:28
11,605
09/16/2008 09:25:33
1
0
Open-source radix/mtrie implementation in C?
I intend to use RADIX / MTRIE as my preferred data-structure for a routing implementation. I would like to know if there's a decent open source implementation available (apart from freebsd-net) which I can use for my purpose, or do I need to write one myself.
c
algorithm
data-structures
null
null
null
open
Open-source radix/mtrie implementation in C? === I intend to use RADIX / MTRIE as my preferred data-structure for a routing implementation. I would like to know if there's a decent open source implementation available (apart from freebsd-net) which I can use for my purpose, or do I need to write one myself.
0
70,755
09/16/2008 09:36:33
4,830
09/05/2008 20:04:00
59
2
Do you use the Inductive User Interface pattern in Windows Forms?
And if you do, can you give some background information on the implementation and the reasons for implementing this pattern? The pattern is described in more detail in these articles: - [Microsoft Inductive User Interface Guidelines][1] - [IUIs and Web-Style Navigation in Windows Forms, Part 1][2] & [Part 2][3] [1]: http://msdn.microsoft.com/en-us/library/ms997506.aspx [2]: http://msdn.microsoft.com/en-us/library/ms951103.aspx [3]: http://msdn.microsoft.com/en-us/library/ms951278.aspx
.net
winforms
gui
user-interface
usability
null
open
Do you use the Inductive User Interface pattern in Windows Forms? === And if you do, can you give some background information on the implementation and the reasons for implementing this pattern? The pattern is described in more detail in these articles: - [Microsoft Inductive User Interface Guidelines][1] - [IUIs and Web-Style Navigation in Windows Forms, Part 1][2] & [Part 2][3] [1]: http://msdn.microsoft.com/en-us/library/ms997506.aspx [2]: http://msdn.microsoft.com/en-us/library/ms951103.aspx [3]: http://msdn.microsoft.com/en-us/library/ms951278.aspx
0
70,756
09/16/2008 09:37:23
4,021
09/01/2008 12:23:44
315
16
What is the difference between precedence, associativity, and order?
This confusion arises as most people are trained to evaluate arithmetic expressions as per PEDMAS or BODMAS rule whereas arithmetic expressions in programming languages like C# do not work in the same way. What are your takes on it?
c#
arithmetic-expressions
null
null
null
null
open
What is the difference between precedence, associativity, and order? === This confusion arises as most people are trained to evaluate arithmetic expressions as per PEDMAS or BODMAS rule whereas arithmetic expressions in programming languages like C# do not work in the same way. What are your takes on it?
0
70,758
09/16/2008 09:37:27
10,186
09/15/2008 21:36:49
1
2
Does anyone know of a way of hiding a column in an asp.net listview?
I know you can put <% if %> statements in the LayoutTemplate to hide controls but the column is still there. Does anyone know of a better way?
asp.net
listview
null
null
null
null
open
Does anyone know of a way of hiding a column in an asp.net listview? === I know you can put <% if %> statements in the LayoutTemplate to hide controls but the column is still there. Does anyone know of a better way?
0
70,762
09/16/2008 09:38:30
1,764
08/18/2008 13:24:03
41
2
What is the license for unlicensed material?
Suppose I've found a &ldquo;text&rdquo; somewhere in open access (say, on public network share). I have no means to contact the author, I even don't know who is the author. What can I legally do with such &ldquo;text&rdquo;?
licensing
null
null
null
null
null
open
What is the license for unlicensed material? === Suppose I've found a &ldquo;text&rdquo; somewhere in open access (say, on public network share). I have no means to contact the author, I even don't know who is the author. What can I legally do with such &ldquo;text&rdquo;?
0
70,773
09/16/2008 09:40:31
11,589
09/16/2008 09:20:04
1
0
pthread_cond_wait versus semaphore
What are the pros / cons of using `pthread_cond_wait` or using a semaphore ? I am waiting for a state change like this : pthread_mutex_lock(&cam->video_lock); while(cam->status == WAIT_DISPLAY) { pthread_cond_wait(&cam->video_cond, &cam->video_lock); } pthread_mutex_unlock(&cam->video_lock); Using a properly initialised semaphore, I think I could do it like this : while(cam->status == WAIT_DISPLAY) { sem_wait(&some_semaphore); } What are the pros and cons of each method ?
pthreads
c
semaphore
null
null
null
open
pthread_cond_wait versus semaphore === What are the pros / cons of using `pthread_cond_wait` or using a semaphore ? I am waiting for a state change like this : pthread_mutex_lock(&cam->video_lock); while(cam->status == WAIT_DISPLAY) { pthread_cond_wait(&cam->video_cond, &cam->video_lock); } pthread_mutex_unlock(&cam->video_lock); Using a properly initialised semaphore, I think I could do it like this : while(cam->status == WAIT_DISPLAY) { sem_wait(&some_semaphore); } What are the pros and cons of each method ?
0
70,779
09/16/2008 09:41:07
7,473
09/15/2008 13:48:50
1
1
How do I quickly do something in Rmagick to test it work
I need to be able to quickly convert an image (inside a rails controller) so that the hosting company using managing our application can quickly test at any time to ensure that rmagick is not only successfully installed, but can be called throgh the rails stiack, what is the quickest clean code I can use to do this?
ruby
ruby-on-rails
rmagick
null
null
null
open
How do I quickly do something in Rmagick to test it work === I need to be able to quickly convert an image (inside a rails controller) so that the hosting company using managing our application can quickly test at any time to ensure that rmagick is not only successfully installed, but can be called throgh the rails stiack, what is the quickest clean code I can use to do this?
0
70,781
09/16/2008 09:41:12
11,562
09/16/2008 09:10:17
1
1
What do you think of Model-driven Software Development?
I'm really interested to hear what you think about Model-driven Software Development for JAVA and or .NET. Does it save time? Does it improve quality?
mdsd
model-driven
null
null
null
null
open
What do you think of Model-driven Software Development? === I'm really interested to hear what you think about Model-driven Software Development for JAVA and or .NET. Does it save time? Does it improve quality?
0
70,785
09/16/2008 09:42:08
7,292
09/15/2008 13:28:39
8
0
What is the best way to use Ext JS as part of Java / Spring / Hibernate based web application?
We want to try Ext JS on new project. Is there any well-known best practice for integrating Ext JS with server side Java (Spring/Hibernate/JS) application? Is DWR a good choice for that?
java
extjs
ext
null
null
null
open
What is the best way to use Ext JS as part of Java / Spring / Hibernate based web application? === We want to try Ext JS on new project. Is there any well-known best practice for integrating Ext JS with server side Java (Spring/Hibernate/JS) application? Is DWR a good choice for that?
0
70,797
09/16/2008 09:44:59
1,384,652
08/01/2008 12:01:23
2,102
86
Python and User input
How do I have a Python script that can accept user input (assuming this is possible) and how do I make it read in arguments if run from the command line?
python
input
null
null
null
null
open
Python and User input === How do I have a Python script that can accept user input (assuming this is possible) and how do I make it read in arguments if run from the command line?
0
70,811
09/16/2008 09:48:04
11,538
09/16/2008 08:59:15
1
0
VMWare Server: Virtual Hard Drive Type
For best performance, is it better to use a virtual IDE HDD or virtual SCSI HDD? If, SCSI, does it matter whether you use an BusLogic or LSILogic?
virtualserver
harddrive
performance
ide
scsi
null
open
VMWare Server: Virtual Hard Drive Type === For best performance, is it better to use a virtual IDE HDD or virtual SCSI HDD? If, SCSI, does it matter whether you use an BusLogic or LSILogic?
0
70,842
09/16/2008 09:52:26
6,974
09/15/2008 12:56:20
1
0
Execute program from within a C program
How do I run another program from within my C program, I need to be able to write data into STDIN of the programed launched (and maybe read from it's STDOUT) Not sure if this is likley to be a standard C function, but I need the solution to work under Linux. Thanks Simon
c
linux
null
null
null
null
open
Execute program from within a C program === How do I run another program from within my C program, I need to be able to write data into STDIN of the programed launched (and maybe read from it's STDOUT) Not sure if this is likley to be a standard C function, but I need the solution to work under Linux. Thanks Simon
0
70,846
09/16/2008 09:53:37
4,734
09/05/2008 11:57:36
255
12
Developers' rights - what should they be?
We're fortunate in our company to each have 2 decent-sized monitors and reasonably fast machines. This alone is enough to impress many of my peers who are stuck working with poor equipment. But should 2 monitors really be seen as a luxury? I propose they should be a basic right for all developers. What should be the fundamentals that developers could expect to be provided with in order to be productive and successful?
productivity
developers
rights
workplace
equipment
10/28/2011 01:08:01
not constructive
Developers' rights - what should they be? === We're fortunate in our company to each have 2 decent-sized monitors and reasonably fast machines. This alone is enough to impress many of my peers who are stuck working with poor equipment. But should 2 monitors really be seen as a luxury? I propose they should be a basic right for all developers. What should be the fundamentals that developers could expect to be provided with in order to be productive and successful?
4
70,850
09/16/2008 09:55:20
2,974
08/26/2008 09:39:16
1,167
81
Why This Strange C Code Format
What advantage, if any, is provided by formatting C code as follows: while(lock_file(lockdir)==0) { count++; if(count==20) { fprintf(stderr,"remlock: Cannot lock directory %s\n",lockdir); exit(1); } sleep(3); } if(rmdir(serverdir)!=0) { switch(errno) { case ENOTDIR: fprintf(stderr,"remlock: Server directory %s is not a directory\n",serverdir); break; case ENOENT: fprintf(stderr,"remlock: Server directory %s does not exist\n",serverdir); break; case EEXIST: fprintf(stderr,"remlock: Server directory %s is not empty\n",serverdir); break; default: fprintf(stderr,"remlock: Cannot delete server directory %s\n",serverdir); } exit(1); } unlock_file(lockdir);
c
formatting
null
null
null
null
open
Why This Strange C Code Format === What advantage, if any, is provided by formatting C code as follows: while(lock_file(lockdir)==0) { count++; if(count==20) { fprintf(stderr,"remlock: Cannot lock directory %s\n",lockdir); exit(1); } sleep(3); } if(rmdir(serverdir)!=0) { switch(errno) { case ENOTDIR: fprintf(stderr,"remlock: Server directory %s is not a directory\n",serverdir); break; case ENOENT: fprintf(stderr,"remlock: Server directory %s does not exist\n",serverdir); break; case EEXIST: fprintf(stderr,"remlock: Server directory %s is not empty\n",serverdir); break; default: fprintf(stderr,"remlock: Cannot delete server directory %s\n",serverdir); } exit(1); } unlock_file(lockdir);
0
70,855
09/16/2008 09:56:31
11,190
09/16/2008 06:00:26
1
1
How can one use mutli threading in php applications
Is there a realistic way of implementing a multi-threaded model in php whether truly or just simulating it. Some time back it was suggested that you can force the operating system to load another instance of the php executable and handle other simultaneous processes. The problem with this is that when the php code finished executing the php instance remains in memory because there is no way to kill it from within php. so if you are simulating several threads you can imagine whats going to happen. So am still looking for a way multi-threading can be done or simulated effectively from within php. Any ideas?
php
multithreading
null
null
null
null
open
How can one use mutli threading in php applications === Is there a realistic way of implementing a multi-threaded model in php whether truly or just simulating it. Some time back it was suggested that you can force the operating system to load another instance of the php executable and handle other simultaneous processes. The problem with this is that when the php code finished executing the php instance remains in memory because there is no way to kill it from within php. so if you are simulating several threads you can imagine whats going to happen. So am still looking for a way multi-threading can be done or simulated effectively from within php. Any ideas?
0
70,880
09/16/2008 10:01:00
8,446
09/15/2008 16:03:14
87
7
deleting a buffer through a different type of pointer?
Say I have the following C++: char *p = new char[cb]; SOME_STRUCT *pSS = (SOME_STRUCT *)p; delete pSS; Is this safe according to the C++ standard? Do I need to cast back to a char* and then use delete[]? I know it'll work in most C++ compilers, because it's plain-ordinary-data, with no destructors. Is it guaranteed to be safe?
c++
memory-management
null
null
null
null
open
deleting a buffer through a different type of pointer? === Say I have the following C++: char *p = new char[cb]; SOME_STRUCT *pSS = (SOME_STRUCT *)p; delete pSS; Is this safe according to the C++ standard? Do I need to cast back to a char* and then use delete[]? I know it'll work in most C++ compilers, because it's plain-ordinary-data, with no destructors. Is it guaranteed to be safe?
0
70,908
09/16/2008 10:06:54
11,503
09/16/2008 08:40:51
11
2
Which plaform for a lightweight windows desktop app for internal use to run basic console commands (WPF, AIR, something else)?
We have a number of scripts that we use for various deployment and data import tasks. These are currently called through a number of command lines calls or batch files. We'd prefer a cool little interface to run them and collect feedback rather than a plethora of drop downs. This will probably be developed in our developer's "20% time" so quickness and fun-ness are considerations ;) Any suggestions?
windows
wpf
desktop
air
suggestions
null
open
Which plaform for a lightweight windows desktop app for internal use to run basic console commands (WPF, AIR, something else)? === We have a number of scripts that we use for various deployment and data import tasks. These are currently called through a number of command lines calls or batch files. We'd prefer a cool little interface to run them and collect feedback rather than a plethora of drop downs. This will probably be developed in our developer's "20% time" so quickness and fun-ness are considerations ;) Any suggestions?
0
70,917
09/16/2008 10:09:10
8,766
09/15/2008 16:50:05
1
0
missing WMI namespace on Vista/Server 2008
What is equivalent to the root\CIMV2\Applications\MicrosoftIE namespace on Vista/Server 2008? The root\cimv2\Applications\MicrosoftIE namespace dates back to at least Internet Explorer 5.00.2920.0000, which happens to be the version of Internet Explorer that shipped with Windows 2000, but it looks like it is removed from Vista/Server 2008.
internet-explorer
namespaces
wmi
null
null
null
open
missing WMI namespace on Vista/Server 2008 === What is equivalent to the root\CIMV2\Applications\MicrosoftIE namespace on Vista/Server 2008? The root\cimv2\Applications\MicrosoftIE namespace dates back to at least Internet Explorer 5.00.2920.0000, which happens to be the version of Internet Explorer that shipped with Windows 2000, but it looks like it is removed from Vista/Server 2008.
0
70,956
09/16/2008 10:15:35
6,308
09/13/2008 22:01:56
1
0
Exclude certain pages from using a HTTPModule
Is there a good way to exclude certain pages from using a HTTP module? I have an application that uses a custom HTTP module to validate a session. The HTTPModule is set up like this in web config: <system.web> <!-- ... --> <httpModules> <add name="SessionValidationModule" type="SessionValidationModule, SomeNamespace" /> </httpModules> </system.web> To exclude the module from the page, I tried doing this (without success): <location path="ToBeExcluded"> <system.web> <!-- ... --> <httpModules> <remove name="SessionValidationModule" /> </httpModules> </system.web> </location> Any thoughts?
.net
asp.net
null
null
null
null
open
Exclude certain pages from using a HTTPModule === Is there a good way to exclude certain pages from using a HTTP module? I have an application that uses a custom HTTP module to validate a session. The HTTPModule is set up like this in web config: <system.web> <!-- ... --> <httpModules> <add name="SessionValidationModule" type="SessionValidationModule, SomeNamespace" /> </httpModules> </system.web> To exclude the module from the page, I tried doing this (without success): <location path="ToBeExcluded"> <system.web> <!-- ... --> <httpModules> <remove name="SessionValidationModule" /> </httpModules> </system.web> </location> Any thoughts?
0
70,983
09/16/2008 10:19:23
6,445
09/15/2008 10:08:37
1
6
Have there ever been any studies relating productivity to coding conventions?
There is always a lot of discussion about various coding conventions, with strongly held beliefs on all sides. But I am curious if there have been any studies comparing equivalent projects where there were different mandated coding conventions, or even no coding conventions whatsoever. I am especially curious as to what effect different coding conventions might have on programmer productivity - perhaps they feel they are "fighting" the system rather than working with the system?
conventions
study
productivity
null
null
null
open
Have there ever been any studies relating productivity to coding conventions? === There is always a lot of discussion about various coding conventions, with strongly held beliefs on all sides. But I am curious if there have been any studies comparing equivalent projects where there were different mandated coding conventions, or even no coding conventions whatsoever. I am especially curious as to what effect different coding conventions might have on programmer productivity - perhaps they feel they are "fighting" the system rather than working with the system?
0
70,992
09/16/2008 10:21:47
48,310
09/07/2008 10:55:41
178
22
Hibernate (JPA) how to do an eager query, loading all child objects
Relating to my [earlier question][1], I want to ensure all the child objects are loaded as I have a multiple threads that may need to access the data (and thus avoid lazy loading exceptions). I understand the way to do this is to use the "fetch" keyword in the query (EJB QL). Like this: select distinct o from Order o left join fetch o.orderLines Assuming a model with an Order class which has a set of OrderLines in it. My question is that the "distinct" keyword seems to be needed as otherwise I seem to get back an Order for each OrderLine. Am I doing the right thing? [1]: http://stackoverflow.com/questions/48733/javahibernate-jpa-designing-the-server-data-reload
java
hibernate
jpa
ejbql
null
null
open
Hibernate (JPA) how to do an eager query, loading all child objects === Relating to my [earlier question][1], I want to ensure all the child objects are loaded as I have a multiple threads that may need to access the data (and thus avoid lazy loading exceptions). I understand the way to do this is to use the "fetch" keyword in the query (EJB QL). Like this: select distinct o from Order o left join fetch o.orderLines Assuming a model with an Order class which has a set of OrderLines in it. My question is that the "distinct" keyword seems to be needed as otherwise I seem to get back an Order for each OrderLine. Am I doing the right thing? [1]: http://stackoverflow.com/questions/48733/javahibernate-jpa-designing-the-server-data-reload
0
70,993
09/16/2008 10:21:50
909
08/10/2008 09:56:57
999
38
Testing ladder logic
We all know the various ways of testing OO systems. However, it looks like I'll be going to do a project where I'll be dealing with PLC ladder logic (don't ask :/), and I was wondering if there's a good way of testing the validity of the system. The only way I see so far is simply constructing a huge table with all known states of the system and which output states that generates. This would do for simple 'if input A is on, turn output B on' cases. I don't think this will work for more complicated constructions though.
testing
logic
plc
ladder
null
null
open
Testing ladder logic === We all know the various ways of testing OO systems. However, it looks like I'll be going to do a project where I'll be dealing with PLC ladder logic (don't ask :/), and I was wondering if there's a good way of testing the validity of the system. The only way I see so far is simply constructing a huge table with all known states of the system and which output states that generates. This would do for simple 'if input A is on, turn output B on' cases. I don't think this will work for more complicated constructions though.
0
71,000
09/16/2008 10:22:16
11,673
09/16/2008 10:05:49
1
1
Help in creating Zip files from .Net and reading them from Java
I'm trying to create a Zip file from .Net that can be read from Java code. I've used SharpZipLib to create the Zip file but also if the file generated is valid according to the CheckZip function of the #ZipLib library and can be successfully uncompressed via WinZip or WinRar I always get an error when trying to uncompress it using the Java.Utils.Zip class in Java. Problem seems to be in the wrong header written by SharpZipLib, I've also posted a question on the SharpDevelop forum but with no results (see http://community.sharpdevelop.net/forums/t/8272.aspx for info) but with no result. Has someone a code sample of compressing a Zip file with .Net and de-compressing it with the Java.Utils.Zip class? Regards Massimo
.net
java
interop
zip
null
null
open
Help in creating Zip files from .Net and reading them from Java === I'm trying to create a Zip file from .Net that can be read from Java code. I've used SharpZipLib to create the Zip file but also if the file generated is valid according to the CheckZip function of the #ZipLib library and can be successfully uncompressed via WinZip or WinRar I always get an error when trying to uncompress it using the Java.Utils.Zip class in Java. Problem seems to be in the wrong header written by SharpZipLib, I've also posted a question on the SharpDevelop forum but with no results (see http://community.sharpdevelop.net/forums/t/8272.aspx for info) but with no result. Has someone a code sample of compressing a Zip file with .Net and de-compressing it with the Java.Utils.Zip class? Regards Massimo
0
7,513,231
09/22/2011 10:21:18
958,860
09/22/2011 10:12:40
1
0
IBus: Couldn't receive data from agent
I load ibus in Emacs, but I active ibus fail. The note is IBus: Couldn't receive data from agent. Thank
emacs23
null
null
null
null
null
open
IBus: Couldn't receive data from agent === I load ibus in Emacs, but I active ibus fail. The note is IBus: Couldn't receive data from agent. Thank
0
9,919,989
03/29/2012 06:14:21
1,295,704
03/27/2012 13:50:37
1
0
Raw socket with device bind using setsockopt() system is not working in Fedora core 6(2.6.18-1.2798.fc6)
Please any one could help on this issue. Please In the below sample code,we had bind raw sock with eth0. but while running the program the recvfrom of raw sock is receiving packets from eth0 & eth1 on same machine(xx_86). It is not clear to me why,could help one on this issue. I hope the setsockopt is not working properly OS: Fedora core 6(2.6.18-1.2798.fc6) Thanks in advance, Viswa. Sampe code: #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <unistd.h> #include <sys/socket.h> #include <netinet/in.h> #include <linux/if_ether.h> #include <net/if.h> #include <linux/filter.h> #include <sys/ioctl.h> #include <string.h> #include <arpa/inet.h> int main(int argc, char **argv) { int sock, i; unsigned char buffer[2048]; unsigned char tbuff[2048]; unsigned char *iphead, *ethhead,*phead; struct ifreq ethreq; // NOTE: use TCPDUMP to build the filter array. // set filter to sniff only port 443 // $ sudo tcpdump -dd port 443 // raw for recvfrom eth0 if ((sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_IP))) == -1) { perror("socket"); exit(1); } // set network card to promiscuos strncpy(ethreq.ifr_name, "eth0", IFNAMSIZ); if (ioctl(sock,SIOCGIFFLAGS, &ethreq) == -1) { perror("ioctl"); close(sock); exit(1); } ethreq.ifr_flags |= IFF_PROMISC; if (ioctl(sock, SIOCSIFFLAGS, &ethreq) == -1) { perror("ioctl"); close(sock); exit(1); } //bind to sock with eth0 struct ifreq Interface; memset(&Interface, 0, sizeof(Interface)); strncpy(Interface.ifr_ifrn.ifrn_name, "eth0", IFNAMSIZ); if (setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, &Interface, sizeof(Interface)) < 0) { close(sock); } //open the RAW socket for sendto int s = socket (PF_INET, SOCK_RAW, IPPROTO_RAW); struct sockaddr_in sin; memset(&sin,0,sizeof(sin)); sin.sin_family = AF_INET; sin.sin_port = htons(0); sin.sin_addr.s_addr = inet_addr ("10.3.161.104"); // inform kernal don't fill IP and Transport header int one = 1; const int *val = &one; if (setsockopt (s, IPPROTO_IP, IP_HDRINCL, val, sizeof (one)) < 0) printf ("Warning: Cannot set HDRINCL!\n"); //bind the sock descriptor with eth0 struct ifreq Interface1; memset(&Interface1, 0, sizeof(Interface1)); strncpy(Interface1.ifr_ifrn.ifrn_name, "eth0", IFNAMSIZ); if (setsockopt(s, SOL_SOCKET, SO_BINDTODEVICE, &Interface1, sizeof(Interface1)) < 0) { close(s); } while (1) { printf("----------------------\n"); i = recvfrom(sock, buffer, sizeof(buffer), 0, NULL, NULL); printf("%d bytes read\n", i); // check header size: Ethernet = 14, IP = 20, TCP = 8 (sum = 42) if (i < 42) { perror("recvfrom():"); printf("Incomplete packet (errno is %d)\n", errno); close(sock); exit(0); } phead = buffer + 14; // (skip ethernet header) memcpy(tbuff,phead,i-14); iphead=tbuff; if (*iphead == 0x45) { int ptrindex= iphead[9]; switch(ptrindex){ case 1: printf("The transport protocl is:ICMP\n"); break; case 2: printf("The transport protol is:IGMP\n"); break; case 6: printf("The transport protocol is:TCP\n"); break; case 17: printf("The transport protocol is:UDP\n"); break; case 103: printf("The transport protocol is:PIM\n"); break; default: printf("The transport protocol is:%d\n",iphead[9]); } //printf("%d",*ptrindex); // printf("\n The transport protocol is :%u\n",iphead[9]); printf("Source Address: %d.%d.%d.%d, Port: %d\n", iphead[12], iphead[13], iphead[14], iphead[15], (iphead[20] << 8) + iphead[21]); printf("Dest Address: %d.%d.%d.%d, Port: %d\n", iphead[16], iphead[17], iphead[18], iphead[19], (iphead[22] << 8) + iphead[23]); if(sendto(s,tbuff,i-14,0,(struct sockaddr *)&sin,sizeof(sin))<0) printf("error\n"); else{printf("\nThe received packet is send\n");} memset(buffer,0,sizeof(buffer)); memset(tbuff,0,sizeof(tbuff)); } else{ printf("The non ip had received");} } close(sock); }
raw-sockets
null
null
null
null
null
open
Raw socket with device bind using setsockopt() system is not working in Fedora core 6(2.6.18-1.2798.fc6) === Please any one could help on this issue. Please In the below sample code,we had bind raw sock with eth0. but while running the program the recvfrom of raw sock is receiving packets from eth0 & eth1 on same machine(xx_86). It is not clear to me why,could help one on this issue. I hope the setsockopt is not working properly OS: Fedora core 6(2.6.18-1.2798.fc6) Thanks in advance, Viswa. Sampe code: #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <unistd.h> #include <sys/socket.h> #include <netinet/in.h> #include <linux/if_ether.h> #include <net/if.h> #include <linux/filter.h> #include <sys/ioctl.h> #include <string.h> #include <arpa/inet.h> int main(int argc, char **argv) { int sock, i; unsigned char buffer[2048]; unsigned char tbuff[2048]; unsigned char *iphead, *ethhead,*phead; struct ifreq ethreq; // NOTE: use TCPDUMP to build the filter array. // set filter to sniff only port 443 // $ sudo tcpdump -dd port 443 // raw for recvfrom eth0 if ((sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_IP))) == -1) { perror("socket"); exit(1); } // set network card to promiscuos strncpy(ethreq.ifr_name, "eth0", IFNAMSIZ); if (ioctl(sock,SIOCGIFFLAGS, &ethreq) == -1) { perror("ioctl"); close(sock); exit(1); } ethreq.ifr_flags |= IFF_PROMISC; if (ioctl(sock, SIOCSIFFLAGS, &ethreq) == -1) { perror("ioctl"); close(sock); exit(1); } //bind to sock with eth0 struct ifreq Interface; memset(&Interface, 0, sizeof(Interface)); strncpy(Interface.ifr_ifrn.ifrn_name, "eth0", IFNAMSIZ); if (setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, &Interface, sizeof(Interface)) < 0) { close(sock); } //open the RAW socket for sendto int s = socket (PF_INET, SOCK_RAW, IPPROTO_RAW); struct sockaddr_in sin; memset(&sin,0,sizeof(sin)); sin.sin_family = AF_INET; sin.sin_port = htons(0); sin.sin_addr.s_addr = inet_addr ("10.3.161.104"); // inform kernal don't fill IP and Transport header int one = 1; const int *val = &one; if (setsockopt (s, IPPROTO_IP, IP_HDRINCL, val, sizeof (one)) < 0) printf ("Warning: Cannot set HDRINCL!\n"); //bind the sock descriptor with eth0 struct ifreq Interface1; memset(&Interface1, 0, sizeof(Interface1)); strncpy(Interface1.ifr_ifrn.ifrn_name, "eth0", IFNAMSIZ); if (setsockopt(s, SOL_SOCKET, SO_BINDTODEVICE, &Interface1, sizeof(Interface1)) < 0) { close(s); } while (1) { printf("----------------------\n"); i = recvfrom(sock, buffer, sizeof(buffer), 0, NULL, NULL); printf("%d bytes read\n", i); // check header size: Ethernet = 14, IP = 20, TCP = 8 (sum = 42) if (i < 42) { perror("recvfrom():"); printf("Incomplete packet (errno is %d)\n", errno); close(sock); exit(0); } phead = buffer + 14; // (skip ethernet header) memcpy(tbuff,phead,i-14); iphead=tbuff; if (*iphead == 0x45) { int ptrindex= iphead[9]; switch(ptrindex){ case 1: printf("The transport protocl is:ICMP\n"); break; case 2: printf("The transport protol is:IGMP\n"); break; case 6: printf("The transport protocol is:TCP\n"); break; case 17: printf("The transport protocol is:UDP\n"); break; case 103: printf("The transport protocol is:PIM\n"); break; default: printf("The transport protocol is:%d\n",iphead[9]); } //printf("%d",*ptrindex); // printf("\n The transport protocol is :%u\n",iphead[9]); printf("Source Address: %d.%d.%d.%d, Port: %d\n", iphead[12], iphead[13], iphead[14], iphead[15], (iphead[20] << 8) + iphead[21]); printf("Dest Address: %d.%d.%d.%d, Port: %d\n", iphead[16], iphead[17], iphead[18], iphead[19], (iphead[22] << 8) + iphead[23]); if(sendto(s,tbuff,i-14,0,(struct sockaddr *)&sin,sizeof(sin))<0) printf("error\n"); else{printf("\nThe received packet is send\n");} memset(buffer,0,sizeof(buffer)); memset(tbuff,0,sizeof(tbuff)); } else{ printf("The non ip had received");} } close(sock); }
0
9,919,990
03/29/2012 06:14:24
663,660
03/17/2011 04:15:58
1,102
14
What is better nagios or sensu?
I am confuse that which monitoring framework to use. Currently I am looking at two options 1) [nagios][1] and 2) [sensu][2] Can anybody give me a good reference which shows the comparision of both and if any other monitoring tool which is good to use. My main intension is scale-out on EC2 and i am using opscode chef for system integration. so please take this into consideration. [1]: http://www.nagios.org/ [2]: http://www.sonian.com/cloud-monitoring-sensu/
amazon-ec2
monitoring
chef
null
null
null
open
What is better nagios or sensu? === I am confuse that which monitoring framework to use. Currently I am looking at two options 1) [nagios][1] and 2) [sensu][2] Can anybody give me a good reference which shows the comparision of both and if any other monitoring tool which is good to use. My main intension is scale-out on EC2 and i am using opscode chef for system integration. so please take this into consideration. [1]: http://www.nagios.org/ [2]: http://www.sonian.com/cloud-monitoring-sensu/
0
9,919,991
03/29/2012 06:14:43
938,505
09/10/2011 19:09:32
62
0
Can you add rows to gridview from strings?
I want to make a gridview with 4 columns. (Checkbox, Hyperlink name Title, Dynamic name Price, Dynamic named ASIN#) I want to be able to add new rows to the gridview from three different strings. I have a function that looks like this: Private Sub displayData(title As String, cost As String, asin As String) Is it possible to even add new data to the gridview with these strings. I've looked all around online and most things deal with databases. Thanks for any insight you can give.
vb.net
gridview
null
null
null
null
open
Can you add rows to gridview from strings? === I want to make a gridview with 4 columns. (Checkbox, Hyperlink name Title, Dynamic name Price, Dynamic named ASIN#) I want to be able to add new rows to the gridview from three different strings. I have a function that looks like this: Private Sub displayData(title As String, cost As String, asin As String) Is it possible to even add new data to the gridview with these strings. I've looked all around online and most things deal with databases. Thanks for any insight you can give.
0
9,919,992
03/29/2012 06:14:44
1,225,411
02/22/2012 09:26:11
1
0
How to remove an item from gallery
I created a gallery of webviews in an android app.I want to remove previously selected view from this gallery.How is it possible?
android
null
null
null
null
null
open
How to remove an item from gallery === I created a gallery of webviews in an android app.I want to remove previously selected view from this gallery.How is it possible?
0
9,920,001
03/29/2012 06:16:11
402,616
07/26/2010 18:31:01
174
10
Including literal HTML code in org-mode templates
In org-mode, when you export HTML projects you can use templates to give all exported pages the same options, this is described here http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html. Now, I tried to add literal HTML code with #begin_html ... #end_html but it didn't work out. Does anyone know how to add html code to each HTML file that is exported in the project?
emacs
elisp
org-mode
null
null
null
open
Including literal HTML code in org-mode templates === In org-mode, when you export HTML projects you can use templates to give all exported pages the same options, this is described here http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html. Now, I tried to add literal HTML code with #begin_html ... #end_html but it didn't work out. Does anyone know how to add html code to each HTML file that is exported in the project?
0
9,805,079
03/21/2012 12:55:31
252,975
01/18/2010 06:58:11
171
33
how to copy external file after installation in msifactory
I have a license.xml file that I want to give to my client with the installer. This file will always be placed with the installer. This file should be copied by installer to the target directory set by client during installation I am using MSIFactory for creating installer. I am not able to do this. I searched internet but did not get any perfect answer.
asp.net
msi
windows-installer
null
null
null
open
how to copy external file after installation in msifactory === I have a license.xml file that I want to give to my client with the installer. This file will always be placed with the installer. This file should be copied by installer to the target directory set by client during installation I am using MSIFactory for creating installer. I am not able to do this. I searched internet but did not get any perfect answer.
0
9,920,003
03/29/2012 06:16:14
1,299,956
03/29/2012 06:07:45
1
0
Overlay DIVs with images on scrolling
I have 6 divs that are placed one below the other, and when I scroll, I am trying to use a technique that makes the corresponding div to overlay/overlap the above div by making it look like the Curtain is raising for the corresponding div, and the Curtain itself is the div above it. Here is some code I developed by using own decisions as well as ideas from the web. var lastScrollPos, currentScrollTop = 0; var newpos, newpos2, newpos3, newpos4, newpos5, newpos6; var stop; var l1h = 902; var l2h = 810; var l3h = 891; var l4h = 850; var l5h = 800; var l6h = 700; var l1t = 0; var l2t = 902; var l3t = 902; var l4t = 902; var l5t = 902; var l6t = 902; var pos, pos2, pos3, pos4, pos5, pos6; var speed = 200; var diff; $(window).scroll(function() { pos = $("#layer2").position(); pos2 = $("#layer3").position(); pos3 = $("#layer4").position(); pos4 = $("#layer5").position(); pos5 = $("#layer6").position(); stop = $(window).scrollTop(); if(lastScrollPos - stop > 0) { // Scrolled up lastScrollPos = stop; if(stop >= l1t && stop <= l2t) { // Layer 2 check current scroll position of window in pixels diff = parseInt(l2t) / 2; if(pos.top > 0) { newpos = pos.top + diff + "px"; } } else if(stop >= l2t && stop <= l3t) { // Layer 3 diff = parseInt(l3t) / 2; newpos2 = pos2.top + diff + "px"; } else if(stop >= l3t && stop <= l4t) { // Layer 4 diff = parseInt(l4t) / 2; newpos3 = pos3.top + diff + "px"; } } else { // Scrolled down lastScrollPos = stop; if(stop >= l1t && stop <= l2t) { // Layer 2 diff = l2t - stop; if(diff > 0) { diff = parseInt(diff) / 2; newpos = pos.top - diff +"px"; } else { newpos = l1t; } $("#layer2").css("top", newpos); if(stop == l2t) { newpos2 = stop + l2h; // Assign top position of next layer by adding current position to height of current layer $("#layer3").css("top", newpos2); } } else if(stop >= l2t && stop <= l3t) { // Layer 3 check scroll position and compare to fixed positions diff = l3t - stop; if(diff > 0) { diff = parseInt(diff) / 2; newpos2 = pos2.top - diff + "px"; } else { newpos2 = l2t; } $("#layer3").css("top", newpos2); if(stop == l3t) { newpos3 = diff; $("#layer4").css("top", newpos3); } } else if(stop >= l3t && stop <= l4t) { // Layer 4 diff = l4t - stop; if(diff > 0) { diff = parseInt(diff) / 2; newpos3 = pos3.top - speed + "px"; } else { newpos3 = l3t; } $("#layer4").css("top", newpos3); } } }); The CSS is in such a way that each div is exactly below the above div which means, the position is absolute and the top is the height of the previous div The above code works partially, but could you guys help me out?
javascript
jquery
html
css
null
null
open
Overlay DIVs with images on scrolling === I have 6 divs that are placed one below the other, and when I scroll, I am trying to use a technique that makes the corresponding div to overlay/overlap the above div by making it look like the Curtain is raising for the corresponding div, and the Curtain itself is the div above it. Here is some code I developed by using own decisions as well as ideas from the web. var lastScrollPos, currentScrollTop = 0; var newpos, newpos2, newpos3, newpos4, newpos5, newpos6; var stop; var l1h = 902; var l2h = 810; var l3h = 891; var l4h = 850; var l5h = 800; var l6h = 700; var l1t = 0; var l2t = 902; var l3t = 902; var l4t = 902; var l5t = 902; var l6t = 902; var pos, pos2, pos3, pos4, pos5, pos6; var speed = 200; var diff; $(window).scroll(function() { pos = $("#layer2").position(); pos2 = $("#layer3").position(); pos3 = $("#layer4").position(); pos4 = $("#layer5").position(); pos5 = $("#layer6").position(); stop = $(window).scrollTop(); if(lastScrollPos - stop > 0) { // Scrolled up lastScrollPos = stop; if(stop >= l1t && stop <= l2t) { // Layer 2 check current scroll position of window in pixels diff = parseInt(l2t) / 2; if(pos.top > 0) { newpos = pos.top + diff + "px"; } } else if(stop >= l2t && stop <= l3t) { // Layer 3 diff = parseInt(l3t) / 2; newpos2 = pos2.top + diff + "px"; } else if(stop >= l3t && stop <= l4t) { // Layer 4 diff = parseInt(l4t) / 2; newpos3 = pos3.top + diff + "px"; } } else { // Scrolled down lastScrollPos = stop; if(stop >= l1t && stop <= l2t) { // Layer 2 diff = l2t - stop; if(diff > 0) { diff = parseInt(diff) / 2; newpos = pos.top - diff +"px"; } else { newpos = l1t; } $("#layer2").css("top", newpos); if(stop == l2t) { newpos2 = stop + l2h; // Assign top position of next layer by adding current position to height of current layer $("#layer3").css("top", newpos2); } } else if(stop >= l2t && stop <= l3t) { // Layer 3 check scroll position and compare to fixed positions diff = l3t - stop; if(diff > 0) { diff = parseInt(diff) / 2; newpos2 = pos2.top - diff + "px"; } else { newpos2 = l2t; } $("#layer3").css("top", newpos2); if(stop == l3t) { newpos3 = diff; $("#layer4").css("top", newpos3); } } else if(stop >= l3t && stop <= l4t) { // Layer 4 diff = l4t - stop; if(diff > 0) { diff = parseInt(diff) / 2; newpos3 = pos3.top - speed + "px"; } else { newpos3 = l3t; } $("#layer4").css("top", newpos3); } } }); The CSS is in such a way that each div is exactly below the above div which means, the position is absolute and the top is the height of the previous div The above code works partially, but could you guys help me out?
0
9,920,004
03/29/2012 06:16:25
902,271
09/15/2010 04:03:58
1
0
How to silent install Postgresql on Windows 7
I want to install "postgresql-9.1.3-1-windows-x64.exe" on windows 7 silently. Where can i find msi install of postgresql-9.1.3.1 Thank you Zak
c#
postgresql
install
silent
null
null
open
How to silent install Postgresql on Windows 7 === I want to install "postgresql-9.1.3-1-windows-x64.exe" on windows 7 silently. Where can i find msi install of postgresql-9.1.3.1 Thank you Zak
0
71,022
09/16/2008 10:27:02
11,703
09/16/2008 10:27:02
1
0
SQL MAX of multiple columns?
How do you return 1 value per row of the max of several columns: TableName [Number, Date1, Date1, Date3, Cost] I need to return something like this: [Number, Most Recent Date, Cost] Query?
mssql
null
null
null
null
null
open
SQL MAX of multiple columns? === How do you return 1 value per row of the max of several columns: TableName [Number, Date1, Date1, Date3, Cost] I need to return something like this: [Number, Most Recent Date, Cost] Query?
0
71,029
09/16/2008 10:28:34
11,372
09/16/2008 07:29:09
34
0
Best source for Algorithms?
I have the book "Introduction to Algorithms" by by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein. What are the other books/sources for algorithms? Even I would like to know information on communities where discussion about Algorithms happen.
algorithms
null
null
null
null
null
open
Best source for Algorithms? === I have the book "Introduction to Algorithms" by by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein. What are the other books/sources for algorithms? Even I would like to know information on communities where discussion about Algorithms happen.
0
71,030
09/16/2008 10:28:37
1,113
08/12/2008 12:53:12
33
1
Can I add maven repositories in teh command line?
I'm aware I can add maven repositories for fetching dependencies in ~/.m2/settings.xml. But is it possible to add a repository using command line, something like: mvn install -Dmaven.repository=http://example.com/maven2 The reason I want to do this is because I'm using a continuous integration tool where I have full control over the command line options it uses to call maven, but managing the settings.xml for the user that runs the integration tool is a bit of a hassle.
maven-2
java
build-process
null
null
null
open
Can I add maven repositories in teh command line? === I'm aware I can add maven repositories for fetching dependencies in ~/.m2/settings.xml. But is it possible to add a repository using command line, something like: mvn install -Dmaven.repository=http://example.com/maven2 The reason I want to do this is because I'm using a continuous integration tool where I have full control over the command line options it uses to call maven, but managing the settings.xml for the user that runs the integration tool is a bit of a hassle.
0
71,031
09/16/2008 10:28:44
7,050
09/15/2008 13:04:36
11
4
Managing large volumes of data - stored procedures or datasets or other...?
I have an application that imports large volumes of data daily, several 100 thousands records.<br> Data comes from different sources. The data is read using C#, then bulk inserted into the database. <br> <br> This data is then processed: - different tables are linked - new tables are generated - data is corrected using complicated algorithmns (totals of certain tables have to total zero) Most of this processing is done in stored procedures. <br> Although some of the complex processing would be simpler in C#, the extraction of the data into a dataset and its reinjection would slow things down considerably. <br> You may ask why I do not process the data before inserting it into the database, but I do not think it practical to manipulate 100,000s of records in memory, and the SQLs set based commands help when creating lots of records. <br> <br> This will probably spark up the age old question of using stored procedures and their pros and cons. (eg. How do you unit test stored procedures?) <br> <br> What I would like in response, is your experience with large volumes of data and how you tackled the problem.
c#
database
null
null
null
null
open
Managing large volumes of data - stored procedures or datasets or other...? === I have an application that imports large volumes of data daily, several 100 thousands records.<br> Data comes from different sources. The data is read using C#, then bulk inserted into the database. <br> <br> This data is then processed: - different tables are linked - new tables are generated - data is corrected using complicated algorithmns (totals of certain tables have to total zero) Most of this processing is done in stored procedures. <br> Although some of the complex processing would be simpler in C#, the extraction of the data into a dataset and its reinjection would slow things down considerably. <br> You may ask why I do not process the data before inserting it into the database, but I do not think it practical to manipulate 100,000s of records in memory, and the SQLs set based commands help when creating lots of records. <br> <br> This will probably spark up the age old question of using stored procedures and their pros and cons. (eg. How do you unit test stored procedures?) <br> <br> What I would like in response, is your experience with large volumes of data and how you tackled the problem.
0