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,218,912 | 6,219,054 | sending user-defined structure using WM_COPYDATA message | How can i send my structure to other application and recieve it using WM_COPYDATA message? | Most of this is explained by MS at Using Data Copy. Is there anything missing in that example? | sending user-defined structure using WM_COPYDATA message How can i send my structure to other application and recieve it using WM_COPYDATA message? | TITLE:
sending user-defined structure using WM_COPYDATA message
QUESTION:
How can i send my structure to other application and recieve it using WM_COPYDATA message?
ANSWER:
Most of this is explained by MS at Using Data Copy. Is there anything missing in that example? | [
"c++",
"winapi"
] | 2 | 3 | 723 | 2 | 0 | 2011-06-02T18:45:36.503000 | 2011-06-02T18:58:29.143000 |
6,218,917 | 6,218,979 | Graphs used in Sleep Cycle iPhone App | Does anybody know what graph framework/api/etc. the developers of the Sleep Cycle app ( http://mdlabs.se/sleepcycle/ ) used in their application? Thank you in advance! | http://code.google.com/p/core-plot/ I would say,unless it's custom implementation. BTW, rolling your own custom graphs is pretty simple. | Graphs used in Sleep Cycle iPhone App Does anybody know what graph framework/api/etc. the developers of the Sleep Cycle app ( http://mdlabs.se/sleepcycle/ ) used in their application? Thank you in advance! | TITLE:
Graphs used in Sleep Cycle iPhone App
QUESTION:
Does anybody know what graph framework/api/etc. the developers of the Sleep Cycle app ( http://mdlabs.se/sleepcycle/ ) used in their application? Thank you in advance!
ANSWER:
http://code.google.com/p/core-plot/ I would say,unless it's custom implementation. BTW,... | [
"iphone",
"objective-c",
"frameworks",
"ios-frameworks"
] | 0 | 0 | 551 | 1 | 0 | 2011-06-02T18:46:08.960000 | 2011-06-02T18:52:10.313000 |
6,218,925 | 6,219,002 | Bind text and variable value togheter | How can use this text value? Text="My custom text: {Binding MyData}" In this code? thanks. | You can write a Converter and pass in the Parameter MyData If it was Silverlight 4.0 you can inherently use Value Converter like this Also Refer Question: Binding with StringFormat on Windows Phone 7? | Bind text and variable value togheter How can use this text value? Text="My custom text: {Binding MyData}" In this code? thanks. | TITLE:
Bind text and variable value togheter
QUESTION:
How can use this text value? Text="My custom text: {Binding MyData}" In this code? thanks.
ANSWER:
You can write a Converter and pass in the Parameter MyData If it was Silverlight 4.0 you can inherently use Value Converter like this Also Refer Question: Binding w... | [
"xaml",
"data-binding",
"windows-phone-7",
"binding"
] | 1 | 0 | 485 | 3 | 0 | 2011-06-02T18:47:08.123000 | 2011-06-02T18:53:53.627000 |
6,218,927 | 6,219,053 | In a document based application does a document have to represent a file? | I am about 90% sure my program would benefit from using the document framework in Cocoa but there is one thing that I am unsure of. In all the examples I have seen, The NSDocument subclass always represents the file being saved which isn't entirely appropriate for my application. The file that will be saved to disk in ... | I am not sure wether this apply to your application, but you could associate your NSDocument with a package, so that your document would be not just a file, but exactly the collection of files you require to work on. When I worked on this a few years back, it was not so trivial to get this working, but in the end it co... | In a document based application does a document have to represent a file? I am about 90% sure my program would benefit from using the document framework in Cocoa but there is one thing that I am unsure of. In all the examples I have seen, The NSDocument subclass always represents the file being saved which isn't entire... | TITLE:
In a document based application does a document have to represent a file?
QUESTION:
I am about 90% sure my program would benefit from using the document framework in Cocoa but there is one thing that I am unsure of. In all the examples I have seen, The NSDocument subclass always represents the file being saved ... | [
"cocoa",
"nsdocument"
] | 1 | 2 | 224 | 1 | 0 | 2011-06-02T18:47:19.353000 | 2011-06-02T18:58:26.257000 |
6,218,936 | 6,219,000 | Virtual methods whose type is known at compile-time | If I do something like: Dog dog; //class with virtual methods Cat cat; //class from same base as Dog
dog.eat(); //call virtual method cat.eat(); //call virtual method Then the eat()s will be normal method calls and will not require the v-table - correct? I can assume that it would run identical to a non-virtual method... | When you're using object.member - you're not dereferencing a pointer, so there's no effect to the virtual methods. Virtual comes into effect only when you have a pointer which can be polymorphic and dynamic dispatch is used. For example: Cat cat; Animal *cat2 = &cat cat.eat(); // direct call //... a lot of other code a... | Virtual methods whose type is known at compile-time If I do something like: Dog dog; //class with virtual methods Cat cat; //class from same base as Dog
dog.eat(); //call virtual method cat.eat(); //call virtual method Then the eat()s will be normal method calls and will not require the v-table - correct? I can assume... | TITLE:
Virtual methods whose type is known at compile-time
QUESTION:
If I do something like: Dog dog; //class with virtual methods Cat cat; //class from same base as Dog
dog.eat(); //call virtual method cat.eat(); //call virtual method Then the eat()s will be normal method calls and will not require the v-table - cor... | [
"c++",
"inheritance",
"methods",
"virtual"
] | 5 | 4 | 212 | 4 | 0 | 2011-06-02T18:47:44.407000 | 2011-06-02T18:53:49.967000 |
6,218,938 | 6,218,984 | How do you 'continue' like with for loops when iterating with a closure in javascript | Using underscore.js is there a way to breakout of the each if a certain condition is met? _.each([1,2,3], function(value) { if (value == 2) { // continue 2 return false; } }); I'm sure returning false did the trick in prototype.js | Looks like you should return breaker, which isn't in scope it seems. So, without modifying _, you can't easily break out of iteration. The === there will ensure that returning {} won't cause the loop to break; you need a reference to breaker, which you don't have. // The cornerstone, an `each` implementation, aka `forE... | How do you 'continue' like with for loops when iterating with a closure in javascript Using underscore.js is there a way to breakout of the each if a certain condition is met? _.each([1,2,3], function(value) { if (value == 2) { // continue 2 return false; } }); I'm sure returning false did the trick in prototype.js | TITLE:
How do you 'continue' like with for loops when iterating with a closure in javascript
QUESTION:
Using underscore.js is there a way to breakout of the each if a certain condition is met? _.each([1,2,3], function(value) { if (value == 2) { // continue 2 return false; } }); I'm sure returning false did the trick i... | [
"javascript",
"node.js"
] | 8 | 4 | 6,551 | 4 | 0 | 2011-06-02T18:48:07.833000 | 2011-06-02T18:52:55.890000 |
6,218,946 | 6,220,276 | C Function that calculates total sizeof arguments | I'm currently looking to calculate the total size of arguments passed into a function, in bytes. In theory, one can just write out sizeof(x) for every argument. However, this is a tremendous waste of time if one wants to do this for a lot of functions. I'm trying to figure out the amount of space for the arguments so I... | You need a FOREACH macro that allows expanding another macro on every element of a variadic list. This works by defining variants for every list length of interest: #define _NUM_ARGS(X100, X99, X98, X97, X96, X95, X94, X93, X92, X91, X90, X89, X88, X87, X86, X85, X84, X83, X82, X81, X80, X79, X78, X77, X76, X75, X74, X... | C Function that calculates total sizeof arguments I'm currently looking to calculate the total size of arguments passed into a function, in bytes. In theory, one can just write out sizeof(x) for every argument. However, this is a tremendous waste of time if one wants to do this for a lot of functions. I'm trying to fig... | TITLE:
C Function that calculates total sizeof arguments
QUESTION:
I'm currently looking to calculate the total size of arguments passed into a function, in bytes. In theory, one can just write out sizeof(x) for every argument. However, this is a tremendous waste of time if one wants to do this for a lot of functions.... | [
"c",
"macros",
"c-preprocessor",
"sizeof",
"variadic-macros"
] | 7 | 4 | 1,056 | 2 | 0 | 2011-06-02T18:48:45.350000 | 2011-06-02T20:54:30.957000 |
6,218,956 | 6,220,809 | Matching similar images in OpenCV | I have two sets of images, {H} and {L}. {H} consists of 512x512 images. {L} consists of all of the images in {H}, but scaled down to 32x32-128x128 and with compression artifacts from lossy compression. What would be the best way of matching images in {H} to their closest match in {L} using OpenCV? | Another, although maybe much slower approach is to do Clustering by Compression (Arxviv.org, PDF) and maybe use the JPEG coefficients as the model data to be compared instead of the uncompressed image data compressed by some other method of compression. Also see articles related to the first paper from Google Scholar. ... | Matching similar images in OpenCV I have two sets of images, {H} and {L}. {H} consists of 512x512 images. {L} consists of all of the images in {H}, but scaled down to 32x32-128x128 and with compression artifacts from lossy compression. What would be the best way of matching images in {H} to their closest match in {L} u... | TITLE:
Matching similar images in OpenCV
QUESTION:
I have two sets of images, {H} and {L}. {H} consists of 512x512 images. {L} consists of all of the images in {H}, but scaled down to 32x32-128x128 and with compression artifacts from lossy compression. What would be the best way of matching images in {H} to their clos... | [
"image-processing",
"opencv"
] | 1 | 1 | 3,454 | 3 | 0 | 2011-06-02T18:50:10.207000 | 2011-06-02T21:51:00.233000 |
6,218,970 | 6,242,840 | Resolving spring:messages in javascript for i18n internationalization | I'm attempting to internationalize some of our code. I have a page in JSPX which is using the tag to resolve strings from a message.properties file. This works fine for the HTML and CSS that is in the JSPX page, however there a javascript file is sourced, and substituting the tag for the string in there just means that... | It seems to me that what you want to do is to treat JS file like JSP file and resolve its contents via spring:message tag. I would not do that. Typically JS i18n is done in one of two ways: By writing out Array of translated strings from JSP page By creating translation filter and provide pre-translated JS file to requ... | Resolving spring:messages in javascript for i18n internationalization I'm attempting to internationalize some of our code. I have a page in JSPX which is using the tag to resolve strings from a message.properties file. This works fine for the HTML and CSS that is in the JSPX page, however there a javascript file is sou... | TITLE:
Resolving spring:messages in javascript for i18n internationalization
QUESTION:
I'm attempting to internationalize some of our code. I have a page in JSPX which is using the tag to resolve strings from a message.properties file. This works fine for the HTML and CSS that is in the JSPX page, however there a java... | [
"javascript",
"spring",
"spring-mvc",
"internationalization",
"dojo"
] | 26 | 39 | 47,280 | 4 | 0 | 2011-06-02T18:51:34.390000 | 2011-06-05T12:17:41.730000 |
6,218,971 | 6,254,573 | Is there a good way to stream video FROM Android to an RTSP server? | I have searched around and haven't really found anything. I would like to send the video from the built in camera to my RTSP server via a stream. When looking for examples, I saw that it might be possible for MediaPlayer to have its setDataSource() method to just include the location of the stream on the server. I trie... | We ended up just using a standard protocol smashing JPEG after JPEG and loading those and it more-or-less simulates real time. We could still use a better solution, but this worked for now. If anybody wants to see some code, leave a comment. If anybody has a better solution, post it and I will switch the answer over. | Is there a good way to stream video FROM Android to an RTSP server? I have searched around and haven't really found anything. I would like to send the video from the built in camera to my RTSP server via a stream. When looking for examples, I saw that it might be possible for MediaPlayer to have its setDataSource() met... | TITLE:
Is there a good way to stream video FROM Android to an RTSP server?
QUESTION:
I have searched around and haven't really found anything. I would like to send the video from the built in camera to my RTSP server via a stream. When looking for examples, I saw that it might be possible for MediaPlayer to have its s... | [
"java",
"android",
"rtsp"
] | 3 | 1 | 5,239 | 2 | 0 | 2011-06-02T18:51:34.467000 | 2011-06-06T15:47:31.073000 |
6,218,976 | 6,219,006 | How to insert a new record with LinqToSql? | Googling shows there is to be an "Add" method for this, but there seems to be no Add or anything alike in my LinqToSQL table classes. I've tried "Attach", but with no effect:-( I use VS2010,.Net 4 and SQL Server 2008 R2. My tables have no surrogate ID but a natural composite primary key. | yourDatacontext.yourlinqClass.InsertOnSubmit(new yourlinqClass());
yourDatacontext.SubmitChanges(); | How to insert a new record with LinqToSql? Googling shows there is to be an "Add" method for this, but there seems to be no Add or anything alike in my LinqToSQL table classes. I've tried "Attach", but with no effect:-( I use VS2010,.Net 4 and SQL Server 2008 R2. My tables have no surrogate ID but a natural composite p... | TITLE:
How to insert a new record with LinqToSql?
QUESTION:
Googling shows there is to be an "Add" method for this, but there seems to be no Add or anything alike in my LinqToSQL table classes. I've tried "Attach", but with no effect:-( I use VS2010,.Net 4 and SQL Server 2008 R2. My tables have no surrogate ID but a n... | [
"c#",
".net",
"linq-to-sql"
] | 0 | 3 | 88 | 2 | 0 | 2011-06-02T18:51:47.397000 | 2011-06-02T18:54:18.833000 |
6,218,978 | 6,219,021 | Is it possible for someone to read or write my .php files on the server if they have world read/write permissions? | Can someone steal or change my PHP files if I have set them to chmod 777? I have an EC-2 instance and even when I'm logged in as EC2-user I cant change my file if I have set them to chmod 755. I can only make changes to the file when I have set them to chmod 777. | Yes and no. Can anyone who is viewing the files over the net? No. However, anyone with the ability to log on to your machine could change the files (since they are world readable / writable.) In general, this isn't a good practice. I'd advise not permitting more than 775. If you are in a hosted environment, this should... | Is it possible for someone to read or write my .php files on the server if they have world read/write permissions? Can someone steal or change my PHP files if I have set them to chmod 777? I have an EC-2 instance and even when I'm logged in as EC2-user I cant change my file if I have set them to chmod 755. I can only m... | TITLE:
Is it possible for someone to read or write my .php files on the server if they have world read/write permissions?
QUESTION:
Can someone steal or change my PHP files if I have set them to chmod 777? I have an EC-2 instance and even when I'm logged in as EC2-user I cant change my file if I have set them to chmod... | [
"php",
"security",
"apache"
] | 3 | 4 | 2,210 | 4 | 0 | 2011-06-02T18:52:02.157000 | 2011-06-02T18:55:32.190000 |
6,218,981 | 6,219,391 | Gobal ASP.NET variable per browser | Environment is ASP.NET 4.0 using C#. I was going to put an ID that I need in a session variable. For example: Session["ProjectID"] = ProjectsComboBox.SelectedValue.ToString(); However, it is possible that the user could have my web application open on the same computer in two different browser windows and be working on... | I'm assuming you're using the default, cookie-based method of session state management. Depending on how the user opens up their multiple windows, it is very likely that each window will be considered part of the same session, as the cookie will be shared between windows. Here is an excellent article that provides a so... | Gobal ASP.NET variable per browser Environment is ASP.NET 4.0 using C#. I was going to put an ID that I need in a session variable. For example: Session["ProjectID"] = ProjectsComboBox.SelectedValue.ToString(); However, it is possible that the user could have my web application open on the same computer in two differen... | TITLE:
Gobal ASP.NET variable per browser
QUESTION:
Environment is ASP.NET 4.0 using C#. I was going to put an ID that I need in a session variable. For example: Session["ProjectID"] = ProjectsComboBox.SelectedValue.ToString(); However, it is possible that the user could have my web application open on the same comput... | [
"c#",
"session-variables",
"asp.net-4.0"
] | 0 | 0 | 1,099 | 2 | 0 | 2011-06-02T18:52:34.913000 | 2011-06-02T19:29:27.593000 |
6,218,986 | 6,219,469 | cannot connect to local database when network is down | I am using following connection string to connect to database on local machine. Problem is that if network goes down then i cannot connect to my database although application is connecting to database on same machine. What am I doing wrong? add name="MainDb" connectionString="Data Source=MyComputerName,1433;Network Lib... | Try to remove Network Library parameter from connection string. This way you are forcing the connection provider to use specific protocol. If you disable networking (TCP), it may be that the provider is not able to connect. Here's some info about Network Library parameter http://support.microsoft.com/kb/238949 If the N... | cannot connect to local database when network is down I am using following connection string to connect to database on local machine. Problem is that if network goes down then i cannot connect to my database although application is connecting to database on same machine. What am I doing wrong? add name="MainDb" connect... | TITLE:
cannot connect to local database when network is down
QUESTION:
I am using following connection string to connect to database on local machine. Problem is that if network goes down then i cannot connect to my database although application is connecting to database on same machine. What am I doing wrong? add nam... | [
"c#",
"sql-server",
"database-connection",
"connection-string"
] | 1 | 0 | 1,042 | 3 | 0 | 2011-06-02T18:52:58.020000 | 2011-06-02T19:36:27.687000 |
6,218,990 | 6,222,152 | How can ocamldebug be used with a Batteries Included project? | I have a simple ocamlbuild project which uses Batteries, including syntax extensions. _tags: <*>: pkg_batteries,pkg_threads,pkg_batteries.syntax,syntax_camlp4o something.ml: open Batteries … let () = … It is built for debugging with: $ ocamlbuild something.d.byte $ ocamldebug something.d.byte Attempting to use the prin... | You have to make the Batteries includes available to the debugger; the dir command and the -I command line options enable this. Unfortunately, this is harder than it should be because ocamlfind does not support ocamldebug. But you can do this: $ ocamldebug `ocamlfind query -recursive -i-format batteries` -I _build some... | How can ocamldebug be used with a Batteries Included project? I have a simple ocamlbuild project which uses Batteries, including syntax extensions. _tags: <*>: pkg_batteries,pkg_threads,pkg_batteries.syntax,syntax_camlp4o something.ml: open Batteries … let () = … It is built for debugging with: $ ocamlbuild something.d... | TITLE:
How can ocamldebug be used with a Batteries Included project?
QUESTION:
I have a simple ocamlbuild project which uses Batteries, including syntax extensions. _tags: <*>: pkg_batteries,pkg_threads,pkg_batteries.syntax,syntax_camlp4o something.ml: open Batteries … let () = … It is built for debugging with: $ ocam... | [
"debugging",
"ocaml",
"ocamlbuild",
"ocaml-batteries"
] | 7 | 8 | 830 | 1 | 0 | 2011-06-02T18:53:12.027000 | 2011-06-03T01:39:56.500000 |
6,219,003 | 6,219,136 | TinyMce protection against cross site scripting | We are planning to use TinyMce in a JSP. We have a standard security filter which keeps track of input data from forms. It identifies insecure code input attempting any intrusions/cross site scripting. My questions are as follows: When using tinyMce are there any third party libraries (paid or open source) which would ... | SQL injection should be something you worry about in your data layer, rather than your front-end. If you're using the proper techniques to prevent SQL injection when you insert the data into your database, you shouldn't have to worry about doing anything with TinyMCE, or any other part of your front-end code. Cross-sit... | TinyMce protection against cross site scripting We are planning to use TinyMce in a JSP. We have a standard security filter which keeps track of input data from forms. It identifies insecure code input attempting any intrusions/cross site scripting. My questions are as follows: When using tinyMce are there any third pa... | TITLE:
TinyMce protection against cross site scripting
QUESTION:
We are planning to use TinyMce in a JSP. We have a standard security filter which keeps track of input data from forms. It identifies insecure code input attempting any intrusions/cross site scripting. My questions are as follows: When using tinyMce are ... | [
"java",
"tinymce",
"sql-injection"
] | 5 | 9 | 5,223 | 1 | 0 | 2011-06-02T18:53:54.783000 | 2011-06-02T19:05:51.667000 |
6,219,007 | 6,219,153 | JSP only application possibilities | I've been fortunate enough to inherit a project which uses a "platform" that only allows JSP. The platform is basically tomcat and we get our own directory where we place our JSPs and JARs. There's no servlet support for us (we don't have access to a web.xml) and even JSTL isn't supported. I tried adding the JSTL jars ... | This is doable. But the recreation of the classes on every request is pretty expensive. I would also just extend them from HttpServlet the usual way. I'd create a factory class which loads all servlets statically. You're then basically taking over the job the servletcontainer is doing based on web.xml. public final cla... | JSP only application possibilities I've been fortunate enough to inherit a project which uses a "platform" that only allows JSP. The platform is basically tomcat and we get our own directory where we place our JSPs and JARs. There's no servlet support for us (we don't have access to a web.xml) and even JSTL isn't suppo... | TITLE:
JSP only application possibilities
QUESTION:
I've been fortunate enough to inherit a project which uses a "platform" that only allows JSP. The platform is basically tomcat and we get our own directory where we place our JSPs and JARs. There's no servlet support for us (we don't have access to a web.xml) and eve... | [
"java",
"jsp"
] | 1 | 3 | 233 | 2 | 0 | 2011-06-02T18:54:23.870000 | 2011-06-02T19:07:22.833000 |
6,219,019 | 6,219,110 | What is the best way to exit and handle a fatal error in Objective-C? | Let's say my app does something unrecoverable (this never happens, right?:P ). Should I use exit()? Should I use NSAssert(false, @"Foo")? Should I throw something somehow? Hard answer to google for. | I don't think you should force quit your app if something bad happens as it is annoying for the user - they won't have a clue about what went wrong. Also, Apple are likely to reject your app if this is a common enough occurrence. Instead you should pop up a dialog to say what went wrong (eg error writing to database, p... | What is the best way to exit and handle a fatal error in Objective-C? Let's say my app does something unrecoverable (this never happens, right?:P ). Should I use exit()? Should I use NSAssert(false, @"Foo")? Should I throw something somehow? Hard answer to google for. | TITLE:
What is the best way to exit and handle a fatal error in Objective-C?
QUESTION:
Let's say my app does something unrecoverable (this never happens, right?:P ). Should I use exit()? Should I use NSAssert(false, @"Foo")? Should I throw something somehow? Hard answer to google for.
ANSWER:
I don't think you should... | [
"objective-c"
] | 5 | 0 | 2,612 | 2 | 0 | 2011-06-02T18:55:21.480000 | 2011-06-02T19:04:00.047000 |
6,219,029 | 6,220,625 | Captcha library for Swing? | I'm looking for a captcha library or component that I could use inside a Swing Gui. Do you know any? Edit: It seems not to exist. I'll program a small one myself. | Even though I don't really understand the need for captcha in Swing app, you can probably use JCaptcha http://jcaptcha.sourceforge.net/ | Captcha library for Swing? I'm looking for a captcha library or component that I could use inside a Swing Gui. Do you know any? Edit: It seems not to exist. I'll program a small one myself. | TITLE:
Captcha library for Swing?
QUESTION:
I'm looking for a captcha library or component that I could use inside a Swing Gui. Do you know any? Edit: It seems not to exist. I'll program a small one myself.
ANSWER:
Even though I don't really understand the need for captcha in Swing app, you can probably use JCaptcha ... | [
"java",
"swing",
"captcha"
] | 4 | 2 | 1,327 | 2 | 0 | 2011-06-02T18:56:07.643000 | 2011-06-02T21:31:06.227000 |
6,219,032 | 6,219,112 | MySQL: How to simplify a "IN" query | I know that I have to avoid to use "IN" clause, but I don't know how to do in this case. The scenario is this: from PHP I get a list of values and then I construct a query like this: SELECT id FROM ( SELECT * FROM `tips` r LEFT JOIN (SELECT tip FROM `tips_showed` WHERE user='8') AS a ON r.id=a.tip WHERE a.tip IS NULL )... | I believe you can simplify the query to: SELECT t.id FROM `tips` t LEFT JOIN `tips_showed` a ON t.id = a.tip AND a.user = '8' WHERE a.tip IS NULL AND t.id IN ('3','4','5','2','6','7','8','9','10','18', '11','12','13','14','15','16','17','20') LIMIT 1 Using NOT EXISTS instead of the LEFT JOIN may also buy you some addit... | MySQL: How to simplify a "IN" query I know that I have to avoid to use "IN" clause, but I don't know how to do in this case. The scenario is this: from PHP I get a list of values and then I construct a query like this: SELECT id FROM ( SELECT * FROM `tips` r LEFT JOIN (SELECT tip FROM `tips_showed` WHERE user='8') AS a... | TITLE:
MySQL: How to simplify a "IN" query
QUESTION:
I know that I have to avoid to use "IN" clause, but I don't know how to do in this case. The scenario is this: from PHP I get a list of values and then I construct a query like this: SELECT id FROM ( SELECT * FROM `tips` r LEFT JOIN (SELECT tip FROM `tips_showed` WH... | [
"mysql",
"optimization"
] | 2 | 4 | 102 | 3 | 0 | 2011-06-02T18:56:19.123000 | 2011-06-02T19:04:09.993000 |
6,219,033 | 6,219,113 | Android Hierarchy and Structure | I want to create an app that has multiple animations on the screen AT THE SAME TIME, to be specific: RPM Gauge animation MPH Gauge animation Direction of wheel animation I believe to make all these 2D graphic fastest i should use SurfaceView with threading. My question is how i should structure this app. A) Should each... | A) The two gauges and the wheel are independent of each other, so I would create three separate Views of each. A SurfaceView is I believe a good option for each. Also, the drawing will be completely different in each, so yes, I would create different classes. Perhaps, depending on how the two gauges will be drawn, you ... | Android Hierarchy and Structure I want to create an app that has multiple animations on the screen AT THE SAME TIME, to be specific: RPM Gauge animation MPH Gauge animation Direction of wheel animation I believe to make all these 2D graphic fastest i should use SurfaceView with threading. My question is how i should st... | TITLE:
Android Hierarchy and Structure
QUESTION:
I want to create an app that has multiple animations on the screen AT THE SAME TIME, to be specific: RPM Gauge animation MPH Gauge animation Direction of wheel animation I believe to make all these 2D graphic fastest i should use SurfaceView with threading. My question ... | [
"android",
"structure",
"hierarchy"
] | 1 | 2 | 95 | 1 | 0 | 2011-06-02T18:56:31.837000 | 2011-06-02T19:04:18.313000 |
6,219,049 | 6,219,103 | error opening HPROF file: IOException: Unknown HPROF Version | I am getting the following exception when trying to open HPROF file (created by Debug.dumpHprofData ) with Memory Analyzer: java.io.IOException: Unknown HPROF Version (JAVA PROFILE 1.0.3) at org.eclipse.mat.hprof.AbstractParser.readVersion(AbstractParser.java:124) at org.eclipse.mat.hprof.Pass1Parser.read(Pass1Parser.j... | The hprof file you get from Android has android specific format. You should convert hprof file take from Android OS into standard hprof format. For this you can use hprof-conv tool that is located at AndroidSDK/tools/hprof-conv. For example: hprof-conv android.hprof mat.hprof And then open mat.hprof in Memory Analyzer.... | error opening HPROF file: IOException: Unknown HPROF Version I am getting the following exception when trying to open HPROF file (created by Debug.dumpHprofData ) with Memory Analyzer: java.io.IOException: Unknown HPROF Version (JAVA PROFILE 1.0.3) at org.eclipse.mat.hprof.AbstractParser.readVersion(AbstractParser.java... | TITLE:
error opening HPROF file: IOException: Unknown HPROF Version
QUESTION:
I am getting the following exception when trying to open HPROF file (created by Debug.dumpHprofData ) with Memory Analyzer: java.io.IOException: Unknown HPROF Version (JAVA PROFILE 1.0.3) at org.eclipse.mat.hprof.AbstractParser.readVersion(A... | [
"android",
"memory-leaks",
"dump"
] | 125 | 309 | 37,651 | 3 | 0 | 2011-06-02T18:58:02.557000 | 2011-06-02T19:03:05.457000 |
6,219,055 | 6,219,937 | Help in writing REGEX | I have to take user input from a HTML form in this format (field1)(space)(field2) where both field1 and field2 are Strings but the restrictions are: field1 & field2 can't be integers they must be alphanumeric they should not start with the same character Note that this pattern can repeat itself, eg: abc def ghi jkl | field1 & field2 can't be integers (?!\p{Digit}+\b) they must be alphanumeric and presumably non-empty \p{Alnum}+ they should not start with the same character requires capturing the first character in a capturing group so the above becomes (\p{Alnum})\p{Alnum}* and you need a negative lookahead (?!\1) Putting it all to... | Help in writing REGEX I have to take user input from a HTML form in this format (field1)(space)(field2) where both field1 and field2 are Strings but the restrictions are: field1 & field2 can't be integers they must be alphanumeric they should not start with the same character Note that this pattern can repeat itself, e... | TITLE:
Help in writing REGEX
QUESTION:
I have to take user input from a HTML form in this format (field1)(space)(field2) where both field1 and field2 are Strings but the restrictions are: field1 & field2 can't be integers they must be alphanumeric they should not start with the same character Note that this pattern ca... | [
"java",
"regex"
] | 0 | 3 | 88 | 1 | 0 | 2011-06-02T18:58:31.980000 | 2011-06-02T20:23:28.353000 |
6,219,073 | 6,224,590 | Pyramid logging | I have a pyramid application and I want the logs to got to stderr and stdout. stdout should be "INFO" level and below. stderr should be "WARN" and higher. How would I change my.ini file to do this? Currently I am logging like this, is this considered the correct way? log = logger.getLogger(__name__) log.info("update...... | You can add multiple handlers to the root, comma-delimited. If you want to filter outside of the normal "only accept messages above this logging level" criterion (i.e. only debug messages) then you need to use something like a logging filter to accept/reject records based on their specific levels: http://docs.python.or... | Pyramid logging I have a pyramid application and I want the logs to got to stderr and stdout. stdout should be "INFO" level and below. stderr should be "WARN" and higher. How would I change my.ini file to do this? Currently I am logging like this, is this considered the correct way? log = logger.getLogger(__name__) log... | TITLE:
Pyramid logging
QUESTION:
I have a pyramid application and I want the logs to got to stderr and stdout. stdout should be "INFO" level and below. stderr should be "WARN" and higher. How would I change my.ini file to do this? Currently I am logging like this, is this considered the correct way? log = logger.getLo... | [
"python",
"logging",
"stdout",
"stderr",
"pyramid"
] | 12 | 11 | 4,909 | 1 | 0 | 2011-06-02T19:00:42.807000 | 2011-06-03T08:12:33.063000 |
6,219,086 | 6,220,472 | Saving a checkbox value in Yii | I can't figure out how to properly save checkbox values in Yii. I have a MySQL column, active, defined as a tinyint. I have the following form creation code, which correctly shows the checkbox as checked if the value is 1 and unchecked if 0: labelEx($model,'active');?> checkBox($model,'active');?> error($model,'active'... | For every input that you are accepting from user, you need to define it in model::rule(). is active defined there in rule()? | Saving a checkbox value in Yii I can't figure out how to properly save checkbox values in Yii. I have a MySQL column, active, defined as a tinyint. I have the following form creation code, which correctly shows the checkbox as checked if the value is 1 and unchecked if 0: labelEx($model,'active');?> checkBox($model,'ac... | TITLE:
Saving a checkbox value in Yii
QUESTION:
I can't figure out how to properly save checkbox values in Yii. I have a MySQL column, active, defined as a tinyint. I have the following form creation code, which correctly shows the checkbox as checked if the value is 1 and unchecked if 0: labelEx($model,'active');?> c... | [
"yii"
] | 16 | 17 | 46,039 | 10 | 0 | 2011-06-02T19:01:33.337000 | 2011-06-02T21:13:56.790000 |
6,219,134 | 6,219,433 | Server throws exception, client misinterprets as success | I am coding a simple login/register functionality using JQuery, PHP and PostgreSQL. The following code is from a PHP file which deals with logins. It throws an exception when the login/password combination is wrong. $username = $_POST['username']; $password = $_POST['password'];
$query = "SELECT * FROM users WHERE use... | First of all: Please look into SQL Injections, because you are pretty vulnerable...;) The problem is, that the HTTP response code is not set to something that is interpreted as an error when you throw a PHP Exception. You could do something like this to workaround this: function exception_handler($exception) { header("... | Server throws exception, client misinterprets as success I am coding a simple login/register functionality using JQuery, PHP and PostgreSQL. The following code is from a PHP file which deals with logins. It throws an exception when the login/password combination is wrong. $username = $_POST['username']; $password = $_P... | TITLE:
Server throws exception, client misinterprets as success
QUESTION:
I am coding a simple login/register functionality using JQuery, PHP and PostgreSQL. The following code is from a PHP file which deals with logins. It throws an exception when the login/password combination is wrong. $username = $_POST['username'... | [
"php",
"jquery",
"postgresql"
] | 5 | 4 | 278 | 3 | 0 | 2011-06-02T19:05:39.433000 | 2011-06-02T19:33:28.093000 |
6,219,141 | 6,219,943 | Searching for a string in a large text file - profiling various methods in python | This question has been asked many times. After spending some time reading the answers, I did some quick profiling to try out the various methods mentioned previously... I have a 600 MB file with 6 million lines of strings (Category paths from DMOZ project). The entry on each line is unique. I want to load the file once... | Variant 1 is great if you need to launch many sequential searches. Since set is internally a hash table, it's rather good at search. It takes time to build, though, and only works well if your data fit into RAM. Variant 3 is good for very big files, because you have plenty of address space to map them and OS caches eno... | Searching for a string in a large text file - profiling various methods in python This question has been asked many times. After spending some time reading the answers, I did some quick profiling to try out the various methods mentioned previously... I have a 600 MB file with 6 million lines of strings (Category paths ... | TITLE:
Searching for a string in a large text file - profiling various methods in python
QUESTION:
This question has been asked many times. After spending some time reading the answers, I did some quick profiling to try out the various methods mentioned previously... I have a 600 MB file with 6 million lines of string... | [
"python",
"performance",
"search",
"profiling",
"large-files"
] | 43 | 13 | 29,927 | 6 | 0 | 2011-06-02T19:06:12.570000 | 2011-06-02T20:24:05.490000 |
6,219,144 | 6,219,161 | IndexOutOfBoundsException | Rather trivial piece of Java code here.. But getting an OutOfBoundsException and I'm not quite sure why? Any help would be great! Before anyone asks if this is homework, no it isn't it's for exam prep. import java.util.Scanner; public class exampractice {
public static void main(String[] args) { Scanner scan = new Sca... | It should be < not <=. Zero based indices on an array vary from 0 to length - 1. Update Someone in grad school taught me to build up a collection of mental patterns like this and use them; you'll avoid bugs. This one is that any array in a C-like language is always searched as for(index = 0; index < array.length; index... | IndexOutOfBoundsException Rather trivial piece of Java code here.. But getting an OutOfBoundsException and I'm not quite sure why? Any help would be great! Before anyone asks if this is homework, no it isn't it's for exam prep. import java.util.Scanner; public class exampractice {
public static void main(String[] args... | TITLE:
IndexOutOfBoundsException
QUESTION:
Rather trivial piece of Java code here.. But getting an OutOfBoundsException and I'm not quite sure why? Any help would be great! Before anyone asks if this is homework, no it isn't it's for exam prep. import java.util.Scanner; public class exampractice {
public static void ... | [
"java",
"arrays",
"exception"
] | 0 | 1 | 361 | 6 | 0 | 2011-06-02T19:06:21.947000 | 2011-06-02T19:07:54.520000 |
6,219,148 | 6,220,762 | MPMoviePlayerController setCurrentPlaybackRate not working | We have an http stream running on iPad iOS 4.3.3. We are using MPMoviePlayerController. I am trying to change the playback rate in order to implement a custom fast forward experience by using: [player setCurrentPlaybackRate:2.0]; But it isn't working. If I display the current playback rate immediately after the above l... | The property currentPlaybackRate does indeed not work when using HTTP-streaming. I would suggest you to file a bug report to Apple on this issue. Still I assume it will not work in the future but possibly another bug report motivates them Apple folks to update their documentation accordingly. | MPMoviePlayerController setCurrentPlaybackRate not working We have an http stream running on iPad iOS 4.3.3. We are using MPMoviePlayerController. I am trying to change the playback rate in order to implement a custom fast forward experience by using: [player setCurrentPlaybackRate:2.0]; But it isn't working. If I disp... | TITLE:
MPMoviePlayerController setCurrentPlaybackRate not working
QUESTION:
We have an http stream running on iPad iOS 4.3.3. We are using MPMoviePlayerController. I am trying to change the playback rate in order to implement a custom fast forward experience by using: [player setCurrentPlaybackRate:2.0]; But it isn't ... | [
"iphone",
"ipad",
"mpmovieplayercontroller"
] | 1 | 0 | 658 | 1 | 0 | 2011-06-02T19:06:55.977000 | 2011-06-02T21:46:19.350000 |
6,219,156 | 6,219,412 | Asynchronous data in UITableView | // Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"celluleConnecte";
celluleConnecte *cell = (celluleConnecte *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if... | it's because you downloading image right in cell, that is wrong. Create a new class of UIImageView and downloading photos there using NSData. There are many examples over the Internet. Here is first i found markj.net/wp/wp-content/uploads/2009/02/asyncimageview.m | Asynchronous data in UITableView // Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"celluleConnecte";
celluleConnecte *cell = (celluleConnecte *) [tableView dequeueReusableCellWi... | TITLE:
Asynchronous data in UITableView
QUESTION:
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"celluleConnecte";
celluleConnecte *cell = (celluleConnecte *) [tableView deq... | [
"iphone",
"json",
"uitableview",
"asynchronous"
] | 0 | 1 | 490 | 1 | 0 | 2011-06-02T19:07:29.450000 | 2011-06-02T19:31:19.797000 |
6,219,162 | 6,222,478 | Dynamics CRM 2011 - Segregating data by Client entity | I'm evaluating CRM 2011 to replace an existing app and and have some questions about security and segregating information by Client (or Account). I have a custom entity for 'Client'. There are lot of custom entities that are related to 'Client' which consitute the data needed to be captured. I would like to limit speci... | Probably the easiest thing to do would be do base your security on business units. Groups of clients an their related records would all be in the same business unit, and as long as you set their security roles to only allow access to records in their own business unit, that would work. For workflows that only trigger o... | Dynamics CRM 2011 - Segregating data by Client entity I'm evaluating CRM 2011 to replace an existing app and and have some questions about security and segregating information by Client (or Account). I have a custom entity for 'Client'. There are lot of custom entities that are related to 'Client' which consitute the d... | TITLE:
Dynamics CRM 2011 - Segregating data by Client entity
QUESTION:
I'm evaluating CRM 2011 to replace an existing app and and have some questions about security and segregating information by Client (or Account). I have a custom entity for 'Client'. There are lot of custom entities that are related to 'Client' whi... | [
"dynamics-crm",
"dynamics-crm-2011"
] | 0 | 1 | 662 | 1 | 0 | 2011-06-02T19:08:01.197000 | 2011-06-03T02:46:23.903000 |
6,219,366 | 6,219,583 | code performance question | Let's say I have a relatively large list of an object MyObjectModel called MyBigList. One of the properties of MyObjectModel is an int called ObjectID. In theory, I think MyBigList could reach 15-20MB in size. I also have a table in my database that stores some scalars about this list so that it can be recomposed later... | I don't think you'll see a material difference between these two approaches. From your description, it sounds like you'll be burning the same CPU cycles either way. The things that matter are: Get the list Iterate through the list to get the IDs Iterate through the list to update the database The order in which these t... | code performance question Let's say I have a relatively large list of an object MyObjectModel called MyBigList. One of the properties of MyObjectModel is an int called ObjectID. In theory, I think MyBigList could reach 15-20MB in size. I also have a table in my database that stores some scalars about this list so that ... | TITLE:
code performance question
QUESTION:
Let's say I have a relatively large list of an object MyObjectModel called MyBigList. One of the properties of MyObjectModel is an int called ObjectID. In theory, I think MyBigList could reach 15-20MB in size. I also have a table in my database that stores some scalars about ... | [
"c#",
"asp.net",
"performance",
"large-data-volumes"
] | 0 | 3 | 127 | 2 | 0 | 2011-06-02T19:26:02.807000 | 2011-06-02T19:48:12.287000 |
6,219,370 | 6,219,417 | where is the memory leak | I have a line of code: CGFloat *components = CGColorGetComponents([color CGColor]); and the analyzer is saying that there is a leak here. I tried free(components) but the app crashes when I do that. Is there really a leak here since I didnt allocate anything. I know that CGColorGetComponents returns an array of 3 CGFlo... | See SO #792119. Declaring the variable does not create the array. In fact, neither does CGColorGetComponents. Whatever created the CGColor object created the array and stored it inside the object; CGColorGetComponents lets you have the pointer to that storage. In short, do not free your pointer. You could, however, set... | where is the memory leak I have a line of code: CGFloat *components = CGColorGetComponents([color CGColor]); and the analyzer is saying that there is a leak here. I tried free(components) but the app crashes when I do that. Is there really a leak here since I didnt allocate anything. I know that CGColorGetComponents re... | TITLE:
where is the memory leak
QUESTION:
I have a line of code: CGFloat *components = CGColorGetComponents([color CGColor]); and the analyzer is saying that there is a leak here. I tried free(components) but the app crashes when I do that. Is there really a leak here since I didnt allocate anything. I know that CGCol... | [
"objective-c",
"memory-management",
"memory-leaks"
] | 1 | 1 | 538 | 2 | 0 | 2011-06-02T19:26:15.647000 | 2011-06-02T19:31:50.387000 |
6,219,374 | 6,219,772 | MySQL re-arranging order of columns with phpmyadmin | Any help on re-ordering the columns in MySQL using phpMyAdmin? Is it called cardinality? I have created tables, but need to re-arrange the order of the columns due to an export script i have. It exports based on the arrangements. E.g. I want columns: Apple | Cherry | Banana changed to: Apple | Banana | Cherry | Use the ALTER TABLE with MODIFY COLUMN command. Something like: ALTER TABLE foo MODIFY COLUMN Hobby VARCHAR(20) FIRST; I don't know whether or not there's a GUI way to do it in phpmyadmin, but normal SQL queries should work, too. | MySQL re-arranging order of columns with phpmyadmin Any help on re-ordering the columns in MySQL using phpMyAdmin? Is it called cardinality? I have created tables, but need to re-arrange the order of the columns due to an export script i have. It exports based on the arrangements. E.g. I want columns: Apple | Cherry | ... | TITLE:
MySQL re-arranging order of columns with phpmyadmin
QUESTION:
Any help on re-ordering the columns in MySQL using phpMyAdmin? Is it called cardinality? I have created tables, but need to re-arrange the order of the columns due to an export script i have. It exports based on the arrangements. E.g. I want columns:... | [
"mysql",
"phpmyadmin"
] | 58 | 43 | 47,748 | 5 | 0 | 2011-06-02T19:26:51.017000 | 2011-06-02T20:06:33.787000 |
6,219,378 | 6,220,663 | How do I manipulate data out of a variable in powershell | I have a power-shell script with which I am trying to back up a constantly changing number of SQL databases. Fortunately all of these databases are listed in a registry key. I am leveraging this in a for-each loop. The issue that I am having is that after grabbing the registry value that I want, when I try to pass it i... | select-object will return an object that has the named properties that you "select". To get just value of that property, just access it by name: write-host $DBname."Channel Database Name" | How do I manipulate data out of a variable in powershell I have a power-shell script with which I am trying to back up a constantly changing number of SQL databases. Fortunately all of these databases are listed in a registry key. I am leveraging this in a for-each loop. The issue that I am having is that after grabbin... | TITLE:
How do I manipulate data out of a variable in powershell
QUESTION:
I have a power-shell script with which I am trying to back up a constantly changing number of SQL databases. Fortunately all of these databases are listed in a registry key. I am leveraging this in a for-each loop. The issue that I am having is ... | [
"sql",
"powershell"
] | 1 | 1 | 1,982 | 3 | 0 | 2011-06-02T19:27:36.880000 | 2011-06-02T21:35:02 |
6,219,381 | 6,220,532 | Common Import Process | I am looking at creating a common import routine for various parts of my company's main system to be used when implementing a new client. For example, we may get excel or csv files of inventory, customers, etc. that needs to be imported into a common model. I was wondering if anyone had some good ideas or best practice... | We use SSIS and create parent and child packages. In the child packages are the standard fields and transformations and imports to the production tables. In the parent packages are any nonstandard transforms (required because of data issues with that particular client) and nonstandard import tasks (maybe they provide s... | Common Import Process I am looking at creating a common import routine for various parts of my company's main system to be used when implementing a new client. For example, we may get excel or csv files of inventory, customers, etc. that needs to be imported into a common model. I was wondering if anyone had some good ... | TITLE:
Common Import Process
QUESTION:
I am looking at creating a common import routine for various parts of my company's main system to be used when implementing a new client. For example, we may get excel or csv files of inventory, customers, etc. that needs to be imported into a common model. I was wondering if any... | [
".net",
"sql-server",
"sql-server-2005"
] | 1 | 1 | 94 | 1 | 0 | 2011-06-02T19:28:08.660000 | 2011-06-02T21:19:51.787000 |
6,219,383 | 6,220,116 | Google Maps API 3 - Check if marker is in view | I see that there is a getVisible call, but that only checks if the marker is on the map NOT if the marker is in the current view. I want to check if the marker is in the current view bounds? | I guess you want map.getBounds().contains(marker.getPosition()) | Google Maps API 3 - Check if marker is in view I see that there is a getVisible call, but that only checks if the marker is on the map NOT if the marker is in the current view. I want to check if the marker is in the current view bounds? | TITLE:
Google Maps API 3 - Check if marker is in view
QUESTION:
I see that there is a getVisible call, but that only checks if the marker is on the map NOT if the marker is in the current view. I want to check if the marker is in the current view bounds?
ANSWER:
I guess you want map.getBounds().contains(marker.getPos... | [
"google-maps",
"google-maps-api-3",
"google-maps-markers"
] | 18 | 41 | 12,666 | 2 | 0 | 2011-06-02T19:28:29.530000 | 2011-06-02T20:37:32.287000 |
6,219,388 | 6,219,510 | MVC best practice for date change possible redirect | I am looking to see anyone could inform me of MVC best practice for the following functionality. A user is able to create a form, specifying a date and other details for submission. Whilst completing the form, if the user changes the date field I want the application to check whether a form for that date already exists... | In an ideal world, you would support the following 2 scenarios: 1) A server side check/validation step that, upon submission of the form and discovery of another form of the same date, would redirect the user back to the original submission page (without any data loss) notifying them of the possible duplicate, and give... | MVC best practice for date change possible redirect I am looking to see anyone could inform me of MVC best practice for the following functionality. A user is able to create a form, specifying a date and other details for submission. Whilst completing the form, if the user changes the date field I want the application ... | TITLE:
MVC best practice for date change possible redirect
QUESTION:
I am looking to see anyone could inform me of MVC best practice for the following functionality. A user is able to create a form, specifying a date and other details for submission. Whilst completing the form, if the user changes the date field I wan... | [
"asp.net-mvc",
"ajax",
"model-view-controller"
] | 0 | 0 | 157 | 2 | 0 | 2011-06-02T19:28:52.713000 | 2011-06-02T19:41:44.210000 |
6,219,389 | 6,224,131 | Loading view from UITableViewController | I made a UITableViewController and tried loading it the previous view [self.view addSubview: poll_ridingController.view]; but when i run it, it display me a blank kid of thing where the footer was supposed to be. See the attached Picture. | The view you see IB just has what I like to call "eye-candy data" which means that Interface Builder does not implement any data into your project that is your job. The methods you will need to make sure you implement are: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)inde... | Loading view from UITableViewController I made a UITableViewController and tried loading it the previous view [self.view addSubview: poll_ridingController.view]; but when i run it, it display me a blank kid of thing where the footer was supposed to be. See the attached Picture. | TITLE:
Loading view from UITableViewController
QUESTION:
I made a UITableViewController and tried loading it the previous view [self.view addSubview: poll_ridingController.view]; but when i run it, it display me a blank kid of thing where the footer was supposed to be. See the attached Picture.
ANSWER:
The view you s... | [
"ios",
"uitableview"
] | 0 | 0 | 43 | 1 | 0 | 2011-06-02T19:29:14.023000 | 2011-06-03T07:17:57.567000 |
6,219,397 | 6,221,641 | Caliburn Micro: "children" VM in a main shell VM | I'm beginning with Caliburn.micro and I'm a bit confused. Say I have a UI with 2 panes, e.g. (this is a fake sample) CustomersView and CustomerView, and 2 corresponding VM's, CustomersViewModel and CustomerViewModel. Now, say I want to include both panes into a main shell, which should be able to access all the VM's li... | In your MainView.xaml add two ContentControls and give them names that match the names of two properties representing your ViewModels. ViewModel: public CustomerViewModel CustomerViewModel { get; set; } public CustomersViewModel CustomersViewModel { get; set; } View: | Caliburn Micro: "children" VM in a main shell VM I'm beginning with Caliburn.micro and I'm a bit confused. Say I have a UI with 2 panes, e.g. (this is a fake sample) CustomersView and CustomerView, and 2 corresponding VM's, CustomersViewModel and CustomerViewModel. Now, say I want to include both panes into a main shel... | TITLE:
Caliburn Micro: "children" VM in a main shell VM
QUESTION:
I'm beginning with Caliburn.micro and I'm a bit confused. Say I have a UI with 2 panes, e.g. (this is a fake sample) CustomersView and CustomerView, and 2 corresponding VM's, CustomersViewModel and CustomerViewModel. Now, say I want to include both pane... | [
"caliburn.micro"
] | 4 | 5 | 963 | 2 | 0 | 2011-06-02T19:30:00.917000 | 2011-06-02T23:49:49.790000 |
6,219,400 | 6,219,450 | C++ - Initializing a static map as a private class member | Let's say I was quite bored one late evening and after catatonically staring at the computer monitor for a few hours, I decided to implement an aggregate C++ class to manage colors for drawing pixels, because I've obviously gone mad. For starters, we'll just tell the (probably singleton) ColorManager object what color ... | #include #include "Color.h"
enum COLOR { RED = 0, BLUE, GREEN, YELLOW, ORANGE, WHITE, BLACK, BRICKS_FROM_A_DISTANCE_ON_AN_UNUSUALLY_SUNNY_AFTERNOON, // etc COLOR_COUNT };
class ColorManager { typedef std::map ColorMap;
public: ColorManager(); Color getColor(COLOR color) const;
private: static ColorMap createColorMa... | C++ - Initializing a static map as a private class member Let's say I was quite bored one late evening and after catatonically staring at the computer monitor for a few hours, I decided to implement an aggregate C++ class to manage colors for drawing pixels, because I've obviously gone mad. For starters, we'll just tel... | TITLE:
C++ - Initializing a static map as a private class member
QUESTION:
Let's say I was quite bored one late evening and after catatonically staring at the computer monitor for a few hours, I decided to implement an aggregate C++ class to manage colors for drawing pixels, because I've obviously gone mad. For starte... | [
"c++",
"dictionary",
"static",
"stl"
] | 22 | 18 | 24,058 | 6 | 0 | 2011-06-02T19:30:06.817000 | 2011-06-02T19:35:16.800000 |
6,219,409 | 6,219,514 | Implementation of class data validation | I have an object that represents physics characteristics of some air tunnel: public class Tunnel { public double Length { get; set; } public double CrossSectionArea { get; set; } public double AirDensity { get; set; } public double Pressure { get; set; } //... } I need to check correctness of parameters: for example, L... | Simplest possible way: //Returns empty list if no errors. public List Validate() { //Validate params } | Implementation of class data validation I have an object that represents physics characteristics of some air tunnel: public class Tunnel { public double Length { get; set; } public double CrossSectionArea { get; set; } public double AirDensity { get; set; } public double Pressure { get; set; } //... } I need to check c... | TITLE:
Implementation of class data validation
QUESTION:
I have an object that represents physics characteristics of some air tunnel: public class Tunnel { public double Length { get; set; } public double CrossSectionArea { get; set; } public double AirDensity { get; set; } public double Pressure { get; set; } //... }... | [
"c#",
"validation",
"serialization",
"correctness"
] | 2 | 4 | 1,235 | 4 | 0 | 2011-06-02T19:31:07.687000 | 2011-06-02T19:42:18.433000 |
6,219,427 | 6,219,509 | getting related js files: What is the point of adding ?t=B48E5AB | I'm using CKEditor which is a multi-file library so the main js file calls other js and css files. I'm noticing that after the main file is called, additional files have a?t=CODE added to them, so something like this, but the actual files don't have that extra?t=B49E5BQ at the end. http://site.com/ckeditor/config.js?t=... | I would guess that the URL parameter is added to bypass any caching mechanisms. When a client sees the same URL with a different query parameter, that usually means the client can't use the cached version of the resource (in this case a JS file) and go to the server to fetch the latest version. In HTTP, if a URL is the... | getting related js files: What is the point of adding ?t=B48E5AB I'm using CKEditor which is a multi-file library so the main js file calls other js and css files. I'm noticing that after the main file is called, additional files have a?t=CODE added to them, so something like this, but the actual files don't have that ... | TITLE:
getting related js files: What is the point of adding ?t=B48E5AB
QUESTION:
I'm using CKEditor which is a multi-file library so the main js file calls other js and css files. I'm noticing that after the main file is called, additional files have a?t=CODE added to them, so something like this, but the actual file... | [
"javascript",
"caching",
"ckeditor"
] | 1 | 1 | 109 | 5 | 0 | 2011-06-02T19:32:42.100000 | 2011-06-02T19:41:26.987000 |
6,219,430 | 6,219,495 | ExtJs sends multiple XHR requests for every item when i hit delete | I have a ExtJs(v3.1) `Ext.grid.GridPanel that loads some records from its store and allows editing. If i select multiple records, and I click the delete it sends multiple DELETE requests, overwhelms the server, which eventually deletes some of them, returns 404 for the rest. I don't understand why it sends a second or ... | Gee that line: batch: false, // update each record with an individual XHR request, the server doesnt process batch requests sure looks suspicious... I bet that that's just what Ext does, given that it'd be pretty slow to actually wait for each response before sending the next. (I agree however that just blasting out a ... | ExtJs sends multiple XHR requests for every item when i hit delete I have a ExtJs(v3.1) `Ext.grid.GridPanel that loads some records from its store and allows editing. If i select multiple records, and I click the delete it sends multiple DELETE requests, overwhelms the server, which eventually deletes some of them, ret... | TITLE:
ExtJs sends multiple XHR requests for every item when i hit delete
QUESTION:
I have a ExtJs(v3.1) `Ext.grid.GridPanel that loads some records from its store and allows editing. If i select multiple records, and I click the delete it sends multiple DELETE requests, overwhelms the server, which eventually deletes... | [
"javascript",
"ajax",
"extjs"
] | 3 | 4 | 2,174 | 2 | 0 | 2011-06-02T19:33:04.493000 | 2011-06-02T19:39:18.090000 |
6,219,446 | 6,219,468 | how do you obtain the address of an instance after overriding the __str__ method in python | class Bar: pass
class Foo: def __str__(self): return "Foo instance"
>> aBar = Bar() >> print aBar <__main__.Bar instance at 0x100572a28> >> aFoo = Foo() >> print aFoo Foo instance is there a way to print out the address of aFoo after overriding the str method? using >>repr(aFoo) solved my problem | At least in cpython, id provides the address. But the output is in decimal; you have to convert that to hex: >>> f = (x for x in [1,2,3]) >>> print f at 0x1004d22d0> >>> '%x' % id(f) '1004d22d0' Actually, though, the __repr__ function isn't altered when __str__ is overridden. So you can do this as well: >>> class Foo:.... | how do you obtain the address of an instance after overriding the __str__ method in python class Bar: pass
class Foo: def __str__(self): return "Foo instance"
>> aBar = Bar() >> print aBar <__main__.Bar instance at 0x100572a28> >> aFoo = Foo() >> print aFoo Foo instance is there a way to print out the address of aFoo... | TITLE:
how do you obtain the address of an instance after overriding the __str__ method in python
QUESTION:
class Bar: pass
class Foo: def __str__(self): return "Foo instance"
>> aBar = Bar() >> print aBar <__main__.Bar instance at 0x100572a28> >> aFoo = Foo() >> print aFoo Foo instance is there a way to print out t... | [
"python",
"string",
"memory-address"
] | 2 | 6 | 210 | 1 | 0 | 2011-06-02T19:35:03.010000 | 2011-06-02T19:36:25.317000 |
6,219,453 | 6,219,523 | Refresh PHP Page using ajax | I have a php page that needs to be refreshed every 5 secs. On embedding the ajax file, I don't find the updates taking place in Firebug. Here is the skeleton of the code: **notification.php**.... Waiting area **refresh.js**
var seconds = 5; var content = "identifier"; var url = "notification.php";
function refreshCon... | Though it may not be the ideal solution, jQuery has a pretty simple way of implementing exactly this: $(document).ready(function () { function reload() { $("#content").load("notification.php"); } setTimeOut(reload, seconds*1000) } I'm not sure that will work perfectly, haven't done it in a little while, but its a much ... | Refresh PHP Page using ajax I have a php page that needs to be refreshed every 5 secs. On embedding the ajax file, I don't find the updates taking place in Firebug. Here is the skeleton of the code: **notification.php**.... Waiting area **refresh.js**
var seconds = 5; var content = "identifier"; var url = "notificatio... | TITLE:
Refresh PHP Page using ajax
QUESTION:
I have a php page that needs to be refreshed every 5 secs. On embedding the ajax file, I don't find the updates taking place in Firebug. Here is the skeleton of the code: **notification.php**.... Waiting area **refresh.js**
var seconds = 5; var content = "identifier"; var ... | [
"php",
"ajax"
] | 0 | 9 | 20,584 | 3 | 0 | 2011-06-02T19:35:24.677000 | 2011-06-02T19:42:58.623000 |
6,219,454 | 6,219,488 | Efficient way to remove ALL whitespace from String? | I'm calling a REST API and am receiving an XML response back. It returns a list of a workspace names, and I'm writing a quick IsExistingWorkspace() method. Since all workspaces consist of contiguous characters with no whitespace, I'm assuming the easiest way to find out if a particular workspace is in the list is to re... | This is fastest way I know of, even though you said you didn't want to use regular expressions: Regex.Replace(XML, @"\s+", ""); Crediting @hypehuman in the comments, if you plan to do this more than once, create and store a Regex instance. This will save the overhead of constructing it every time, which is more expensi... | Efficient way to remove ALL whitespace from String? I'm calling a REST API and am receiving an XML response back. It returns a list of a workspace names, and I'm writing a quick IsExistingWorkspace() method. Since all workspaces consist of contiguous characters with no whitespace, I'm assuming the easiest way to find o... | TITLE:
Efficient way to remove ALL whitespace from String?
QUESTION:
I'm calling a REST API and am receiving an XML response back. It returns a list of a workspace names, and I'm writing a quick IsExistingWorkspace() method. Since all workspaces consist of contiguous characters with no whitespace, I'm assuming the eas... | [
"c#",
"string",
"whitespace",
"removing-whitespace"
] | 504 | 826 | 918,023 | 19 | 0 | 2011-06-02T19:35:26.640000 | 2011-06-02T19:38:29.887000 |
6,219,458 | 6,219,529 | dynamic buttons fire off 2 times, why? | Here's my code that creates dynamic buttons that are supposed to fire off $('#emailRemoveBtn').live('click', function() once clicked. The problem is, it always fires it two times. Say, I click on the button once, but this function executes twice. Any ideas what might be wrong with it? | I can't see why it's running twice looking at that code, but it feels like it's being bound to the click event twice somehow. This is worth trying to see if it only fires once, and if this helps hunt around for another instance of 'click' being bound. $('#emailRemoveBtn').unbind('click').die().live('click', function() ... | dynamic buttons fire off 2 times, why? Here's my code that creates dynamic buttons that are supposed to fire off $('#emailRemoveBtn').live('click', function() once clicked. The problem is, it always fires it two times. Say, I click on the button once, but this function executes twice. Any ideas what might be wrong with... | TITLE:
dynamic buttons fire off 2 times, why?
QUESTION:
Here's my code that creates dynamic buttons that are supposed to fire off $('#emailRemoveBtn').live('click', function() once clicked. The problem is, it always fires it two times. Say, I click on the button once, but this function executes twice. Any ideas what m... | [
"jquery"
] | 2 | 2 | 184 | 1 | 0 | 2011-06-02T19:35:59.403000 | 2011-06-02T19:43:29.823000 |
6,219,460 | 6,222,864 | How to move all messages in a conversation? | I need to know how to move all of the messages in a conversation at once. My macro currently reads Sub Archive() Set ArchiveFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Parent.Folders("Archive") For Each Msg In ActiveExplorer.Selection Msg.UnRead = False Msg.Move ArchiveFolder Next Msg End ... | If you want to handle conversations, you'll have to do so explicitly. You can go from MailItem to its Conversation using MailItem.GetConversation, but you'd be better off working with conversations directly. What you do is: Get all conversation headers from the current selection For each conversation, get the individua... | How to move all messages in a conversation? I need to know how to move all of the messages in a conversation at once. My macro currently reads Sub Archive() Set ArchiveFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Parent.Folders("Archive") For Each Msg In ActiveExplorer.Selection Msg.UnRead ... | TITLE:
How to move all messages in a conversation?
QUESTION:
I need to know how to move all of the messages in a conversation at once. My macro currently reads Sub Archive() Set ArchiveFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Parent.Folders("Archive") For Each Msg In ActiveExplorer.Sel... | [
"vba",
"outlook"
] | 2 | 3 | 9,995 | 3 | 0 | 2011-06-02T19:36:05.567000 | 2011-06-03T04:08:49.480000 |
6,219,466 | 6,219,524 | C double value round up | I have written a programm in C. Mostly, in the output is a point number. If I write "%.2lf" sometimes it round off but I would like that it allways round up. How can I do this? | Since you obviously want to get 2 digits left behind the decimal dot you would need to transform the number before you use ceil and then transform it back: val = ceil( val * 100.0 ) / 100.0 printf( "%.2lf\n", val ); | C double value round up I have written a programm in C. Mostly, in the output is a point number. If I write "%.2lf" sometimes it round off but I would like that it allways round up. How can I do this? | TITLE:
C double value round up
QUESTION:
I have written a programm in C. Mostly, in the output is a point number. If I write "%.2lf" sometimes it round off but I would like that it allways round up. How can I do this?
ANSWER:
Since you obviously want to get 2 digits left behind the decimal dot you would need to trans... | [
"c",
"double"
] | 3 | 9 | 8,636 | 3 | 0 | 2011-06-02T19:36:25.003000 | 2011-06-02T19:43:05.767000 |
6,219,473 | 6,220,385 | OnDraw() is not fired, nothing is drawn in surfaceView - Android | HI! I have a surfaceView inside a horizontal scrollview that I want to fill with images with a onDraw() call. However, nothing is drawn. I have a class in which the drawing is done from the thread CanvasThread. public class PanelChart extends SurfaceView implements SurfaceHolder.Callback { private CanvasThread canvasth... | postInvalidate will not call onDraw with surfaceView. You need to unlock canvas, draw things and then lock canvas. Here is an example of a thread for surfaceView: class CanvasThread extends Thread { private SurfaceHolder surfaceHolder; private PanelChart panel; private boolean run = false;
public CanvasThread(SurfaceH... | OnDraw() is not fired, nothing is drawn in surfaceView - Android HI! I have a surfaceView inside a horizontal scrollview that I want to fill with images with a onDraw() call. However, nothing is drawn. I have a class in which the drawing is done from the thread CanvasThread. public class PanelChart extends SurfaceView ... | TITLE:
OnDraw() is not fired, nothing is drawn in surfaceView - Android
QUESTION:
HI! I have a surfaceView inside a horizontal scrollview that I want to fill with images with a onDraw() call. However, nothing is drawn. I have a class in which the drawing is done from the thread CanvasThread. public class PanelChart ex... | [
"android",
"surfaceview",
"ondraw"
] | 4 | 4 | 5,816 | 1 | 0 | 2011-06-02T19:37:13.727000 | 2011-06-02T21:04:37.483000 |
6,219,481 | 6,219,705 | jquery how to load different scripts when i click on different links? | i have a list: about portfolio what i am trying to do is to load a different script inside a div #content depending on what option i choose. The script will load some rss content: lets say if i select option 1 then a script with id 1 will load into page, if i select option 2 than the script with id 1 will unload and 2 ... | You could use something like this about portfolio and the js $(function(){ var urls = [ "http://rss.bloople.net/?url=http%3A%2F%2Fwww.exploretalent.com%2Frss_cj.php%3Fpid%3D3087968%26file_xml%3Dcastings_new.xml&showtitle=false&type=js&id=1307038796890991", "http://rss.bloople.net/?url=http%3A%2F%2Fwww.exploretalent.com... | jquery how to load different scripts when i click on different links? i have a list: about portfolio what i am trying to do is to load a different script inside a div #content depending on what option i choose. The script will load some rss content: lets say if i select option 1 then a script with id 1 will load into p... | TITLE:
jquery how to load different scripts when i click on different links?
QUESTION:
i have a list: about portfolio what i am trying to do is to load a different script inside a div #content depending on what option i choose. The script will load some rss content: lets say if i select option 1 then a script with id ... | [
"jquery"
] | 1 | 1 | 108 | 3 | 0 | 2011-06-02T19:37:47.373000 | 2011-06-02T20:00:09.400000 |
6,219,483 | 6,219,630 | how to work with 2 notifications in Android? | I have 2 StatusBar Notification in my app. These notifications appear in the same time in app, and I can see only the last notification. And, if I press the Button Clear, both of them are cleared. How to work with more than one notification in android? The second question is how to display the text of notification on m... | I see your codes are using the same ID for both notifications. As you might know, the answer is already on this documentation: Creating Status Bar Notifications. You may focus on two things covered on the documentation: Notification ID. This is useful for creating a different notifications. " Creating a Custom Extended... | how to work with 2 notifications in Android? I have 2 StatusBar Notification in my app. These notifications appear in the same time in app, and I can see only the last notification. And, if I press the Button Clear, both of them are cleared. How to work with more than one notification in android? The second question is... | TITLE:
how to work with 2 notifications in Android?
QUESTION:
I have 2 StatusBar Notification in my app. These notifications appear in the same time in app, and I can see only the last notification. And, if I press the Button Clear, both of them are cleared. How to work with more than one notification in android? The ... | [
"android",
"notifications"
] | 0 | 1 | 2,847 | 1 | 0 | 2011-06-02T19:38:02.163000 | 2011-06-02T19:52:25.953000 |
6,219,484 | 6,219,552 | Which permissions are required in Facebook API to go from 'notConnected' to 'connected' | http://fbrell.com/fb.ui/feed In the above example from the Facebook test environment, status can take on one of three values: 1)connected 2)notConnected 3)unknown These states, according to the API, correspond to the following descriptions: 1) Connected 2) Logged into Facebook but not connected with your application 3)... | When a user "connects" with your application, there is a basic set of permissions that are given to your application by default. Here is an image that depicts the permissions given by default to an App: You can, however, ask for extended permissions listed here: Extended Permissions | Which permissions are required in Facebook API to go from 'notConnected' to 'connected' http://fbrell.com/fb.ui/feed In the above example from the Facebook test environment, status can take on one of three values: 1)connected 2)notConnected 3)unknown These states, according to the API, correspond to the following descr... | TITLE:
Which permissions are required in Facebook API to go from 'notConnected' to 'connected'
QUESTION:
http://fbrell.com/fb.ui/feed In the above example from the Facebook test environment, status can take on one of three values: 1)connected 2)notConnected 3)unknown These states, according to the API, correspond to t... | [
"javascript",
"api",
"facebook",
"status"
] | 0 | 1 | 473 | 1 | 0 | 2011-06-02T19:38:02.117000 | 2011-06-02T19:45:01.943000 |
6,219,486 | 6,219,541 | checkbox checked value in asp.net MVC2 | I am using the following syntax to create a checkbox: <%: Html.CheckBox("Monday", new { id = "Monday" })%> Monday in asp.net MVC2 view and when I try to get it in controller action like this: string Monday = Request["Monday"]; Request["Monday"] has value "true,false". why so? How can I get current value (checked/unchec... | In your situation, there is no much use in using the HtmlHelper to create your checkbox. It would simply by easier to make the code yourself: Then you could access the value when you post like so: string rawValue = Request.Form["monday"]; Alternatively, you could make a view model and make a checkbox like so: <% Html.C... | checkbox checked value in asp.net MVC2 I am using the following syntax to create a checkbox: <%: Html.CheckBox("Monday", new { id = "Monday" })%> Monday in asp.net MVC2 view and when I try to get it in controller action like this: string Monday = Request["Monday"]; Request["Monday"] has value "true,false". why so? How ... | TITLE:
checkbox checked value in asp.net MVC2
QUESTION:
I am using the following syntax to create a checkbox: <%: Html.CheckBox("Monday", new { id = "Monday" })%> Monday in asp.net MVC2 view and when I try to get it in controller action like this: string Monday = Request["Monday"]; Request["Monday"] has value "true,fa... | [
"asp.net-mvc-2"
] | 0 | 0 | 1,303 | 1 | 0 | 2011-06-02T19:38:12.740000 | 2011-06-02T19:44:23.333000 |
6,219,492 | 6,220,575 | Automatically tweet on user upload (on my site) | I have a website where users can upload tracks. When upload finished I would like to automatically tweet it using the Twitter account of the website. And I would also like to enable the user (optionally) to tweet it using his/her account simultaneously. Another thing I would like to do is tweet the track with the most ... | I think Zend_Service_Twitter is a nice client, and there are other opinions here. To do what you want, you really only need to have a client that 1) supports authentication, and 2) can send a status update via the statuses/update API method. One nice thing about status updates is that they are not rate limited, so you ... | Automatically tweet on user upload (on my site) I have a website where users can upload tracks. When upload finished I would like to automatically tweet it using the Twitter account of the website. And I would also like to enable the user (optionally) to tweet it using his/her account simultaneously. Another thing I wo... | TITLE:
Automatically tweet on user upload (on my site)
QUESTION:
I have a website where users can upload tracks. When upload finished I would like to automatically tweet it using the Twitter account of the website. And I would also like to enable the user (optionally) to tweet it using his/her account simultaneously. ... | [
"php",
"twitter"
] | 1 | 1 | 252 | 1 | 0 | 2011-06-02T19:39:02.460000 | 2011-06-02T21:24:29.213000 |
6,219,499 | 6,219,563 | Is it possible to specify the release date in Windows Phone app submission? | Is it possible for me to specify that the app should not be released into the marketplace before a particular date, even if it is approved before that date? | No. But, you can specify that the application shouldn't be automatically made available once the certification process has been passed. You can then make it publically available at the time/date of your choosing. | Is it possible to specify the release date in Windows Phone app submission? Is it possible for me to specify that the app should not be released into the marketplace before a particular date, even if it is approved before that date? | TITLE:
Is it possible to specify the release date in Windows Phone app submission?
QUESTION:
Is it possible for me to specify that the app should not be released into the marketplace before a particular date, even if it is approved before that date?
ANSWER:
No. But, you can specify that the application shouldn't be a... | [
"windows-phone-7",
"windows-phone"
] | 4 | 7 | 64 | 1 | 0 | 2011-06-02T19:39:57.467000 | 2011-06-02T19:46:02.787000 |
6,219,501 | 6,219,518 | Is a long IN clause a code smell? | Simple question. Wondering if a long IN clause is a code smell? I don't really know how to justify it. I can't put my finger on why it smells other than that I think it does. select name, code, capital, population, flower, bird from us_states where code in ('NJ', 'NY', 'PA', 'CA', 'AL', 'AK', 'AZ', 'IL', 'IN', 'KY', 'K... | I think it is a code smell. For one thing, databases have limits as to the number of elements allowed in an IN clause, and if your SQL is generated dynamically, you may eventually bump up against those limits. When the list starts to become long-ish, I would convert to using a stored procedure with a temporary table, t... | Is a long IN clause a code smell? Simple question. Wondering if a long IN clause is a code smell? I don't really know how to justify it. I can't put my finger on why it smells other than that I think it does. select name, code, capital, population, flower, bird from us_states where code in ('NJ', 'NY', 'PA', 'CA', 'AL'... | TITLE:
Is a long IN clause a code smell?
QUESTION:
Simple question. Wondering if a long IN clause is a code smell? I don't really know how to justify it. I can't put my finger on why it smells other than that I think it does. select name, code, capital, population, flower, bird from us_states where code in ('NJ', 'NY'... | [
"mysql",
"sql",
"database",
"performance"
] | 9 | 9 | 2,024 | 5 | 0 | 2011-06-02T19:40:13.100000 | 2011-06-02T19:42:34.947000 |
6,219,507 | 6,219,723 | HTML and jQuery - Reset a form. How? | I'm working on a PHP + HTML + jQuery project. And there are quite some coding knowledge problem I faced during my way of coding - But I'm almost done with it! To get it done, I just need this last help (for this project for sure) to get done. So, what I need is to RESET a form using jQuery after this: 1) I have a form ... | Maybe you are resetting fields not supposed to be reseted – Like values in hidden inputs. It would really help out if you provide the html code. But if you want to have better control of the fields that you need to reset, you can do like this: $("input[type=text], textarea").val("") That would reset all input with type... | HTML and jQuery - Reset a form. How? I'm working on a PHP + HTML + jQuery project. And there are quite some coding knowledge problem I faced during my way of coding - But I'm almost done with it! To get it done, I just need this last help (for this project for sure) to get done. So, what I need is to RESET a form using... | TITLE:
HTML and jQuery - Reset a form. How?
QUESTION:
I'm working on a PHP + HTML + jQuery project. And there are quite some coding knowledge problem I faced during my way of coding - But I'm almost done with it! To get it done, I just need this last help (for this project for sure) to get done. So, what I need is to ... | [
"jquery",
"html",
"forms"
] | 1 | 3 | 6,175 | 4 | 0 | 2011-06-02T19:40:40.353000 | 2011-06-02T20:01:12.740000 |
6,219,511 | 6,258,279 | Output Results of Table to .CSV BTEQ/FastLoad | I have a table full of data called "MYTABLE" I used SELECT * FROM MYTABLE; How do I output the results of this table to a.csv file for a Teradata database? | Two possible options using native Teradata utilities: If you use the Teradata FastExport utility and specify the MLSCRIPT option in the EXPORT command a MultiLoad Script will be generated automatically that can be used to load the data file into Teradata. With a little tweaking you can point it at another system and lo... | Output Results of Table to .CSV BTEQ/FastLoad I have a table full of data called "MYTABLE" I used SELECT * FROM MYTABLE; How do I output the results of this table to a.csv file for a Teradata database? | TITLE:
Output Results of Table to .CSV BTEQ/FastLoad
QUESTION:
I have a table full of data called "MYTABLE" I used SELECT * FROM MYTABLE; How do I output the results of this table to a.csv file for a Teradata database?
ANSWER:
Two possible options using native Teradata utilities: If you use the Teradata FastExport ut... | [
"sql",
"teradata"
] | 0 | 0 | 4,822 | 4 | 0 | 2011-06-02T19:41:48.293000 | 2011-06-06T21:33:59.430000 |
6,219,520 | 6,257,765 | ProtectedData.Unprotect Method Fails to Decrypt | We have a build process that needs to decrypt a password which it then uses to connect to a database. We are using the Data Protection API (DPAPI) to encrypt the password at the machine scope on the build server (I'm logged in with my own domain account) using PowerShell: [Security.Cryptography.ProtectedData]::Protect(... | Developer error. It turns out I was encrypting at the CurrentUser scope, not the LocalMachine scope. I updated my script and everything is working now. | ProtectedData.Unprotect Method Fails to Decrypt We have a build process that needs to decrypt a password which it then uses to connect to a database. We are using the Data Protection API (DPAPI) to encrypt the password at the machine scope on the build server (I'm logged in with my own domain account) using PowerShell:... | TITLE:
ProtectedData.Unprotect Method Fails to Decrypt
QUESTION:
We have a build process that needs to decrypt a password which it then uses to connect to a database. We are using the Data Protection API (DPAPI) to encrypt the password at the machine scope on the build server (I'm logged in with my own domain account)... | [
".net",
"powershell",
"cruisecontrol.net",
"dpapi"
] | 4 | 3 | 9,871 | 2 | 0 | 2011-06-02T19:42:43.523000 | 2011-06-06T20:38:44.463000 |
6,219,526 | 6,219,553 | Opposite of IN operator in SQL | How could I do the opposite of: In other words select all the people whose last name is NOT Hansen or Pettersen. | WHERE lastname NOT IN ('Hansen', 'Pettersen') see the section "The IN and NOT IN operators" in SQL As Understood By SQLite | Opposite of IN operator in SQL How could I do the opposite of: In other words select all the people whose last name is NOT Hansen or Pettersen. | TITLE:
Opposite of IN operator in SQL
QUESTION:
How could I do the opposite of: In other words select all the people whose last name is NOT Hansen or Pettersen.
ANSWER:
WHERE lastname NOT IN ('Hansen', 'Pettersen') see the section "The IN and NOT IN operators" in SQL As Understood By SQLite | [
"sql",
"sqlite"
] | 10 | 23 | 19,508 | 5 | 0 | 2011-06-02T19:43:13.677000 | 2011-06-02T19:45:03.520000 |
6,219,527 | 6,223,749 | Asp.net mvc 3 load razor views from a physical path | I am tring to load razor views from a physical path that is outside of my webapp. Is it that possible for you? Thanks Marco | You could write a custom virtual path provider. Here's a nice article illustrating how to achieve this (it loads views stored in a database but it could be easily adapted to load them from any physical location). | Asp.net mvc 3 load razor views from a physical path I am tring to load razor views from a physical path that is outside of my webapp. Is it that possible for you? Thanks Marco | TITLE:
Asp.net mvc 3 load razor views from a physical path
QUESTION:
I am tring to load razor views from a physical path that is outside of my webapp. Is it that possible for you? Thanks Marco
ANSWER:
You could write a custom virtual path provider. Here's a nice article illustrating how to achieve this (it loads view... | [
"c#",
"asp.net",
"asp.net-mvc-3"
] | 0 | 2 | 684 | 1 | 0 | 2011-06-02T19:43:19.653000 | 2011-06-03T06:32:20.520000 |
6,219,531 | 6,219,568 | Accessing an ObjC object from a C function callback | I'm playing around a bit with global hot keys in Carbon, and I registered a hot key. When the hot key is pressed, this function is called: OSStatus myHotKeyHandler(EventHandlerCallRef nextHandler, EventRef anEvent, void *userData) {... } This function is in the same file as my app delegate's definition. How do I now ca... | Give the pointer to your class instance as parameter for userData when you register your event handler. You will then get this pointer back inside the handler as userData. | Accessing an ObjC object from a C function callback I'm playing around a bit with global hot keys in Carbon, and I registered a hot key. When the hot key is pressed, this function is called: OSStatus myHotKeyHandler(EventHandlerCallRef nextHandler, EventRef anEvent, void *userData) {... } This function is in the same f... | TITLE:
Accessing an ObjC object from a C function callback
QUESTION:
I'm playing around a bit with global hot keys in Carbon, and I registered a hot key. When the hot key is pressed, this function is called: OSStatus myHotKeyHandler(EventHandlerCallRef nextHandler, EventRef anEvent, void *userData) {... } This functio... | [
"objective-c",
"c",
"callback"
] | 3 | 5 | 474 | 3 | 0 | 2011-06-02T19:43:36.890000 | 2011-06-02T19:46:50.667000 |
6,219,533 | 6,219,656 | maven: How to load tools.jar/classes.jar in an OS independent way? | I am using a maven plugin that requires a class that is contained in the jdk's (windows) tools.jar (mac it's in classes.jar). I add this as an explicit dependency of the plugin as follows: sun.jdk classes 1.6.0 system ${java.home}/../Classes/classes.jar This works if I'm using OS X. However, it does not work if I'm dev... | You can achieve this by defining different build profiles for Windows VS Mac OS. See here for more details. http://maven.apache.org/guides/introduction/introduction-to-profiles.html | maven: How to load tools.jar/classes.jar in an OS independent way? I am using a maven plugin that requires a class that is contained in the jdk's (windows) tools.jar (mac it's in classes.jar). I add this as an explicit dependency of the plugin as follows: sun.jdk classes 1.6.0 system ${java.home}/../Classes/classes.jar... | TITLE:
maven: How to load tools.jar/classes.jar in an OS independent way?
QUESTION:
I am using a maven plugin that requires a class that is contained in the jdk's (windows) tools.jar (mac it's in classes.jar). I add this as an explicit dependency of the plugin as follows: sun.jdk classes 1.6.0 system ${java.home}/../C... | [
"maven",
"maven-plugin",
"java"
] | 1 | 0 | 1,457 | 2 | 0 | 2011-06-02T19:43:38.330000 | 2011-06-02T19:55:19.120000 |
6,219,535 | 6,219,802 | adding additional functionality to the asp.net login component | I am using the default login component for my logging in and out and im wanting to add some additional code to allow me to track if the user is online or not i have created a attribute in the asp_users table called online im wanting to when the user has logged in and they are authenticated it to then change the online ... | The LastActivityDate + UserIsOnlineTimeWindow tracks already if the user is currently logged in( Date.Now - UserIsOnlineTimeWindow <= LastActivityDate ). Here are more informations: https://web.archive.org/web/20211020150010/https://www.4guysfromrolla.com/articles/041608-1.aspx According to the time issue: Coordinated ... | adding additional functionality to the asp.net login component I am using the default login component for my logging in and out and im wanting to add some additional code to allow me to track if the user is online or not i have created a attribute in the asp_users table called online im wanting to when the user has log... | TITLE:
adding additional functionality to the asp.net login component
QUESTION:
I am using the default login component for my logging in and out and im wanting to add some additional code to allow me to track if the user is online or not i have created a attribute in the asp_users table called online im wanting to whe... | [
"asp.net",
"authentication",
"asp.net-membership"
] | 0 | 0 | 109 | 1 | 0 | 2011-06-02T19:43:50.800000 | 2011-06-02T20:09:55.547000 |
6,219,540 | 6,219,677 | How I can make a loading indicator with any color on android? | I have a code want to user "Style.xml" as I show file content at the end. What I want to do is " The ProgressDailog Indicator to change its color which will be defined in Style.xml.... Simple. public class SimpleProgressDialog extends Dialog { public static SimpleProgressDialog show(Context context, CharSequence title,... | It's not entirely clear what you're asking, but I highly recommend putting you ProgressBar definition in its own XML layout. From there, you can easily apply the style by adding the attribute style="@style/NewDialog" eg. create progress.xml: And then in your code, do: dialog.setContentView(R.layout.progres); | How I can make a loading indicator with any color on android? I have a code want to user "Style.xml" as I show file content at the end. What I want to do is " The ProgressDailog Indicator to change its color which will be defined in Style.xml.... Simple. public class SimpleProgressDialog extends Dialog { public static ... | TITLE:
How I can make a loading indicator with any color on android?
QUESTION:
I have a code want to user "Style.xml" as I show file content at the end. What I want to do is " The ProgressDailog Indicator to change its color which will be defined in Style.xml.... Simple. public class SimpleProgressDialog extends Dialo... | [
"android",
"android-widget",
"android-progressbar"
] | 0 | 1 | 688 | 1 | 0 | 2011-06-02T19:44:14.333000 | 2011-06-02T19:57:03.677000 |
6,219,566 | 6,219,584 | How to determine which Radio Button is selected in Form with multiple button groups? | I have a form with two groups of radio buttons. They all have the same name, but in the case where a certain type of radio button is selected, I want to change the content before the next submission. If the form is sumitted with the first radio button is selected (class spam), I don't need to do anything special. But i... | if ($('input[name=key].eggs:checked').length > 0){ // an egg group is selected. } Something like that? | How to determine which Radio Button is selected in Form with multiple button groups? I have a form with two groups of radio buttons. They all have the same name, but in the case where a certain type of radio button is selected, I want to change the content before the next submission. If the form is sumitted with the fi... | TITLE:
How to determine which Radio Button is selected in Form with multiple button groups?
QUESTION:
I have a form with two groups of radio buttons. They all have the same name, but in the case where a certain type of radio button is selected, I want to change the content before the next submission. If the form is su... | [
"javascript",
"jquery",
"radio-button"
] | 1 | 2 | 765 | 3 | 0 | 2011-06-02T19:46:28.437000 | 2011-06-02T19:48:12.383000 |
6,219,570 | 6,219,605 | Do something 100px before the scrollbar reaches bottom | I have the below Javascript, and the alert shows up as it is supposed to when the scrollbar hits the bottom of the page. However, I would like this to happen 100 pixels before it reaches the bottom. How would I do that? $(window).scroll(function(){ if($(window).scrollTop() == $(document).height() - $(window).height() )... | $(window).scroll(function(){ if($(window).scrollTop() + 100 > $(document).height() - $(window).height() ){
alert("at bottom");
} }); Using > instead of == because the scroll event fires sporadically, so you may scroll past that value a bunch of times without the event ever firing when there's a precise match. | Do something 100px before the scrollbar reaches bottom I have the below Javascript, and the alert shows up as it is supposed to when the scrollbar hits the bottom of the page. However, I would like this to happen 100 pixels before it reaches the bottom. How would I do that? $(window).scroll(function(){ if($(window).scr... | TITLE:
Do something 100px before the scrollbar reaches bottom
QUESTION:
I have the below Javascript, and the alert shows up as it is supposed to when the scrollbar hits the bottom of the page. However, I would like this to happen 100 pixels before it reaches the bottom. How would I do that? $(window).scroll(function()... | [
"javascript",
"jquery"
] | 5 | 11 | 5,346 | 1 | 0 | 2011-06-02T19:46:56.857000 | 2011-06-02T19:50:07.400000 |
6,219,577 | 6,220,483 | Modeling Question for RavenDB (Or other doc oriented databases) | Wondering how some of the more experienced (or anyone with a better idea than I have) would tackle my particular modeling scenario... I have a typical "Category -> SubCategory ->TertiarySubCategory" scenario and I'm not sure if I'm mapping it out correctly. I am mapping this directly to an MVC route since raven seems t... | The answer is that it depends on the size of your data and your usage scenario. The first example is useful if you have large number of items and want to access categories without its items. The second example is useful if you usually access category with its items, and the size of items is limited (note that limited i... | Modeling Question for RavenDB (Or other doc oriented databases) Wondering how some of the more experienced (or anyone with a better idea than I have) would tackle my particular modeling scenario... I have a typical "Category -> SubCategory ->TertiarySubCategory" scenario and I'm not sure if I'm mapping it out correctly... | TITLE:
Modeling Question for RavenDB (Or other doc oriented databases)
QUESTION:
Wondering how some of the more experienced (or anyone with a better idea than I have) would tackle my particular modeling scenario... I have a typical "Category -> SubCategory ->TertiarySubCategory" scenario and I'm not sure if I'm mappin... | [
"nosql",
"ravendb"
] | 3 | 2 | 420 | 1 | 0 | 2011-06-02T19:47:53.043000 | 2011-06-02T21:14:43.267000 |
6,219,580 | 6,223,048 | Query SQL Server Dynamically | I'm working on creating a dashboard. I have started to refactor the application so methods relating to querying the database are generic or dynamic. I'm fairly new to the concept of generics and still an amateur programmer but I have done some searching and I have tried to come up with a solution. The problem is not re... | You are reinventing the wheel, yes, it's true. You are best advised to use an object-relational mapper off the "shelf". But I think you also deserve an answer to your question: to assign the query results dynamically to the correct properties, you would use reflection. See the documentation for the System.Reflection na... | Query SQL Server Dynamically I'm working on creating a dashboard. I have started to refactor the application so methods relating to querying the database are generic or dynamic. I'm fairly new to the concept of generics and still an amateur programmer but I have done some searching and I have tried to come up with a so... | TITLE:
Query SQL Server Dynamically
QUESTION:
I'm working on creating a dashboard. I have started to refactor the application so methods relating to querying the database are generic or dynamic. I'm fairly new to the concept of generics and still an amateur programmer but I have done some searching and I have tried to... | [
"c#",
".net",
"sql",
"sql-server",
"generics"
] | 4 | 3 | 711 | 2 | 0 | 2011-06-02T19:47:57.593000 | 2011-06-03T04:45:48.410000 |
6,219,593 | 6,219,611 | Javascript: == or ===? | Possible Duplicate: Javascript === vs ==: Does it matter which “equal” operator I use? Hi, This is my tiny code: var domains_before_update = storage.getItem('domain_list_original'); if(domains_before_update==null || domains_before_update=="" ) { gBrowser.selectedTab = gBrowser.addTab("chrome://filter/content/block_and_... | === checks the strict equals (without coercion) that you're used to, where == checks the value [after built-in coercion] equality but as the other answer(s) noted, strict equality does not work when checking for null, use!variable same as this post: Difference between == and === in JavaScript edit: clarified some of th... | Javascript: == or ===? Possible Duplicate: Javascript === vs ==: Does it matter which “equal” operator I use? Hi, This is my tiny code: var domains_before_update = storage.getItem('domain_list_original'); if(domains_before_update==null || domains_before_update=="" ) { gBrowser.selectedTab = gBrowser.addTab("chrome://fi... | TITLE:
Javascript: == or ===?
QUESTION:
Possible Duplicate: Javascript === vs ==: Does it matter which “equal” operator I use? Hi, This is my tiny code: var domains_before_update = storage.getItem('domain_list_original'); if(domains_before_update==null || domains_before_update=="" ) { gBrowser.selectedTab = gBrowser.a... | [
"javascript",
"equals"
] | 2 | 2 | 338 | 4 | 0 | 2011-06-02T19:49:05.800000 | 2011-06-02T19:50:51.673000 |
6,219,595 | 6,220,175 | R Using a for() loop to fill one dataframe with another | I have two dataframes and I wish to insert the values of one dataframe into another (let's call them DF1 and DF2 ). DF1 consists of 2 columns 1 and 2. Column 1 ( col1 ) contains characters a to z and col2 has values associated with each character (from a to z) DF2 is a dataframe with 3 columns. The first two consist of... | You should really use merge for this as @Aaron suggested in his comment above, but if you insist on writing your own loop, than you have the problem in your last line, as you assign g value to the whole col3 column. You should use the j index there also, like: for(j in 1:length(DF2$col1)) { DF2$col3[j] = DF1[(which(DF1... | R Using a for() loop to fill one dataframe with another I have two dataframes and I wish to insert the values of one dataframe into another (let's call them DF1 and DF2 ). DF1 consists of 2 columns 1 and 2. Column 1 ( col1 ) contains characters a to z and col2 has values associated with each character (from a to z) DF2... | TITLE:
R Using a for() loop to fill one dataframe with another
QUESTION:
I have two dataframes and I wish to insert the values of one dataframe into another (let's call them DF1 and DF2 ). DF1 consists of 2 columns 1 and 2. Column 1 ( col1 ) contains characters a to z and col2 has values associated with each character... | [
"r",
"for-loop"
] | 2 | 4 | 3,873 | 3 | 0 | 2011-06-02T19:49:11.923000 | 2011-06-02T20:44:45.793000 |
6,219,597 | 6,219,602 | Thread blocks my Android UI | I have a problem with java Threads in my Android app. My nested thread blocks my UI, how can i resolve this? MyClass.java package com.knobik.gadu;
import android.util.Log;
public class MyClass {
public void StartTheThread() {
Thread Nested = new Thread( new NestedThread() ); Nested.run(); }
private class NestedThr... | My nested thread blocks my UI You need to use.start() instead of.run(). That is, replace Nested.run(); with Nested.start(); ( run is just an ordinary method. start() is the method that actually spawns a new thread, which in turn runs run ) | Thread blocks my Android UI I have a problem with java Threads in my Android app. My nested thread blocks my UI, how can i resolve this? MyClass.java package com.knobik.gadu;
import android.util.Log;
public class MyClass {
public void StartTheThread() {
Thread Nested = new Thread( new NestedThread() ); Nested.run()... | TITLE:
Thread blocks my Android UI
QUESTION:
I have a problem with java Threads in my Android app. My nested thread blocks my UI, how can i resolve this? MyClass.java package com.knobik.gadu;
import android.util.Log;
public class MyClass {
public void StartTheThread() {
Thread Nested = new Thread( new NestedThread... | [
"java",
"android",
"multithreading",
"class",
"nested"
] | 1 | 6 | 1,674 | 3 | 0 | 2011-06-02T19:49:19.590000 | 2011-06-02T19:50:00.253000 |
6,219,599 | 6,219,818 | Update metadata of MOSS document library item using powershell | Is it possible to update metadata of an item in SharePoint 2007 document library using powershell? I'd like to execute a CAML query and then change && update every item in the results list. My goal is to write a single throwaway script instead of writing a console app in VS. Can anyone point me towards a way of doing t... | I'm normally able to do anything in sharepoint 2010 just using Powershell and: [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint") But never tried in Sharepoint 2007. However I think you won't have any problem, since it seems Sharepoint Services 3.0 supports the assembly as well, along with SPQuer... | Update metadata of MOSS document library item using powershell Is it possible to update metadata of an item in SharePoint 2007 document library using powershell? I'd like to execute a CAML query and then change && update every item in the results list. My goal is to write a single throwaway script instead of writing a ... | TITLE:
Update metadata of MOSS document library item using powershell
QUESTION:
Is it possible to update metadata of an item in SharePoint 2007 document library using powershell? I'd like to execute a CAML query and then change && update every item in the results list. My goal is to write a single throwaway script ins... | [
"powershell",
"sharepoint-2007",
"wss"
] | 2 | 2 | 1,065 | 2 | 0 | 2011-06-02T19:49:24.487000 | 2011-06-02T20:11:59.370000 |
6,219,614 | 6,219,932 | Convert a long to two int for the purpose of reconstruction | I need to pass a parameter as two int parameters to a Telerik Report since it cannot accept Long parameters. What is the easiest way to split a long into two ints and reconstruct it without losing data? | Using masking and shifting is your best bet. long is guaranteed to be 64 bit and int 32 bit, according to the documentation, so you can mask off the bits into the two integers and then recombine. See: static int[] long2doubleInt(long a) { int a1 = (int)(a & uint.MaxValue); int a2 = (int)(a >> 32); return new int[] { a1... | Convert a long to two int for the purpose of reconstruction I need to pass a parameter as two int parameters to a Telerik Report since it cannot accept Long parameters. What is the easiest way to split a long into two ints and reconstruct it without losing data? | TITLE:
Convert a long to two int for the purpose of reconstruction
QUESTION:
I need to pass a parameter as two int parameters to a Telerik Report since it cannot accept Long parameters. What is the easiest way to split a long into two ints and reconstruct it without losing data?
ANSWER:
Using masking and shifting is ... | [
"c#",
"int"
] | 11 | 18 | 13,241 | 6 | 0 | 2011-06-02T19:51:14.113000 | 2011-06-02T20:22:42.970000 |
6,219,617 | 6,219,673 | Check if property of object instance is 'blank' | I am trying to implement the code below without success. Basically, I want to set the display name to use thisPhoto.userFullName if it is not 'Blank", else show thisPhoto.userName instead. UILabel *thisUserNameLabel = (UILabel *)[cell.contentView viewWithTag:kUserNameValueTag];
NSLog(@"user full name %@",thisPhoto.use... | I see a few points here First - if your userFullName instance variable is NSString* then doing simple comparison with nil is enough: if (thisPhoto.userFullName) Unless, of course, you explicitly set it to be [NSNull null], which then requires the condition you wrote. Second - comparing strings is done with isEqualToStr... | Check if property of object instance is 'blank' I am trying to implement the code below without success. Basically, I want to set the display name to use thisPhoto.userFullName if it is not 'Blank", else show thisPhoto.userName instead. UILabel *thisUserNameLabel = (UILabel *)[cell.contentView viewWithTag:kUserNameValu... | TITLE:
Check if property of object instance is 'blank'
QUESTION:
I am trying to implement the code below without success. Basically, I want to set the display name to use thisPhoto.userFullName if it is not 'Blank", else show thisPhoto.userName instead. UILabel *thisUserNameLabel = (UILabel *)[cell.contentView viewWit... | [
"objective-c",
"cocoa-touch",
"ios",
"uilabel",
"string-comparison"
] | 2 | 2 | 2,693 | 7 | 0 | 2011-06-02T19:51:18.717000 | 2011-06-02T19:56:49.903000 |
6,219,619 | 6,220,129 | DisplayNameAttribute for anonymous class | If I had a non-anonymous class like this, I know I can use DisplayNameAttribute like this. class Record{
[DisplayName("The Foo")] public string Foo {get; set;}
[DisplayName("The Bar")] public string Bar {get; set;}
} but I have var records = (from item in someCollection select{ Foo = item.SomeField, Bar = item.SomeO... | How about the following solution: dataGrid.SetValue( DataGridUtilities.ColumnHeadersProperty, new Dictionary { { "Foo", "The Foo" }, { "Bar", "The Bar" }, });
dataGrid.ItemsSource = (from item in someCollection select{ Foo = item.SomeField, Bar = item.SomeOtherField, }).ToList(); Then you have the following Attached P... | DisplayNameAttribute for anonymous class If I had a non-anonymous class like this, I know I can use DisplayNameAttribute like this. class Record{
[DisplayName("The Foo")] public string Foo {get; set;}
[DisplayName("The Bar")] public string Bar {get; set;}
} but I have var records = (from item in someCollection selec... | TITLE:
DisplayNameAttribute for anonymous class
QUESTION:
If I had a non-anonymous class like this, I know I can use DisplayNameAttribute like this. class Record{
[DisplayName("The Foo")] public string Foo {get; set;}
[DisplayName("The Bar")] public string Bar {get; set;}
} but I have var records = (from item in so... | [
"c#",
"anonymous-types"
] | 10 | 2 | 639 | 2 | 0 | 2011-06-02T19:51:25.580000 | 2011-06-02T20:38:43.330000 |
6,219,620 | 6,229,145 | Add Username to Order Comment History | Is there a simple way to add the username of the person who is making the comment in the admin history to the comment thread on the order? -- edit -- Another way of asking this would be how do I add an additional field to the comment history model so that I can override the appropriate models and templates inserting th... | If you want to add the username who is currently logged in and making change in order or commenting on order. you need to add an attribute to magento. Create a Module say Audit app / etc / modules / Namespace_Audit.xml true local then Create a folder Audit in you namespace and create the config file. purpose of this is... | Add Username to Order Comment History Is there a simple way to add the username of the person who is making the comment in the admin history to the comment thread on the order? -- edit -- Another way of asking this would be how do I add an additional field to the comment history model so that I can override the appropr... | TITLE:
Add Username to Order Comment History
QUESTION:
Is there a simple way to add the username of the person who is making the comment in the admin history to the comment thread on the order? -- edit -- Another way of asking this would be how do I add an additional field to the comment history model so that I can ov... | [
"magento",
"magento-1.4"
] | 13 | 8 | 8,544 | 3 | 0 | 2011-06-02T19:51:26.190000 | 2011-06-03T15:29:36.667000 |
6,219,629 | 6,220,755 | Creating a multilingual website | I am looking to build a multilingual website using MS expressions web. The website will consist of a blog and possibly a art display portions. I would like to do all translations manually but I don't want to have more then one CSS stack. What would be the best way to populate the website text. Because this is just a le... | In my professional opinion I would use SQL simply because databases are always easier to edit and handle (in my opinion...) than XML, I like KatieK's idea of simply querying a different database based on which language it is in. However, if this is a learning experience I would use whichever language you know least of ... | Creating a multilingual website I am looking to build a multilingual website using MS expressions web. The website will consist of a blog and possibly a art display portions. I would like to do all translations manually but I don't want to have more then one CSS stack. What would be the best way to populate the website... | TITLE:
Creating a multilingual website
QUESTION:
I am looking to build a multilingual website using MS expressions web. The website will consist of a blog and possibly a art display portions. I would like to do all translations manually but I don't want to have more then one CSS stack. What would be the best way to po... | [
"css",
"expression-web"
] | 1 | 3 | 556 | 2 | 0 | 2011-06-02T19:52:20.473000 | 2011-06-02T21:45:11.597000 |
6,219,633 | 6,219,685 | parsing xml doc with Javascript | hey guys.. i was wondering what the best way to go about getting a node from an xml doc into a javascript variable would be? i dont really want to use jquery because i believe that i wont have too.. so far i have: if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest();... | You can parse the returned XML using DOM manipulators. We'll need more information about the XML returned to be more specific. xmlDoc=xmlhttp.responseXML;
// For example - get "person" tags if there were any var people = xmlDoc.getElementsByTagName("person");
// All child nodes under the first person var children = p... | parsing xml doc with Javascript hey guys.. i was wondering what the best way to go about getting a node from an xml doc into a javascript variable would be? i dont really want to use jquery because i believe that i wont have too.. so far i have: if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safa... | TITLE:
parsing xml doc with Javascript
QUESTION:
hey guys.. i was wondering what the best way to go about getting a node from an xml doc into a javascript variable would be? i dont really want to use jquery because i believe that i wont have too.. so far i have: if (window.XMLHttpRequest) {// code for IE7+, Firefox, C... | [
"javascript"
] | 2 | 2 | 199 | 1 | 0 | 2011-06-02T19:52:57.470000 | 2011-06-02T19:58:08.473000 |
6,219,637 | 6,219,654 | How to check if IEnumerable is a List? | Given an IEnumerable, how can I check if its type is List? Given an IEnumerable, I want to perform List methods, but if it's a List already I will simply cast it rather that using.ToList() | Use the is operator to test the type of the variable. if(myIEnumerable is IList) { // it is a List (may still need casting in order to use List specific methods) } | How to check if IEnumerable is a List? Given an IEnumerable, how can I check if its type is List? Given an IEnumerable, I want to perform List methods, but if it's a List already I will simply cast it rather that using.ToList() | TITLE:
How to check if IEnumerable is a List?
QUESTION:
Given an IEnumerable, how can I check if its type is List? Given an IEnumerable, I want to perform List methods, but if it's a List already I will simply cast it rather that using.ToList()
ANSWER:
Use the is operator to test the type of the variable. if(myIEnume... | [
".net",
"list",
"types",
"ienumerable"
] | 2 | 6 | 1,461 | 6 | 0 | 2011-06-02T19:53:23.303000 | 2011-06-02T19:55:13.023000 |
6,219,638 | 6,219,760 | Where is the documentation for OGNL officially kept now? | The OpenSymphony page no longer has it. A link to ognl.org from the Struts 2 documentation is also dead. So where is the official OGNL site now? UPDATE EDIT As of August 2011, it graduated from Incubator to Apache Commons. OGNL has its own site now, though an ominous "Coming soon (or not)" message is there. | It appears to be in limbo at the moment. OGNL was accepted into the Apache Incubator a little while back, so once incubation is finished, I'd expect to see it at the new OGNL project site. For now, you may want to follow the incubation status at: http://incubator.apache.org/projects/ognl.html I know that the OpenSympho... | Where is the documentation for OGNL officially kept now? The OpenSymphony page no longer has it. A link to ognl.org from the Struts 2 documentation is also dead. So where is the official OGNL site now? UPDATE EDIT As of August 2011, it graduated from Incubator to Apache Commons. OGNL has its own site now, though an omi... | TITLE:
Where is the documentation for OGNL officially kept now?
QUESTION:
The OpenSymphony page no longer has it. A link to ognl.org from the Struts 2 documentation is also dead. So where is the official OGNL site now? UPDATE EDIT As of August 2011, it graduated from Incubator to Apache Commons. OGNL has its own site ... | [
"struts2",
"ognl",
"opensymphony"
] | 2 | 2 | 516 | 2 | 0 | 2011-06-02T19:53:26.470000 | 2011-06-02T20:04:53.783000 |
6,219,642 | 6,219,701 | Combine HTML Table Rows with Javascript | Is there an easy way to combine rows in an HTML table where the first column is the same? I basically have a table set up like: test 12345 12345 test 12345 12345 test2 12345 12345 test 12345 12345 test2 12345 12345 and I want it to generate: test 37035 37035 test2 24690 24690 | using jQuery: var map = {}; $('table tr').each(function(){ var $tr = $(this), cells = $tr.find('td'), mapTxt = cells.eq(0).text();
if(!map[mapTxt]){ map[mapTxt] = cells; } else { for(var i=1, l=cells.length; i this is a "dumb" script -- no error handling for cases like different number of cells, fields being non-numer... | Combine HTML Table Rows with Javascript Is there an easy way to combine rows in an HTML table where the first column is the same? I basically have a table set up like: test 12345 12345 test 12345 12345 test2 12345 12345 test 12345 12345 test2 12345 12345 and I want it to generate: test 37035 37035 test2 24690 24690 | TITLE:
Combine HTML Table Rows with Javascript
QUESTION:
Is there an easy way to combine rows in an HTML table where the first column is the same? I basically have a table set up like: test 12345 12345 test 12345 12345 test2 12345 12345 test 12345 12345 test2 12345 12345 and I want it to generate: test 37035 37035 tes... | [
"javascript",
"php",
"html-table"
] | 1 | 4 | 1,314 | 2 | 0 | 2011-06-02T19:54:04.253000 | 2011-06-02T19:59:38.107000 |
6,219,643 | 6,219,823 | How to call stored procedure in MVC by EF | Where can I get good tutorial on Entity framework with Stored Procedure in MVC framework? Is it better to use Enterprise library in this case when I have almost everything written in the stored procedure. Note: I am using stored procedure because they are really very complex and some of them is over 1000 lines. | MVC is in this case absolutely not related. The way how you call stored procedure from EF will be still the same. I guess you want to use stored procedures without actually using entities and linq-to-entities (main EF features), don't you? Generally you need: EDMX file (ado.net entity data model) where you run update f... | How to call stored procedure in MVC by EF Where can I get good tutorial on Entity framework with Stored Procedure in MVC framework? Is it better to use Enterprise library in this case when I have almost everything written in the stored procedure. Note: I am using stored procedure because they are really very complex an... | TITLE:
How to call stored procedure in MVC by EF
QUESTION:
Where can I get good tutorial on Entity framework with Stored Procedure in MVC framework? Is it better to use Enterprise library in this case when I have almost everything written in the stored procedure. Note: I am using stored procedure because they are real... | [
"asp.net-mvc-3",
"entity-framework",
"enterprise-library"
] | 11 | 41 | 41,515 | 3 | 0 | 2011-06-02T19:54:07.017000 | 2011-06-02T20:12:30.027000 |
6,219,647 | 6,219,725 | How do I get variable values in my stack trace dump? | I maintain an application that sends me an email when an error occurs in the application. I dump the stack trace into the email, and it seems to work ok. The only thing missing is the values of the variables. I get all the calls and such, just never any variables. What am I missing in order to get these variable values... | Instead of trying to put them in the stack trace, just add them to the string you're sending. UtilityClass.SendEmail(shortNTID, "admin@mydomain.com", new string[] { "support@mydomain.com" }, "MyApplication error has occured for user: " + shortNTID + " (Main).", "Message: " + ex.Message.ToString() + " Source: " + ex.Sou... | How do I get variable values in my stack trace dump? I maintain an application that sends me an email when an error occurs in the application. I dump the stack trace into the email, and it seems to work ok. The only thing missing is the values of the variables. I get all the calls and such, just never any variables. Wh... | TITLE:
How do I get variable values in my stack trace dump?
QUESTION:
I maintain an application that sends me an email when an error occurs in the application. I dump the stack trace into the email, and it seems to work ok. The only thing missing is the values of the variables. I get all the calls and such, just never... | [
"c#",
".net",
"variables",
"stack-trace"
] | 5 | 3 | 2,473 | 2 | 0 | 2011-06-02T19:54:48.950000 | 2011-06-02T20:01:16.743000 |
6,219,657 | 6,219,703 | jquery fadeOut() the same element multiple times | I have the following code which notifies the user when something happens: window.parent.$(".Toast").html('Successfully Did Something!').fadeOut(9000); It works great the first time, but then, of course, the element is still set to hidden and has the same text. So when the user triggers it again, nothing happens. I've t... | Use.show() just before.fadeOut(): window.parent.$(".Toast").html('Successfully Did Something!').show().fadeOut(9000); To cancel the current animation, use.stop(true, true): window.parent.$(".Toast").html('Successfully Did Something!').stop(true, true).show().fadeOut(9000); | jquery fadeOut() the same element multiple times I have the following code which notifies the user when something happens: window.parent.$(".Toast").html('Successfully Did Something!').fadeOut(9000); It works great the first time, but then, of course, the element is still set to hidden and has the same text. So when th... | TITLE:
jquery fadeOut() the same element multiple times
QUESTION:
I have the following code which notifies the user when something happens: window.parent.$(".Toast").html('Successfully Did Something!').fadeOut(9000); It works great the first time, but then, of course, the element is still set to hidden and has the sam... | [
"javascript",
"jquery"
] | 2 | 6 | 1,506 | 4 | 0 | 2011-06-02T19:55:21.400000 | 2011-06-02T19:59:47.223000 |
6,219,668 | 6,219,706 | Disable rdoc and ri generation by default for rubygems 1.8.x | There are a lot of answers for this question that work under older versions of rubygems, but what is the recommended procedure for Rubygems 1.8.x? I have an /etc/gemrc file that looks like this: gem: --no-rdoc --no-ri These options seem to be ignored during any gem install. Update: After doing some more digging, it see... | You need to put the following in your ~/.gemrc or /etc/gemrc file install: --no-rdoc --no-ri | Disable rdoc and ri generation by default for rubygems 1.8.x There are a lot of answers for this question that work under older versions of rubygems, but what is the recommended procedure for Rubygems 1.8.x? I have an /etc/gemrc file that looks like this: gem: --no-rdoc --no-ri These options seem to be ignored during a... | TITLE:
Disable rdoc and ri generation by default for rubygems 1.8.x
QUESTION:
There are a lot of answers for this question that work under older versions of rubygems, but what is the recommended procedure for Rubygems 1.8.x? I have an /etc/gemrc file that looks like this: gem: --no-rdoc --no-ri These options seem to b... | [
"ruby",
"rubygems"
] | 14 | 12 | 2,194 | 3 | 0 | 2011-06-02T19:56:11.907000 | 2011-06-02T20:00:21.257000 |
6,219,687 | 6,219,693 | Why windows.onload is executed several times? | I'm binding the window.onload event like this // It's a little more complex than this, I analyze if there is any other function // attached but for the sake of the question it's ok, this behaves the same. window.onload = myfunction; Onload is triggered twice on my local machine a several times on the production server ... | The parentheses on your assignment — myfunction() — executes your function. You haven't shown what myfunction does, but this means that the return value from that function is being assigned to window.onload, not the function itself. So, I don't know how that is getting executed, unless you have somehow got that to work... | Why windows.onload is executed several times? I'm binding the window.onload event like this // It's a little more complex than this, I analyze if there is any other function // attached but for the sake of the question it's ok, this behaves the same. window.onload = myfunction; Onload is triggered twice on my local mac... | TITLE:
Why windows.onload is executed several times?
QUESTION:
I'm binding the window.onload event like this // It's a little more complex than this, I analyze if there is any other function // attached but for the sake of the question it's ok, this behaves the same. window.onload = myfunction; Onload is triggered twi... | [
"javascript",
"jquery"
] | 5 | 7 | 12,324 | 1 | 0 | 2011-06-02T19:58:17.327000 | 2011-06-02T19:59:04.817000 |
6,219,692 | 6,220,536 | Very small numbers | I am writing a Mandelbrot viewer. Everything works except when you get to a very high zoom the image starts to pixilate about at about zoom 10^(-14). I am guessing because i run out of memory in my double vars. What can i use that will allow me to use very small numbers? I need to use the java.lang.Math class and i don... | I know nothing about how you're doing it, but if you can do your calculations in log-space you can deal with tiny numbers much better (since they become large negative numbers). | Very small numbers I am writing a Mandelbrot viewer. Everything works except when you get to a very high zoom the image starts to pixilate about at about zoom 10^(-14). I am guessing because i run out of memory in my double vars. What can i use that will allow me to use very small numbers? I need to use the java.lang.M... | TITLE:
Very small numbers
QUESTION:
I am writing a Mandelbrot viewer. Everything works except when you get to a very high zoom the image starts to pixilate about at about zoom 10^(-14). I am guessing because i run out of memory in my double vars. What can i use that will allow me to use very small numbers? I need to u... | [
"java"
] | 6 | 1 | 4,441 | 5 | 0 | 2011-06-02T19:59:00.340000 | 2011-06-02T21:20:27.567000 |
6,219,694 | 6,222,078 | UIButton event "touch hold" | in Xcode 3.2 Interface Builder there was a UIButton Send Event called "touch hold". This very simply executed the event as long as the button was being held. For example lets say you had a red light and UIButton that lit up the light. The "touch hold" send event would keep the light lit the while the button was being p... | Making your own seems to be the easiest route. Create two IBActions, one that turns your red light off, and one that turns your red light on. In interface builder, connect the button's "touch Down" send event to the IBAction turning on your light. Then connect the button's "touch Up Inside" send event to the IBAction t... | UIButton event "touch hold" in Xcode 3.2 Interface Builder there was a UIButton Send Event called "touch hold". This very simply executed the event as long as the button was being held. For example lets say you had a red light and UIButton that lit up the light. The "touch hold" send event would keep the light lit the ... | TITLE:
UIButton event "touch hold"
QUESTION:
in Xcode 3.2 Interface Builder there was a UIButton Send Event called "touch hold". This very simply executed the event as long as the button was being held. For example lets say you had a red light and UIButton that lit up the light. The "touch hold" send event would keep ... | [
"iphone",
"xcode",
"ios",
"ios4",
"uibutton"
] | 1 | 7 | 3,603 | 2 | 0 | 2011-06-02T19:59:05.537000 | 2011-06-03T01:19:54.243000 |
6,219,695 | 6,219,814 | When serving responses from a REST API with the hypermedia constraint, how to indicate to client which HTTP method(verb) to use? | I think I have a pretty good grasp on the tenets of a RESTful architecture but I'm not there yet. The part that I can't seem to figure out is how do the clients become aware of which HTTP methods are available to each resource? What about when a specific action is required in the application flow to continue a process?... | The simple fact is that those verbs will be documented in the documentation of the resources. The question you didn't ask is, "How does a client know what the refs 'order', 'invoice', and 'payment' are for?". Yet, they suffer the same problem you're asking. And they, too, need to be documented as well. When those are d... | When serving responses from a REST API with the hypermedia constraint, how to indicate to client which HTTP method(verb) to use? I think I have a pretty good grasp on the tenets of a RESTful architecture but I'm not there yet. The part that I can't seem to figure out is how do the clients become aware of which HTTP met... | TITLE:
When serving responses from a REST API with the hypermedia constraint, how to indicate to client which HTTP method(verb) to use?
QUESTION:
I think I have a pretty good grasp on the tenets of a RESTful architecture but I'm not there yet. The part that I can't seem to figure out is how do the clients become aware... | [
"api",
"rest",
"architecture",
"hateoas"
] | 5 | 6 | 1,254 | 2 | 0 | 2011-06-02T19:59:10.763000 | 2011-06-02T20:11:41.443000 |
6,219,696 | 6,219,826 | Alternative to .readLine() / readLine only returns lists | I'm using read line to get some text from wikipedia. But read line only returns lists, not the text that I want. Is there any way to use an alternative or to solve my problem? public class mediawiki {
public static void main(String[] args) throws Exception { URL yahoo = new URL( "http://en.wikipedia.org/w/index.php?ti... | The method readLine() on a BufferedReader instance definitely returns a String. In your code example, you are doing readLine() twice in your while loop. First you store it in inputLine: while ((inputLine = in.readLine())!= null) Then you are storing (the next line) in TEST without checking if it is null. Try to pass in... | Alternative to .readLine() / readLine only returns lists I'm using read line to get some text from wikipedia. But read line only returns lists, not the text that I want. Is there any way to use an alternative or to solve my problem? public class mediawiki {
public static void main(String[] args) throws Exception { URL... | TITLE:
Alternative to .readLine() / readLine only returns lists
QUESTION:
I'm using read line to get some text from wikipedia. But read line only returns lists, not the text that I want. Is there any way to use an alternative or to solve my problem? public class mediawiki {
public static void main(String[] args) thro... | [
"java",
"eclipse",
"bufferedreader",
"readline",
"wikimedia-dumps"
] | 1 | 2 | 2,257 | 1 | 0 | 2011-06-02T19:59:13.997000 | 2011-06-02T20:12:43.910000 |
6,219,708 | 6,221,971 | How can we add DLLs to an Install Shield "build" on the command line/at build time? | We would like to add DLLs to an install based on some external command (We want to reuse a script/install shield configuration multiple times from a command line. We have a program that will be localized and the localization just requires an additional DLL be added to the target directory. Because of the additional siz... | You need to look into the concept of release flags and product configurations. You can create a single installer project that builds a variety of different views to meet all of your requirements. I have one customer that I did this for where I build 57 install configurations from one installer baseline to support all o... | How can we add DLLs to an Install Shield "build" on the command line/at build time? We would like to add DLLs to an install based on some external command (We want to reuse a script/install shield configuration multiple times from a command line. We have a program that will be localized and the localization just requir... | TITLE:
How can we add DLLs to an Install Shield "build" on the command line/at build time?
QUESTION:
We would like to add DLLs to an install based on some external command (We want to reuse a script/install shield configuration multiple times from a command line. We have a program that will be localized and the locali... | [
"installshield"
] | 2 | 2 | 1,553 | 1 | 0 | 2011-06-02T20:00:29.823000 | 2011-06-03T00:58:33.397000 |
6,219,709 | 6,219,849 | Google Maps: Relative to Fixed Positioning | The effect I'm looking for is that I have a div that is floating right with a Google map inside it and when the user scrolls down, I want it to be fixed at top:0px. This is basically what Yelp has for the map on their search page. There's been a few questions that are similar that ask about using JQuery to change the c... | You just needed to pick apart the specifics of what Yelp was doing a little more, I think... their column is floated as well (examine their markup... it's #searchLayoutMapResults ), but then inside that, the div #searchLayoutMapResults is the one that gets position: fixed added to it (via the className fixed ), so it d... | Google Maps: Relative to Fixed Positioning The effect I'm looking for is that I have a div that is floating right with a Google map inside it and when the user scrolls down, I want it to be fixed at top:0px. This is basically what Yelp has for the map on their search page. There's been a few questions that are similar ... | TITLE:
Google Maps: Relative to Fixed Positioning
QUESTION:
The effect I'm looking for is that I have a div that is floating right with a Google map inside it and when the user scrolls down, I want it to be fixed at top:0px. This is basically what Yelp has for the map on their search page. There's been a few questions... | [
"javascript",
"jquery",
"google-maps",
"position"
] | 3 | 2 | 22,205 | 3 | 0 | 2011-06-02T20:00:29.860000 | 2011-06-02T20:15:21.693000 |
6,219,716 | 6,220,047 | Where can I find tutorials about ant properties? | I'm trying to learn some ant for a Struts 1.x project that I was thrown onto. Mainly I'm trying to find a good referent for the inherent variables/properties of ant...beginners tutorial. Any GOOD reference really. A couple lines of the ant file that I've been trying to figure out just for example... and <!DOCTYPE //in ... | Your first code block refers to the "available" ant task. It sets the property sun.web.present if the given file exists. In your second code block, " " closes one). This is true for all XML, not just ant build.xml files. In this case it is using the "replace" ant task to replace " In general an ant build file has targe... | Where can I find tutorials about ant properties? I'm trying to learn some ant for a Struts 1.x project that I was thrown onto. Mainly I'm trying to find a good referent for the inherent variables/properties of ant...beginners tutorial. Any GOOD reference really. A couple lines of the ant file that I've been trying to f... | TITLE:
Where can I find tutorials about ant properties?
QUESTION:
I'm trying to learn some ant for a Struts 1.x project that I was thrown onto. Mainly I'm trying to find a good referent for the inherent variables/properties of ant...beginners tutorial. Any GOOD reference really. A couple lines of the ant file that I'v... | [
"java",
"ant",
"jakarta-ee"
] | 1 | 3 | 228 | 3 | 0 | 2011-06-02T20:00:50.400000 | 2011-06-02T20:31:18.900000 |
6,219,718 | 6,219,765 | Android: Multiple Views on a Activity | Here is my main: @Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
LinearLayout layout = (LinearLayout) findViewById(R.id.mainView); TextView text= (TextView) findViewById(R.id.text); text.setText("This is a Test!");
firstCircle first = ne... | when you add the views, add them with layout parameters. Its possible the 1st view is filling the parent, leaving no space for the second view. you could do something like LinearLayout.LayoutParams p = new LinearLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); layout.addView(first,p); layout.... | Android: Multiple Views on a Activity Here is my main: @Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
LinearLayout layout = (LinearLayout) findViewById(R.id.mainView); TextView text= (TextView) findViewById(R.id.text); text.setText("This... | TITLE:
Android: Multiple Views on a Activity
QUESTION:
Here is my main: @Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
LinearLayout layout = (LinearLayout) findViewById(R.id.mainView); TextView text= (TextView) findViewById(R.id.text); ... | [
"android",
"multithreading",
"layout",
"surfaceview"
] | 0 | 1 | 1,131 | 1 | 0 | 2011-06-02T20:00:58.183000 | 2011-06-02T20:05:30.913000 |
6,219,726 | 6,219,984 | "Throttled" async download in F# | I'm trying to download the 3000+ photos referenced from the xml backup of my blog. The problem I came across is that if just one of those photos is no longer available, the whole async gets blocked because AsyncGetResponse doesn't do timeouts. ildjarn helped me to put together a version of AsyncGetResponse which does f... | I think there must be a better way to find out that a file is not available than using a timeout. I'm not exactly sure, but is there some way to make it throw an exception if a file cannot be found? Then you could just wrap your async code inside try.. with and you should avoid most of the problems. Anyway, if you want... | "Throttled" async download in F# I'm trying to download the 3000+ photos referenced from the xml backup of my blog. The problem I came across is that if just one of those photos is no longer available, the whole async gets blocked because AsyncGetResponse doesn't do timeouts. ildjarn helped me to put together a version... | TITLE:
"Throttled" async download in F#
QUESTION:
I'm trying to download the 3000+ photos referenced from the xml backup of my blog. The problem I came across is that if just one of those photos is no longer available, the whole async gets blocked because AsyncGetResponse doesn't do timeouts. ildjarn helped me to put ... | [
"asynchronous",
"f#",
"timeout"
] | 7 | 9 | 1,549 | 4 | 0 | 2011-06-02T20:01:22.657000 | 2011-06-02T20:27:10.917000 |
6,219,730 | 6,219,763 | JSTL conditional check | On my current page I am using JSTL to check if data is available for my form. Problem I am facing is "if there is no data I am not seeing the text fields either". I can solve it using and tags but that would entail lot of if else if else kind of code all through the page. Can anyone suggest me a better cleaner solution... | You can have multiple conditions in a test. But you can also use the empty keyword to do both a nullcheck and lengthcheck. That's the best what you can get, now. If you need to reuse the same condition elsewhere in the page, then you could also save it by....... Foo | JSTL conditional check On my current page I am using JSTL to check if data is available for my form. Problem I am facing is "if there is no data I am not seeing the text fields either". I can solve it using and tags but that would entail lot of if else if else kind of code all through the page. Can anyone suggest me a ... | TITLE:
JSTL conditional check
QUESTION:
On my current page I am using JSTL to check if data is available for my form. Problem I am facing is "if there is no data I am not seeing the text fields either". I can solve it using and tags but that would entail lot of if else if else kind of code all through the page. Can an... | [
"jsp",
"jstl",
"el"
] | 16 | 19 | 34,332 | 2 | 0 | 2011-06-02T20:01:52.287000 | 2011-06-02T20:05:24.327000 |
6,219,734 | 6,219,858 | Python Numpy Question and Python Version Question | I want to use Numpy with Python 3.2 and it won't work; it says I need 3.1. Does anyone know how to get around this issue, other than using 3.1? What do I have to import in order to make this work in a python program? I want to represent a matrix in python, as well as get the norm of the matrix. How would I go about doi... | NumPy 1.6.0 released on 5/14/2011 supports Python 3.2. The prior version (1.5.1) was released prior to Python 3.2. So what version of NumPy are you using? If it's 1.6.0 and it's not working on 3.2 it might be a bug with NumPy and you should report it to NumPy. Regarding basic use of numpy, use this tutorial. I can see ... | Python Numpy Question and Python Version Question I want to use Numpy with Python 3.2 and it won't work; it says I need 3.1. Does anyone know how to get around this issue, other than using 3.1? What do I have to import in order to make this work in a python program? I want to represent a matrix in python, as well as ge... | TITLE:
Python Numpy Question and Python Version Question
QUESTION:
I want to use Numpy with Python 3.2 and it won't work; it says I need 3.1. Does anyone know how to get around this issue, other than using 3.1? What do I have to import in order to make this work in a python program? I want to represent a matrix in pyt... | [
"python",
"matrix",
"numpy",
"matrix-multiplication",
"norm"
] | 2 | 2 | 624 | 2 | 0 | 2011-06-02T20:02:02.090000 | 2011-06-02T20:15:50.047000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.