question_id
int64
4
6.31M
answer_id
int64
7
6.31M
title
stringlengths
9
150
question_body
stringlengths
0
28.8k
answer_body
stringlengths
60
27.2k
question_text
stringlengths
40
28.9k
combined_text
stringlengths
124
39.6k
tags
listlengths
1
6
question_score
int64
0
26.3k
answer_score
int64
0
28.8k
view_count
int64
15
14M
answer_count
int64
0
182
favorite_count
int64
0
32
question_creation_date
stringdate
2008-07-31 21:42:52
2011-06-10 18:12:18
answer_creation_date
stringdate
2008-07-31 22:17:57
2011-06-10 18:14:17
6,205,960
6,206,219
How do I build a runtime version agnostic DLL in C++?
My product is a C++ library, which, on Windows, is distributed as a dll. It makes very little use of the c-runtime (basic iostream and that's it), so I'm sure that all recent versions of the CRT will be fine. Since my client is supposed to build his application using my dll, I don't want to impose upon him any specific...
There's no real way to ensure your DLL works with multiple runtimes -- any of the types that change between them can lead to incompatibilities. For instance, the size of an object can change, or the location of members in them. There is very little room in C++ for this kind of thing. The best thing you can do is static...
How do I build a runtime version agnostic DLL in C++? My product is a C++ library, which, on Windows, is distributed as a dll. It makes very little use of the c-runtime (basic iostream and that's it), so I'm sure that all recent versions of the CRT will be fine. Since my client is supposed to build his application usin...
TITLE: How do I build a runtime version agnostic DLL in C++? QUESTION: My product is a C++ library, which, on Windows, is distributed as a dll. It makes very little use of the c-runtime (basic iostream and that's it), so I'm sure that all recent versions of the CRT will be fine. Since my client is supposed to build hi...
[ "c++", "windows", "dll" ]
13
12
3,206
8
0
2011-06-01T18:29:21.490000
2011-06-01T18:53:31.100000
6,205,961
6,207,227
Better frame rate drawing bitmaps in a Canvas (Part 2)?
Here's what I'm trying to do: I'm trying to load a sequence of bitmaps to display an animation. That means that I need to have a descent fps (24 fps). I need to load no more than 10 seconds of animations or about 300 bitmaps. And since it's a live wallpaper I'm limited to manually drawing each frame. Here's what I trie...
What you're trying to do (i.e. full-frame animation) is not easy. Almost all Android animation (from the Lunar Lander example in the SDK to Angry Birds) consists of moving small sprites on a relatively static background. The "obvious" solution to your problem would be to turn your animation into an mpeg and then decode...
Better frame rate drawing bitmaps in a Canvas (Part 2)? Here's what I'm trying to do: I'm trying to load a sequence of bitmaps to display an animation. That means that I need to have a descent fps (24 fps). I need to load no more than 10 seconds of animations or about 300 bitmaps. And since it's a live wallpaper I'm li...
TITLE: Better frame rate drawing bitmaps in a Canvas (Part 2)? QUESTION: Here's what I'm trying to do: I'm trying to load a sequence of bitmaps to display an animation. That means that I need to have a descent fps (24 fps). I need to load no more than 10 seconds of animations or about 300 bitmaps. And since it's a liv...
[ "android", "animation", "opengl-es", "bitmap", "live-wallpaper" ]
0
1
977
1
0
2011-06-01T18:29:25.560000
2011-06-01T20:28:20.297000
6,205,971
6,242,559
django : Display modelformset, then edit, then save -
I'm looking for a simple modelformset example - I have a model class Category(BaseModel): categoryText = db.StringProperty() parentCat = db.IntegerProperty() I am trying to create a formset to display all available Categories wihle they all could be edited and then submit the edits. I am getting stuck where I get erro...
I figured it out - I was using appengine helper as a patch to get django working - this patch does not support model formsets. Must use GAE version of forms which is not as rich as Django. For this reason I switched from appengine helper to non-rel - although I had some issues during install, this version of the patch ...
django : Display modelformset, then edit, then save - I'm looking for a simple modelformset example - I have a model class Category(BaseModel): categoryText = db.StringProperty() parentCat = db.IntegerProperty() I am trying to create a formset to display all available Categories wihle they all could be edited and then...
TITLE: django : Display modelformset, then edit, then save - QUESTION: I'm looking for a simple modelformset example - I have a model class Category(BaseModel): categoryText = db.StringProperty() parentCat = db.IntegerProperty() I am trying to create a formset to display all available Categories wihle they all could ...
[ "django", "google-app-engine", "django-forms" ]
2
0
239
1
0
2011-06-01T18:30:25.170000
2011-06-05T11:15:13.317000
6,205,972
6,208,211
uninitialized constant Mysql::error
I am trying to get my rails app to production but this is my first time. I am running mysql 5.5 and gem 2.8.1. When trying rake db:setup RAILS_ENV="production", I get the following: rake aborted! uninitialized constant Mysql::Error any help is much appreciated i thought it might be useful to add the trace file for this...
As mentioned in Rails 3 Mysql Problems you should be using the mysql2 gem if possible. Make sure to change mysql to mysql2 in both your Gemfile and your database.yml
uninitialized constant Mysql::error I am trying to get my rails app to production but this is my first time. I am running mysql 5.5 and gem 2.8.1. When trying rake db:setup RAILS_ENV="production", I get the following: rake aborted! uninitialized constant Mysql::Error any help is much appreciated i thought it might be u...
TITLE: uninitialized constant Mysql::error QUESTION: I am trying to get my rails app to production but this is my first time. I am running mysql 5.5 and gem 2.8.1. When trying rake db:setup RAILS_ENV="production", I get the following: rake aborted! uninitialized constant Mysql::Error any help is much appreciated i tho...
[ "mysql", "ruby-on-rails", "rake" ]
7
9
3,924
2
0
2011-06-01T18:30:26.153000
2011-06-01T21:56:32.467000
6,205,979
6,217,362
Rewriting seo-url to url with query string
I want to use mod_rewrite to do urls like this: http://domain.tld/id/1/type/2/url/http://domain2.tld How can I do that?
Put this code in your.htaccess file: Options +FollowSymlinks -MultiViews RewriteEngine on RewriteCond %{REQUEST_URI} ^/+id/([^/]*)/type/([^/]*)/url/(http://)?(.*)$ [NC] RewriteRule ^ /api.php?uid=%1&type=%2&url=%3%4 [L,NE] This will support both /id/1/type/2/url/http://domain2.tld and /id/1/type/2/url/domain2.tld URIs...
Rewriting seo-url to url with query string I want to use mod_rewrite to do urls like this: http://domain.tld/id/1/type/2/url/http://domain2.tld How can I do that?
TITLE: Rewriting seo-url to url with query string QUESTION: I want to use mod_rewrite to do urls like this: http://domain.tld/id/1/type/2/url/http://domain2.tld How can I do that? ANSWER: Put this code in your.htaccess file: Options +FollowSymlinks -MultiViews RewriteEngine on RewriteCond %{REQUEST_URI} ^/+id/([^/]*...
[ "apache", "mod-rewrite", "url-rewriting" ]
0
1
123
2
0
2011-06-01T18:31:17.670000
2011-06-02T16:30:44.490000
6,205,988
6,206,309
An access Problem : how to show a report in maximize form
I have created a form in access 2010, in which there is a show report button.Whenever a user clicked that button it show a report. Now I want that this report is always visible in maximize form. I have checked report property but there is no such option. How can I do this?
I believe you would need to do this with VBA. Microsoft has published an article about ' How to Use Visual Basic for Applications to Minimize, Maximize, and Restore Access '. This should be able to do exactly what you want. They even provide code examples for you. Other than the button, you would need to do it on the l...
An access Problem : how to show a report in maximize form I have created a form in access 2010, in which there is a show report button.Whenever a user clicked that button it show a report. Now I want that this report is always visible in maximize form. I have checked report property but there is no such option. How can...
TITLE: An access Problem : how to show a report in maximize form QUESTION: I have created a form in access 2010, in which there is a show report button.Whenever a user clicked that button it show a report. Now I want that this report is always visible in maximize form. I have checked report property but there is no su...
[ "ms-access", "ms-access-2010" ]
0
0
1,128
1
0
2011-06-01T18:32:03.547000
2011-06-01T19:02:05.263000
6,205,998
6,206,301
What are the tradeoffs between performSelector:withObject:afterDelay: and dispatch_after
The only functional difference I have encountered is that I can cancel the message scheduled with performSelector:withObject:afterDelay:. I don't know of a way to cancel a block submitted to dispatch_after. (Please let me know if there is a way to do this that I do not know about). I'd like to know more about: function...
dispatch_after is part of the new Grand Central Dispatch, which is an extension to iOS aimed at improving concurrent code execution on multicore hardware. But overall, I think they address different requirements overall. GCD allows to a much finer graded control over concurrent execution of code. You can schedule block...
What are the tradeoffs between performSelector:withObject:afterDelay: and dispatch_after The only functional difference I have encountered is that I can cancel the message scheduled with performSelector:withObject:afterDelay:. I don't know of a way to cancel a block submitted to dispatch_after. (Please let me know if t...
TITLE: What are the tradeoffs between performSelector:withObject:afterDelay: and dispatch_after QUESTION: The only functional difference I have encountered is that I can cancel the message scheduled with performSelector:withObject:afterDelay:. I don't know of a way to cancel a block submitted to dispatch_after. (Pleas...
[ "iphone", "objective-c", "ios", "ios4", "grand-central-dispatch" ]
21
19
7,538
2
0
2011-06-01T18:33:10.023000
2011-06-01T19:01:13.990000
6,206,019
6,213,673
How to force http or https with Url.Action<tController>
I'm using the strongly typed Url.Action method from MvcContrib to do all of my url generation on my site. For example: Url.Action (c => c.List()) Is there a way to force the urls generated by this method to use http or https? Right now it seems to just be creating urls relative to the current page. So, for example, if ...
Unfortunately MvcContrib's Action extension doesn't support generating https URLs. Internally, this method calls into Microsoft's LinkBuilder.BuildUrlFromExpression method from the MvcFutures library which is very simplistic. It only supports generating simple relative links and doesn't support many of the features bui...
How to force http or https with Url.Action<tController> I'm using the strongly typed Url.Action method from MvcContrib to do all of my url generation on my site. For example: Url.Action (c => c.List()) Is there a way to force the urls generated by this method to use http or https? Right now it seems to just be creating...
TITLE: How to force http or https with Url.Action<tController> QUESTION: I'm using the strongly typed Url.Action method from MvcContrib to do all of my url generation on my site. For example: Url.Action (c => c.List()) Is there a way to force the urls generated by this method to use http or https? Right now it seems t...
[ "asp.net", "asp.net-mvc-3", "ssl", "https", "mvccontrib" ]
1
1
6,568
2
0
2011-06-01T18:35:08.177000
2011-06-02T11:01:39.123000
6,206,020
6,206,560
writing url to form input value
Problem: I don't know why my script is not loading a value into the selected input section of a form Scenario: The page, call it the host page, permanently displays a dialog with a link as the content. If a user clicks on the link another dialog, call it the "form dialog" opens with a form. Some items are inserted into...
The problem I suppose is that you put the data onto the body without it being wrapped inside a $(document).ready() clause. For a quick fix you can define the url just as a variable, and then access that variable inside your script. example: http://jsfiddle.net/LF2rs/1/ Ps: I would recommend reading into seperating your...
writing url to form input value Problem: I don't know why my script is not loading a value into the selected input section of a form Scenario: The page, call it the host page, permanently displays a dialog with a link as the content. If a user clicks on the link another dialog, call it the "form dialog" opens with a fo...
TITLE: writing url to form input value QUESTION: Problem: I don't know why my script is not loading a value into the selected input section of a form Scenario: The page, call it the host page, permanently displays a dialog with a link as the content. If a user clicks on the link another dialog, call it the "form dialo...
[ "jquery", "forms", "dialog" ]
0
1
1,903
1
0
2011-06-01T18:35:14.877000
2011-06-01T19:26:02.537000
6,206,039
6,206,275
secure data transfer between Silverlight 4 and WCF service
Background So after fumbling around with wsHttpBinding on my WCF services I find out that Silverlight doesnt support it!! After thinking of sending encrypted data over the wire that is decrypted on both the service and client side I figured that this might be a performance issue. Plus Im not really sure if this is the ...
As @Shiraz suggested you can go for https transport with basicHttpBinding. You have a variety of message level securities supported. Well it is true that basicHttpBinding doesn't support all the message level security. But it does some. http://msdn.microsoft.com/en-us/library/ms730294.aspx summarizes all the possible c...
secure data transfer between Silverlight 4 and WCF service Background So after fumbling around with wsHttpBinding on my WCF services I find out that Silverlight doesnt support it!! After thinking of sending encrypted data over the wire that is decrypted on both the service and client side I figured that this might be a...
TITLE: secure data transfer between Silverlight 4 and WCF service QUESTION: Background So after fumbling around with wsHttpBinding on my WCF services I find out that Silverlight doesnt support it!! After thinking of sending encrypted data over the wire that is decrypted on both the service and client side I figured th...
[ "wcf", "silverlight-4.0", "wcf-security", "wcfserviceclient" ]
0
3
713
2
0
2011-06-01T18:36:56.170000
2011-06-01T18:58:28.260000
6,206,042
6,206,269
import/export data from iphone
Hi guys i am making an application for iPhone that will allow user to access server and pull data thorught NSUrl request and store it in phone memory. Then user won't be able to access the internet( may be somewhere out where there is no internet connection) and when he comes back in the coverage will be able to submit...
The easiest way would be to use a HTTP connection you mentioned. While the user is offline, you can store the data using Core Data. When the user is back you send a HTTP POST/PUT request to upload the data back to the server. For easy HTTP requests on the iPhone use ASIHTTPRequest.
import/export data from iphone Hi guys i am making an application for iPhone that will allow user to access server and pull data thorught NSUrl request and store it in phone memory. Then user won't be able to access the internet( may be somewhere out where there is no internet connection) and when he comes back in the ...
TITLE: import/export data from iphone QUESTION: Hi guys i am making an application for iPhone that will allow user to access server and pull data thorught NSUrl request and store it in phone memory. Then user won't be able to access the internet( may be somewhere out where there is no internet connection) and when he ...
[ "iphone", "ios", "core-data" ]
1
2
358
1
0
2011-06-01T18:37:05.730000
2011-06-01T18:57:51.723000
6,206,043
6,206,206
Index or Unique? What is better MySql
So i have a question. Say you have a table requests, which represent a graph. There are 3 columns in the request table, A, B, time. A -> B At time. So what each row represents is a directed connection from A (the requestor) to B (the requestee) at Time T (time is just for organizing data, not really for anything else)....
In this specific case, use a composite index including A and B. Make sure that A is first in the index. That way when you run these two queries, the index would be used for both. More on composite indexes: http://dev.mysql.com/doc/refman/5.5/en/multiple-column-indexes.html Also, uniqueness (A,B) shouldn't matter unless...
Index or Unique? What is better MySql So i have a question. Say you have a table requests, which represent a graph. There are 3 columns in the request table, A, B, time. A -> B At time. So what each row represents is a directed connection from A (the requestor) to B (the requestee) at Time T (time is just for organizin...
TITLE: Index or Unique? What is better MySql QUESTION: So i have a question. Say you have a table requests, which represent a graph. There are 3 columns in the request table, A, B, time. A -> B At time. So what each row represents is a directed connection from A (the requestor) to B (the requestee) at Time T (time is ...
[ "mysql", "indexing", "key", "unique" ]
17
3
8,834
2
0
2011-06-01T18:37:19.773000
2011-06-01T18:52:38.853000
6,206,044
6,228,939
Autodecode &#x98; encoded values in XML
I have a C# app that makes a call out to a cold fusion web service (well it resembles a web service). This service returns 1252 encoded XML format, and characters passed a certain range come encoded like this: ˜. That is one of the characters that actually comes back. I know the actual text value for this is "˜" in cod...
In the end I didn't find a way to get the XmlTextReader to autodecode the data but I did find the next best thing. Using ReadChars (which isn't available on XmlReader) I was able to retrieve the data from the InnerText of my XML node without having those characters corrupted resulting in loss of data. Here is my code: ...
Autodecode &#x98; encoded values in XML I have a C# app that makes a call out to a cold fusion web service (well it resembles a web service). This service returns 1252 encoded XML format, and characters passed a certain range come encoded like this: ˜. That is one of the characters that actually comes back. I know the ...
TITLE: Autodecode &#x98; encoded values in XML QUESTION: I have a C# app that makes a call out to a cold fusion web service (well it resembles a web service). This service returns 1252 encoded XML format, and characters passed a certain range come encoded like this: ˜. That is one of the characters that actually comes...
[ "c#", "xml" ]
0
0
415
2
0
2011-06-01T18:37:22.913000
2011-06-03T15:11:55.263000
6,206,058
6,206,133
Multiple arraylist into a multi-dimensional array
Hello I was wonder if there was any ways I could merge multiple arraylist into a multi array. Exmaple I have arraylist1 which holds names. arraylist 2 which holds phone number and arraylist 3 which holds address. how could i merge these into one multi array so it would be as a record?
Lets suppose you have three ArrayList of string and all elements at ith index forms a record, ArrayList Names = new ArrayList(); ArrayList Phone = new ArrayList(); ArrayList Address = new ArrayList(); ArrayList res = new ArrayList(); for(int i=0; i
Multiple arraylist into a multi-dimensional array Hello I was wonder if there was any ways I could merge multiple arraylist into a multi array. Exmaple I have arraylist1 which holds names. arraylist 2 which holds phone number and arraylist 3 which holds address. how could i merge these into one multi array so it would ...
TITLE: Multiple arraylist into a multi-dimensional array QUESTION: Hello I was wonder if there was any ways I could merge multiple arraylist into a multi array. Exmaple I have arraylist1 which holds names. arraylist 2 which holds phone number and arraylist 3 which holds address. how could i merge these into one multi ...
[ "c#" ]
0
2
3,082
3
0
2011-06-01T18:39:05.890000
2011-06-01T18:45:15.280000
6,206,059
6,206,130
Rails' resource has 'show' mapped without an ID and creates /users.id links instead of /users/id
For my current routing, the following ruby on rails code: <%= link_to current_user.name, users_path(current_user) %> which produces a link like the following: name In turn, Ruby on Rails has a hard time understanding this as it expects the 1 to be the format: ActiveRecord::RecordNotFound in UsersController#show Couldn'...
You probably want your route to use resources:users, not resource:users. Also, change your link_to to use user_path instead of users_path: <%= link_to current_user.name, user_path(current_user) %>
Rails' resource has 'show' mapped without an ID and creates /users.id links instead of /users/id For my current routing, the following ruby on rails code: <%= link_to current_user.name, users_path(current_user) %> which produces a link like the following: name In turn, Ruby on Rails has a hard time understanding this a...
TITLE: Rails' resource has 'show' mapped without an ID and creates /users.id links instead of /users/id QUESTION: For my current routing, the following ruby on rails code: <%= link_to current_user.name, users_path(current_user) %> which produces a link like the following: name In turn, Ruby on Rails has a hard time un...
[ "ruby-on-rails", "rails-routing" ]
2
9
3,187
1
0
2011-06-01T18:39:06.333000
2011-06-01T18:45:00.707000
6,206,069
6,251,702
Custom Font in Tabbar
Hey, is there a way to set the tabbar's font to e.g. Chalkboard? I've seen the question for the font size and tried it with font, but the loop wouldn't work out. If there's no way for a custom font, is it possible to remove all text and make the tabbar's item covering the whole tab? Or can I somehow put a imageView on ...
I've found myself an amazing and very easy tutorial to achieve exactly what I need. For further reference and for all, that might need that too, here's the link Part 1 Part 2
Custom Font in Tabbar Hey, is there a way to set the tabbar's font to e.g. Chalkboard? I've seen the question for the font size and tried it with font, but the loop wouldn't work out. If there's no way for a custom font, is it possible to remove all text and make the tabbar's item covering the whole tab? Or can I someh...
TITLE: Custom Font in Tabbar QUESTION: Hey, is there a way to set the tabbar's font to e.g. Chalkboard? I've seen the question for the font size and tried it with font, but the loop wouldn't work out. If there's no way for a custom font, is it possible to remove all text and make the tabbar's item covering the whole t...
[ "iphone", "objective-c", "fonts", "uitabbarcontroller" ]
2
6
4,072
3
0
2011-06-01T18:39:30.063000
2011-06-06T12:01:49.793000
6,206,071
6,206,138
returning and using multiple models in MVC
I've been able to successfully return a model to a view and display the results in a strongly-typed fashion. I have never seen an example where multiple models get returned. How do I go about that? I suppose the controller would have something like this: return View(lemondb.Messages.Where(p => p.user == tmp_username).T...
You can create a custom model representing the data needed for your view. public class UserView { public User User{get;set;} public List Messages{get;set;} } And then, return View(new UserView(){ User = user, Messages = message}); In the view: Model.User; Model.Messages; The ViewBag is useful because it is dynamically ...
returning and using multiple models in MVC I've been able to successfully return a model to a view and display the results in a strongly-typed fashion. I have never seen an example where multiple models get returned. How do I go about that? I suppose the controller would have something like this: return View(lemondb.Me...
TITLE: returning and using multiple models in MVC QUESTION: I've been able to successfully return a model to a view and display the results in a strongly-typed fashion. I have never seen an example where multiple models get returned. How do I go about that? I suppose the controller would have something like this: retu...
[ "asp.net-mvc", "entity-framework", "asp.net-mvc-3" ]
9
18
17,357
2
0
2011-06-01T18:39:42.910000
2011-06-01T18:46:02.657000
6,206,075
6,207,256
How do you force Perl to re-compile a regex compiled with "/o" on demand?
Technical question: Given a regex: my $regEx = qr{whatever$myVar}oxi; # Notice /o for "compile-once" What is the most effective way to force it to recompile on demand? (e.g. when I know from the program logic that $myVar value changed) without dropping /o and depending on Perl's internal smarts to auto-recompile? NOTE:...
when I know from the program logic that $myVar value changed m//, s/// and qr// only compile if the pattern doesn't change. All you have to do to get the behaviour you requested is to remove the /o. $ perl -Mre=debug -e' qr/$_/ for qw( abc abc def def abc abc ); ' 2>&1 | grep Compiling Compiling REx "abc" Compiling REx...
How do you force Perl to re-compile a regex compiled with "/o" on demand? Technical question: Given a regex: my $regEx = qr{whatever$myVar}oxi; # Notice /o for "compile-once" What is the most effective way to force it to recompile on demand? (e.g. when I know from the program logic that $myVar value changed) without dr...
TITLE: How do you force Perl to re-compile a regex compiled with "/o" on demand? QUESTION: Technical question: Given a regex: my $regEx = qr{whatever$myVar}oxi; # Notice /o for "compile-once" What is the most effective way to force it to recompile on demand? (e.g. when I know from the program logic that $myVar value c...
[ "regex", "perl", "compilation", "modifier" ]
7
4
725
3
0
2011-06-01T18:39:53.350000
2011-06-01T20:30:03.273000
6,206,083
6,206,208
Add floatValues to NSArray add then output total
My brain is fried! I can't think. I'm using Core Data, and this is an iPhone app just so you know. What i am trying to do is take the floatValues (like amount paid) from text fields and them to an array, add the values in the array and output the total to a label. For some odd reason I honestly can't think.I'm scattere...
The NSArray in Objective C stores only Objects, so you will need to convert the float integral value into an NSNumber object using the following code and of course back. [arr addObject: [NSNumber numberWithFloat: fV]]; float total = 0.0; for (NSNumber v in arr) { total += [v floatValue]; } However, you could easily cr...
Add floatValues to NSArray add then output total My brain is fried! I can't think. I'm using Core Data, and this is an iPhone app just so you know. What i am trying to do is take the floatValues (like amount paid) from text fields and them to an array, add the values in the array and output the total to a label. For so...
TITLE: Add floatValues to NSArray add then output total QUESTION: My brain is fried! I can't think. I'm using Core Data, and this is an iPhone app just so you know. What i am trying to do is take the floatValues (like amount paid) from text fields and them to an array, add the values in the array and output the total ...
[ "iphone", "floating-point", "uitextfield", "nsarray", "uilabel" ]
0
1
462
2
0
2011-06-01T18:40:57.997000
2011-06-01T18:52:45.453000
6,206,088
6,206,295
Command Prompt "dir /b /s > file.txt" need to remove directories from results
I am using the following command to dump the complete file listings recursively from a directory. dir /b /s c:\myfolder > c:\mylist.txt This works fine but it is display the results with the full path as well, beacuse I am using a regex expression on the results I need them to display only the filenames. Anyone any ide...
Change your regex to get the filename from the entire path. If you can use powershell, look at Get-ChildItem. You can have more powerful options with it.
Command Prompt "dir /b /s > file.txt" need to remove directories from results I am using the following command to dump the complete file listings recursively from a directory. dir /b /s c:\myfolder > c:\mylist.txt This works fine but it is display the results with the full path as well, beacuse I am using a regex expre...
TITLE: Command Prompt "dir /b /s > file.txt" need to remove directories from results QUESTION: I am using the following command to dump the complete file listings recursively from a directory. dir /b /s c:\myfolder > c:\mylist.txt This works fine but it is display the results with the full path as well, beacuse I am u...
[ "command", "prompt" ]
4
2
77,980
6
0
2011-06-01T18:41:09.417000
2011-06-01T19:00:14.483000
6,206,089
6,206,183
Is it a good practice to add names to __all__ using a decorator?
Is this a good practice in Python (from Active State Recipes -- Public Decorator )? import sys def public(f): """Use a decorator to avoid retyping function/class names. * Based on an idea by Duncan Booth: http://groups.google.com/group/comp.lang.python/msg/11cbb03e09611b8a * Improved via a suggestion by Dave Angel: h...
Yes, it's a good practice. This decorator allows you to state your intentions right at function or class definition, rather than directly afterwards. That makes your code more readable. @public def foo(): pass @public class bar(): pass class helper(): # not part of the modules public interface! pass Note: helper is s...
Is it a good practice to add names to __all__ using a decorator? Is this a good practice in Python (from Active State Recipes -- Public Decorator )? import sys def public(f): """Use a decorator to avoid retyping function/class names. * Based on an idea by Duncan Booth: http://groups.google.com/group/comp.lang.python/...
TITLE: Is it a good practice to add names to __all__ using a decorator? QUESTION: Is this a good practice in Python (from Active State Recipes -- Public Decorator )? import sys def public(f): """Use a decorator to avoid retyping function/class names. * Based on an idea by Duncan Booth: http://groups.google.com/group...
[ "python", "coding-style" ]
22
8
3,728
4
0
2011-06-01T18:41:16.060000
2011-06-01T18:50:37.297000
6,206,091
6,206,139
Show/Hide Div Based on URL (PHP)
I am basically trying to hide a DIV on the homepage but have it show elsewhere (Controled by the URL). DIV name "left_col" Trying to do this using just php. How would this be done?
Supposing your homepage url was index.php, something like this should work and be very easy: // We're NOT on the home page if (strpos($_SERVER['REQUEST_URI'], "index.php") >= 0) { echo " contents "; } There are many other ways to do this, depending on the rest of your architecture, if you use templating engines, or man...
Show/Hide Div Based on URL (PHP) I am basically trying to hide a DIV on the homepage but have it show elsewhere (Controled by the URL). DIV name "left_col" Trying to do this using just php. How would this be done?
TITLE: Show/Hide Div Based on URL (PHP) QUESTION: I am basically trying to hide a DIV on the homepage but have it show elsewhere (Controled by the URL). DIV name "left_col" Trying to do this using just php. How would this be done? ANSWER: Supposing your homepage url was index.php, something like this should work and ...
[ "php", "html" ]
0
4
5,324
1
0
2011-06-01T18:41:31.393000
2011-06-01T18:46:09.037000
6,206,092
6,206,119
VB.NET: Possible to separate function into sections?
Is it possible to divide a function into sections, something like this? Function myFunc Section Dim i As Integer = 0... End Section Section Dim i As Integer = 0... End Section End Function I realize it could be done with If True Then Dim i As Integer = 0... End If but that seems like a hack Am I going about this the...
I would recommend refactoring your "Sections" into separate functions or subs, and calling them as appropriate. The fact that you want this separate seems like it highlights an opportunity for refactoring....
VB.NET: Possible to separate function into sections? Is it possible to divide a function into sections, something like this? Function myFunc Section Dim i As Integer = 0... End Section Section Dim i As Integer = 0... End Section End Function I realize it could be done with If True Then Dim i As Integer = 0... End If...
TITLE: VB.NET: Possible to separate function into sections? QUESTION: Is it possible to divide a function into sections, something like this? Function myFunc Section Dim i As Integer = 0... End Section Section Dim i As Integer = 0... End Section End Function I realize it could be done with If True Then Dim i As Int...
[ ".net", "vb.net" ]
3
3
529
2
0
2011-06-01T18:41:39.460000
2011-06-01T18:43:52.927000
6,206,095
6,208,163
Common DLL referencing throughout Silverlight project
I have a common silverlight project. This project project, among other things, includes constants and static classes. The silverlight App i have references this common library. In addition, i have a handful of external modules that are loaded on-demand (via Prism). Each module is its own.Xap file and they too reference...
By default DLLs are loaded on demand. This means that you can't really guarantee which directory they will load from. This is a common issue among modular applications and one that there isn't a ready prescription for. It depends on requirements, essentially. Some things you can do: GAC the Common.dll in the target env...
Common DLL referencing throughout Silverlight project I have a common silverlight project. This project project, among other things, includes constants and static classes. The silverlight App i have references this common library. In addition, i have a handful of external modules that are loaded on-demand (via Prism). ...
TITLE: Common DLL referencing throughout Silverlight project QUESTION: I have a common silverlight project. This project project, among other things, includes constants and static classes. The silverlight App i have references this common library. In addition, i have a handful of external modules that are loaded on-de...
[ "silverlight", "prism" ]
0
0
337
2
0
2011-06-01T18:42:03.330000
2011-06-01T21:51:08.917000
6,206,097
6,206,352
How to disable Go button on iPhone keyboard
Can any one please let me know how to disable the 'Go' button on keyboard? The purpose is: when the text field is empty Go button has to be disable (gray color) and when type some thing the Go button become active and color blue. (Same as Apple Find iPhone app). Many thanks
In Interface builder, tick the box which is labelled Auto-enable Return Key. In code do: [textField setEnablesReturnKeyAutomatically:YES]; The Return key (Go key) will only be enabled when the text field is not empty.
How to disable Go button on iPhone keyboard Can any one please let me know how to disable the 'Go' button on keyboard? The purpose is: when the text field is empty Go button has to be disable (gray color) and when type some thing the Go button become active and color blue. (Same as Apple Find iPhone app). Many thanks
TITLE: How to disable Go button on iPhone keyboard QUESTION: Can any one please let me know how to disable the 'Go' button on keyboard? The purpose is: when the text field is empty Go button has to be disable (gray color) and when type some thing the Go button become active and color blue. (Same as Apple Find iPhone a...
[ "iphone", "button", "keyboard" ]
6
12
2,962
1
0
2011-06-01T18:42:10.887000
2011-06-01T19:05:27.273000
6,206,101
6,210,215
page method question
I'm building an asp.net page that uses a page method call from jquery. This is a simple test page but I can't get it to work and I can't see why. I added a script manager to the aspx. Here's the javascript function: And here's the full code behind: using System; using System.Collections.Generic; using System.Linq; usin...
I have made some small changes to your code. Changed your contentType, data and dataType of your $.ajax request Changed your onsuccess handler to check for.hasOwnProperty("d") Changed your onerror handler so that you may see what the actual error is. I strongly believe that you had a parse error since you used text for...
page method question I'm building an asp.net page that uses a page method call from jquery. This is a simple test page but I can't get it to work and I can't see why. I added a script manager to the aspx. Here's the javascript function: And here's the full code behind: using System; using System.Collections.Generic; us...
TITLE: page method question QUESTION: I'm building an asp.net page that uses a page method call from jquery. This is a simple test page but I can't get it to work and I can't see why. I added a script manager to the aspx. Here's the javascript function: And here's the full code behind: using System; using System.Colle...
[ "c#", "asp.net" ]
0
1
165
2
0
2011-06-01T18:42:40.667000
2011-06-02T04:01:48.800000
6,206,105
6,206,177
Running web-fetches from within a Hadoop cluster
A blog post - http://petewarden.typepad.com/searchbrowser/2011/05/using-hadoop-with-external-api-calls.html - suggests calling external systems (querying the twitter API, or crawling webpages) from within a Hadoop cluster. For the system I'm currently developing, there are both fast, and slow(bulk) sub-systems. Data is...
The plus: it's a super easy way to distribute the work that needs to be done. The minus: due to the way that Hadoop recovers from failures, you need to be very careful about managing what is and isn't run (which you can definitely do, it's just something to watch out for). If a reduce fails, for example, then all of th...
Running web-fetches from within a Hadoop cluster A blog post - http://petewarden.typepad.com/searchbrowser/2011/05/using-hadoop-with-external-api-calls.html - suggests calling external systems (querying the twitter API, or crawling webpages) from within a Hadoop cluster. For the system I'm currently developing, there a...
TITLE: Running web-fetches from within a Hadoop cluster QUESTION: A blog post - http://petewarden.typepad.com/searchbrowser/2011/05/using-hadoop-with-external-api-calls.html - suggests calling external systems (querying the twitter API, or crawling webpages) from within a Hadoop cluster. For the system I'm currently d...
[ "hadoop" ]
1
2
280
1
0
2011-06-01T18:42:51.643000
2011-06-01T18:50:09.940000
6,206,109
6,206,417
couchdb log files missing, can't get any to be created :-(
I'm running couchdb 1.0.1 on ubuntu and everything is working OK - except that I've just seen that my log files are non existent. They seem to have been like this for nearly a year, but to be fair I haven't really been using the system as it is a test bed for a project I've just picked up again. /var/log/couchdb contai...
There is a possibility that the log file configuration is being set by some other.ini file. Issue a GET request to http://localhost:5984/_config/log to see what CouchDB has set. I had stuff like this happen to me because I had installed CouchDB multiple times using different methods. (compiling from source, using apt, ...
couchdb log files missing, can't get any to be created :-( I'm running couchdb 1.0.1 on ubuntu and everything is working OK - except that I've just seen that my log files are non existent. They seem to have been like this for nearly a year, but to be fair I haven't really been using the system as it is a test bed for a...
TITLE: couchdb log files missing, can't get any to be created :-( QUESTION: I'm running couchdb 1.0.1 on ubuntu and everything is working OK - except that I've just seen that my log files are non existent. They seem to have been like this for nearly a year, but to be fair I haven't really been using the system as it i...
[ "couchdb" ]
6
7
7,345
2
0
2011-06-01T18:42:59.933000
2011-06-01T19:11:24.657000
6,206,120
6,207,912
Communicating to server from Firefox extension
I'm looking to make an HTTP POST request to a PHP script on a server from a Firefox extension and get JSON in return. The amount of data that I would ideally like to send to the server in one request is too large for a GET request (due to the practical URL length restrictions). Therefore, I cannot use JSONP with a GET ...
From your comment: There are origin restrictions when performing cross-domain requests. JSONP is generally the solution for doing requests over different domains, but it is limited in that it is a GET request with an inherent limit on the data being transmitted (due to the practical limitations of URL length). The gene...
Communicating to server from Firefox extension I'm looking to make an HTTP POST request to a PHP script on a server from a Firefox extension and get JSON in return. The amount of data that I would ideally like to send to the server in one request is too large for a GET request (due to the practical URL length restricti...
TITLE: Communicating to server from Firefox extension QUESTION: I'm looking to make an HTTP POST request to a PHP script on a server from a Firefox extension and get JSON in return. The amount of data that I would ideally like to send to the server in one request is too large for a GET request (due to the practical UR...
[ "javascript", "http", "firefox-addon" ]
2
2
1,054
1
0
2011-06-01T18:43:58.163000
2011-06-01T21:25:53.360000
6,206,122
6,206,294
Android adding a custom extended listactivity to layout in code
I have a simple linearlayout with a textbox a button and a listview, I'm doing some URL data getting when something is entered in the textbox and the button is pressed I want to parse the results and display in the listview. What I can't work out is how to instatiate the listview from within my extende activity class a...
As long as your main.xml layout file has a ListView in it, you're on the right path. Set its @+id to something arbitrary and reference it in your code with: ListView lv = (ListView) findViewById(R.id.arbitrary_id); You don't necessarily need a ListActivity to use a ListView. Simply parse the data that you receive back ...
Android adding a custom extended listactivity to layout in code I have a simple linearlayout with a textbox a button and a listview, I'm doing some URL data getting when something is entered in the textbox and the button is pressed I want to parse the results and display in the listview. What I can't work out is how to...
TITLE: Android adding a custom extended listactivity to layout in code QUESTION: I have a simple linearlayout with a textbox a button and a listview, I'm doing some URL data getting when something is entered in the textbox and the button is pressed I want to parse the results and display in the listview. What I can't ...
[ "android", "class", "listview" ]
0
0
417
3
0
2011-06-01T18:44:11.550000
2011-06-01T19:00:13.513000
6,206,132
6,206,210
How to Convert Special Chars to Standard Chars?
I'm looking for way to convert chars like āžšķūņrūķīš to azskunrukis. In other words, to replace ā with a, ž with z and so. Is there anything built-in, or I should create my own "library" of from-to symbols?
Take a look at iconv's transliteration capabilities: The above example will output something similar to: Original: This is the Euro symbol '€'. TRANSLIT: This is the Euro symbol 'EUR'. IGNORE: This is the Euro symbol ''. Plain: Notice: iconv(): Detected an illegal character in input string in.\iconv-example.php on line...
How to Convert Special Chars to Standard Chars? I'm looking for way to convert chars like āžšķūņrūķīš to azskunrukis. In other words, to replace ā with a, ž with z and so. Is there anything built-in, or I should create my own "library" of from-to symbols?
TITLE: How to Convert Special Chars to Standard Chars? QUESTION: I'm looking for way to convert chars like āžšķūņrūķīš to azskunrukis. In other words, to replace ā with a, ž with z and so. Is there anything built-in, or I should create my own "library" of from-to symbols? ANSWER: Take a look at iconv's transliteratio...
[ "php", "encoding", "special-characters" ]
5
6
5,785
3
0
2011-06-01T18:45:13.547000
2011-06-01T18:52:57.340000
6,206,144
6,206,628
How Can A .dll File Read a .txt File?
I would like my Browser Helper Object which is simply a.dll, to be able to read a text file. I have tried using a pointer to a FILE, as well as ifstream in("file name goes here"). Before implementing these two methods of reading files into the BHO, I tested them individually, and made sure each example dealt with simil...
Are you providing an absolute path to the file? If you're just using a relative path you may not be in the same working directory while running IE.
How Can A .dll File Read a .txt File? I would like my Browser Helper Object which is simply a.dll, to be able to read a text file. I have tried using a pointer to a FILE, as well as ifstream in("file name goes here"). Before implementing these two methods of reading files into the BHO, I tested them individually, and m...
TITLE: How Can A .dll File Read a .txt File? QUESTION: I would like my Browser Helper Object which is simply a.dll, to be able to read a text file. I have tried using a pointer to a FILE, as well as ifstream in("file name goes here"). Before implementing these two methods of reading files into the BHO, I tested them i...
[ "c++", "dll", "text", "bho" ]
0
0
1,719
2
0
2011-06-01T18:46:53.403000
2011-06-01T19:33:03.637000
6,206,148
6,206,538
Rails 3 - default_scope
I would like to order the article tags on my index page by popularity as opposed to by creation date i.e. the tags with the most amount of articles in them from highest to lowest. My model is as follows? class Tag < ActiveRecord::Base attr_accessible:name validates:name,:uniqueness => true # order by creation default...
I recommend using a counter cache column to store a taggings_count (which automatically gets updated when new taggings). And then your default scope can look like this: default_scope:order => 'taggings_count DESC' For more info, search for "counter_cache" in the Rails guide for AR associations
Rails 3 - default_scope I would like to order the article tags on my index page by popularity as opposed to by creation date i.e. the tags with the most amount of articles in them from highest to lowest. My model is as follows? class Tag < ActiveRecord::Base attr_accessible:name validates:name,:uniqueness => true # o...
TITLE: Rails 3 - default_scope QUESTION: I would like to order the article tags on my index page by popularity as opposed to by creation date i.e. the tags with the most amount of articles in them from highest to lowest. My model is as follows? class Tag < ActiveRecord::Base attr_accessible:name validates:name,:uniqu...
[ "ruby-on-rails-3" ]
4
5
2,940
1
0
2011-06-01T18:47:01.283000
2011-06-01T19:23:33.077000
6,206,150
6,206,393
In a unit test, how can the parameter passed to a custom exception be determined?
class AppError(Exception): pass class MissingInputError(AppError): em = {1101: "Date input is missing. Please verify.", \ 1102: "Key input is missing. Please verify.", \ 1103: "Stn input is missing. Please verify."} # and so on...... def validate(self): """ Method of Input class to validate input and save it """ par...
You can pass a regular expression that runs against the message: import unittest class MyError(Exception): pass def raiseError(): raise MyError(100) class TestStuff(unittest.TestCase): def testError(self): self.assertRaisesRegexp(MyError, '100', raiseError) unittest.main() Does that make sense to you? If you were r...
In a unit test, how can the parameter passed to a custom exception be determined? class AppError(Exception): pass class MissingInputError(AppError): em = {1101: "Date input is missing. Please verify.", \ 1102: "Key input is missing. Please verify.", \ 1103: "Stn input is missing. Please verify."} # and so on...... de...
TITLE: In a unit test, how can the parameter passed to a custom exception be determined? QUESTION: class AppError(Exception): pass class MissingInputError(AppError): em = {1101: "Date input is missing. Please verify.", \ 1102: "Key input is missing. Please verify.", \ 1103: "Stn input is missing. Please verify."} # ...
[ "python", "unit-testing", "custom-exceptions" ]
4
3
2,364
2
0
2011-06-01T18:47:07.040000
2011-06-01T19:09:39.303000
6,206,152
6,206,174
Do static libraries, which depend on other slibs need the actual 'code' from them to work?
Sorry about the vague question title, I just want to ascertain some things. Static libraries don't link with other static libraries, right? So when I write a slib: A, that uses functionality of another: B, all I have to provide are the headers of B to A, and only those, even if A actually uses functionality from B? Yes...
Yes, you have got it pretty much right. Executables (and DLLs) which depend on static libraries cannot be created without those dependencies being resolved, but static libraries that contain dependencies on other static libraries do not require those dependencies to be resolved at static library creation time. In fact,...
Do static libraries, which depend on other slibs need the actual 'code' from them to work? Sorry about the vague question title, I just want to ascertain some things. Static libraries don't link with other static libraries, right? So when I write a slib: A, that uses functionality of another: B, all I have to provide a...
TITLE: Do static libraries, which depend on other slibs need the actual 'code' from them to work? QUESTION: Sorry about the vague question title, I just want to ascertain some things. Static libraries don't link with other static libraries, right? So when I write a slib: A, that uses functionality of another: B, all I...
[ "c++", "linker", "dependencies", "static-libraries" ]
10
8
1,818
2
0
2011-06-01T18:47:24.880000
2011-06-01T18:49:54.130000
6,206,153
6,206,190
Cannot hide a paragraph when a checkbox is unchecked
I am trying to hide a paragraph when a check box is unchecked right now I can only display when it is checked. here is my jquery: $('.pharmacy').click(function(){ $('.pcsoc').show(); }); What can I do to hide the paragraph when it is unchecked?
Bind to the change event instead: $('.pharmacy').change(function(e){ $('.pcsoc').toggle(); }); Or you can check if.is(':checked') and make your own hide/show (more bullet-proof). $('.pharmacy').change(function(e){ if ($(this).is(':checked')) $('.pcsoc').show(); else $('.pcsoc').hide(); });
Cannot hide a paragraph when a checkbox is unchecked I am trying to hide a paragraph when a check box is unchecked right now I can only display when it is checked. here is my jquery: $('.pharmacy').click(function(){ $('.pcsoc').show(); }); What can I do to hide the paragraph when it is unchecked?
TITLE: Cannot hide a paragraph when a checkbox is unchecked QUESTION: I am trying to hide a paragraph when a check box is unchecked right now I can only display when it is checked. here is my jquery: $('.pharmacy').click(function(){ $('.pcsoc').show(); }); What can I do to hide the paragraph when it is unchecked? ANS...
[ "javascript", "jquery", "input", "checkbox" ]
1
5
273
4
0
2011-06-01T18:47:41.703000
2011-06-01T18:51:19.883000
6,206,160
6,206,283
WCF Client freezes when calling method from Service
I have this strange problem where my client will hang when it calls a method from my WCF Service. Now the real strange thing is that this does not happen when the Client is a Console Application. It does happen when the client is a WinForm or WPF application. I created a Client Library that a WCF Client can use to conn...
In case that your service call backs the client directly from DCCInitialize and both operation and callback operation are not marked as one-way your application will deadlock. Try marking your callback implementation with this attribute: [CallbackBehavior(ConcurrencyMode=ConcurrencyModel.Reentrant)] Instead of this you...
WCF Client freezes when calling method from Service I have this strange problem where my client will hang when it calls a method from my WCF Service. Now the real strange thing is that this does not happen when the Client is a Console Application. It does happen when the client is a WinForm or WPF application. I create...
TITLE: WCF Client freezes when calling method from Service QUESTION: I have this strange problem where my client will hang when it calls a method from my WCF Service. Now the real strange thing is that this does not happen when the Client is a Console Application. It does happen when the client is a WinForm or WPF app...
[ "wcf", "wcf-client", "wcfserviceclient" ]
3
15
7,437
1
0
2011-06-01T18:48:22.797000
2011-06-01T18:59:19.943000
6,206,161
6,206,233
Method expects object to have 2 properties, but the object I have has it in an array?
There is a method that looks like: def some_thing(user) x = user.age y = user.height end I have an object that looks like: x = other.info[0] y = other.info[1] How could I pass this information to the method some_thing? some_thing(other) won't work as it doesn't have the properties exposed in that manner. Is it possible...
Create an anonymous Struct to create the properties and use Array splat to fill them: some_thing(Struct.new(:age,:height).new(*other.info))
Method expects object to have 2 properties, but the object I have has it in an array? There is a method that looks like: def some_thing(user) x = user.age y = user.height end I have an object that looks like: x = other.info[0] y = other.info[1] How could I pass this information to the method some_thing? some_thing(othe...
TITLE: Method expects object to have 2 properties, but the object I have has it in an array? QUESTION: There is a method that looks like: def some_thing(user) x = user.age y = user.height end I have an object that looks like: x = other.info[0] y = other.info[1] How could I pass this information to the method some_thin...
[ "ruby" ]
0
2
40
1
0
2011-06-01T18:48:25.877000
2011-06-01T18:54:25.420000
6,206,167
6,208,834
MongoDB MapReduce : use positional operator $ in map function
I have a collection with entries that look like that: {"userid": 1, "contents": [ { "tag": "whatever", "value": 100 }, {"tag": "whatever2", "value": 110 } ] } I'm performing a MapReduce on this collection with queries such as {"contents.tag": "whatever"}. What I'd like to do in my map function is emiting the field "val...
This will not work without iterating over the whole array. In MongoDB a query is intended to match an entire document. When dealing with Map / Reduce, the query is simply trimming the number of documents that are passed into the map function. However, the map function has no knowledge of the query that was run. The two...
MongoDB MapReduce : use positional operator $ in map function I have a collection with entries that look like that: {"userid": 1, "contents": [ { "tag": "whatever", "value": 100 }, {"tag": "whatever2", "value": 110 } ] } I'm performing a MapReduce on this collection with queries such as {"contents.tag": "whatever"}. Wh...
TITLE: MongoDB MapReduce : use positional operator $ in map function QUESTION: I have a collection with entries that look like that: {"userid": 1, "contents": [ { "tag": "whatever", "value": 100 }, {"tag": "whatever2", "value": 110 } ] } I'm performing a MapReduce on this collection with queries such as {"contents.tag...
[ "mongodb", "mapreduce" ]
0
0
363
2
0
2011-06-01T18:49:18.367000
2011-06-01T23:19:52.590000
6,206,181
6,212,372
question about windows forms checkbox
private void frmSearch_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'bookdatabaseDataSet.Dist_Year' table. You can move, or remove it, as needed. this.dist_YearTableAdapter.Fill(this.bookdatabaseDataSet.Dist_Year); // TODO: This line of code loads data into the 'bookdatabaseDataSet....
I guess you want to ensure at least one checkbox is checked when button1 is clicked, right? If so, place it at the beginning of button1_Click event. private void button1_Click(object sender, EventArgs e) { if (!checkbox1.Checked &&!checkbox2.Checked &&!checkbox100.Checked) { MessageBox.Show("Please select a checkbox.",...
question about windows forms checkbox private void frmSearch_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'bookdatabaseDataSet.Dist_Year' table. You can move, or remove it, as needed. this.dist_YearTableAdapter.Fill(this.bookdatabaseDataSet.Dist_Year); // TODO: This line of code loa...
TITLE: question about windows forms checkbox QUESTION: private void frmSearch_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'bookdatabaseDataSet.Dist_Year' table. You can move, or remove it, as needed. this.dist_YearTableAdapter.Fill(this.bookdatabaseDataSet.Dist_Year); // TODO: Thi...
[ "c#", "winforms" ]
1
0
1,581
4
0
2011-06-01T18:50:34.260000
2011-06-02T08:53:21.237000
6,206,184
6,206,674
Can you use multiple conditionals in SASS/SCSS CSS
I am using SCSS code for styling my ruby app and am trying to write my own "rounded" mixin to help out with multi-browser border rounding. Currently I have the following: @mixin rounded($corner: all, $radius: 8px) { @if $corner==all || $corner==bottom || $corner == right || $corner==bottom-right{webkit-border-bottom-ri...
You need to use or instead of ||. See the Sass Docs. Also it looks like you have a typo in the last @if statement for each block: $corner==bottom should be $corner==top
Can you use multiple conditionals in SASS/SCSS CSS I am using SCSS code for styling my ruby app and am trying to write my own "rounded" mixin to help out with multi-browser border rounding. Currently I have the following: @mixin rounded($corner: all, $radius: 8px) { @if $corner==all || $corner==bottom || $corner == rig...
TITLE: Can you use multiple conditionals in SASS/SCSS CSS QUESTION: I am using SCSS code for styling my ruby app and am trying to write my own "rounded" mixin to help out with multi-browser border rounding. Currently I have the following: @mixin rounded($corner: all, $radius: 8px) { @if $corner==all || $corner==bottom...
[ "html", "css", "ruby", "sass" ]
13
34
17,192
2
0
2011-06-01T18:50:55.913000
2011-06-01T19:38:34.383000
6,206,196
6,231,476
attr_accessor causes Rspec tests to fail
I've added a:username_or_email property to my User model as such: class User < ActiveRecord::Base #authlogic acts_as_authentic do |c| c.login_field =:username_or_email end #virtual field for allowing a user to login with their username or email attr_accessor:username_or_email attr_accessible:username,:email,:passwor...
The solution was actually pretty simple. In user.rb: class User < ActiveRecord::Base #authlogic acts_as_authentic do |c| c.login_field =:username_or_email c.validates_login_field = false end... end The documentation for this method can be found here.
attr_accessor causes Rspec tests to fail I've added a:username_or_email property to my User model as such: class User < ActiveRecord::Base #authlogic acts_as_authentic do |c| c.login_field =:username_or_email end #virtual field for allowing a user to login with their username or email attr_accessor:username_or_email ...
TITLE: attr_accessor causes Rspec tests to fail QUESTION: I've added a:username_or_email property to my User model as such: class User < ActiveRecord::Base #authlogic acts_as_authentic do |c| c.login_field =:username_or_email end #virtual field for allowing a user to login with their username or email attr_accessor:...
[ "ruby-on-rails", "ruby", "rspec", "authlogic", "attr-accessor" ]
2
0
2,086
2
0
2011-06-01T18:51:44.390000
2011-06-03T18:59:47.993000
6,206,204
6,206,421
Python: Importing an "import file"
I am importing a lot of different scripts, so at the top of my file it gets cluttered with import statements, i.e.: from somewhere.fileA import... from somewhere.fileB import... from somewhere.fileC import...... Is there a way to move all of these somewhere else and then all I have to do is import that file instead so ...
I strongly advise against what you want to do. You are doing the global include file mistake again. Although only one module is importing all your modules (as opposed to all modules importing the global one), the remaining point is that if there's a valid reason for all those modules to be collected under a common name...
Python: Importing an "import file" I am importing a lot of different scripts, so at the top of my file it gets cluttered with import statements, i.e.: from somewhere.fileA import... from somewhere.fileB import... from somewhere.fileC import...... Is there a way to move all of these somewhere else and then all I have to...
TITLE: Python: Importing an "import file" QUESTION: I am importing a lot of different scripts, so at the top of my file it gets cluttered with import statements, i.e.: from somewhere.fileA import... from somewhere.fileB import... from somewhere.fileC import...... Is there a way to move all of these somewhere else and ...
[ "python", "python-import" ]
32
39
22,187
2
0
2011-06-01T18:52:26.983000
2011-06-01T19:11:31.350000
6,206,216
6,211,581
CakePHP - Is it possible to use Containable behaviour with the read() method?
I'm new with CakePHP and can't figure out how to call the read() method of a model class with a Containable behaviour. I can do the following with find() $this->T->find('all', array ( 'contain' => array ( 'C', 'L' => array ( 'fields' => array ('L.id, L.time'), 'I' => array ( 'fields' => array ('I.id','I.time'), 'J.name...
You can set also before the read() call: $this->T->id = $id; $this->T->contain(array(...)); $this->T->read();
CakePHP - Is it possible to use Containable behaviour with the read() method? I'm new with CakePHP and can't figure out how to call the read() method of a model class with a Containable behaviour. I can do the following with find() $this->T->find('all', array ( 'contain' => array ( 'C', 'L' => array ( 'fields' => array...
TITLE: CakePHP - Is it possible to use Containable behaviour with the read() method? QUESTION: I'm new with CakePHP and can't figure out how to call the read() method of a model class with a Containable behaviour. I can do the following with find() $this->T->find('all', array ( 'contain' => array ( 'C', 'L' => array (...
[ "cakephp", "cakephp-1.3", "containable" ]
5
16
3,116
2
0
2011-06-01T18:53:17.523000
2011-06-02T07:15:44.927000
6,206,218
6,207,608
Kohana 3.1 ORM: Empty model property value saved as 0 (zero) instead of NULL
I have two models, Product and Product_Methodology. In my product edit view I have a select form field to select one of many methodologies or none (empty first option). In my products table I have a INT(10) methodology_id property that gets saved with the id of the methodology selected from the select form field. Every...
What form input are you using for choosing the methodology? is it? If so, the value of choosen option is probably set to 0 when no methodology is choosen, and send with other form data. In such cases I make a custom filter withing model's filters() method, to set the value to NULL (as PHP treats it) when it's empty(), ...
Kohana 3.1 ORM: Empty model property value saved as 0 (zero) instead of NULL I have two models, Product and Product_Methodology. In my product edit view I have a select form field to select one of many methodologies or none (empty first option). In my products table I have a INT(10) methodology_id property that gets sa...
TITLE: Kohana 3.1 ORM: Empty model property value saved as 0 (zero) instead of NULL QUESTION: I have two models, Product and Product_Methodology. In my product edit view I have a select form field to select one of many methodologies or none (empty first option). In my products table I have a INT(10) methodology_id pro...
[ "php", "kohana", "kohana-3", "kohana-orm" ]
3
6
1,851
4
0
2011-06-01T18:53:29.103000
2011-06-01T20:58:19.670000
6,206,230
6,206,415
C# - DatagidView show full header text
I have a datagrid in my application. My datagridview columns have very long names and I would like that datagridview would show full text of the column header. I have tried change AutoSizeColumnMode property to ColumnHeader, but I do that then I wont be able to resize the columns, I wont be able to make the cell bigger...
In the Winform designer leave the AutoSizeColumnMode setting to ColumnHeader, but in your form's constructor (after calling InitializeComponent() ) set all your DGV columns AutoSizeColumnMode property to None: foreach (DataGridViewColumn col in dataGridView1.Columns) { col.AutoSizeMode = DataGridViewAutoSizeColumnMode....
C# - DatagidView show full header text I have a datagrid in my application. My datagridview columns have very long names and I would like that datagridview would show full text of the column header. I have tried change AutoSizeColumnMode property to ColumnHeader, but I do that then I wont be able to resize the columns,...
TITLE: C# - DatagidView show full header text QUESTION: I have a datagrid in my application. My datagridview columns have very long names and I would like that datagridview would show full text of the column header. I have tried change AutoSizeColumnMode property to ColumnHeader, but I do that then I wont be able to r...
[ "c#", "datagridview" ]
2
1
2,516
1
0
2011-06-01T18:54:21.193000
2011-06-01T19:11:21.240000
6,206,232
6,206,402
Keyboard Number Line vs Keypad Numbers
I'm using Javascript, I need to get the keypad numbers. For what ever reason, my code treats them differently. function getKey(keyStroke) { var keyCode = (document.layers)? keyStroke.which: event.keyCode; var keyString = String.fromCharCode(keyCode).toLowerCase(); if (lop.charAt(cpos)==keyString) { document.getElementB...
http://www.cambiaresearch.com/c4/702b8cd1-e5b0-42e6-83ac-25f0306e3e25/Javascript-Char-Codes-Key-Codes.aspx That shows a list with all of the keys on a regular keyboard and the keycodes that are associated with it. As you can see, when pressing 'numpad 1', it should return '97' in this line: var keyCode = (document.laye...
Keyboard Number Line vs Keypad Numbers I'm using Javascript, I need to get the keypad numbers. For what ever reason, my code treats them differently. function getKey(keyStroke) { var keyCode = (document.layers)? keyStroke.which: event.keyCode; var keyString = String.fromCharCode(keyCode).toLowerCase(); if (lop.charAt(c...
TITLE: Keyboard Number Line vs Keypad Numbers QUESTION: I'm using Javascript, I need to get the keypad numbers. For what ever reason, my code treats them differently. function getKey(keyStroke) { var keyCode = (document.layers)? keyStroke.which: event.keyCode; var keyString = String.fromCharCode(keyCode).toLowerCase()...
[ "javascript", "keypress" ]
0
1
902
1
0
2011-06-01T18:54:21.347000
2011-06-01T19:09:54.797000
6,206,239
6,206,308
ImageView is being re-sized - why?
I have the following image in my app: It's a 59x60 PNG. I use it in the following layout: When I run it in my Nexus One, the width of the ImageView is 89 pixels. Why?
See my answer here: Set size of ImageView in px at runtime It is resizing it due to a different screen density than the base 160 dpi: 59x240/160 = 88.5 A workaround is to use android:layout_width="59px" and android:layout_height="60"
ImageView is being re-sized - why? I have the following image in my app: It's a 59x60 PNG. I use it in the following layout: When I run it in my Nexus One, the width of the ImageView is 89 pixels. Why?
TITLE: ImageView is being re-sized - why? QUESTION: I have the following image in my app: It's a 59x60 PNG. I use it in the following layout: When I run it in my Nexus One, the width of the ImageView is 89 pixels. Why? ANSWER: See my answer here: Set size of ImageView in px at runtime It is resizing it due to a diffe...
[ "android" ]
1
3
53
1
0
2011-06-01T18:54:49.930000
2011-06-01T19:02:03.070000
6,206,241
6,206,311
Django, passing information when modifying queryset for ModelForm
Database: Document has many Sections, Sections has many Comments On each document page, there is a comment form that lets you pick the section (using a ModelChoiceField). The problem is that the ModelChoiceField will contain ALL sections for all documents. So to limit them I do this: class CommentForm(ModelForm): def _...
You can pass the document id when initialising the form: class CommentForm(ModelForm): def __init__(self, doc_id=None, *args, **kwargs): if doc_id: self.fields['section'].queryset = Section.objects.filter(document__id=doc_id) and in the view def my_view(request):... doc = Document.objects(...) form = CommentForm(doc_id...
Django, passing information when modifying queryset for ModelForm Database: Document has many Sections, Sections has many Comments On each document page, there is a comment form that lets you pick the section (using a ModelChoiceField). The problem is that the ModelChoiceField will contain ALL sections for all document...
TITLE: Django, passing information when modifying queryset for ModelForm QUESTION: Database: Document has many Sections, Sections has many Comments On each document page, there is a comment form that lets you pick the section (using a ModelChoiceField). The problem is that the ModelChoiceField will contain ALL section...
[ "python", "django", "django-forms" ]
1
5
1,497
1
0
2011-06-01T18:55:04.200000
2011-06-01T19:02:18.637000
6,206,244
6,206,562
getting on duplicate key mysql to work
i am having trouble getting this to work, can any one spot the issue? INSERT INTO `page_category_link` (page_id,cat_id) VALUES ('4','2') ON DUPLICATE KEY UPDATE page_id=VALUES('4') AND cat_id=VALUES('2') WHERE id=2 many thanks
INSERT INTO `page_category_link` (page_id,cat_id) VALUES ('4','2') ON DUPLICATE KEY UPDATE page_id='4', cat_id='2'
getting on duplicate key mysql to work i am having trouble getting this to work, can any one spot the issue? INSERT INTO `page_category_link` (page_id,cat_id) VALUES ('4','2') ON DUPLICATE KEY UPDATE page_id=VALUES('4') AND cat_id=VALUES('2') WHERE id=2 many thanks
TITLE: getting on duplicate key mysql to work QUESTION: i am having trouble getting this to work, can any one spot the issue? INSERT INTO `page_category_link` (page_id,cat_id) VALUES ('4','2') ON DUPLICATE KEY UPDATE page_id=VALUES('4') AND cat_id=VALUES('2') WHERE id=2 many thanks ANSWER: INSERT INTO `page_category_...
[ "mysql", "insert" ]
0
4
96
3
0
2011-06-01T18:55:26.203000
2011-06-01T19:26:10.097000
6,206,245
6,206,396
How to programmatically set / edit content of webview
Is there a way I can edit the content either to add to or create from scratch via the java? I haven't been able to find any examples.
You should look at the WebView documentation here. Among other great bits of information there, you'll find: // OR, you can also load from an HTML string: String summary = " You scored 192 points. "; webview.loadData(summary, "text/html; charset=utf-8", "utf-8"); //... although note that there are restrictions on what ...
How to programmatically set / edit content of webview Is there a way I can edit the content either to add to or create from scratch via the java? I haven't been able to find any examples.
TITLE: How to programmatically set / edit content of webview QUESTION: Is there a way I can edit the content either to add to or create from scratch via the java? I haven't been able to find any examples. ANSWER: You should look at the WebView documentation here. Among other great bits of information there, you'll fi...
[ "android" ]
23
71
34,340
2
0
2011-06-01T18:55:29.007000
2011-06-01T19:09:47.413000
6,206,250
6,206,539
What data do I need to implement k nearest neighbor?
I currently have a reddit-clone type website. I'm trying to recommend posts based on the posts that my users have previously liked. It seems like K nearest neighbor or k means are the best way to do this. I can't seem to understand how to actually implement this. I've seen some mathematical formulas (such as the one on...
K-Nearest Neighbor (aka KNN) is a classification algorithm. Basically, you take a training group of N items and classify them. How you classify them is completely dependent on your data, and what you think the important classification characteristics of that data are. In your example, this may be category of posts, who...
What data do I need to implement k nearest neighbor? I currently have a reddit-clone type website. I'm trying to recommend posts based on the posts that my users have previously liked. It seems like K nearest neighbor or k means are the best way to do this. I can't seem to understand how to actually implement this. I'v...
TITLE: What data do I need to implement k nearest neighbor? QUESTION: I currently have a reddit-clone type website. I'm trying to recommend posts based on the posts that my users have previously liked. It seems like K nearest neighbor or k means are the best way to do this. I can't seem to understand how to actually i...
[ "ruby", "algorithm", "machine-learning", "nearest-neighbor", "knn" ]
5
8
3,061
5
0
2011-06-01T18:56:02.237000
2011-06-01T19:23:37.993000
6,206,257
6,220,835
Dynamic Razor code execution - how?
In this post I wondered about cleaner code when internationalising an app. that leads to this second query... supposing I wanted to call a function like this: @Html.RenderWithTags("Help", new Dictionary () { "HelpPage", "@Html.ActionLink(...)" } ) such that I look up a string in my local resource file containing embedd...
in the end, the solution turned out pretty slick. would not have been possible without SLaks, I'm much obliged for the help (though I didn't end up using inline helpers (but thanks for the intro (they're very cool))). Now my page contains this: @{ Dictionary tokenMap = new Dictionary () { {"HelpPage", Html.ActionLink("...
Dynamic Razor code execution - how? In this post I wondered about cleaner code when internationalising an app. that leads to this second query... supposing I wanted to call a function like this: @Html.RenderWithTags("Help", new Dictionary () { "HelpPage", "@Html.ActionLink(...)" } ) such that I look up a string in my l...
TITLE: Dynamic Razor code execution - how? QUESTION: In this post I wondered about cleaner code when internationalising an app. that leads to this second query... supposing I wanted to call a function like this: @Html.RenderWithTags("Help", new Dictionary () { "HelpPage", "@Html.ActionLink(...)" } ) such that I look u...
[ "c#", "asp.net-mvc-3", "dynamic", "razor", "execution" ]
1
0
1,657
2
0
2011-06-01T18:56:41.553000
2011-06-02T21:54:50.343000
6,206,262
6,206,289
Android Change Shape of Button
I'm trying to design a button for an android application like this: The length of the button will be determined based on the size of the text. The text will change during runtime depending on the page the button is displayed on. Does anyone have an idea on how I can achieve this?
Just use a regular button with 9-patch png image as a background. More about 9-patch can be read here: Draw 9-patch.
Android Change Shape of Button I'm trying to design a button for an android application like this: The length of the button will be determined based on the size of the text. The text will change during runtime depending on the page the button is displayed on. Does anyone have an idea on how I can achieve this?
TITLE: Android Change Shape of Button QUESTION: I'm trying to design a button for an android application like this: The length of the button will be determined based on the size of the text. The text will change during runtime depending on the page the button is displayed on. Does anyone have an idea on how I can achi...
[ "android", "button", "imagebutton", "shapes" ]
1
3
1,976
1
0
2011-06-01T18:56:53.300000
2011-06-01T18:59:59.100000
6,206,265
6,206,339
Error in Dynamic SQL
I Have Created the following SP to generate the Update Statements and it uses the table Col.TMap.T_Mp and the data in the table looks like: ID M_Type ID_F SF1 SF2 1 Acc ACC_ID AC_ID NULL 1 STA STA_ID ST_ID NULL 1 CHa Cha_ID CH_ID NULL CREATE PROCEDURE dbo.dtmap( @ID INT ) AS BEGIN DECLARE @SQL NVARCHAR(MAX) DECLARE @...
You are building the query incorrectly. ALL of the SQL parts need to be in quotes. The only thing outside of them should be the variables you are passing in.
Error in Dynamic SQL I Have Created the following SP to generate the Update Statements and it uses the table Col.TMap.T_Mp and the data in the table looks like: ID M_Type ID_F SF1 SF2 1 Acc ACC_ID AC_ID NULL 1 STA STA_ID ST_ID NULL 1 CHa Cha_ID CH_ID NULL CREATE PROCEDURE dbo.dtmap( @ID INT ) AS BEGIN DECLARE @SQL NV...
TITLE: Error in Dynamic SQL QUESTION: I Have Created the following SP to generate the Update Statements and it uses the table Col.TMap.T_Mp and the data in the table looks like: ID M_Type ID_F SF1 SF2 1 Acc ACC_ID AC_ID NULL 1 STA STA_ID ST_ID NULL 1 CHa Cha_ID CH_ID NULL CREATE PROCEDURE dbo.dtmap( @ID INT ) AS BEGI...
[ "sql", "sql-server", "sql-server-2008", "dynamic", "dynamic-sql" ]
0
1
439
3
0
2011-06-01T18:57:28.257000
2011-06-01T19:04:26.993000
6,206,273
6,207,672
Java servlet not dispatching to another servlet
I have 2 servlets, "HomeController" and "SearchController". On the home.jsp I have a form that has a search box and when submitted actions to "Search" So the first thing the SearchController does is: @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOExc...
You can use getNamedDispatcher: ServletContext context = getServletContext(); RequestDispatcher requestVar = context.getNamedDispatcher("HomeController");
Java servlet not dispatching to another servlet I have 2 servlets, "HomeController" and "SearchController". On the home.jsp I have a form that has a search box and when submitted actions to "Search" So the first thing the SearchController does is: @Override protected void doPost(HttpServletRequest request, HttpServletR...
TITLE: Java servlet not dispatching to another servlet QUESTION: I have 2 servlets, "HomeController" and "SearchController". On the home.jsp I have a form that has a search box and when submitted actions to "Search" So the first thing the SearchController does is: @Override protected void doPost(HttpServletRequest req...
[ "java", "servlets" ]
1
2
1,957
4
0
2011-06-01T18:58:09.447000
2011-06-01T21:04:55.160000
6,206,274
6,231,996
Identifying Visible Lists through SharePoint Web Services
all! I'm having some issues using SharePoint Web Services to identify the lists available in my server. I'm using GetListCollection to get all the lists and associated properties from my server, and filtering for "BaseType=0" to identify the custom lists. However, the results include "hidden" custom lists such as the "...
Resolved. I'm blind as a bat. There's a Hidden="True/False" attribute in the list tag in the XML.
Identifying Visible Lists through SharePoint Web Services all! I'm having some issues using SharePoint Web Services to identify the lists available in my server. I'm using GetListCollection to get all the lists and associated properties from my server, and filtering for "BaseType=0" to identify the custom lists. Howeve...
TITLE: Identifying Visible Lists through SharePoint Web Services QUESTION: all! I'm having some issues using SharePoint Web Services to identify the lists available in my server. I'm using GetListCollection to get all the lists and associated properties from my server, and filtering for "BaseType=0" to identify the cu...
[ "jquery", "xml", "web-services", "sharepoint", "sharepoint-list" ]
0
0
265
1
0
2011-06-01T18:58:21.423000
2011-06-03T19:56:01.190000
6,206,277
6,206,401
Using Abstract Classes in C#
I have an abstract class that other classes are inheriting this. public abstract class GenericAccess { public static IList GetObjectListFromArray(int[] IDs) { //Your help need is here. } } public class Doors: GenericAccess { } public class DoorEntity { public int Id { get; set; } public string Name { get; set; } } I...
Use an interface or a base class... With interface: public abstract class GenericAccess where TEntity: IEntity, new() { public static IList GetObjectListFromArray(int[] IDs) { return IDs.Select(id => new TEntity { Id = id }).ToList(); } } public class Doors: GenericAccess { } public class DoorEntity: IEntity { publi...
Using Abstract Classes in C# I have an abstract class that other classes are inheriting this. public abstract class GenericAccess { public static IList GetObjectListFromArray(int[] IDs) { //Your help need is here. } } public class Doors: GenericAccess { } public class DoorEntity { public int Id { get; set; } public ...
TITLE: Using Abstract Classes in C# QUESTION: I have an abstract class that other classes are inheriting this. public abstract class GenericAccess { public static IList GetObjectListFromArray(int[] IDs) { //Your help need is here. } } public class Doors: GenericAccess { } public class DoorEntity { public int Id { g...
[ "c#", ".net", "oop", "class" ]
4
2
409
3
0
2011-06-01T18:58:40.200000
2011-06-01T19:09:54.633000
6,206,281
6,206,330
Background operation and ProgressDialog
I created an AsyncTask to perform my background operation. The UI shows a ProgressDialog. I pass the Context to the constructor of the AsyncTask. When I want to manipulate the the ProgressDialog text from AsyncTask it errors because the ProgressDialog box is created by a different thread. Tips or ideas on how I can mak...
You shouldn't communicate with UI from AsyncTask 's doInBackground function. Use onProgressUpdate function instead. private class BackgrounTask extends AsyncTask { protected Integer doInBackground(Integer... count){ int max = count[0]; for (int i = 0; i < count; i++) { publishProgress(i, max); } return max; } protect...
Background operation and ProgressDialog I created an AsyncTask to perform my background operation. The UI shows a ProgressDialog. I pass the Context to the constructor of the AsyncTask. When I want to manipulate the the ProgressDialog text from AsyncTask it errors because the ProgressDialog box is created by a differen...
TITLE: Background operation and ProgressDialog QUESTION: I created an AsyncTask to perform my background operation. The UI shows a ProgressDialog. I pass the Context to the constructor of the AsyncTask. When I want to manipulate the the ProgressDialog text from AsyncTask it errors because the ProgressDialog box is cre...
[ "android", "progressdialog", "android-asynctask" ]
0
1
276
2
0
2011-06-01T18:59:11.193000
2011-06-01T19:03:59.270000
6,206,284
6,206,346
VB6 to VB.NET conversion - System.Collections.IEnumerator
I have a fairly lengthly block of code that I'm trying to convert from VB6 to VB.NET. The ArcObjects GIS code basically looks at a table and groups a bunch of GIS layers together and adds them to the ArcMap table of contents. I'm having trouble with this line when testing it in Visual Studio 2010: The VB6 line was this...
Iterating over an object looks like this: While iterator.MoveNext() Do val=iterator.Current 'do work with val here End While What you're doing is calling Current without first moving the iterator in place (and then calling Current at the end for no reason). By the way, that whole mess is equivalent to: For Each val in...
VB6 to VB.NET conversion - System.Collections.IEnumerator I have a fairly lengthly block of code that I'm trying to convert from VB6 to VB.NET. The ArcObjects GIS code basically looks at a table and groups a bunch of GIS layers together and adds them to the ArcMap table of contents. I'm having trouble with this line wh...
TITLE: VB6 to VB.NET conversion - System.Collections.IEnumerator QUESTION: I have a fairly lengthly block of code that I'm trying to convert from VB6 to VB.NET. The ArcObjects GIS code basically looks at a table and groups a bunch of GIS layers together and adds them to the ArcMap table of contents. I'm having trouble...
[ "vb.net", "visual-studio-2010", "vb6-migration", "arcgis", "arcobjects" ]
1
3
1,182
1
0
2011-06-01T18:59:29.247000
2011-06-01T19:05:00.300000
6,206,287
6,206,341
Cast from renamed type in google go
I'm trying to write suitable method of converting appengine/datastore.Time type to string. This type is declared as type Time int64 But when i'm trying to use it as int64 value: localTime:= time.SecondsToLocalTime(t/1000) I'm receiving error message cannot use t / 1000 (type datastore.Time) as type int64 in function ar...
do it like time.SecondsToLocalTime(int64(t)/1000) See more in the documentation about Conversions
Cast from renamed type in google go I'm trying to write suitable method of converting appengine/datastore.Time type to string. This type is declared as type Time int64 But when i'm trying to use it as int64 value: localTime:= time.SecondsToLocalTime(t/1000) I'm receiving error message cannot use t / 1000 (type datastor...
TITLE: Cast from renamed type in google go QUESTION: I'm trying to write suitable method of converting appengine/datastore.Time type to string. This type is declared as type Time int64 But when i'm trying to use it as int64 value: localTime:= time.SecondsToLocalTime(t/1000) I'm receiving error message cannot use t / 1...
[ "google-app-engine", "go" ]
2
4
2,108
1
0
2011-06-01T18:59:44.093000
2011-06-01T19:04:40.237000
6,206,292
6,236,862
how to extract data from one excel workbook and output to another using python xlrd/xlwt?
I am trying to write a script which will automate a copy/paste of employee time sheets from several files to one compiled file. Since they are time sheets with project codes some cells are left blank where an employee worked on a different project that day. Also the files have been converted from xlsx(2007) to.csv.xls ...
This might help... it reproduces your data as closely as possible (dates remain as dates, empty cells don't become text cells with 0-length contents, booleans and error cells don't become number cells). from xlrd import XL_CELL_EMPTY, XL_CELL_TEXT, XL_CELL_NUMBER, XL_CELL_DATE, XL_CELL_BOOLEAN, XL_CELL_ERROR, open_work...
how to extract data from one excel workbook and output to another using python xlrd/xlwt? I am trying to write a script which will automate a copy/paste of employee time sheets from several files to one compiled file. Since they are time sheets with project codes some cells are left blank where an employee worked on a ...
TITLE: how to extract data from one excel workbook and output to another using python xlrd/xlwt? QUESTION: I am trying to write a script which will automate a copy/paste of employee time sheets from several files to one compiled file. Since they are time sheets with project codes some cells are left blank where an emp...
[ "python", "excel", "xlrd", "xlwt" ]
0
1
7,671
2
0
2011-06-01T19:00:08.930000
2011-06-04T12:57:41.057000
6,206,296
6,206,915
MVC3 - Model empty on post
I have two models - category and article. I have pretty much the same delete views and controllers for both of them. The only difference is that it works for categories, but with articles I get empty model on HttpPost. Categories: public ActionResult DeleteCat(int id) { Category cat = db.CategoryByID(id); if (cat!= nul...
There are two primary ways this can happen. One way is that you have custom model binding that is not working. I assume you are doing everything out-of-the-box so this wouldn't apply. The most likely issue is that the data is not getting POSTed. Ensure that the fields exist inside the same Form that the Delete button i...
MVC3 - Model empty on post I have two models - category and article. I have pretty much the same delete views and controllers for both of them. The only difference is that it works for categories, but with articles I get empty model on HttpPost. Categories: public ActionResult DeleteCat(int id) { Category cat = db.Cate...
TITLE: MVC3 - Model empty on post QUESTION: I have two models - category and article. I have pretty much the same delete views and controllers for both of them. The only difference is that it works for categories, but with articles I get empty model on HttpPost. Categories: public ActionResult DeleteCat(int id) { Cate...
[ "c#", "asp.net-mvc-3", "razor" ]
16
6
24,993
6
0
2011-06-01T19:00:22.130000
2011-06-01T19:58:17.130000
6,206,297
6,206,334
converting a int variable to a string and passing as a string
I have a variable "StudentID" which is an int, I need to convert to a string then pass it to string as a string. This is what I have so far: int StuID = Convert.ToString("StudentID"); string ReturnXML = " "; So if the "StudentID" variable were equal to 12345, I need the ReturnXML to look like this: Any suggestions?
I took the liberty to alter the XML a bit, to make it valid. int studentId = 42; string returnXml = string.Format(@" ", studentId); // returnXml will be ' ' If you want the Student element itself to have the student id value, you probably want to put the value inside the element: string returnXml = string.Format(@" {0}...
converting a int variable to a string and passing as a string I have a variable "StudentID" which is an int, I need to convert to a string then pass it to string as a string. This is what I have so far: int StuID = Convert.ToString("StudentID"); string ReturnXML = " "; So if the "StudentID" variable were equal to 1234...
TITLE: converting a int variable to a string and passing as a string QUESTION: I have a variable "StudentID" which is an int, I need to convert to a string then pass it to string as a string. This is what I have so far: int StuID = Convert.ToString("StudentID"); string ReturnXML = " "; So if the "StudentID" variable ...
[ "c#", "asp.net", "string" ]
0
3
3,102
7
0
2011-06-01T19:00:55.623000
2011-06-01T19:04:17.680000
6,206,299
6,206,606
close a section of a accordion in jquery
It's a simple question, but i don't know how do it. I think there's a way to close all of the sections in the accordion attached to a event click, but i haven't found a method that will allow it to be done. I tried this: $(document).ready(initialize); $("#accordion").accordion("destroy"); $("#accordion").accordion({ ...
I think you're looking for the activate method instead of active method. I haven't tried it, but I think you should change: $("#accordion").accordion("active", false); to: $("#accordion").accordion("activate", false); Hope this helps.
close a section of a accordion in jquery It's a simple question, but i don't know how do it. I think there's a way to close all of the sections in the accordion attached to a event click, but i haven't found a method that will allow it to be done. I tried this: $(document).ready(initialize); $("#accordion").accordion(...
TITLE: close a section of a accordion in jquery QUESTION: It's a simple question, but i don't know how do it. I think there's a way to close all of the sections in the accordion attached to a event click, but i haven't found a method that will allow it to be done. I tried this: $(document).ready(initialize); $("#acco...
[ "jquery", "jquery-ui-accordion" ]
4
4
13,497
2
0
2011-06-01T19:01:08.710000
2011-06-01T19:31:07.443000
6,206,302
6,206,722
C++ - How to use a stream to parse a file?
I have a file and I need to loop through it assigning an int foo, string type, 64/128 bit long. How would I use a stream to parse these lines into the following variables - I want to stick with the stream syntax ( ifs >> foo >> type ) but in this case type would end up being the rest of the line after the 0/52... and a...
This is a rather trivial task for a more sophisticated parser such as boost.spirit. To solve this using just the standard C++ streams you would need to a) treat ' as whitespace and b) take an extra pass over the string "04001C0180000000000000000EE317BC" which has no separators between the values. Borrowing Jerry Coffin...
C++ - How to use a stream to parse a file? I have a file and I need to loop through it assigning an int foo, string type, 64/128 bit long. How would I use a stream to parse these lines into the following variables - I want to stick with the stream syntax ( ifs >> foo >> type ) but in this case type would end up being t...
TITLE: C++ - How to use a stream to parse a file? QUESTION: I have a file and I need to loop through it assigning an int foo, string type, 64/128 bit long. How would I use a stream to parse these lines into the following variables - I want to stick with the stream syntax ( ifs >> foo >> type ) but in this case type wo...
[ "c++", "iostream" ]
7
4
6,163
2
0
2011-06-01T19:01:21.533000
2011-06-01T19:42:10.623000
6,206,314
6,253,131
What are typical VT values for LICENSED responses from Android Market license server?
The application licensing docs say that once the application is no longer refundable, the validity period of license server responses is "typically a number of days." This is rather vague, although I would imagine that it means "days, not weeks or months" (as opposed to "days, not minutes or hours"). Does anyone have a...
In my experience the period is 14 days for a live application and 1 minute for a test response. It's possible to ignore the VT value and use your own timestamp (or add extra time to it) by altering the long value stored. I've never seen these values documented and recall them from development around 3 months ago.
What are typical VT values for LICENSED responses from Android Market license server? The application licensing docs say that once the application is no longer refundable, the validity period of license server responses is "typically a number of days." This is rather vague, although I would imagine that it means "days,...
TITLE: What are typical VT values for LICENSED responses from Android Market license server? QUESTION: The application licensing docs say that once the application is no longer refundable, the validity period of license server responses is "typically a number of days." This is rather vague, although I would imagine th...
[ "android", "android-lvl" ]
2
5
755
2
0
2011-06-01T19:02:35.093000
2011-06-06T13:57:48.417000
6,206,315
6,206,412
Ruby/Rails - Is it possible to perform ruby calculations in the view?
I'm trying to perform a calculation that looks to me like it has to be in the view so far. In the view I have <% for post in @user.posts %> <%= post.tasks.count / @projects.tasks.count %> <% end %> I'm trying to display the a percentage.... When I place <%= post.tasks.count %> by itself it displays 2 and <%= @projects....
The reason you're getting zero is that both numbers are integers, so it's doing integer division. If you convert the first to a float, then you'll get a float as the result. If you want to format the number as a percentage, you'll also want to use the number_to_percentage helper as well. So your view code would look so...
Ruby/Rails - Is it possible to perform ruby calculations in the view? I'm trying to perform a calculation that looks to me like it has to be in the view so far. In the view I have <% for post in @user.posts %> <%= post.tasks.count / @projects.tasks.count %> <% end %> I'm trying to display the a percentage.... When I pl...
TITLE: Ruby/Rails - Is it possible to perform ruby calculations in the view? QUESTION: I'm trying to perform a calculation that looks to me like it has to be in the view so far. In the view I have <% for post in @user.posts %> <%= post.tasks.count / @projects.tasks.count %> <% end %> I'm trying to display the a percen...
[ "ruby-on-rails", "ruby", "view" ]
1
6
845
2
0
2011-06-01T19:02:35.530000
2011-06-01T19:10:49.333000
6,206,316
6,206,437
Implement a database requirement
I am programming a database. I have one requirement, I am unsure how to implement it.The database is about medical related information. It is as follows: Ventricular Arrangement: This begins as a single entry box that becomes 7 separate fields to describe the ventricles: a. Number of Ventricles (Vent_No): 2 choices = 1...
I would probably do something like this: Ventricles PatientId int (not null) VentricularMorphologyTypeid (int not null) VentricularMorphologyid (int not null) VentricularSizeID (int null) Notes (nvarchar(max) null) Then I would create three lookup tables for the potential values for the typeId (1 or 2 and descriptons a...
Implement a database requirement I am programming a database. I have one requirement, I am unsure how to implement it.The database is about medical related information. It is as follows: Ventricular Arrangement: This begins as a single entry box that becomes 7 separate fields to describe the ventricles: a. Number of Ve...
TITLE: Implement a database requirement QUESTION: I am programming a database. I have one requirement, I am unsure how to implement it.The database is about medical related information. It is as follows: Ventricular Arrangement: This begins as a single entry box that becomes 7 separate fields to describe the ventricle...
[ "database-design" ]
0
0
122
1
0
2011-06-01T19:02:36.790000
2011-06-01T19:12:35.077000
6,206,319
6,206,532
i18n find in associated models with rails 3
I need to build a multi-language site, where the client will add records in many languages. I wanna know if Rails has something to do a website like this. Imagine these scenario: I have a Post and Category. The user language sessions is set to en-US. When the user do a search for category 'car' the system will retrieve...
You can do this by yourself by adding a translation table for the posts and categories tables and join them with the original tables. Alternatively, have a look at Globalize2: https://github.com/joshmh/globalize2 which does all the backend work for you.
i18n find in associated models with rails 3 I need to build a multi-language site, where the client will add records in many languages. I wanna know if Rails has something to do a website like this. Imagine these scenario: I have a Post and Category. The user language sessions is set to en-US. When the user do a search...
TITLE: i18n find in associated models with rails 3 QUESTION: I need to build a multi-language site, where the client will add records in many languages. I wanna know if Rails has something to do a website like this. Imagine these scenario: I have a Post and Category. The user language sessions is set to en-US. When th...
[ "ruby-on-rails", "ruby", "ruby-on-rails-3", "internationalization" ]
0
1
194
1
0
2011-06-01T19:03:03.733000
2011-06-01T19:22:57.520000
6,206,322
6,217,288
jQuery: How should I structure a new list that's generated by jQuery
edit: This question is about jQuery refactoring. Basically I have a big block of code but I want to see if other folks can think of a better way to refactor it. Since I'm new to jQuery I'm not sure if I'm on the right track or not with my design original post: I'm working on a bookmarklet which adds HTML elements to th...
I'm not really sure what the question is - my interpretation is that you're asking for refactoring advice. If that's what you're looking for, here's the way I'd probably implement the same requirements: jQuery(' ').appendTo("body").css({ background: "white", left: 0, position: "absolute", textAlign: "left", top: '50%' ...
jQuery: How should I structure a new list that's generated by jQuery edit: This question is about jQuery refactoring. Basically I have a big block of code but I want to see if other folks can think of a better way to refactor it. Since I'm new to jQuery I'm not sure if I'm on the right track or not with my design origi...
TITLE: jQuery: How should I structure a new list that's generated by jQuery QUESTION: edit: This question is about jQuery refactoring. Basically I have a big block of code but I want to see if other folks can think of a better way to refactor it. Since I'm new to jQuery I'm not sure if I'm on the right track or not wi...
[ "javascript", "jquery", "html", "bookmarklet" ]
0
1
164
1
0
2011-06-01T19:03:33.767000
2011-06-02T16:22:59.670000
6,206,333
6,206,407
Convert square bracket notation array from javascript to C# using JSON?
I have this: var testArray = []; testArray["First"] = "First Test Data"; testArray["Second"] = "Second Test Data"; $.toJSON(testArray); I then pass it back to server side. When I look at the object server side in handling the AJAX request all I have is "[]". Is there a way to do this or something similar to achieve the...
You are creating an array, but then you are using it as an object. Create an object instead, and it will be handled correctly: var testObject = {}; testObject["First"] = "First Test Data"; testObject["Second"] = "Second Test Data"; $.toJSON(testObject); or simply: var testObject = { First: "First Test Data", Second: "S...
Convert square bracket notation array from javascript to C# using JSON? I have this: var testArray = []; testArray["First"] = "First Test Data"; testArray["Second"] = "Second Test Data"; $.toJSON(testArray); I then pass it back to server side. When I look at the object server side in handling the AJAX request all I hav...
TITLE: Convert square bracket notation array from javascript to C# using JSON? QUESTION: I have this: var testArray = []; testArray["First"] = "First Test Data"; testArray["Second"] = "Second Test Data"; $.toJSON(testArray); I then pass it back to server side. When I look at the object server side in handling the AJAX...
[ "c#", "javascript", "json" ]
1
4
1,236
2
0
2011-06-01T19:04:17.280000
2011-06-01T19:10:27.527000
6,206,343
6,206,408
Regex for use with PHP's preg_match() to find a newline
I'm fairly new/rusty with regular expressions. I'm collecting a block of text from a textarea element and I want to check to see if the person who filled it used any paragraphs, amongst other things. I'm using the following and I know it's wrong. preg_match('/\r\n|\n|\r/', $_GET['text']);
Your regex is not wrong. But for detecting paragraphs you will want to look for two consecutive newlines: preg_match('/(\r?\n){2}/' The carriage return \r is optional, and I would just check for \n newline as most platforms treat that as linebreak. Obviously this check will fail if the submitted text is just a single l...
Regex for use with PHP's preg_match() to find a newline I'm fairly new/rusty with regular expressions. I'm collecting a block of text from a textarea element and I want to check to see if the person who filled it used any paragraphs, amongst other things. I'm using the following and I know it's wrong. preg_match('/\r\n...
TITLE: Regex for use with PHP's preg_match() to find a newline QUESTION: I'm fairly new/rusty with regular expressions. I'm collecting a block of text from a textarea element and I want to check to see if the person who filled it used any paragraphs, amongst other things. I'm using the following and I know it's wrong....
[ "php", "newline", "expression" ]
5
6
26,964
2
0
2011-06-01T19:04:49.723000
2011-06-01T19:10:35.297000
6,206,349
6,206,884
Is it wise to disable a Task by using an expression evaluation?
I have an SSIS Package that is scheduled to export data on a daily basis. I have a few Tasks that I'd like to execute only on the first day of the month. It is important that these Tasks are skipped, and that the Package continue to execute if it is not the first of the month. After doing a bit of searching, I've found...
I don't think there is anything unconventional about setting expressions to disable tasks on conditional basis. I have done the same thing in a package that I developed. I would prefer to set the conditions directly on the Disable property on the task using Expressions rather than using Script Task. Refer screenshot # ...
Is it wise to disable a Task by using an expression evaluation? I have an SSIS Package that is scheduled to export data on a daily basis. I have a few Tasks that I'd like to execute only on the first day of the month. It is important that these Tasks are skipped, and that the Package continue to execute if it is not th...
TITLE: Is it wise to disable a Task by using an expression evaluation? QUESTION: I have an SSIS Package that is scheduled to export data on a daily basis. I have a few Tasks that I'd like to execute only on the first day of the month. It is important that these Tasks are skipped, and that the Package continue to execu...
[ "sql", "t-sql", "ssis", "bids" ]
4
9
5,096
1
0
2011-06-01T19:05:11.080000
2011-06-01T19:55:12.287000
6,206,350
6,206,486
How To Use Condition Variable
The Linux Programming Interface book has a piece of code (producer/consumer) to show how condition variable works: static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int avail = 0; while (TRUE) { s = pthread_mutex_lock(&mtx); while (avail == 0) { /* ...
Because pthread_cond_signal() is allowed to wake up more than one thread waiting on the condition variable. Therefore you must double-check the condition once you wake up, because some other thread might have woken up and changed it ahead of you. If you know you have just one thread waiting, and you are sure nobody in ...
How To Use Condition Variable The Linux Programming Interface book has a piece of code (producer/consumer) to show how condition variable works: static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int avail = 0; while (TRUE) { s = pthread_mutex_lock(&m...
TITLE: How To Use Condition Variable QUESTION: The Linux Programming Interface book has a piece of code (producer/consumer) to show how condition variable works: static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int avail = 0; while (TRUE) { s = pth...
[ "c", "pthreads", "mutex", "condition-variable" ]
11
13
8,625
1
0
2011-06-01T19:05:24.323000
2011-06-01T19:17:54.513000
6,206,359
6,206,990
PHP Header location in IF statement
Im trying to write this script to say if email is valied insert into DB and redirect, else redirect with error message only my redirect isn't working, im not terribly great with php and still reading up on the subject so id appreciate any advice, thanks in advance! userID(); $user_email=$_POST['email_upd']; if(!filter...
I managed to get it working using the following code, I've rewritten it based upon what I've read regarding SQL injections and it works fine, I'd appreciate any advice on this, thanks! userID(); $user_email=mysql_real_escape_string($_POST['email_upd']); if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(...
PHP Header location in IF statement Im trying to write this script to say if email is valied insert into DB and redirect, else redirect with error message only my redirect isn't working, im not terribly great with php and still reading up on the subject so id appreciate any advice, thanks in advance! userID(); $user_em...
TITLE: PHP Header location in IF statement QUESTION: Im trying to write this script to say if email is valied insert into DB and redirect, else redirect with error message only my redirect isn't working, im not terribly great with php and still reading up on the subject so id appreciate any advice, thanks in advance! ...
[ "php" ]
0
0
11,178
3
0
2011-06-01T19:05:55.453000
2011-06-01T20:05:11.697000
6,206,363
6,206,423
Procedure not printing anything
CREATE OR REPLACE PROCEDURE proc AS CURSOR v_cursor IS BEGIN FOR obj IN v_cursor LOOP dbms_output.put_line(obj.player ||' '|| obj.No ||' '); END LOOP; END; This is the procedure that i have written.... When i comile it the procedure gets created but when i try and execute the procedure.... Procedure succesfully comple...
Two things: 1) Check if your query is indeed returning some rows. 2) Make sure SERVEROUT IS ON (SET SERVEROUTPUT ON) or use dbms_output.enable(buffer_size => NULL);
Procedure not printing anything CREATE OR REPLACE PROCEDURE proc AS CURSOR v_cursor IS BEGIN FOR obj IN v_cursor LOOP dbms_output.put_line(obj.player ||' '|| obj.No ||' '); END LOOP; END; This is the procedure that i have written.... When i comile it the procedure gets created but when i try and execute the procedure....
TITLE: Procedure not printing anything QUESTION: CREATE OR REPLACE PROCEDURE proc AS CURSOR v_cursor IS BEGIN FOR obj IN v_cursor LOOP dbms_output.put_line(obj.player ||' '|| obj.No ||' '); END LOOP; END; This is the procedure that i have written.... When i comile it the procedure gets created but when i try and exec...
[ "oracle", "stored-procedures" ]
1
3
324
1
0
2011-06-01T19:06:30.663000
2011-06-01T19:11:32.017000
6,206,366
6,206,469
Can Delphi created Soap server app run on linux?
I have been toying around with creating soap servers in Delphi then running and interacting with them being hosted on my localmachine via IIS. I have a godaddy account that is linux hosting and I am curious if I'll be able to use the Delphi created Soap Servers on this hosting?
I think you have 3 options: Run it through Wine which is very capable nowadays. Build it with Kylix if you can get hold of a copy. Build it with FreePascal.
Can Delphi created Soap server app run on linux? I have been toying around with creating soap servers in Delphi then running and interacting with them being hosted on my localmachine via IIS. I have a godaddy account that is linux hosting and I am curious if I'll be able to use the Delphi created Soap Servers on this h...
TITLE: Can Delphi created Soap server app run on linux? QUESTION: I have been toying around with creating soap servers in Delphi then running and interacting with them being hosted on my localmachine via IIS. I have a godaddy account that is linux hosting and I am curious if I'll be able to use the Delphi created Soap...
[ "linux", "web-services", "delphi", "soap" ]
3
7
1,288
5
0
2011-06-01T19:06:44.730000
2011-06-01T19:16:23.937000
6,206,381
6,206,507
Targeting elements to show/hide based on matching ids and classes
Very new to Jquery and wondering if anyone can help me with the following problem: Using Textpattern I have a list generated as so; May Post Number One Post Number Two Post Number One April ad infinitum. My question is, how can I use the tags to show and hide the list items with classes that match the id of the tag? Fo...
To present an alternative solution which should be more efficient than @David's answer: $('li.archive-month > a').live('click', function() { $(this).parent().nextUntil('.archive-month').toggle(); return false; }); You can even do a bit better by using.delegate() instead of.live() if all the s share a common ancestor - ...
Targeting elements to show/hide based on matching ids and classes Very new to Jquery and wondering if anyone can help me with the following problem: Using Textpattern I have a list generated as so; May Post Number One Post Number Two Post Number One April ad infinitum. My question is, how can I use the tags to show and...
TITLE: Targeting elements to show/hide based on matching ids and classes QUESTION: Very new to Jquery and wondering if anyone can help me with the following problem: Using Textpattern I have a list generated as so; May Post Number One Post Number Two Post Number One April ad infinitum. My question is, how can I use th...
[ "jquery" ]
0
3
540
2
0
2011-06-01T19:08:08.043000
2011-06-01T19:20:19.467000
6,206,390
6,206,545
Extension Methods in VB 2008 assembly cannot be used in a C# project?
I wrote some string extension methods in a VB assembly and am unit testing them from a C# project. However, C# acts like it cannot see the the extension methods, when other VB projects reference the VB assembly they have no problem. Both the VB assemebly and the C# test project are targeting.Net 3.5. Is there a way aro...
Tried to make the module 'Public'? Update: Can't explain why it worked with other VB assemblies. Think that C# has its own vision of class access modifiers or something.
Extension Methods in VB 2008 assembly cannot be used in a C# project? I wrote some string extension methods in a VB assembly and am unit testing them from a C# project. However, C# acts like it cannot see the the extension methods, when other VB projects reference the VB assembly they have no problem. Both the VB assem...
TITLE: Extension Methods in VB 2008 assembly cannot be used in a C# project? QUESTION: I wrote some string extension methods in a VB assembly and am unit testing them from a C# project. However, C# acts like it cannot see the the extension methods, when other VB projects reference the VB assembly they have no problem....
[ "c#", ".net", "vb.net", "extension-methods" ]
4
3
512
1
0
2011-06-01T19:09:11.673000
2011-06-01T19:24:19.863000
6,206,397
6,206,587
What is the most robust HTTP library for android?
I'm looking for a library that handles HTTP POST, multipart etc. Is there a de-facto standard library to make these requests easier on android?
Take a look at DroidFu, and in particular the DroidFu HTTP components. They're a fairly thin wrapper around the Apache Commons HTTP stuff, but they fit most needs pretty well. It includes some niceties like optional HTTP and model caching, and even "why isn't this built in to the platform" stuff like GZip. (An aside: a...
What is the most robust HTTP library for android? I'm looking for a library that handles HTTP POST, multipart etc. Is there a de-facto standard library to make these requests easier on android?
TITLE: What is the most robust HTTP library for android? QUESTION: I'm looking for a library that handles HTTP POST, multipart etc. Is there a de-facto standard library to make these requests easier on android? ANSWER: Take a look at DroidFu, and in particular the DroidFu HTTP components. They're a fairly thin wrappe...
[ "android", "http" ]
19
8
31,634
7
0
2011-06-01T19:09:47.973000
2011-06-01T19:29:00.390000
6,206,398
6,209,015
How to linkify @usernames and #hashtags with jquery.linkify Plugin
I'm using this jquery plugin: https://github.com/maranomynet/linkify/blob/master/1.0/jquery.linkify-1.0.js With this REGEX plugins I'm trying to linkify @usernames and #hashtags... linkify.plugins = { tUser: { re: /(^|\s)@(\w+)/gi, tmpl: '$1@ $2 ' }, tHashtag: { re: /(^|["'(]|<|\s)(#.+?)((?:[:?]|\.+)?(?:\s|$)|>|[)"',])...
I'm not very familiar with linkify, but I'll give this a shot. The problem with the first regex ( @user ) is that it isn't matching because it requires leading whitespace or newline -- that's the (^|\s) part. As for the #hash regex, well... that seems unnecessarily complex. Try the following: linkify.plugins = { tUser:...
How to linkify @usernames and #hashtags with jquery.linkify Plugin I'm using this jquery plugin: https://github.com/maranomynet/linkify/blob/master/1.0/jquery.linkify-1.0.js With this REGEX plugins I'm trying to linkify @usernames and #hashtags... linkify.plugins = { tUser: { re: /(^|\s)@(\w+)/gi, tmpl: '$1@ $2 ' }, tH...
TITLE: How to linkify @usernames and #hashtags with jquery.linkify Plugin QUESTION: I'm using this jquery plugin: https://github.com/maranomynet/linkify/blob/master/1.0/jquery.linkify-1.0.js With this REGEX plugins I'm trying to linkify @usernames and #hashtags... linkify.plugins = { tUser: { re: /(^|\s)@(\w+)/gi, tmp...
[ "jquery", "regex", "linkify", "hashtag" ]
1
3
1,716
1
0
2011-06-01T19:09:49.223000
2011-06-01T23:50:48.873000
6,206,406
6,206,859
How to install and use F# Powerpack in Mono?
I need to install use F# powerpack. I use mono version 2.10.2 on Mac. mono --version Mono JIT compiler version 2.10.2 (tarball Mon Apr 18 09:14:01 MDT 2011) Copyright (C) 2002-2011 Novell, Inc and Contributors. www.mono-project.com TLS: normal SIGSEGV: normal Notification: kqueue Architecture: x86 Disabled: none Misc: ...
Your installation procedure seems to be correct (just unzip and install using gacutil -i ). I think there is just a minor issue with the sample - the ToLinqExpression extension method is available in a module that needs to be explicitly opened, so your file should be: EDIT The right module name is actually Microsoft.FS...
How to install and use F# Powerpack in Mono? I need to install use F# powerpack. I use mono version 2.10.2 on Mac. mono --version Mono JIT compiler version 2.10.2 (tarball Mon Apr 18 09:14:01 MDT 2011) Copyright (C) 2002-2011 Novell, Inc and Contributors. www.mono-project.com TLS: normal SIGSEGV: normal Notification: k...
TITLE: How to install and use F# Powerpack in Mono? QUESTION: I need to install use F# powerpack. I use mono version 2.10.2 on Mac. mono --version Mono JIT compiler version 2.10.2 (tarball Mon Apr 18 09:14:01 MDT 2011) Copyright (C) 2002-2011 Novell, Inc and Contributors. www.mono-project.com TLS: normal SIGSEGV: norm...
[ "f#", "mono", "gac", "powerpack" ]
6
4
1,150
1
0
2011-06-01T19:10:22.017000
2011-06-01T19:53:06.050000
6,206,416
6,206,525
Why does `ann = F` not work when plotting with `as.factor` in R?
I am plotting a continuous variable against a factor using plot() in R (see example below). I do not want the labels on the axes. Without the as.factor call in the formula ann = F suppresses the printing of the labels but it doesn't work with as.factor in the formula. Why is this? Thank you. # example for SO # example ...
It seems to be caused by plot.formula because it works if you specify x and y separately: plot(as.factor(y), x, ann=FALSE) UPDATE: Confirmation that it's in graphics:::plot.formula. The line that calls plot explicitly sets ylab and xlab ( funname is "plot" and dots = list(ann=FALSE) ): do.call(funname, c(list(mf[[i]], ...
Why does `ann = F` not work when plotting with `as.factor` in R? I am plotting a continuous variable against a factor using plot() in R (see example below). I do not want the labels on the axes. Without the as.factor call in the formula ann = F suppresses the printing of the labels but it doesn't work with as.factor in...
TITLE: Why does `ann = F` not work when plotting with `as.factor` in R? QUESTION: I am plotting a continuous variable against a factor using plot() in R (see example below). I do not want the labels on the axes. Without the as.factor call in the formula ann = F suppresses the printing of the labels but it doesn't work...
[ "r", "plot", "r-factor" ]
4
5
2,031
2
0
2011-06-01T19:11:21.360000
2011-06-01T19:21:48.707000
6,206,445
6,206,470
MonoTouch - How to specify image path of UIImage.FromFile()
I have a path problem with UIImage.FromFile() method. My solution folder has 3 projects and the main UI project has an Images folder in it. I put all my project images in this folder and I have code like this: UIImage myImg = UIImage.FromFile("Images/someImage.png"); I have already examined this and all these topics.. ...
Generally, if you have right clicked on the file, gone to it's properties and marked it as Content then the following will work: UIImage myImg = UIImage.FromFile(@"Images/someImage.png");
MonoTouch - How to specify image path of UIImage.FromFile() I have a path problem with UIImage.FromFile() method. My solution folder has 3 projects and the main UI project has an Images folder in it. I put all my project images in this folder and I have code like this: UIImage myImg = UIImage.FromFile("Images/someImage...
TITLE: MonoTouch - How to specify image path of UIImage.FromFile() QUESTION: I have a path problem with UIImage.FromFile() method. My solution folder has 3 projects and the main UI project has an Images folder in it. I put all my project images in this folder and I have code like this: UIImage myImg = UIImage.FromFile...
[ "image", "xamarin.ios", "uiimage", "filepath", "nsbundle" ]
8
12
7,772
2
0
2011-06-01T19:13:18.150000
2011-06-01T19:16:28.303000
6,206,446
6,206,571
Possible PHP bug around static:: in PHP 5.3.3
I was working on some PHP around the "static::" keyword, and encountered an issue where too many static calls result in confusion as to where a method resides. It's easier to show by example: class Class1 { function Test() { return Class2::Test(); } } class Class2 { function Test() { return static::Test2(); } functio...
The PHP docs on late static bindings answer your question. "late static bindings work by storing the class named in the last "non-forwarding call". In case of static method calls, this is the class explicitly named (usually the one on the left of the:: operator); in case of non static method calls, it is the class of t...
Possible PHP bug around static:: in PHP 5.3.3 I was working on some PHP around the "static::" keyword, and encountered an issue where too many static calls result in confusion as to where a method resides. It's easier to show by example: class Class1 { function Test() { return Class2::Test(); } } class Class2 { functi...
TITLE: Possible PHP bug around static:: in PHP 5.3.3 QUESTION: I was working on some PHP around the "static::" keyword, and encountered an issue where too many static calls result in confusion as to where a method resides. It's easier to show by example: class Class1 { function Test() { return Class2::Test(); } } cla...
[ "php", "static" ]
6
7
445
1
0
2011-06-01T19:13:36.243000
2011-06-01T19:27:03.030000
6,206,447
6,206,728
gdb: logging something instead of breaking?
Is it possible to have gdb log something to the terminal instead of breaking on it? For example I would like to set a 'breakpoint' on some method and have gdb print self as well as the parameters each time the method is invoked. Basically I want to insert print statements into arbitrary places without actually recompil...
You can use Breakpoint Command Lists. There is an example how to do it. For example, here is how you could use breakpoint commands to print the value of x at entry to foo whenever x is positive. break foo if x>0 commands silent printf "x is %d\n",x cont end
gdb: logging something instead of breaking? Is it possible to have gdb log something to the terminal instead of breaking on it? For example I would like to set a 'breakpoint' on some method and have gdb print self as well as the parameters each time the method is invoked. Basically I want to insert print statements int...
TITLE: gdb: logging something instead of breaking? QUESTION: Is it possible to have gdb log something to the terminal instead of breaking on it? For example I would like to set a 'breakpoint' on some method and have gdb print self as well as the parameters each time the method is invoked. Basically I want to insert pr...
[ "unix", "logging", "gdb" ]
7
15
4,209
3
0
2011-06-01T19:13:44.343000
2011-06-01T19:42:46.883000
6,206,449
6,206,673
Does getDefinitionByName worked with linked MovieClips?
I have a MovieClip named "Dress" that I would like to create using: var c:Class = getDefinitionByName("Dress") as Class; var dress:MovieClip = new c(); However, it doesn't seem to work...
getDefinitionByName will work only if Dress class was mentioned somewhere in the code. E.g. you may just import it: import package.Dress
Does getDefinitionByName worked with linked MovieClips? I have a MovieClip named "Dress" that I would like to create using: var c:Class = getDefinitionByName("Dress") as Class; var dress:MovieClip = new c(); However, it doesn't seem to work...
TITLE: Does getDefinitionByName worked with linked MovieClips? QUESTION: I have a MovieClip named "Dress" that I would like to create using: var c:Class = getDefinitionByName("Dress") as Class; var dress:MovieClip = new c(); However, it doesn't seem to work... ANSWER: getDefinitionByName will work only if Dress class...
[ "actionscript-3" ]
1
1
405
2
0
2011-06-01T19:14:21.863000
2011-06-01T19:38:28.690000
6,206,457
6,283,368
Access ViewNavigatorApplication's actionbar component from View
I want to change icon of button thats in actioncontent of ViewNavigatorApplication from a view. ViewNavigatorApplication loads views which are mxml components. i tried Object(navigator.activeView).refreshbutton.icon = "../assets/r.gif"; It throws runtime error saying it couldn't find element.
Assuming your button is called refreshbutton and your app is called MyApp MyApp(FlexGlobals.topLevelApplication).refreshbutton.icon="../assets/r.gif"; It's important to understand that your casting the top level application as your own app so it knows about the contents of your main level app including actionContent. T...
Access ViewNavigatorApplication's actionbar component from View I want to change icon of button thats in actioncontent of ViewNavigatorApplication from a view. ViewNavigatorApplication loads views which are mxml components. i tried Object(navigator.activeView).refreshbutton.icon = "../assets/r.gif"; It throws runtime e...
TITLE: Access ViewNavigatorApplication's actionbar component from View QUESTION: I want to change icon of button thats in actioncontent of ViewNavigatorApplication from a view. ViewNavigatorApplication loads views which are mxml components. i tried Object(navigator.activeView).refreshbutton.icon = "../assets/r.gif"; I...
[ "android", "apache-flex", "flex4" ]
1
1
305
1
0
2011-06-01T19:14:45.793000
2011-06-08T18:20:56.913000
6,206,471
6,264,316
Re-render Tweet button via JS
I used to use this snippet to re-render a Tweet button. var tweetButton = new twttr.TweetButton(twitterScript); twttr.render(); But it looks like widgets.js ( http://platform.twitter.com/widgets.js ) has been modified so twttr.TweetButton is no longer a constructor. Can anyone help with this issue?
Looks like the twttr.TweetButton constructor was never supported, and now no longer works after the last API update: http://groups.google.com/group/twitter-development-talk/browse_thread/thread/bcda486acdf4ab42/6a557050f850ccf2?lnk=gst&q=+twttr.TweetButton#6a557050f850ccf2 The supported method is to create an iframe -b...
Re-render Tweet button via JS I used to use this snippet to re-render a Tweet button. var tweetButton = new twttr.TweetButton(twitterScript); twttr.render(); But it looks like widgets.js ( http://platform.twitter.com/widgets.js ) has been modified so twttr.TweetButton is no longer a constructor. Can anyone help with th...
TITLE: Re-render Tweet button via JS QUESTION: I used to use this snippet to re-render a Tweet button. var tweetButton = new twttr.TweetButton(twitterScript); twttr.render(); But it looks like widgets.js ( http://platform.twitter.com/widgets.js ) has been modified so twttr.TweetButton is no longer a constructor. Can a...
[ "javascript", "ajax", "twitter" ]
19
4
14,039
7
0
2011-06-01T19:16:29.067000
2011-06-07T11:10:07.050000
6,206,472
6,206,773
What is the best way to write to a file in a parallel thread in Java?
I have a program that performs lots of calculations and reports them to a file frequently. I know that frequent write operations can slow a program down a lot, so to avoid it I'd like to have a second thread dedicated to the writing operations. Right now I'm doing it with this class I wrote (the impatient can skip to t...
Your basic approach looks fine. I would structure the code as follows: import java.io.BufferedWriter; import java.io.File; import java.io.IOException; import java.io.Writer; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; public interfac...
What is the best way to write to a file in a parallel thread in Java? I have a program that performs lots of calculations and reports them to a file frequently. I know that frequent write operations can slow a program down a lot, so to avoid it I'd like to have a second thread dedicated to the writing operations. Right...
TITLE: What is the best way to write to a file in a parallel thread in Java? QUESTION: I have a program that performs lots of calculations and reports them to a file frequently. I know that frequent write operations can slow a program down a lot, so to avoid it I'd like to have a second thread dedicated to the writing...
[ "java", "multithreading", "file" ]
29
16
26,847
4
0
2011-06-01T19:16:43.330000
2011-06-01T19:46:13.057000
6,206,487
6,206,609
Jsoup: "Which span does this element belong to?"
Assuming I have found an element using: Element link = div.select("a:not([class])").first(); I now want to find out whether this particular element is enclosed within a -- not necessarily a direct descendant. Is there a way to do that in Jsoup? Update: I just found the wonderful Element.parent(). I am going to check wh...
That's not directly possible from the Element link on. I'd suggest to collect all links in a span.uniqspan first and then check if it contains the link. E.g. Element link = div.select("a:not([class])").first(); Elements linksInUniqspan = document.select("span.uniqspan a:not([class])"); if (linksInUniqspan.contains(lin...
Jsoup: "Which span does this element belong to?" Assuming I have found an element using: Element link = div.select("a:not([class])").first(); I now want to find out whether this particular element is enclosed within a -- not necessarily a direct descendant. Is there a way to do that in Jsoup? Update: I just found the w...
TITLE: Jsoup: "Which span does this element belong to?" QUESTION: Assuming I have found an element using: Element link = div.select("a:not([class])").first(); I now want to find out whether this particular element is enclosed within a -- not necessarily a direct descendant. Is there a way to do that in Jsoup? Update: ...
[ "java", "html-parsing", "jsoup" ]
2
2
272
1
0
2011-06-01T19:18:20.227000
2011-06-01T19:31:49.693000
6,206,490
6,206,572
Razor in-line if statement not working?
I've got an exception throwing at this line, and can't figure out why...maybe someone else can spot it The exception I'm getting is: error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
You need to use the expression ( explicit ) code block style for that expression: see the gu's post
Razor in-line if statement not working? I've got an exception throwing at this line, and can't figure out why...maybe someone else can spot it The exception I'm getting is: error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
TITLE: Razor in-line if statement not working? QUESTION: I've got an exception throwing at this line, and can't figure out why...maybe someone else can spot it The exception I'm getting is: error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement ANSWER: You nee...
[ "asp.net-mvc-3", "razor" ]
26
61
19,793
2
0
2011-06-01T19:18:27.780000
2011-06-01T19:27:08.130000
6,206,495
6,209,166
Parse routes in cakephp to load specific model (is it possible to use .htaccess for this?)
First part of this question will look trivial, but the point is in second part. So, let's say that I have next few links on my app: http://myapp.com/cars-audi http://myapp.com/cars-opel http://myapp.com/cars-fiat http://myapp.com/cars-vw In these cases, model car is used. So, in this case, I want to escape using slash ...
This is a simple case of routing a URL to a controller action, it doesn't involve models at all. Router::connect('/:carlink', array('controller' => 'cars', 'action' => 'view'), array('carlink' => 'cars-\w+', 'pass' => array('carlink'))); This route says any URL that matches /:carlink should be routed to the given contr...
Parse routes in cakephp to load specific model (is it possible to use .htaccess for this?) First part of this question will look trivial, but the point is in second part. So, let's say that I have next few links on my app: http://myapp.com/cars-audi http://myapp.com/cars-opel http://myapp.com/cars-fiat http://myapp.com...
TITLE: Parse routes in cakephp to load specific model (is it possible to use .htaccess for this?) QUESTION: First part of this question will look trivial, but the point is in second part. So, let's say that I have next few links on my app: http://myapp.com/cars-audi http://myapp.com/cars-opel http://myapp.com/cars-fia...
[ "cakephp", "model", "routes", "cakephp-1.3" ]
1
2
346
1
0
2011-06-01T19:19:10.720000
2011-06-02T00:16:46.610000
6,206,500
6,230,644
Rails 3 serialized form attribute
I have the following model: class Deck < ActiveRecord::Base has_many:cards serialize:stats attr_accessible:name,:description,:stats end In this, stats should be an array of strings. I want to be able to add an arbitrary number of stats to the row (using javascript to add additional "stat" input boxes, but that is outsi...
Posting the solution I went for to aid future readers. #Controller def new @deck = Deck.new @deck.stats = ["", ""] #include for number of times you wish to show the field. end #View <%@deck.stats.each_with_index do |s,i| %> Stat <%=i+1%>: <%=text_field "stat", i,:name => "deck[stats][]",:value => s %> <%end%>
Rails 3 serialized form attribute I have the following model: class Deck < ActiveRecord::Base has_many:cards serialize:stats attr_accessible:name,:description,:stats end In this, stats should be an array of strings. I want to be able to add an arbitrary number of stats to the row (using javascript to add additional "st...
TITLE: Rails 3 serialized form attribute QUESTION: I have the following model: class Deck < ActiveRecord::Base has_many:cards serialize:stats attr_accessible:name,:description,:stats end In this, stats should be an array of strings. I want to be able to add an arbitrary number of stats to the row (using javascript to ...
[ "ruby-on-rails", "ruby-on-rails-3" ]
1
1
2,673
4
0
2011-06-01T19:19:38.537000
2011-06-03T17:39:44.760000
6,206,501
6,206,521
isDigit() returning true for letter
When running the following program and inputing a letter, one of the output windows says that the letter is a digit when it is clearly not. Why? import javax.swing.JOptionPane; /** * This program demonstrates some of the Character * class's character testing methods * * */ public class CharacterTest { public static v...
if(Character.isDigit(ch));{ JOptionPane.showMessageDialog(null, "Thit is a digit."); } That means: JOptionPane.showMessageDialog(null, "Thit is a digit."); without any condition, so it will always print that it's a digit. By the way, neither spaces nor white spaces (funny how Java distinguishes between the two) are "up...
isDigit() returning true for letter When running the following program and inputing a letter, one of the output windows says that the letter is a digit when it is clearly not. Why? import javax.swing.JOptionPane; /** * This program demonstrates some of the Character * class's character testing methods * * */ public cl...
TITLE: isDigit() returning true for letter QUESTION: When running the following program and inputing a letter, one of the output windows says that the letter is a digit when it is clearly not. Why? import javax.swing.JOptionPane; /** * This program demonstrates some of the Character * class's character testing method...
[ "java", "wrapper", "character" ]
1
8
3,045
1
0
2011-06-01T19:19:45.847000
2011-06-01T19:21:24.760000
6,206,503
6,206,574
Is it possible to create a function where [[prototype]] refers to another function
I would like to create function objects (yes, all functions are objects) with some control over the prototypal inheritance, that is, I would like one function to inherit from another. I can make objects that have prototypal inheritance, and know to set the prototype property of a function performing as a constructor to...
In V8 (and most other browsers/engines except IE) you can change an object's prototype by setting the __prototype__ __proto__ attribute. Setting the prototype attribute will instead change the prototype that is used to create an object if the function is invoked as a constructor function. This should not be what you wa...
Is it possible to create a function where [[prototype]] refers to another function I would like to create function objects (yes, all functions are objects) with some control over the prototypal inheritance, that is, I would like one function to inherit from another. I can make objects that have prototypal inheritance, ...
TITLE: Is it possible to create a function where [[prototype]] refers to another function QUESTION: I would like to create function objects (yes, all functions are objects) with some control over the prototypal inheritance, that is, I would like one function to inherit from another. I can make objects that have protot...
[ "javascript", "v8" ]
3
1
970
3
0
2011-06-01T19:19:48.133000
2011-06-01T19:27:12.153000
6,206,509
6,206,623
C# Boxing of valuetypes. Questions on size and type of boxing wrappers and valuetypes
After reading ValueTypes - RefTypes - EricLippert I have 3 questions: Because say an 'int' derives from System.ValueType which derives from System.Object, So how much space really does the value type like 'int' take (seeing that it finally derives from System.Object)? Is it only size of int or the extra CLR bookkeeping...
An int is 32 bits, no matter what, because it's a value. The Object part only comes into play once you box it (for example in C# cast it to an object ). Once that happens, a new object is created with everything an object has, and inside that object resides your int. This is why C# generics are so amazing, compared to ...
C# Boxing of valuetypes. Questions on size and type of boxing wrappers and valuetypes After reading ValueTypes - RefTypes - EricLippert I have 3 questions: Because say an 'int' derives from System.ValueType which derives from System.Object, So how much space really does the value type like 'int' take (seeing that it fi...
TITLE: C# Boxing of valuetypes. Questions on size and type of boxing wrappers and valuetypes QUESTION: After reading ValueTypes - RefTypes - EricLippert I have 3 questions: Because say an 'int' derives from System.ValueType which derives from System.Object, So how much space really does the value type like 'int' take ...
[ ".net" ]
7
6
477
1
0
2011-06-01T19:20:24.027000
2011-06-01T19:32:44.383000
6,206,511
6,206,660
JQuery How to add a Accordion inside a Dialog
I have a dialog hidden by default that when the user clicks in a button in the page, the dialog appears and inside the dialog there is a accordion. The accordion appears BUT each section of the accordion does not appear complete. It does not show the text inside each accordion section completely. It just shows the firs...
this seems seems to work fine for me but we really need to see your code $( "#accordion" ).accordion(); $('#dialog').dialog({autoOpen:false}); $('#mybutton').click(function(){ $('#dialog').dialog('open'); }) here is a working demo
JQuery How to add a Accordion inside a Dialog I have a dialog hidden by default that when the user clicks in a button in the page, the dialog appears and inside the dialog there is a accordion. The accordion appears BUT each section of the accordion does not appear complete. It does not show the text inside each accord...
TITLE: JQuery How to add a Accordion inside a Dialog QUESTION: I have a dialog hidden by default that when the user clicks in a button in the page, the dialog appears and inside the dialog there is a accordion. The accordion appears BUT each section of the accordion does not appear complete. It does not show the text ...
[ "jquery-ui", "accordion", "jquery-ui-dialog" ]
2
1
2,153
1
0
2011-06-01T19:20:42.547000
2011-06-01T19:37:21.640000
6,206,513
6,206,541
Microsoft Access Question
I do not know VB that well. I can figure out most things. I was wondering if anyone can tell me what this line of code means Option Compare Database
It means "In this module, compare strings using rules that are defined in the database." Alternatives are Option Compare Text (case-insensitive compare) and Option Compare Binary (case-sensitive). Had you used Google, you would immediately have found this article that explains everything.
Microsoft Access Question I do not know VB that well. I can figure out most things. I was wondering if anyone can tell me what this line of code means Option Compare Database
TITLE: Microsoft Access Question QUESTION: I do not know VB that well. I can figure out most things. I was wondering if anyone can tell me what this line of code means Option Compare Database ANSWER: It means "In this module, compare strings using rules that are defined in the database." Alternatives are Option Compa...
[ "database", "ms-access", "vba" ]
2
5
343
1
0
2011-06-01T19:20:53.340000
2011-06-01T19:23:54.950000