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,192,031
6,192,090
Should I accept the same object as a parameter and return it or just accept it as a parameter?
I have the following interface: public IStateMachineConfigurator {??? Configure(StateMachine machine); } In the implementation I am calling some of the StateMachine methods to configure it like this: machine.Configure(States.State1).Allow(Triggers.Trigger1); The question is, can I rely on the fact that the StateMachine...
Yes, you can rely on the fact that StateMachine is an object reference. Some people might choose to return a bool or perhaps an enum to give the programmer some kind of hint as to what happened in the Configure method (ie. success/fail/no change/etc.). Others might choose to throw an exception in the event something go...
Should I accept the same object as a parameter and return it or just accept it as a parameter? I have the following interface: public IStateMachineConfigurator {??? Configure(StateMachine machine); } In the implementation I am calling some of the StateMachine methods to configure it like this: machine.Configure(States....
TITLE: Should I accept the same object as a parameter and return it or just accept it as a parameter? QUESTION: I have the following interface: public IStateMachineConfigurator {??? Configure(StateMachine machine); } In the implementation I am calling some of the StateMachine methods to configure it like this: machine...
[ "c#", ".net" ]
2
1
113
3
0
2011-05-31T18:42:47.263000
2011-05-31T18:48:48.993000
6,192,060
6,193,705
jQuery "return false" works in version 1.6 but not 1.6.1 (rails 3)
The following code used to function without attempting to render a new template with jQuery verion 1.6. I installed jQuery 1.6.1 and now a radio button click results in an attempt to render a new page. FYI, the form was submitted on each click because quite a few clients would complete part of the questions, close the ...
The problem was one version of jQuery on the production machine and another on the development machine. We changed from 1.6 full to 1.6.1 min on the development machine. When i changed it back the problem disappeared. Thanks for all your help guys. Kudos to thedaian. I'll switch the answer over to him if he posts.
jQuery "return false" works in version 1.6 but not 1.6.1 (rails 3) The following code used to function without attempting to render a new template with jQuery verion 1.6. I installed jQuery 1.6.1 and now a radio button click results in an attempt to render a new page. FYI, the form was submitted on each click because q...
TITLE: jQuery "return false" works in version 1.6 but not 1.6.1 (rails 3) QUESTION: The following code used to function without attempting to render a new template with jQuery verion 1.6. I installed jQuery 1.6.1 and now a radio button click results in an attempt to render a new page. FYI, the form was submitted on ea...
[ "jquery", "ruby-on-rails-3" ]
0
1
331
3
0
2011-05-31T18:45:33.610000
2011-05-31T21:20:26.983000
6,192,063
6,192,274
Ipad infinate drag scrolling?
How can I make an area on a webpage that can be drag scrolled horizontally on an ipad or iphone, and when you get to the end of content it loops so you continue scrolling and see the first content again? The jscrollpane has the drag capability: http://jscrollpane.kelvinluck.com/arrow_hover.html The jquery smooth div sc...
Here is my stab at it.... Complete hackery, but don't have time to improve it. Hope it gives you something you can work with. If you'd like to fork and push improvements I would gladly accept it. Just plain too busy to work on it since last year. http://github.com/reklis/objc-carousel UPDATE: Sorry I was brain-dead, he...
Ipad infinate drag scrolling? How can I make an area on a webpage that can be drag scrolled horizontally on an ipad or iphone, and when you get to the end of content it loops so you continue scrolling and see the first content again? The jscrollpane has the drag capability: http://jscrollpane.kelvinluck.com/arrow_hover...
TITLE: Ipad infinate drag scrolling? QUESTION: How can I make an area on a webpage that can be drag scrolled horizontally on an ipad or iphone, and when you get to the end of content it loops so you continue scrolling and see the first content again? The jscrollpane has the drag capability: http://jscrollpane.kelvinlu...
[ "html", "ipad", "scroll" ]
0
0
404
1
0
2011-05-31T18:45:56.287000
2011-05-31T19:06:11.860000
6,192,067
6,192,117
Concrete class as generic param
Is there any difference between those definitions? public class Foo {} public class Foo{} UPDATED Can first one have any real usage?
Yes, the first is equivalent to Foo but with the type parameter named String (which is not java.lang.String ) instead of T. So you aren't actually using a concrete class as the type parameter (that isn't legal... try changing the declaration to class Foo ).
Concrete class as generic param Is there any difference between those definitions? public class Foo {} public class Foo{} UPDATED Can first one have any real usage?
TITLE: Concrete class as generic param QUESTION: Is there any difference between those definitions? public class Foo {} public class Foo{} UPDATED Can first one have any real usage? ANSWER: Yes, the first is equivalent to Foo but with the type parameter named String (which is not java.lang.String ) instead of T. So y...
[ "java", "generics" ]
2
3
248
1
0
2011-05-31T18:46:14.330000
2011-05-31T18:50:59.353000
6,192,073
6,192,516
Kynetx and SOAP
I have been searching the web and Kynetx.com for any documetation or examples of how to use SOAP with KRL but have come up with nothing. Sadly the web services I am working with has a lot of SOAP rather then REST. If there is any links of documentation or examples of doing SOAP with KRL I would be really pleased if you...
There is no SOAP support in KRL. The best way to get these APIs into KRL is to create a REST-SOAP shim that translates between the two.
Kynetx and SOAP I have been searching the web and Kynetx.com for any documetation or examples of how to use SOAP with KRL but have come up with nothing. Sadly the web services I am working with has a lot of SOAP rather then REST. If there is any links of documentation or examples of doing SOAP with KRL I would be reall...
TITLE: Kynetx and SOAP QUESTION: I have been searching the web and Kynetx.com for any documetation or examples of how to use SOAP with KRL but have come up with nothing. Sadly the web services I am working with has a lot of SOAP rather then REST. If there is any links of documentation or examples of doing SOAP with KR...
[ "soap", "krl" ]
3
3
60
1
0
2011-05-31T18:47:02.457000
2011-05-31T19:26:10.500000
6,192,075
6,192,393
How to stop an Activity from parent Activity?
_alerts = new Intent(homeActivity,Alertss.class); homeActivity.startActivity(_alerts);......... homeActivity.stopService(_alerts); I need to stop the Activity i created from the object where i created it. I tried it in the way above but it did not work. Can any one suggest me a way to do this.
You can use Activity.startActivityForResult() and then Activity.finishActivity() passing in the same result code you used for starting it. However, this does sound like something that would be better done just as a Dialog.
How to stop an Activity from parent Activity? _alerts = new Intent(homeActivity,Alertss.class); homeActivity.startActivity(_alerts);......... homeActivity.stopService(_alerts); I need to stop the Activity i created from the object where i created it. I tried it in the way above but it did not work. Can any one suggest ...
TITLE: How to stop an Activity from parent Activity? QUESTION: _alerts = new Intent(homeActivity,Alertss.class); homeActivity.startActivity(_alerts);......... homeActivity.stopService(_alerts); I need to stop the Activity i created from the object where i created it. I tried it in the way above but it did not work. Ca...
[ "android" ]
1
1
1,322
1
0
2011-05-31T18:47:21.130000
2011-05-31T19:14:36.137000
6,192,077
6,193,041
JavaScript Object prototype function not available as expected
If you open this JSFiddle, you should see in Firebug/Chrome Dev Tools that an exception is thrown when x.method is called, as method does not exist. However if you run either Object.method or Function.method in the console you'll see that they do indeed exist in their respective prototypes. I'm sure its a simply inheri...
[ note ] jsfiddle seems to be down at the moment, so I couldn't check your code This function: Function.prototype.method = function (name, func) { this.prototype[name] = func; return this; }; adds a method to the Function prototype. An Object is created using a constructor function: a function that, called with the new...
JavaScript Object prototype function not available as expected If you open this JSFiddle, you should see in Firebug/Chrome Dev Tools that an exception is thrown when x.method is called, as method does not exist. However if you run either Object.method or Function.method in the console you'll see that they do indeed exi...
TITLE: JavaScript Object prototype function not available as expected QUESTION: If you open this JSFiddle, you should see in Firebug/Chrome Dev Tools that an exception is thrown when x.method is called, as method does not exist. However if you run either Object.method or Function.method in the console you'll see that ...
[ "javascript", "prototype-programming" ]
1
2
3,059
4
0
2011-05-31T18:47:27.810000
2011-05-31T20:15:07.580000
6,192,084
6,192,124
pass an object to T4 template
I have an object u1 of type User class. User has an attribute name. How can I pass in u1 to a T4 template? I am trying to do something very simple: User u1 = new User("John"); Template script: Hello <# u1.Name #>
Do you wanna use it in your template? Then you need to add a reference to the assembly containing the type. You cannot simply pass existing reference to the T4 engine unless you host it yourself in some highly unorthodox fashion (I've never seen anyone atempting to do this). And even if you went as far and did that how...
pass an object to T4 template I have an object u1 of type User class. User has an attribute name. How can I pass in u1 to a T4 template? I am trying to do something very simple: User u1 = new User("John"); Template script: Hello <# u1.Name #>
TITLE: pass an object to T4 template QUESTION: I have an object u1 of type User class. User has an attribute name. How can I pass in u1 to a T4 template? I am trying to do something very simple: User u1 = new User("John"); Template script: Hello <# u1.Name #> ANSWER: Do you wanna use it in your template? Then you nee...
[ "c#", ".net", "templates", "t4" ]
5
2
2,704
5
0
2011-05-31T18:48:28.667000
2011-05-31T18:51:53.280000
6,192,087
6,192,315
Remove default values from ABAP form
I have a screen for creating new records in a table, it contains a form with all the database columns. Problem is, once the screen is called, it has the last database record in it. So to add a new record, you have to empty the current values first. Any idea how to get rid of this?
The only way that this could happen is if you are selecting values into the fields in the first place. Presumably you have declared the a structure of the same type as the table (possibly with a TABLES statement) in your program and have named the fields the same on the screen, and you are selecting values into the str...
Remove default values from ABAP form I have a screen for creating new records in a table, it contains a form with all the database columns. Problem is, once the screen is called, it has the last database record in it. So to add a new record, you have to empty the current values first. Any idea how to get rid of this?
TITLE: Remove default values from ABAP form QUESTION: I have a screen for creating new records in a table, it contains a form with all the database columns. Problem is, once the screen is called, it has the last database record in it. So to add a new record, you have to empty the current values first. Any idea how to ...
[ "screen", "default", "abap", "dynpro" ]
0
2
2,056
2
0
2011-05-31T18:48:38.237000
2011-05-31T19:09:35.683000
6,192,094
6,192,269
How do I update routes from Rails 2 to Rails 3?
Here are some routes I have in Rails 2 and want to upgrade to Rails 3: map.callback "/auth/:provider/callback",:controller => "authorizations",:action => "create" #omniauth map.failure "/auth/failure",:controller => "authorizations",:action => "failure" #omniauth map.signup 'signup',:controller => 'users',:action => '...
match "/auth/:provider/callback" => "authorizations#create",:as =>:callback match "/auth/failure" => "authorizations#failure",:as =>:failure match "signup" => "users#new",:as =>:signup match "signin" => "user_sessions#new",:as =>:signin match "signout" => "user_sessions#destroy",:as =>:signout That should get you goin...
How do I update routes from Rails 2 to Rails 3? Here are some routes I have in Rails 2 and want to upgrade to Rails 3: map.callback "/auth/:provider/callback",:controller => "authorizations",:action => "create" #omniauth map.failure "/auth/failure",:controller => "authorizations",:action => "failure" #omniauth map.sig...
TITLE: How do I update routes from Rails 2 to Rails 3? QUESTION: Here are some routes I have in Rails 2 and want to upgrade to Rails 3: map.callback "/auth/:provider/callback",:controller => "authorizations",:action => "create" #omniauth map.failure "/auth/failure",:controller => "authorizations",:action => "failure" ...
[ "ruby-on-rails", "ruby-on-rails-3", "routes" ]
0
5
1,901
4
0
2011-05-31T18:48:59.380000
2011-05-31T19:05:44.353000
6,192,102
6,192,190
MySql Numeric Type Migration on InnoDB
We have a very large (10million+) row table stored in MySql using the InnoDB engine. Column 'x' is defined as 'smallint(5) unsigned not null'. Requirements have now changed since the original design a few years ago, and column 'x' needs to store a minimum datatype size of 'int unsigned not null'. We are allowed a "shor...
heres a recipe i've used where you have old column, a create a new column b create a trigger to update b on update/insert on a update b = a drop all fkey relations referencing a create fkey relations for b update code to use column b instead of a (deploy) drop triggers on column a drop column a repeat all steps if you ...
MySql Numeric Type Migration on InnoDB We have a very large (10million+) row table stored in MySql using the InnoDB engine. Column 'x' is defined as 'smallint(5) unsigned not null'. Requirements have now changed since the original design a few years ago, and column 'x' needs to store a minimum datatype size of 'int uns...
TITLE: MySql Numeric Type Migration on InnoDB QUESTION: We have a very large (10million+) row table stored in MySql using the InnoDB engine. Column 'x' is defined as 'smallint(5) unsigned not null'. Requirements have now changed since the original design a few years ago, and column 'x' needs to store a minimum datatyp...
[ "mysql", "database" ]
2
1
100
4
0
2011-05-31T18:49:44.703000
2011-05-31T18:58:49.507000
6,192,106
6,192,277
JSF Project not working under JBoss 6 but working under Tomcat 6
I'm using Eclipse 3.6 SR2, I have a Dynamic Web Project that uses JSF. Using Apache Tomcat 6.0, I'm able to run the project and see it on browser. Then I tried to use JBoss 6.0, but I get HTTP 404 requested resource is not available. I can browse to http://localhost:8080/ ok. I have JBoss Tools 3.2 installed. The proje...
You really need to be much more specific about what "doesn't work". Read the server logs for any startup errors and on. I however guess that this is caused because you didn't tell JBoss that your project already includes the necessary JSF libraries. Full fledged Java EE application servers such as JBoss AS 6 namely shi...
JSF Project not working under JBoss 6 but working under Tomcat 6 I'm using Eclipse 3.6 SR2, I have a Dynamic Web Project that uses JSF. Using Apache Tomcat 6.0, I'm able to run the project and see it on browser. Then I tried to use JBoss 6.0, but I get HTTP 404 requested resource is not available. I can browse to http:...
TITLE: JSF Project not working under JBoss 6 but working under Tomcat 6 QUESTION: I'm using Eclipse 3.6 SR2, I have a Dynamic Web Project that uses JSF. Using Apache Tomcat 6.0, I'm able to run the project and see it on browser. Then I tried to use JBoss 6.0, but I get HTTP 404 requested resource is not available. I c...
[ "eclipse", "jsf", "jboss" ]
1
4
3,377
3
0
2011-05-31T18:50:18.200000
2011-05-31T19:06:32.140000
6,192,112
6,192,491
How to get the main thread in java?
So I have a long running process that I want to encapsulate as a Runnable and dispatch it in a thread. To be more specific, I have a POST web service that creates a file in the file system but the creation of the file can take a very long time. In the resource method of my web service, I want to be able to dispatch a t...
I am not sure whether I get you right. Here is what I understood: You want to preform a possibly long running operation (file creation) you do not want you service method to block while that task is exectued you want the task executed in a thread that exists outside the boundary/lifetime of the single request. Am I rig...
How to get the main thread in java? So I have a long running process that I want to encapsulate as a Runnable and dispatch it in a thread. To be more specific, I have a POST web service that creates a file in the file system but the creation of the file can take a very long time. In the resource method of my web servic...
TITLE: How to get the main thread in java? QUESTION: So I have a long running process that I want to encapsulate as a Runnable and dispatch it in a thread. To be more specific, I have a POST web service that creates a file in the file system but the creation of the file can take a very long time. In the resource metho...
[ "java", "thread-safety" ]
2
4
4,419
3
0
2011-05-31T18:50:49.257000
2011-05-31T19:23:11.267000
6,192,116
6,192,158
Web Security - MVC
So you always hear a bunch of stories about web sites getting popular, and then getting hacked. Basically, I am releasing (as the sole programmer) a website in a few weeks. It's made with MVC2 and it's going to run on the Azure Cloud. I just would like to know which types of things are "hackable" so to speak. What type...
Have you watched the The HaaHa Show: Microsoft ASP.NET MVC Security with Haack and Hanselman? They go through in depth what you should be thinking about and how somebody might atempt to hack your site and what you can do to protect your users. It's a very entertaining session geard at ASP.NET MVC security specifically.
Web Security - MVC So you always hear a bunch of stories about web sites getting popular, and then getting hacked. Basically, I am releasing (as the sole programmer) a website in a few weeks. It's made with MVC2 and it's going to run on the Azure Cloud. I just would like to know which types of things are "hackable" so ...
TITLE: Web Security - MVC QUESTION: So you always hear a bunch of stories about web sites getting popular, and then getting hacked. Basically, I am releasing (as the sole programmer) a website in a few weeks. It's made with MVC2 and it's going to run on the Azure Cloud. I just would like to know which types of things ...
[ ".net", "security", "asp.net-mvc-2", "azure" ]
0
3
732
2
0
2011-05-31T18:50:59.187000
2011-05-31T18:55:23.763000
6,192,122
6,192,157
Does this Android application require a Service/IntentService?
/** Start of pseudocode **/ 1) After a specified delay, the application requests data from a Bluetooth device. 2) The application saves and analyzes the data. 3) IF the analysis results are abnormal, the application sets off an alarm and returns to step 1) with a shortened delay. ELSE the application returns to step 1)...
Yes, services are designed exactly for that: asynchronous tasks that can take a long time and need to keep running even when the activity is closed.
Does this Android application require a Service/IntentService? /** Start of pseudocode **/ 1) After a specified delay, the application requests data from a Bluetooth device. 2) The application saves and analyzes the data. 3) IF the analysis results are abnormal, the application sets off an alarm and returns to step 1) ...
TITLE: Does this Android application require a Service/IntentService? QUESTION: /** Start of pseudocode **/ 1) After a specified delay, the application requests data from a Bluetooth device. 2) The application saves and analyzes the data. 3) IF the analysis results are abnormal, the application sets off an alarm and r...
[ "android", "bluetooth", "android-intent", "android-service" ]
0
1
786
3
0
2011-05-31T18:51:38.453000
2011-05-31T18:55:19.787000
6,192,131
6,223,287
Conversion of Blob to UIImage from a Sqlite Database
I saved an image using Coredata in my application. Then i imported the Sqlite file in another project and retrieved that Blob field and converted to NSData. Then i got a NULL value when trying to convert this NSData to UIImage. NSData *data=UIImageJPEGRepresentation(tempImage, 1.0); saved the above data by saving conte...
The code you are writing is correct. Difference I found in your code and some other code on internet is: You use: UIImageJPEGRepresentation(tempImage, 1.0); They use: UIImagePNGRepresentation(self.coffeeImage); Though this is not the correct solution of your question but though It may help you to investigate further in...
Conversion of Blob to UIImage from a Sqlite Database I saved an image using Coredata in my application. Then i imported the Sqlite file in another project and retrieved that Blob field and converted to NSData. Then i got a NULL value when trying to convert this NSData to UIImage. NSData *data=UIImageJPEGRepresentation(...
TITLE: Conversion of Blob to UIImage from a Sqlite Database QUESTION: I saved an image using Coredata in my application. Then i imported the Sqlite file in another project and retrieved that Blob field and converted to NSData. Then i got a NULL value when trying to convert this NSData to UIImage. NSData *data=UIImageJ...
[ "iphone", "sqlite", "uiimage", "blob" ]
2
0
1,846
1
0
2011-05-31T18:52:30.133000
2011-06-03T05:23:16.650000
6,192,135
6,193,031
Language Redirect with mod_rewrite
I have a site that is offered in 7 languages. I want to be able to redirect the user based on the browser language only when the user is visiting the homepage. This is meant for added usability when it comes to organic traffic. I need this redirect to only apply to the homepage as the site also sends out mailers specif...
Since you only want to redirect while on your homepage, you can do like this (assumging www.xyz.com is your home page) RewriteCond %{HTTP:HOST} www.xyz.com // user visiting default RewriteCond %{HTTP:Accept-Language} ^de [NC] // browser language German RewriteRule ^$ de.xyz.com [L,R=301] // R=302 if you need temporary ...
Language Redirect with mod_rewrite I have a site that is offered in 7 languages. I want to be able to redirect the user based on the browser language only when the user is visiting the homepage. This is meant for added usability when it comes to organic traffic. I need this redirect to only apply to the homepage as the...
TITLE: Language Redirect with mod_rewrite QUESTION: I have a site that is offered in 7 languages. I want to be able to redirect the user based on the browser language only when the user is visiting the homepage. This is meant for added usability when it comes to organic traffic. I need this redirect to only apply to t...
[ ".htaccess", "mod-rewrite", "redirect" ]
3
7
5,786
2
0
2011-05-31T18:53:08.943000
2011-05-31T20:14:19.723000
6,192,137
6,192,354
How to write this regular expression in Lua?
I need to write the Lua equivalent of the following regular expression (regex) \b[0-9]*.\b[0-9]*(?!]) for use with Lua's string.gmatch. Can this be done? For reference, the above expression matches both the integer and fractional part of a number containing a decimal separator (e.g. 1, 1.1, 0.1, 0.11 all match fully). ...
Lua does not have regular expressions, mainly because a full regular expression library would be bigger than Lua itself. What Lua has instead are matching patterns, which are way less powerful (but still sufficient for many use cases): There is no "word boundary" matcher, no alternatives, and also no lookahead or simil...
How to write this regular expression in Lua? I need to write the Lua equivalent of the following regular expression (regex) \b[0-9]*.\b[0-9]*(?!]) for use with Lua's string.gmatch. Can this be done? For reference, the above expression matches both the integer and fractional part of a number containing a decimal separat...
TITLE: How to write this regular expression in Lua? QUESTION: I need to write the Lua equivalent of the following regular expression (regex) \b[0-9]*.\b[0-9]*(?!]) for use with Lua's string.gmatch. Can this be done? For reference, the above expression matches both the integer and fractional part of a number containing...
[ "regex", "lua", "pattern-matching" ]
17
20
45,266
2
0
2011-05-31T18:53:15.840000
2011-05-31T19:11:48.570000
6,192,138
6,192,214
Function to apply arbitrary functions in R
How would one implement in R the function apply.func(func, arg.list), which takes an arbitrary function func and a suitable list arg.list as arguments, and returns the result of calling func with the arguments contained in arg.list. E.g. apply.func(foo, list(x="A", y=1, z=TRUE)) is equivalent to foo(x="A", y=1, z=TRUE)...
I think do.call is what you're looking for. You can read about it via?do.call. The classic example of how folks use do.call is to rbind data frames or matrices together: d1 <- data.frame(x = 1:5,y = letters[1:5]) d2 <- data.frame(x = 6:10,y = letters[6:10]) do.call(rbind,list(d1,d2)) Here's another fairly trivial exam...
Function to apply arbitrary functions in R How would one implement in R the function apply.func(func, arg.list), which takes an arbitrary function func and a suitable list arg.list as arguments, and returns the result of calling func with the arguments contained in arg.list. E.g. apply.func(foo, list(x="A", y=1, z=TRUE...
TITLE: Function to apply arbitrary functions in R QUESTION: How would one implement in R the function apply.func(func, arg.list), which takes an arbitrary function func and a suitable list arg.list as arguments, and returns the result of calling func with the arguments contained in arg.list. E.g. apply.func(foo, list(...
[ "r" ]
7
17
796
2
0
2011-05-31T18:53:34.187000
2011-05-31T19:00:54.217000
6,192,143
6,192,176
help with regex
From the string [foo](bar) I want to extract the foo and the bar part: Pattern p = Pattern.compile("\\[(.*)\\]\\((.*)\\)"); String input = "[foo](bar)"; assert p.matcher(input).matches(); String[] a =??? // should be initialized to {"foo", "bar"} What do I write in the fourth line to obtain foo and bar from the input?
This should get you close to where you wanna be: Pattern p = Pattern.compile("\\[(.*)\\]\\((.*)\\)"); String input = "[foo](bar)"; Matcher m = p.matcher(input); if (m.find()){ String[] a = { m.group(1), m.group(2) }; } Essentially, you will create a Matcher. Then use find() to locate the match. Then you will use the gr...
help with regex From the string [foo](bar) I want to extract the foo and the bar part: Pattern p = Pattern.compile("\\[(.*)\\]\\((.*)\\)"); String input = "[foo](bar)"; assert p.matcher(input).matches(); String[] a =??? // should be initialized to {"foo", "bar"} What do I write in the fourth line to obtain foo and bar ...
TITLE: help with regex QUESTION: From the string [foo](bar) I want to extract the foo and the bar part: Pattern p = Pattern.compile("\\[(.*)\\]\\((.*)\\)"); String input = "[foo](bar)"; assert p.matcher(input).matches(); String[] a =??? // should be initialized to {"foo", "bar"} What do I write in the fourth line to o...
[ "java", "regex" ]
2
4
104
2
0
2011-05-31T18:54:07.157000
2011-05-31T18:57:21.273000
6,192,149
6,192,282
CakePHP user session not updating but database yes
I'm developing with cakePhP and I have the following problem: When a user logs in with his name and password to the account system that I've created, he can save items (images) as favorites. This is saved in a text field into the database. What is saved is the image ID. The saving process works perfectly, the user clic...
When you save, the array passed to the save method of the model should look like this: [User] => array( [field] => value, [field2] => value2,... ) In your example, you clearly haven't added the [User] key. Also, is your modified field actually the default Cake modified field? That is, the DATETIME field which changes t...
CakePHP user session not updating but database yes I'm developing with cakePhP and I have the following problem: When a user logs in with his name and password to the account system that I've created, he can save items (images) as favorites. This is saved in a text field into the database. What is saved is the image ID...
TITLE: CakePHP user session not updating but database yes QUESTION: I'm developing with cakePhP and I have the following problem: When a user logs in with his name and password to the account system that I've created, he can save items (images) as favorites. This is saved in a text field into the database. What is sav...
[ "database", "session", "cakephp" ]
0
0
715
2
0
2011-05-31T18:54:38.853000
2011-05-31T19:06:45.023000
6,192,151
6,192,182
LINQ2SQL distinct count and sort
I have a list of: a,b,c Using LINQ2SQL I want a list of: a,b,count(a,b) sorted by a,b where intArray.Contains(c) The output can be groups of a, thats no problem. To explain a bit further: SELECT a,b,c FROM TABLE WHERE c=1 would give me a list of a,b,c. I don't care about c, but I'm interesting in a distinct list of a,b...
from data in context.Data group data by new { data.A, data.B, } into dg orderby dg.Key.A, dg.Key.B select new { dg.Key.A, dg.Key.B, dg.Count() }
LINQ2SQL distinct count and sort I have a list of: a,b,c Using LINQ2SQL I want a list of: a,b,count(a,b) sorted by a,b where intArray.Contains(c) The output can be groups of a, thats no problem. To explain a bit further: SELECT a,b,c FROM TABLE WHERE c=1 would give me a list of a,b,c. I don't care about c, but I'm inte...
TITLE: LINQ2SQL distinct count and sort QUESTION: I have a list of: a,b,c Using LINQ2SQL I want a list of: a,b,count(a,b) sorted by a,b where intArray.Contains(c) The output can be groups of a, thats no problem. To explain a bit further: SELECT a,b,c FROM TABLE WHERE c=1 would give me a list of a,b,c. I don't care abo...
[ "c#", "linq-to-sql" ]
3
0
200
1
0
2011-05-31T18:54:50.207000
2011-05-31T18:58:03.500000
6,192,162
6,192,338
php speed vs. mysql speed
I'm making a feeds aggregator using php and mysql. And writting a paper about it which must contain math. I have a table feeds (id, title, description, link) where id is the primary key. When I collect new feeds I need to add them to the database, but I must not let any duplicates in. I see two ways to do that: 1) for ...
have you considered using a composite unique index instead? alter table feeds add unique index(title, description); this would prevent adding new rows when title and description taken together are already present in the table. you would have to do large number of inserts in a large database to really get performance va...
php speed vs. mysql speed I'm making a feeds aggregator using php and mysql. And writting a paper about it which must contain math. I have a table feeds (id, title, description, link) where id is the primary key. When I collect new feeds I need to add them to the database, but I must not let any duplicates in. I see tw...
TITLE: php speed vs. mysql speed QUESTION: I'm making a feeds aggregator using php and mysql. And writting a paper about it which must contain math. I have a table feeds (id, title, description, link) where id is the primary key. When I collect new feeds I need to add them to the database, but I must not let any dupli...
[ "php", "mysql", "performance" ]
0
0
321
5
0
2011-05-31T18:55:56.840000
2011-05-31T19:10:51.910000
6,192,163
6,192,549
Is this code an exploit? What is this code?
I'm looking at a site that has been exploited by someone/something. The site has had a bunch of links injected into it's footer that links to pharmaceutical pitches, and who knows what else. There are/were a lot of links right at the top of the footer. I can only find these now, on the cached pages in the Yahoo index. ...
here's the unobfuscated script (more or less) it's just dumping the contents of this url onto your page it also checks the remote_addr against a list of IPs (google, et al) to try to remain undetected. looks like you're being attaced by genshop.com
Is this code an exploit? What is this code? I'm looking at a site that has been exploited by someone/something. The site has had a bunch of links injected into it's footer that links to pharmaceutical pitches, and who knows what else. There are/were a lot of links right at the top of the footer. I can only find these n...
TITLE: Is this code an exploit? What is this code? QUESTION: I'm looking at a site that has been exploited by someone/something. The site has had a bunch of links injected into it's footer that links to pharmaceutical pitches, and who knows what else. There are/were a lot of links right at the top of the footer. I can...
[ "php", "exploit", "shellcode" ]
5
2
996
3
0
2011-05-31T18:55:59.807000
2011-05-31T19:28:45.383000
6,192,177
6,200,205
Redis Pub/Sub with Reliability
I've been looking at using Redis Pub/Sub as a replacement to RabbitMQ. From my understanding Redis's pub/sub holds a persistent connection to each of the subscribers, and if the connection is terminated, all future messages will be lost and dropped on the floor. One possible solution is to use a list (and blocking wait...
When a subscriber (consumer) dies, your list will continue to grow until the client returns. Your producer could trim the list (from either side) once it reaches a specific limit, but that is something you would need to handle at the application level. If you include a timestamp within each message, your consumer can t...
Redis Pub/Sub with Reliability I've been looking at using Redis Pub/Sub as a replacement to RabbitMQ. From my understanding Redis's pub/sub holds a persistent connection to each of the subscribers, and if the connection is terminated, all future messages will be lost and dropped on the floor. One possible solution is t...
TITLE: Redis Pub/Sub with Reliability QUESTION: I've been looking at using Redis Pub/Sub as a replacement to RabbitMQ. From my understanding Redis's pub/sub holds a persistent connection to each of the subscribers, and if the connection is terminated, all future messages will be lost and dropped on the floor. One poss...
[ "redis" ]
62
43
39,845
3
0
2011-05-31T18:57:36.027000
2011-06-01T11:10:13.490000
6,192,189
6,192,293
How to make sure my local svn copy is the same as a particular branch revision?
coUp $HADOOP_HOME 1041718 "http://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-append" I've written the following bash function to checkout a copy of hadoop if it doesn't exist already, or otherwise make sure it's the same as a checkout. However when the update command is executed against an unmodified c...
it works fine, I had some path issues (what's the smiley for embarressment?)
How to make sure my local svn copy is the same as a particular branch revision? coUp $HADOOP_HOME 1041718 "http://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-append" I've written the following bash function to checkout a copy of hadoop if it doesn't exist already, or otherwise make sure it's the same as...
TITLE: How to make sure my local svn copy is the same as a particular branch revision? QUESTION: coUp $HADOOP_HOME 1041718 "http://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-append" I've written the following bash function to checkout a copy of hadoop if it doesn't exist already, or otherwise make sur...
[ "svn" ]
0
0
60
1
0
2011-05-31T18:58:46.073000
2011-05-31T19:07:53.010000
6,192,207
6,192,956
Deleting Dynamically Populated images from a Directory (NOT GridView) ASP.NET (VB)
The code below displays a thumbnail of each image in a specific server directory and when I click on the image it pops up a nice full sized picture. It works perfectly. I would however, like to be able to delete an image. I first thought I could have a button at the bottom of the page with a checkbox next to each image...
OK what Kendrick is talking about (basically) is using server side controls to keep track of which file to delete. What you are doing right now is dumping markup into a Label control, which on postback won't fire an event on the server side. However you can accomplish this easily with server side controls. The basic id...
Deleting Dynamically Populated images from a Directory (NOT GridView) ASP.NET (VB) The code below displays a thumbnail of each image in a specific server directory and when I click on the image it pops up a nice full sized picture. It works perfectly. I would however, like to be able to delete an image. I first thought...
TITLE: Deleting Dynamically Populated images from a Directory (NOT GridView) ASP.NET (VB) QUESTION: The code below displays a thumbnail of each image in a specific server directory and when I click on the image it pops up a nice full sized picture. It works perfectly. I would however, like to be able to delete an imag...
[ "asp.net", "vb.net", "server.mappath" ]
1
2
641
2
0
2011-05-31T19:00:00.973000
2011-05-31T20:08:24.173000
6,192,212
6,205,056
Magento 1.5.1 getting product images using php
This code gets contents(images) in a magento store. It is able to fetch images for magento 1.4x - 1.5 I tried it in 1.5.1 and it seems it cannot fetch the images. Is it located in "media/catalog/product"? Any help in getting the location of magento 1.5.1 images? Thanks. getCollection(); $products->addAttributeToSelect(...
getCollection(); $products->addAttributeToSelect('thumbnail'); $products->load(); $product = $products->getData('thumbnail'); $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); $myImage = $baseUrl."media/catalog/product". $product[2]['thumbnail']; print $myImage;?> Obviously you'll want to loop over th...
Magento 1.5.1 getting product images using php This code gets contents(images) in a magento store. It is able to fetch images for magento 1.4x - 1.5 I tried it in 1.5.1 and it seems it cannot fetch the images. Is it located in "media/catalog/product"? Any help in getting the location of magento 1.5.1 images? Thanks. ge...
TITLE: Magento 1.5.1 getting product images using php QUESTION: This code gets contents(images) in a magento store. It is able to fetch images for magento 1.4x - 1.5 I tried it in 1.5.1 and it seems it cannot fetch the images. Is it located in "media/catalog/product"? Any help in getting the location of magento 1.5.1 ...
[ "magento", "magento-1.4" ]
0
0
1,610
1
0
2011-05-31T19:00:37.060000
2011-06-01T17:08:59.733000
6,192,218
6,193,385
Delete everything in a reposity to recommit
I have a repository that has a lot of issues with it. A bunch of files were moved/names changed/ ect. Committing these throws an error. What I want to do is fully delete everything in the repository so that I can recommit the project with the correct files/names/locations ect. To do this I tried updating the project th...
What about this idea: Make a patch file of all your changes (in Eclipse this is utterly easy). Then get a fresh version of your repo in another sandbox folder. Then apply your patch file changes there. Then try to commit your changes in the updated version of your repo. That ought to work.
Delete everything in a reposity to recommit I have a repository that has a lot of issues with it. A bunch of files were moved/names changed/ ect. Committing these throws an error. What I want to do is fully delete everything in the repository so that I can recommit the project with the correct files/names/locations ect...
TITLE: Delete everything in a reposity to recommit QUESTION: I have a repository that has a lot of issues with it. A bunch of files were moved/names changed/ ect. Committing these throws an error. What I want to do is fully delete everything in the repository so that I can recommit the project with the correct files/n...
[ "svn", "tortoisesvn" ]
1
2
350
1
0
2011-05-31T19:01:06.870000
2011-05-31T20:49:24.200000
6,192,220
6,192,520
ActionScript 3 Bindable MetaData Tag without Flex?
I am just just curious as to whether the [Bindable] metadata tag in ActionScript 3 can only be used within the Flex framework, or can it be used in "regular" ActionScript projects where Flex isn't used? Thank you for your time.
According to this it can be used only in the Flex framework. But there are ways to to have the same functionality in pure AS3. Off-topic: why there is a php tag on this question?
ActionScript 3 Bindable MetaData Tag without Flex? I am just just curious as to whether the [Bindable] metadata tag in ActionScript 3 can only be used within the Flex framework, or can it be used in "regular" ActionScript projects where Flex isn't used? Thank you for your time.
TITLE: ActionScript 3 Bindable MetaData Tag without Flex? QUESTION: I am just just curious as to whether the [Bindable] metadata tag in ActionScript 3 can only be used within the Flex framework, or can it be used in "regular" ActionScript projects where Flex isn't used? Thank you for your time. ANSWER: According to t...
[ "flash", "apache-flex", "actionscript-3", "actionscript" ]
3
2
560
1
0
2011-05-31T19:01:07.103000
2011-05-31T19:26:20.487000
6,192,221
6,192,245
Reason to use BOTH abstract classes and interfaces? (Abstract class implements interface)
Recently I have come across a curious pattern in some code. We know that there is a time and a place for everything, especially when it comes to the issue of ABCs and interfaces, but this just seems redundant to me. // This describes a person.... public interface IPerson { public string FirstName { get; set; } public s...
Personally, I feel that using an interface to describe a "noun", such as a person, it typically a poor design choice. Interfaces should be used for contracts - all people are always a Person, so an abstract class makes more sense here. Interfaces could be added for behaviors attached to specific types of people, or to ...
Reason to use BOTH abstract classes and interfaces? (Abstract class implements interface) Recently I have come across a curious pattern in some code. We know that there is a time and a place for everything, especially when it comes to the issue of ABCs and interfaces, but this just seems redundant to me. // This descri...
TITLE: Reason to use BOTH abstract classes and interfaces? (Abstract class implements interface) QUESTION: Recently I have come across a curious pattern in some code. We know that there is a time and a place for everything, especially when it comes to the issue of ABCs and interfaces, but this just seems redundant to ...
[ "c#", "oop", "interface", "abstract-class" ]
28
21
9,952
14
0
2011-05-31T19:01:07.700000
2011-05-31T19:03:38.367000
6,192,230
6,192,272
Help with macro functions
Given many inline functions with identical signatures. All functions are small and performance critical. int inline f1(int); int inline f2(int);... int inline f5(int); I need to write high level functions to automate certain tasks - one high level function per each inline function. n-th high level function uses only n-...
Why not use templates? template int inline f(int); template <> int inline f<1>(int); template <> int inline f<2>(int); template <> int inline f<3>(int);... template int F(int x) { int y; y = x * f (x); return y; } Edit: If it should work in C, use a macro like this: #define GENERATE_FUNCTION(n) \ int F_ ## n(int x)...
Help with macro functions Given many inline functions with identical signatures. All functions are small and performance critical. int inline f1(int); int inline f2(int);... int inline f5(int); I need to write high level functions to automate certain tasks - one high level function per each inline function. n-th high l...
TITLE: Help with macro functions QUESTION: Given many inline functions with identical signatures. All functions are small and performance critical. int inline f1(int); int inline f2(int);... int inline f5(int); I need to write high level functions to automate certain tasks - one high level function per each inline fun...
[ "c++", "c", "macros" ]
2
10
194
3
0
2011-05-31T19:02:00.410000
2011-05-31T19:06:03.360000
6,192,234
6,192,345
JSF: Selecting value in one drop down enables another drop down
Lets say I have two selectOneMenu drop-downs: Drop-down A: Drop-down B: How can I make sure that drop down B is disabled until a user selects a value in drop down A? I can make a method within the JavaClass that returns true or false depending on if a value in drop-down A has been selected or not, but is there any way ...
I have no idea what JSF/RF versions you are using, so here's just a generic answer. Bind the value of the 1st dropdown to a bean property: Then let the disabled attribute of the 2nd dropdown intercept on that: Note that with JSF2/RF4 you don't need the valueChangeListener / immediate hacks which are been used in old aj...
JSF: Selecting value in one drop down enables another drop down Lets say I have two selectOneMenu drop-downs: Drop-down A: Drop-down B: How can I make sure that drop down B is disabled until a user selects a value in drop down A? I can make a method within the JavaClass that returns true or false depending on if a valu...
TITLE: JSF: Selecting value in one drop down enables another drop down QUESTION: Lets say I have two selectOneMenu drop-downs: Drop-down A: Drop-down B: How can I make sure that drop down B is disabled until a user selects a value in drop down A? I can make a method within the JavaClass that returns true or false depe...
[ "java", "jsf", "richfaces" ]
1
2
3,898
2
0
2011-05-31T19:02:15.370000
2011-05-31T19:11:23.327000
6,192,237
6,207,661
Can one model be passed through multiple editor templates?
I'm trying to display a view model using an editor template that wraps the model in a fieldset before applying a base Object editor template. My view: @model Mvc3VanillaApplication.Models.ContactModel @using (Html.BeginForm()) { @Html.EditorForModel("Fieldset") } Uses a fieldset template (Views/Shared/EditorTemplates/...
I implemented what you have, and was able to reproduce it. I set a break point in Object.cshtml so I could inspect it and I was caught off guard to realize that it wasn't even hitting the object template when the fieldset template was being used. Then I stepped through the fieldset template and saw it was calling the t...
Can one model be passed through multiple editor templates? I'm trying to display a view model using an editor template that wraps the model in a fieldset before applying a base Object editor template. My view: @model Mvc3VanillaApplication.Models.ContactModel @using (Html.BeginForm()) { @Html.EditorForModel("Fieldset"...
TITLE: Can one model be passed through multiple editor templates? QUESTION: I'm trying to display a view model using an editor template that wraps the model in a fieldset before applying a base Object editor template. My view: @model Mvc3VanillaApplication.Models.ContactModel @using (Html.BeginForm()) { @Html.EditorF...
[ "asp.net-mvc", "razor" ]
7
5
2,292
2
0
2011-05-31T19:02:43.717000
2011-06-01T21:04:11.740000
6,192,238
6,212,238
Change TextMate live webpreview to use Chrome's Webkit
Currently Textmate uses Safari's Webkit to render the hmlt outputs for both commands and the live webpreview window. Unfortunately for one specific project I am working with specific javascript API supported only be Firefox's gecko or Chrome's Webkit, it seems Safari still not supporting it. Perhaps there's a way to gl...
A support member of TextMate kindly answered my email asking for it by mentioning this url which definitely points to the right solution. I really didn't think it could be done so seamlessly and now I am very happy that it is possible. Basically there are few steps to follow: $ cd /Applications/TextMate.app/Contents/Ma...
Change TextMate live webpreview to use Chrome's Webkit Currently Textmate uses Safari's Webkit to render the hmlt outputs for both commands and the live webpreview window. Unfortunately for one specific project I am working with specific javascript API supported only be Firefox's gecko or Chrome's Webkit, it seems Safa...
TITLE: Change TextMate live webpreview to use Chrome's Webkit QUESTION: Currently Textmate uses Safari's Webkit to render the hmlt outputs for both commands and the live webpreview window. Unfortunately for one specific project I am working with specific javascript API supported only be Firefox's gecko or Chrome's Web...
[ "webkit", "textmate", "preview", "chromium" ]
0
3
708
2
0
2011-05-31T19:02:51.143000
2011-06-02T08:38:32.893000
6,192,242
6,193,100
Lucene.NET stemming problem
I'm running into a problem using the SnowBallAnalyzer in Lucene.NET. It works great for some words, but others it doesn't find any results on at all, and I'm not sure how to dig into this further to find out what is happening. I am testing the search on the USDA Food Description file which can be found here (http://www...
Are you sure you used Lucene.Net.Analysis.Snowball.SnowballAnalyzer("English") to write your index? You have to use the same analyzer to write and query the index.
Lucene.NET stemming problem I'm running into a problem using the SnowBallAnalyzer in Lucene.NET. It works great for some words, but others it doesn't find any results on at all, and I'm not sure how to dig into this further to find out what is happening. I am testing the search on the USDA Food Description file which c...
TITLE: Lucene.NET stemming problem QUESTION: I'm running into a problem using the SnowBallAnalyzer in Lucene.NET. It works great for some words, but others it doesn't find any results on at all, and I'm not sure how to dig into this further to find out what is happening. I am testing the search on the USDA Food Descri...
[ "lucene.net", "stemming" ]
5
5
3,188
1
0
2011-05-31T19:03:21.890000
2011-05-31T20:20:24.397000
6,192,246
6,192,280
How to update T-SQL record and ignoring UPDATE on parameters where NULL
Is there a way to create UPDATE stored_procedure with parameters like: @param1 int = null, @param2 int = null, @param3 nvarchar(255) = null, @param4 bit = null, @id int and with UPDATE statement which will update only fields which are not NULL so if I execute spUpdateProcedure @param1=255, @id=1 if will update record @...
UPDATE YourTable SET Column1 = COALESCE(@param1, Column1), Column2 = COALESCE(@param2, Column2),... WHERE id = @id
How to update T-SQL record and ignoring UPDATE on parameters where NULL Is there a way to create UPDATE stored_procedure with parameters like: @param1 int = null, @param2 int = null, @param3 nvarchar(255) = null, @param4 bit = null, @id int and with UPDATE statement which will update only fields which are not NULL so i...
TITLE: How to update T-SQL record and ignoring UPDATE on parameters where NULL QUESTION: Is there a way to create UPDATE stored_procedure with parameters like: @param1 int = null, @param2 int = null, @param3 nvarchar(255) = null, @param4 bit = null, @id int and with UPDATE statement which will update only fields which...
[ "t-sql", "stored-procedures" ]
4
5
833
2
0
2011-05-31T19:03:41.003000
2011-05-31T19:06:36.370000
6,192,249
6,192,580
viewWillAppear and viewDidLoad for presenting login popup
I have a UIViewController in which it should pop up a LoginViewController if a user is not yet login. The question is where should I call this: LoginViewController* lvc = [[LoginViewController alloc] init]; lvc.delegate = self; //[lvc setModalPresentationStyle:UIModalPresentationFullScreen]; [self presentModalViewContr...
The modal window tries to initialize itself with respect to the view controller that called it (resizing the nib, for example). Creating and displaying it in its parent's viewDidLoad can sometimes give it wrong information since the parent is still itself loading. This is why you are seeing discrepancies. Presenting th...
viewWillAppear and viewDidLoad for presenting login popup I have a UIViewController in which it should pop up a LoginViewController if a user is not yet login. The question is where should I call this: LoginViewController* lvc = [[LoginViewController alloc] init]; lvc.delegate = self; //[lvc setModalPresentationStyle:U...
TITLE: viewWillAppear and viewDidLoad for presenting login popup QUESTION: I have a UIViewController in which it should pop up a LoginViewController if a user is not yet login. The question is where should I call this: LoginViewController* lvc = [[LoginViewController alloc] init]; lvc.delegate = self; //[lvc setModalP...
[ "iphone", "objective-c", "ipad", "uiviewcontroller" ]
4
0
2,623
2
0
2011-05-31T19:03:51.347000
2011-05-31T19:31:31.703000
6,192,250
6,202,632
talend take out zeros before the comma
I have a file with two columns the first one with a name and the second one with a number. The size of the number column is 20 chars, the numbers use to be less than 2 chars size the rest of the chars are complite with 0. I need to take out all the zeros before the comma. I should use a tMap, How?
The solution: Using a tMap, put a Var in the midle of both files (Input and output). In the var use: "0"+row1.numberField.split(",")[0].replace("0", "") + "." + row1.numberField.split(",")[1] Example: 000000001,58 Result: 01.58 Solution 2: Define your own routine: public static String calcImp(String theNumber) { Float ...
talend take out zeros before the comma I have a file with two columns the first one with a name and the second one with a number. The size of the number column is 20 chars, the numbers use to be less than 2 chars size the rest of the chars are complite with 0. I need to take out all the zeros before the comma. I should...
TITLE: talend take out zeros before the comma QUESTION: I have a file with two columns the first one with a name and the second one with a number. The size of the number column is 20 chars, the numbers use to be less than 2 chars size the rest of the chars are complite with 0. I need to take out all the zeros before t...
[ "etl", "talend" ]
0
1
670
1
0
2011-05-31T19:03:55.747000
2011-06-01T14:15:46.693000
6,192,265
6,193,082
Send log messages from all celery tasks to a single file
I'm wondering how to setup a more specific logging system. All my tasks use logger = logging.getLogger(__name__) as a module-wide logger. I want celery to log to "celeryd.log" and my tasks to "tasks.log" but I got no idea how to get this working. Using CELERYD_LOG_FILE from django-celery I can route all celeryd related...
Note: This answer is outdated as of Celery 3.0, where you now use get_task_logger() to get your per-task logger set up. Please see the Logging section of the What's new in Celery 3.0 document for details. Celery has dedicated support for logging, per task. See the Task documentation on the subject: You can use the work...
Send log messages from all celery tasks to a single file I'm wondering how to setup a more specific logging system. All my tasks use logger = logging.getLogger(__name__) as a module-wide logger. I want celery to log to "celeryd.log" and my tasks to "tasks.log" but I got no idea how to get this working. Using CELERYD_LO...
TITLE: Send log messages from all celery tasks to a single file QUESTION: I'm wondering how to setup a more specific logging system. All my tasks use logger = logging.getLogger(__name__) as a module-wide logger. I want celery to log to "celeryd.log" and my tasks to "tasks.log" but I got no idea how to get this working...
[ "python", "logging", "celery", "python-logging" ]
69
103
68,989
3
0
2011-05-31T19:05:00.893000
2011-05-31T20:19:04.023000
6,192,268
6,192,330
Elegant clean way to include HTML in JavaScript files?
I'm building a small app with a few modal dialog windows. The windows require a tiny bit of HTML. I've hard coded the window HTML in the javascript library but am not thrilled with this solution. Is there a more elegant way to do this? It seems that JavaScript doesn't have multi line strings/heredoc syntax. var html = ...
Templates. Pick your poison EJS jQuery templates (nb: development discontinued ) underscore templates mustache jResig micro templates Either inline them as script blocks or load them using ajax as external resources. I personally use EJS as external template files and just get EJS to load them and inject them into a co...
Elegant clean way to include HTML in JavaScript files? I'm building a small app with a few modal dialog windows. The windows require a tiny bit of HTML. I've hard coded the window HTML in the javascript library but am not thrilled with this solution. Is there a more elegant way to do this? It seems that JavaScript does...
TITLE: Elegant clean way to include HTML in JavaScript files? QUESTION: I'm building a small app with a few modal dialog windows. The windows require a tiny bit of HTML. I've hard coded the window HTML in the javascript library but am not thrilled with this solution. Is there a more elegant way to do this? It seems th...
[ "javascript", "jquery" ]
29
16
43,412
7
0
2011-05-31T19:05:29.643000
2011-05-31T19:10:31.767000
6,192,285
6,198,033
MongoDb with php on windows 7 64 bits
I installed wampserver, and mongodb both up and running i installed the mongodb extension PHP 5.3 VC6 Thread-Safe Mongo extension and added php_mongo.dll extension to php.ini, restarted the server but it won't show up in phpinfo() and of course it won;t work. Where did i skip a step?
PHP x86 or x64? Look at "Architecture" in phpinfo. Official drivers doesn't work with Apache + PHP x64. Look at this post: http://groups.google.com/group/mongodb-user/browse_thread/thread/1d2cecd9734e54fc/ff785888cb8e2c39?lnk=gst&q=x64#ff785888cb8e2c39
MongoDb with php on windows 7 64 bits I installed wampserver, and mongodb both up and running i installed the mongodb extension PHP 5.3 VC6 Thread-Safe Mongo extension and added php_mongo.dll extension to php.ini, restarted the server but it won't show up in phpinfo() and of course it won;t work. Where did i skip a ste...
TITLE: MongoDb with php on windows 7 64 bits QUESTION: I installed wampserver, and mongodb both up and running i installed the mongodb extension PHP 5.3 VC6 Thread-Safe Mongo extension and added php_mongo.dll extension to php.ini, restarted the server but it won't show up in phpinfo() and of course it won;t work. Wher...
[ "php", "windows-7", "64-bit", "mongodb" ]
3
4
5,890
4
0
2011-05-31T19:07:15.137000
2011-06-01T08:02:10.370000
6,192,289
6,192,390
Global Search and Replace throughout Flex Project files?
Is there a way to do a search and replace across multiple files in a single project? thanks, Mark
Ctrl+Shift+F -> Enter 'Containing text', select 'Enclosing projects', Click 'Replace' button, enter replacement text.
Global Search and Replace throughout Flex Project files? Is there a way to do a search and replace across multiple files in a single project? thanks, Mark
TITLE: Global Search and Replace throughout Flex Project files? QUESTION: Is there a way to do a search and replace across multiple files in a single project? thanks, Mark ANSWER: Ctrl+Shift+F -> Enter 'Containing text', select 'Enclosing projects', Click 'Replace' button, enter replacement text.
[ "apache-flex", "flex4", "flash-builder" ]
0
0
1,185
2
0
2011-05-31T19:07:47.680000
2011-05-31T19:14:17.883000
6,192,290
6,192,417
Shift select table rows
I know this question has been asked a lot but there is really no definite answer that I can find. Here is my code. Basically I have everything set up. I'm just lost on where to get the rows of a table by index. I've tried the.index function but I that's not working. I'm trying to do something like $('#pkgLineTable').in...
instead of for (var i = start; i < end; i++) { //$(this).parent().parent().addClass('row_selected'); } use table.find('tr:gt('+(start-1)+'):lt('+(end)+')').addClass('row_selected');
Shift select table rows I know this question has been asked a lot but there is really no definite answer that I can find. Here is my code. Basically I have everything set up. I'm just lost on where to get the rows of a table by index. I've tried the.index function but I that's not working. I'm trying to do something li...
TITLE: Shift select table rows QUESTION: I know this question has been asked a lot but there is really no definite answer that I can find. Here is my code. Basically I have everything set up. I'm just lost on where to get the rows of a table by index. I've tried the.index function but I that's not working. I'm trying ...
[ "javascript", "jquery" ]
2
5
3,267
1
0
2011-05-31T19:07:48.570000
2011-05-31T19:16:16.720000
6,192,292
6,192,363
Excluding objects when print_r()ing variables in a custom logger
I have Logger-Class which is logging everything. Objects will be logged with print_r to a human-readable state. My Problem is that I have a big MVC-Object. Everytime an Exception or Error occurs, the MVC-Object will also be printed in the Log by print_r. This results in a very very long Logfile that is not really frien...
__toString() is called, when the object is casted to a string. You may try something like $objectString = method_exists($object, '__toString')? (string) $object: print_r($object, true); Use is_object() to find out, if a value is an object or not. At all $string =!is_object($value) || method_exists($value, '__toString')...
Excluding objects when print_r()ing variables in a custom logger I have Logger-Class which is logging everything. Objects will be logged with print_r to a human-readable state. My Problem is that I have a big MVC-Object. Everytime an Exception or Error occurs, the MVC-Object will also be printed in the Log by print_r. ...
TITLE: Excluding objects when print_r()ing variables in a custom logger QUESTION: I have Logger-Class which is logging everything. Objects will be logged with print_r to a human-readable state. My Problem is that I have a big MVC-Object. Everytime an Exception or Error occurs, the MVC-Object will also be printed in th...
[ "php", "error-logging" ]
4
2
1,495
5
0
2011-05-31T19:07:50.847000
2011-05-31T19:12:23.803000
6,192,294
6,192,600
C# WCF NetTCPBinding Blocking Application
I have a basic buddylist type application which is a pub/sub deal in WCF. My problem is one or two of the calls are long running and this blocks up the entire server application (gui updates etc). Here's my code: [ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(IBuddyListContract))] public...
My problem is one or two of the calls are long running and this blocks up the entire server application (gui updates etc). You're not clear on where you're seeing the blocking behavior, but it sounds like it would be on the client side. You should be making your call to your WCF service from a background thread, not th...
C# WCF NetTCPBinding Blocking Application I have a basic buddylist type application which is a pub/sub deal in WCF. My problem is one or two of the calls are long running and this blocks up the entire server application (gui updates etc). Here's my code: [ServiceContract(SessionMode = SessionMode.Required, CallbackCont...
TITLE: C# WCF NetTCPBinding Blocking Application QUESTION: I have a basic buddylist type application which is a pub/sub deal in WCF. My problem is one or two of the calls are long running and this blocks up the entire server application (gui updates etc). Here's my code: [ServiceContract(SessionMode = SessionMode.Requ...
[ "c#", "wcf", "nettcpbinding" ]
6
2
431
1
0
2011-05-31T19:07:56.667000
2011-05-31T19:33:49.333000
6,192,299
6,282,918
Adding a project reference in TFS redirects to a previously branched version of the project♦
I have a TFS structure that looks something like this: $ -MainSoftwareBranch -Dev -Main -Enterprise -Project1 -Test -TeamProjectA -Main -Enterprise -Project1 -TeamProjectB -Main -Enterprise -Project1 The end goal of this is that MainSoftwareBranch (MSB) contains all of the software that our company develops. When you n...
A couple of things to check... but before you do any TFS/project structure modifications, I recommend checking in all current changes (for all teams), doing a get-latest to retrieve all of these changes, and making a backup of your entire local workspace folder. One point I need clarified to fully answer you... what su...
Adding a project reference in TFS redirects to a previously branched version of the project♦ I have a TFS structure that looks something like this: $ -MainSoftwareBranch -Dev -Main -Enterprise -Project1 -Test -TeamProjectA -Main -Enterprise -Project1 -TeamProjectB -Main -Enterprise -Project1 The end goal of this is tha...
TITLE: Adding a project reference in TFS redirects to a previously branched version of the project♦ QUESTION: I have a TFS structure that looks something like this: $ -MainSoftwareBranch -Dev -Main -Enterprise -Project1 -Test -TeamProjectA -Main -Enterprise -Project1 -TeamProjectB -Main -Enterprise -Project1 The end g...
[ "visual-studio-2010", "tfs", "reparenting" ]
1
0
2,583
2
0
2011-05-31T19:08:19.863000
2011-06-08T17:38:59.870000
6,192,300
6,192,555
EJB session bean Thread Safety
What is the exactly meaning of EJB session bean thread safety? what happens if I define static ArrayList in the session beans (as you know ArrayList doesn't support multi thread) OR I mark my method with "synchronized"? RGDS
The EJB container ensures that session bean instances are thread-safe, so session bean methods do not need to be marked synchronized. A static ArrayList is never thread-safe (using EJBs or otherwise). (The only exception to thread-safe session bean instances are EJB 3.1 singleton session beans using bean-managed concur...
EJB session bean Thread Safety What is the exactly meaning of EJB session bean thread safety? what happens if I define static ArrayList in the session beans (as you know ArrayList doesn't support multi thread) OR I mark my method with "synchronized"? RGDS
TITLE: EJB session bean Thread Safety QUESTION: What is the exactly meaning of EJB session bean thread safety? what happens if I define static ArrayList in the session beans (as you know ArrayList doesn't support multi thread) OR I mark my method with "synchronized"? RGDS ANSWER: The EJB container ensures that sessio...
[ "multithreading", "session", "ejb" ]
1
2
2,067
1
0
2011-05-31T19:08:22.547000
2011-05-31T19:29:15.650000
6,192,310
6,194,964
Translate C code into Haskell
How do I translate this portion of C code into Haskell? From what I know, I must use the State monad, but I don't know how. int x = 1; int y = 2; x = x * y; y = y + x;
A literal translation would use IORefs: import Data.IORef main:: IO () main = do x <- newIORef 1 y <- newIORef 2 y_val <- readIORef y modifyIORef x (\v -> v * y_val) x_val <- readIORef x modifyIORef y (\v -> v + x_val) As you can see, imperative programming is ugly in Haskell. This is intentional, to coax you into usi...
Translate C code into Haskell How do I translate this portion of C code into Haskell? From what I know, I must use the State monad, but I don't know how. int x = 1; int y = 2; x = x * y; y = y + x;
TITLE: Translate C code into Haskell QUESTION: How do I translate this portion of C code into Haskell? From what I know, I must use the State monad, but I don't know how. int x = 1; int y = 2; x = x * y; y = y + x; ANSWER: A literal translation would use IORefs: import Data.IORef main:: IO () main = do x <- newIORef...
[ "c", "haskell", "translate" ]
2
8
3,265
5
0
2011-05-31T19:09:03.173000
2011-06-01T00:17:41.887000
6,192,311
6,192,484
Ruby && Operator Results Don't Make Sense
Here is my code: >> x = "apple spoon" => "apple spoon" >> y = "spoon tree" => "spoon tree" >> z = "apple tree" => "apple tree" >> puts "match" if x.upcase.match("APPLE" && "SPOON" && "TREE") => nil >> puts "match" if y.upcase.match("APPLE" && "SPOON" && "TREE") match => nil >> puts "match" if z.upcase.match("APPLE...
As dmarkow says, the && operator is for boolean operations, not to give multiple arguments to match(). If you need to find if it matches any of the strings, use some sort of iterator, such as: puts "MATCH" if ["TREE","SPOON"].any? {|t| z.upcase.match(t)} Also, since String#match accepts a regular expression, I think yo...
Ruby && Operator Results Don't Make Sense Here is my code: >> x = "apple spoon" => "apple spoon" >> y = "spoon tree" => "spoon tree" >> z = "apple tree" => "apple tree" >> puts "match" if x.upcase.match("APPLE" && "SPOON" && "TREE") => nil >> puts "match" if y.upcase.match("APPLE" && "SPOON" && "TREE") match => nil...
TITLE: Ruby && Operator Results Don't Make Sense QUESTION: Here is my code: >> x = "apple spoon" => "apple spoon" >> y = "spoon tree" => "spoon tree" >> z = "apple tree" => "apple tree" >> puts "match" if x.upcase.match("APPLE" && "SPOON" && "TREE") => nil >> puts "match" if y.upcase.match("APPLE" && "SPOON" && "T...
[ "ruby", "operators" ]
2
7
235
2
0
2011-05-31T19:09:07.990000
2011-05-31T19:22:16.663000
6,192,320
6,192,435
com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean
I have a JSF managedbean I am getting the error when a managed bean is referred from from JSF page in WebSphere AppServer. The bean is defined in the faces-config.xml as bean com.test.Bean session This is the exception: com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection o...
com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean This exception just means that the managed bean creation has failed because an error occurred during resource injection of the managed bean. Oh wait, that is what the exception is already telling. Well, im...
com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean I have a JSF managedbean I am getting the error when a managed bean is referred from from JSF page in WebSphere AppServer. The bean is defined in the faces-config.xml as bean com.test.Bean session This is ...
TITLE: com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean QUESTION: I have a JSF managedbean I am getting the error when a managed bean is referred from from JSF page in WebSphere AppServer. The bean is defined in the faces-config.xml as bean com.test.Bea...
[ "jsf", "dependency-injection", "resources", "managed-bean" ]
13
21
48,081
2
0
2011-05-31T19:09:48.647000
2011-05-31T19:17:43.403000
6,192,326
6,192,410
Gallery images wrap in IE but not in other browsers
Here's the situation: my WordPress Gallery looks fine in Firefox, Safari, etc. but running on IE (under Windows), the the last image in the gallery wraps to the next line. So far, I've tried adjusting the gallery width, padding, inline, block, and changing the number of columns to no avail. There is plenty of room on t...
Fix this { margin-right: 3px; margin-left: 3px; } Either change it to 1px or delete them or delete just the right or left margin in the styles.css line 1219
Gallery images wrap in IE but not in other browsers Here's the situation: my WordPress Gallery looks fine in Firefox, Safari, etc. but running on IE (under Windows), the the last image in the gallery wraps to the next line. So far, I've tried adjusting the gallery width, padding, inline, block, and changing the number ...
TITLE: Gallery images wrap in IE but not in other browsers QUESTION: Here's the situation: my WordPress Gallery looks fine in Firefox, Safari, etc. but running on IE (under Windows), the the last image in the gallery wraps to the next line. So far, I've tried adjusting the gallery width, padding, inline, block, and ch...
[ "css", "wordpress", "gallery", "word-wrap" ]
1
2
254
2
0
2011-05-31T19:10:08.567000
2011-05-31T19:16:01.283000
6,192,334
6,192,436
Get filename(s) where type is defined in asp.net website
If I define a class in a file ~/App_Code/Extensions/MyExtension/MyClass.cs Is it possible to retrieve the filename by type (or 'MyExtension' part of it) without hard coding it? var extTypes = getExtensions(); foreach(var extType in extTypes) { // something like var files = extType.GetSourceFiles(); //or maybe asp.net ...
This sort of information is only really available in compiled languages (like C#) when you have debugging symbols included. So if you had a Debug build then you could get at this information by examining the current StackFrame. var stackFrame = new StackFrame(true); stackFrame.GetFileName() Of course you probably don't...
Get filename(s) where type is defined in asp.net website If I define a class in a file ~/App_Code/Extensions/MyExtension/MyClass.cs Is it possible to retrieve the filename by type (or 'MyExtension' part of it) without hard coding it? var extTypes = getExtensions(); foreach(var extType in extTypes) { // something like v...
TITLE: Get filename(s) where type is defined in asp.net website QUESTION: If I define a class in a file ~/App_Code/Extensions/MyExtension/MyClass.cs Is it possible to retrieve the filename by type (or 'MyExtension' part of it) without hard coding it? var extTypes = getExtensions(); foreach(var extType in extTypes) { /...
[ "c#", "asp.net" ]
1
1
241
2
0
2011-05-31T19:10:40.737000
2011-05-31T19:17:54.670000
6,192,347
6,192,521
FLEX XMLDecoder turns `09.00` to "09.00", but `10.00` to 10
Could someone explain why the FLEX 4.5 XMLDecoder does this to my XML-data? var decoder:XMLDecoder = new XMLDecoder; var $object:Object = decoder.decode( 08.00 ); // object = "08.00" var decoder:XMLDecoder = new XMLDecoder; var $object:Object = decoder.decode( 11.00 ); // Object = "11" (HEY! Where did my '.00' part of...
The Flex deserializer also gave me issues with this. It may be interpreting them as Number objects and thus they will return short representations when toString() is called. Try using.toFixed(2) whenever you need to print a value such as 11.00 var $object:Object = decoder.decode( 11.00 ); trace($object); //11 trace($ob...
FLEX XMLDecoder turns `09.00` to "09.00", but `10.00` to 10 Could someone explain why the FLEX 4.5 XMLDecoder does this to my XML-data? var decoder:XMLDecoder = new XMLDecoder; var $object:Object = decoder.decode( 08.00 ); // object = "08.00" var decoder:XMLDecoder = new XMLDecoder; var $object:Object = decoder.decode...
TITLE: FLEX XMLDecoder turns `09.00` to "09.00", but `10.00` to 10 QUESTION: Could someone explain why the FLEX 4.5 XMLDecoder does this to my XML-data? var decoder:XMLDecoder = new XMLDecoder; var $object:Object = decoder.decode( 08.00 ); // object = "08.00" var decoder:XMLDecoder = new XMLDecoder; var $object:Objec...
[ "apache-flex", "actionscript-3" ]
3
1
652
2
0
2011-05-31T19:11:30.580000
2011-05-31T19:26:29.970000
6,192,348
6,192,527
Getting Coarse GPS Location on Windows Phone 7 (rather than precise location)
I have seen various articles on how to get location information on WP7, such as Getting GPS coordinates on Windows phone 7. On Android, there is an option to ask for Coarse location instead of Fine location. This is very useful for leaderboards etc as you only really care about the city that the user is in and not ther...
You can alter the accuracy of the GeoCoordinateWatcher by changing its DesiredAccuracy property. You'd want to set it to Default instead of High (although, if you haven't changed it, it should be set to Default anyway).
Getting Coarse GPS Location on Windows Phone 7 (rather than precise location) I have seen various articles on how to get location information on WP7, such as Getting GPS coordinates on Windows phone 7. On Android, there is an option to ask for Coarse location instead of Fine location. This is very useful for leaderboar...
TITLE: Getting Coarse GPS Location on Windows Phone 7 (rather than precise location) QUESTION: I have seen various articles on how to get location information on WP7, such as Getting GPS coordinates on Windows phone 7. On Android, there is an option to ask for Coarse location instead of Fine location. This is very use...
[ "windows-phone-7" ]
0
2
847
2
0
2011-05-31T19:11:32.767000
2011-05-31T19:27:07.317000
6,192,351
6,192,603
Problem with a php multistep form using sessions
I have a problem with a php multistep form. I need to perform the switching between the different forms only in one page. In this page I switch the following cases: $_SESSION["profilo"]= $_POST["profilo"]; $_SESSION["periodic"]=$_POST["periodic"]; $_SESSION["from"]=$_POST["from"]; $_SESSION["to"]=$_POST["to"]; $_SESSIO...
if(isset($_POST["profilo"])) $_SESSION["profilo"]= $_POST["profilo"]; if(isset($_POST["periodic"])) $_SESSION["periodic"]=$_POST["periodic"]; if(isset($_POST["from"])) $_SESSION["from"]=$_POST["from"]; if(isset($_POST["to"])) $_SESSION["to"]=$_POST["to"]; if(isset($_POST["weekdays"])) $_SESSION["weekdays"]=$_POST["week...
Problem with a php multistep form using sessions I have a problem with a php multistep form. I need to perform the switching between the different forms only in one page. In this page I switch the following cases: $_SESSION["profilo"]= $_POST["profilo"]; $_SESSION["periodic"]=$_POST["periodic"]; $_SESSION["from"]=$_POS...
TITLE: Problem with a php multistep form using sessions QUESTION: I have a problem with a php multistep form. I need to perform the switching between the different forms only in one page. In this page I switch the following cases: $_SESSION["profilo"]= $_POST["profilo"]; $_SESSION["periodic"]=$_POST["periodic"]; $_SES...
[ "php", "forms", "session", "multi-step" ]
0
1
890
1
0
2011-05-31T19:11:38.313000
2011-05-31T19:34:09.253000
6,192,359
6,192,593
MVC return view() issue
I'm very new to MVC, and am attempting to add further functionality to an app that has already been developed. I'm having trouble returning a View with posted results after validation has rendered the model invalid. My controller has three actions of note: public ActionResult Create(int workID) [HttpParamAction] [Http...
the URL is based on the action name; not on the view name. You probably need to RedirectToAction("Create"...) and issue View() from there
MVC return view() issue I'm very new to MVC, and am attempting to add further functionality to an app that has already been developed. I'm having trouble returning a View with posted results after validation has rendered the model invalid. My controller has three actions of note: public ActionResult Create(int workID) ...
TITLE: MVC return view() issue QUESTION: I'm very new to MVC, and am attempting to add further functionality to an app that has already been developed. I'm having trouble returning a View with posted results after validation has rendered the model invalid. My controller has three actions of note: public ActionResult C...
[ "asp.net-mvc" ]
2
1
1,504
1
0
2011-05-31T19:12:11.237000
2011-05-31T19:32:41.220000
6,192,361
6,192,438
Can send header even though I have output
Should'nt the following give an error message? It sends me to domain.com/asdad/ instead of giving me an error message. I view this directly, no other files or code before or after this. Should'nt header give me an error and NOT send me to the new page as I have output before the header?
Check your phpinfo(), you probably have output_buffering switched on.
Can send header even though I have output Should'nt the following give an error message? It sends me to domain.com/asdad/ instead of giving me an error message. I view this directly, no other files or code before or after this. Should'nt header give me an error and NOT send me to the new page as I have output before th...
TITLE: Can send header even though I have output QUESTION: Should'nt the following give an error message? It sends me to domain.com/asdad/ instead of giving me an error message. I view this directly, no other files or code before or after this. Should'nt header give me an error and NOT send me to the new page as I hav...
[ "php" ]
2
2
81
2
0
2011-05-31T19:12:18.350000
2011-05-31T19:18:00.707000
6,192,365
6,192,416
Variable is Not Available Using dbContexts?
I have the following code that throws an error on the call for getOccupants within Using dbPC. Is there a way to make this value accessible in Using dbPC? Or a better way to accomplish this? I tried nesting Using dbPC inside of Using dbContext, but that also throws errors. Protected Sub btnPushSemester_Click(sender As ...
Declare getOccupants outside of the using block. You can assign it inside the block, but you have to declare it outside or it goes out of scope before you actually need to use it.
Variable is Not Available Using dbContexts? I have the following code that throws an error on the call for getOccupants within Using dbPC. Is there a way to make this value accessible in Using dbPC? Or a better way to accomplish this? I tried nesting Using dbPC inside of Using dbContext, but that also throws errors. Pr...
TITLE: Variable is Not Available Using dbContexts? QUESTION: I have the following code that throws an error on the call for getOccupants within Using dbPC. Is there a way to make this value accessible in Using dbPC? Or a better way to accomplish this? I tried nesting Using dbPC inside of Using dbContext, but that also...
[ "asp.net", "vb.net", "variables", "linq-to-entities" ]
0
0
88
2
0
2011-05-31T19:12:32.017000
2011-05-31T19:16:16.397000
6,192,368
6,192,839
Hudson slave using msysGit shell
I have got a Hudson Slave on a windows machine and need to execute some shell commands on it. I have put all the commands in the execute shell portion of the project and the first line reads as this: #!C:\msysgit\msysgit\bin\sh.exe However when running the project I am getting errors saying command not found. Specifica...
You could start by making that script displays: the username the path the $HOME (important for ssh operation, and not always set correctly on Windows ) And see what those variables reference in the context of an Hudson job. They might not reflect/inherit the values of your current session. And it can depend on how you ...
Hudson slave using msysGit shell I have got a Hudson Slave on a windows machine and need to execute some shell commands on it. I have put all the commands in the execute shell portion of the project and the first line reads as this: #!C:\msysgit\msysgit\bin\sh.exe However when running the project I am getting errors sa...
TITLE: Hudson slave using msysGit shell QUESTION: I have got a Hudson Slave on a windows machine and need to execute some shell commands on it. I have put all the commands in the execute shell portion of the project and the first line reads as this: #!C:\msysgit\msysgit\bin\sh.exe However when running the project I am...
[ "windows", "shell", "hudson", "msysgit" ]
1
2
645
1
0
2011-05-31T19:12:50.363000
2011-05-31T19:57:53.760000
6,192,369
6,192,420
Wordpress local server to web database
I'm installing wordpress and I'd like to use a web mysql database rather than a local one. Is this possible? I used the same exact credentials for an already existing web wordpress installation with no luck.
If your web server allows remote MySQL connections, then yes. Just set your DB_HOST in wp-config.php correctly.
Wordpress local server to web database I'm installing wordpress and I'd like to use a web mysql database rather than a local one. Is this possible? I used the same exact credentials for an already existing web wordpress installation with no luck.
TITLE: Wordpress local server to web database QUESTION: I'm installing wordpress and I'd like to use a web mysql database rather than a local one. Is this possible? I used the same exact credentials for an already existing web wordpress installation with no luck. ANSWER: If your web server allows remote MySQL connect...
[ "mysql", "database", "wordpress", "local" ]
0
2
178
1
0
2011-05-31T19:12:53.560000
2011-05-31T19:16:30.147000
6,192,375
6,192,408
Creating winforms help file
I'm looking to create a indexable help file for a winforms app, but how do you get started? The Microsoft MSDN is rubbish, it says "create a new project" but doesn't specify which type to create. How do I go about creating a help file for my applications?
Are you looking for this Integrating "Help" into WinForms Application?
Creating winforms help file I'm looking to create a indexable help file for a winforms app, but how do you get started? The Microsoft MSDN is rubbish, it says "create a new project" but doesn't specify which type to create. How do I go about creating a help file for my applications?
TITLE: Creating winforms help file QUESTION: I'm looking to create a indexable help file for a winforms app, but how do you get started? The Microsoft MSDN is rubbish, it says "create a new project" but doesn't specify which type to create. How do I go about creating a help file for my applications? ANSWER: Are you l...
[ "c#", "winforms", "visual-studio-2008" ]
2
4
6,776
2
0
2011-05-31T19:13:30.183000
2011-05-31T19:15:51.813000
6,192,380
6,192,445
Using 2 domains on one website
I have a dedicated server (apache, php, mysql) There is a primary domain (let's call it www.domain1.com) that actually holds all the files like any other regular web hosting account. Another domain (call it domain2.com) needs to forward to it, but with masking. So domain2.com/filename.php, domain2.com/filename.php/432/...
DocumentRoot /www/example1 ServerName www.domain1.com ServerAlias www.domain2.com
Using 2 domains on one website I have a dedicated server (apache, php, mysql) There is a primary domain (let's call it www.domain1.com) that actually holds all the files like any other regular web hosting account. Another domain (call it domain2.com) needs to forward to it, but with masking. So domain2.com/filename.php...
TITLE: Using 2 domains on one website QUESTION: I have a dedicated server (apache, php, mysql) There is a primary domain (let's call it www.domain1.com) that actually holds all the files like any other regular web hosting account. Another domain (call it domain2.com) needs to forward to it, but with masking. So domain...
[ "php", "apache", "url", "dns" ]
11
29
3,697
6
0
2011-05-31T19:13:38.530000
2011-05-31T19:18:27.513000
6,192,391
6,192,409
Measurement Studio controls not visible in VS2010
I am trying to get started with the NI Measurement Studio. After intalling the software, the controls don't show up in my Toolbox. I get the text "Controls in this category are unavailable for the.Net Framework 4 Client Profile. To change this setting, open the Project Propeties window."
Newbie mistake -- I just changed the Profile to.Net Framework 4 and it works. It just didn't like the.Net Framework 4 Client Profile.
Measurement Studio controls not visible in VS2010 I am trying to get started with the NI Measurement Studio. After intalling the software, the controls don't show up in my Toolbox. I get the text "Controls in this category are unavailable for the.Net Framework 4 Client Profile. To change this setting, open the Project ...
TITLE: Measurement Studio controls not visible in VS2010 QUESTION: I am trying to get started with the NI Measurement Studio. After intalling the software, the controls don't show up in my Toolbox. I get the text "Controls in this category are unavailable for the.Net Framework 4 Client Profile. To change this setting,...
[ "visual-studio-2010", "controls", "measurement-studio" ]
1
1
794
1
0
2011-05-31T19:14:25.677000
2011-05-31T19:16:01.057000
6,192,392
6,192,406
MYSQL Query help, I thikn this should be simple... but I can't get it
So I join two tables in a query, let's use below as an example: SELECT property.address, property.city, property.state, property.zip, unit.name FROM property, unit WHERE unit.propertyID = property.id This table can return a list of all properties that have a matching unit in the unit table. My problem is, if I have pro...
Simplest way to update your query to working order: SELECT property.address, property.city, property.state, property.zip, unit.name FROM property left join unit on property.id = unit.propertyID Better way to write it, using aliases: select p.address, p.city, p.state, p.zip, u.name from property p left join unit u on p....
MYSQL Query help, I thikn this should be simple... but I can't get it So I join two tables in a query, let's use below as an example: SELECT property.address, property.city, property.state, property.zip, unit.name FROM property, unit WHERE unit.propertyID = property.id This table can return a list of all properties tha...
TITLE: MYSQL Query help, I thikn this should be simple... but I can't get it QUESTION: So I join two tables in a query, let's use below as an example: SELECT property.address, property.city, property.state, property.zip, unit.name FROM property, unit WHERE unit.propertyID = property.id This table can return a list of ...
[ "mysql", "join" ]
0
1
31
2
0
2011-05-31T19:14:35.760000
2011-05-31T19:15:35.330000
6,192,400
6,193,533
OAI Jaxen XPath problem
I'm having big problems with Xpath evaluation using Jaxen. Here's part of XML i'm evaluating on: 2011-05-31T13:04:08+00:00 http://citeseerx.ist.psu.edu/oai2 oai:CiteSeerXPSU:10.1.1.1.1484 2009-05-24 Winner-Take-All.. 10.1.1.134.6077 10.1.1.65.2144 10.1.1.54.7277 10.1.1.48.5282 10.1.1.1.2041-1547151-500-oai_dc I'm using...
I can't see how the XPath expression /OAI-PMH/ListRecords/record can possibly select anything, since your document does not have a {}OAI-PMH element, only a {http://www.openarchives.org/OAI/2.0/}OAI-PMH element. See http://jaxen.codehaus.org/faq.html
OAI Jaxen XPath problem I'm having big problems with Xpath evaluation using Jaxen. Here's part of XML i'm evaluating on: 2011-05-31T13:04:08+00:00 http://citeseerx.ist.psu.edu/oai2 oai:CiteSeerXPSU:10.1.1.1.1484 2009-05-24 Winner-Take-All.. 10.1.1.134.6077 10.1.1.65.2144 10.1.1.54.7277 10.1.1.48.5282 10.1.1.1.2041-1547...
TITLE: OAI Jaxen XPath problem QUESTION: I'm having big problems with Xpath evaluation using Jaxen. Here's part of XML i'm evaluating on: 2011-05-31T13:04:08+00:00 http://citeseerx.ist.psu.edu/oai2 oai:CiteSeerXPSU:10.1.1.1.1484 2009-05-24 Winner-Take-All.. 10.1.1.134.6077 10.1.1.65.2144 10.1.1.54.7277 10.1.1.48.5282 ...
[ "java", "xml", "xpath" ]
0
1
712
1
0
2011-05-31T19:15:10.270000
2011-05-31T21:04:36.813000
6,192,402
6,192,455
How to cope with an multi language system with pulldowns?
I have builded an system with php an MySQL. This has been set as multi language, so each user can choose it's own language. How do I work with pulldowns? Most of these menus are generated from the database. How would you make this work for an multi language system?
The database generated string would simply be used as a parameter to gettext, which would then chose a translated string if one was available for the selected language. If one isn't available, it would default to the provided string.
How to cope with an multi language system with pulldowns? I have builded an system with php an MySQL. This has been set as multi language, so each user can choose it's own language. How do I work with pulldowns? Most of these menus are generated from the database. How would you make this work for an multi language syst...
TITLE: How to cope with an multi language system with pulldowns? QUESTION: I have builded an system with php an MySQL. This has been set as multi language, so each user can choose it's own language. How do I work with pulldowns? Most of these menus are generated from the database. How would you make this work for an m...
[ "php", "mysql", "internationalization" ]
1
1
140
1
0
2011-05-31T19:15:21.720000
2011-05-31T19:19:12.173000
6,192,418
6,192,657
Message Box sending Windows messages?
I've got a relatively simple Window class. I've created a window, associated my this, etc etc. Now later, I've thrown an exception to indicate a problem. When I call MessageBox to pop up the error, the program crashes, because it's attempting to call my Window Proc. Now, I mean, admittedly, I failed SRP here and just w...
What is happening here is that there are still messages for the dud window in the queue when you show the message box. The message box runs a modal window message pump and dispatches the troublesome messages. Remember that all windows created from the same thread share a single message queue. I have no idea how to fix ...
Message Box sending Windows messages? I've got a relatively simple Window class. I've created a window, associated my this, etc etc. Now later, I've thrown an exception to indicate a problem. When I call MessageBox to pop up the error, the program crashes, because it's attempting to call my Window Proc. Now, I mean, ad...
TITLE: Message Box sending Windows messages? QUESTION: I've got a relatively simple Window class. I've created a window, associated my this, etc etc. Now later, I've thrown an exception to indicate a problem. When I call MessageBox to pop up the error, the program crashes, because it's attempting to call my Window Pro...
[ "c++", "winapi", "windows-7" ]
3
4
438
1
0
2011-05-31T19:16:16.930000
2011-05-31T19:40:33.650000
6,192,423
6,192,590
Render javascript for partial - Rails 3
I'm still relatively new to rails and getting used to a few things. Just a quick question really, I have an AJAX form (with:remote => true etc...) which works and sends the data to the server without a pageload. My question is around the javascript file that can be used after the post. My partial is called '_newsomethi...
In your controller action you have to have: respond_to do |format| format.html {.... } format.js end The format.js is the important part. If Rails discovers that you are POSTing through AJAX, then it will render _create.js.erb partial.
Render javascript for partial - Rails 3 I'm still relatively new to rails and getting used to a few things. Just a quick question really, I have an AJAX form (with:remote => true etc...) which works and sends the data to the server without a pageload. My question is around the javascript file that can be used after the...
TITLE: Render javascript for partial - Rails 3 QUESTION: I'm still relatively new to rails and getting used to a few things. Just a quick question really, I have an AJAX form (with:remote => true etc...) which works and sends the data to the server without a pageload. My question is around the javascript file that can...
[ "javascript", "ajax", "ruby-on-rails-3" ]
1
2
1,525
1
0
2011-05-31T19:16:42.190000
2011-05-31T19:32:28.270000
6,192,431
6,204,948
Table propertyId value is null when using setCellStyleGenerator
I am new to Vaadin but do have some Java Swing experience. I am attempting to use table.setCellStyleGenerator to set the colour of a particular cell with the column heading "Name". I am working off an example in vaadin book: Table table = new Table("Table with Cell Styles"); table.addStyleName("checkerboard"); table.a...
The reason for the null propertyId is explained in the javadoc for CellStyleGenerator: the cell style generator is also called to optionally set a style for each row, and in that scenario, the propertyId is null. You'll probably want to simply return null if the propertyId is null.
Table propertyId value is null when using setCellStyleGenerator I am new to Vaadin but do have some Java Swing experience. I am attempting to use table.setCellStyleGenerator to set the colour of a particular cell with the column heading "Name". I am working off an example in vaadin book: Table table = new Table("Table ...
TITLE: Table propertyId value is null when using setCellStyleGenerator QUESTION: I am new to Vaadin but do have some Java Swing experience. I am attempting to use table.setCellStyleGenerator to set the colour of a particular cell with the column heading "Name". I am working off an example in vaadin book: Table table =...
[ "css", "vaadin", "cell" ]
0
1
1,693
1
0
2011-05-31T19:17:28.420000
2011-06-01T17:01:17.830000
6,192,439
6,220,253
NHibernate 3.1, Release mode and SQL not getting executed
Edit: The below information was the symptom that led me to the following tests. I downloaded, compiled, and ran all the tests for NHibernate under Release mode. They all work. I fired up NH Profiler and looked at the difference between the logs in Debug and Release. Release didn't appear to be executing any SQL besides...
I figured it out. The issue, as pointed to by the error about persisters, was that NHibernate was not getting any mapping files in Release mode. The reason turned out to be because when I was configuring Fluent NHibernate with a PersistenceModel, I was calling PersistenceModel.AddMappingsFromThisAssembly() instead of P...
NHibernate 3.1, Release mode and SQL not getting executed Edit: The below information was the symptom that led me to the following tests. I downloaded, compiled, and ran all the tests for NHibernate under Release mode. They all work. I fired up NH Profiler and looked at the difference between the logs in Debug and Rele...
TITLE: NHibernate 3.1, Release mode and SQL not getting executed QUESTION: Edit: The below information was the symptom that led me to the following tests. I downloaded, compiled, and ran all the tests for NHibernate under Release mode. They all work. I fired up NH Profiler and looked at the difference between the logs...
[ ".net", "nhibernate", "exception" ]
0
1
864
1
0
2011-05-31T19:18:03.733000
2011-06-02T20:52:08.113000
6,192,446
6,192,538
Javascript Dropdown Action
I am trying to show divs based on input from a dropdown menu. 1 2 3 Nothing happens when I select an option. What am I doing wrong here?
Ok after thinking back to some old problems i had, i remembered a problem that IE and Chrome have with the onClick event. 1 2 3 hey, 1 works hey, 2 works hey, 3 works The solution was to make the function call on the select and use onchange. Then it gets the selected options value and gives it to the function to work i...
Javascript Dropdown Action I am trying to show divs based on input from a dropdown menu. 1 2 3 Nothing happens when I select an option. What am I doing wrong here?
TITLE: Javascript Dropdown Action QUESTION: I am trying to show divs based on input from a dropdown menu. 1 2 3 Nothing happens when I select an option. What am I doing wrong here? ANSWER: Ok after thinking back to some old problems i had, i remembered a problem that IE and Chrome have with the onClick event. 1 2 3 h...
[ "javascript", "html", "drop-down-menu" ]
0
1
9,580
2
0
2011-05-31T19:18:29.287000
2011-05-31T19:28:09.440000
6,192,451
6,193,397
Multiple Arrays From Plist
Title 1 Subtitle 1 image1.png Title 2 Subtitle 2 image2.png This is my Plist file for an app I am working on. I am not sure on how to take the first string of many arrays to create an NSMutableArray with all the titles and again for the subtitles and image names. My workaround at the moment is creating 3 separate Plist...
To answer your question while retaining the plist data structure, you could simply do something like the following: NSArray *rootArray = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"your-plist" ofType:@"plist"]]; int numItems = [rootArray count]; NSMutableArray *titles = [NSMutableArray arr...
Multiple Arrays From Plist Title 1 Subtitle 1 image1.png Title 2 Subtitle 2 image2.png This is my Plist file for an app I am working on. I am not sure on how to take the first string of many arrays to create an NSMutableArray with all the titles and again for the subtitles and image names. My workaround at the moment i...
TITLE: Multiple Arrays From Plist QUESTION: Title 1 Subtitle 1 image1.png Title 2 Subtitle 2 image2.png This is my Plist file for an app I am working on. I am not sure on how to take the first string of many arrays to create an NSMutableArray with all the titles and again for the subtitles and image names. My workarou...
[ "iphone", "arrays", "xcode", "nsmutablearray", "plist" ]
2
2
2,735
1
0
2011-05-31T19:18:46.540000
2011-05-31T20:50:11.850000
6,192,452
6,192,917
Rails i18n shows translated text surrounded by [" "]
When trying to use i18n in rails I get the following undesired output. The translated text is surrounded by [" "] so for example: hello: "Hello" <%= t(:hello) %> is displayed like ["Hello"] Any idea why that is? UPDATE en.yml en: hello: "Hello" Usage <%= t(:hello) %> That it...
I could be wrong, but could you try using it like: <%= t('hello') %> This is how i use it without any problems:)
Rails i18n shows translated text surrounded by [" "] When trying to use i18n in rails I get the following undesired output. The translated text is surrounded by [" "] so for example: hello: "Hello" <%= t(:hello) %> is displayed like ["Hello"] Any idea why that is? UPDATE en.yml en: hello: "Hello" Usage <%= t(:hello) %>...
TITLE: Rails i18n shows translated text surrounded by [" "] QUESTION: When trying to use i18n in rails I get the following undesired output. The translated text is surrounded by [" "] so for example: hello: "Hello" <%= t(:hello) %> is displayed like ["Hello"] Any idea why that is? UPDATE en.yml en: hello: "Hello" Usag...
[ "ruby-on-rails-3", "internationalization" ]
1
0
107
1
0
2011-05-31T19:18:49.520000
2011-05-31T20:05:03.743000
6,192,453
6,192,492
How might you grab information from a page that only populates AFTER that page executes javascript? (C#)
Hey there. I have a CE program which needs to get information from a website. I can't simply grab the source code, because the information is only displayed after the page's javascript is executed. Is there a way to view a page's information/source/links after javascript has fully load the information? Thanks!:)
Sure thing, AJAX. Linked is the jQuery wrapper for it, which hides all the annoyances of getting it right in a cross-browser way. The basic idea of AJAX is, you make a call from javascript and end your function. When the result eventually comes, a function handler is called where you can update your page with the resul...
How might you grab information from a page that only populates AFTER that page executes javascript? (C#) Hey there. I have a CE program which needs to get information from a website. I can't simply grab the source code, because the information is only displayed after the page's javascript is executed. Is there a way to...
TITLE: How might you grab information from a page that only populates AFTER that page executes javascript? (C#) QUESTION: Hey there. I have a CE program which needs to get information from a website. I can't simply grab the source code, because the information is only displayed after the page's javascript is executed....
[ "c#", "javascript" ]
0
0
55
2
0
2011-05-31T19:18:56.447000
2011-05-31T19:23:14.543000
6,192,454
6,196,397
Table view doesn't scroll when Reordering Rows/Cells beyond bounds of table using Three20
When I re-order rows/cells in my Three20 TTTableViewController (editing a table and moving individual cells up or down) it does not scroll with the cell being moved beyond the bounds of the tableview. When I do drag the cell up beyond the bounds it automatically animates the cell upwards and out of the view without scr...
Apparently Three20's TTTableView implementation overrides UIScrollView 's - (void)setContentSize:(CGSize)size; and - (void)setContentOffset:(CGPoint)point; These are meant to prevent the contentOffset from being changed incorrectly with a change in content size or height of the table, although it inadvertently prevents...
Table view doesn't scroll when Reordering Rows/Cells beyond bounds of table using Three20 When I re-order rows/cells in my Three20 TTTableViewController (editing a table and moving individual cells up or down) it does not scroll with the cell being moved beyond the bounds of the tableview. When I do drag the cell up be...
TITLE: Table view doesn't scroll when Reordering Rows/Cells beyond bounds of table using Three20 QUESTION: When I re-order rows/cells in my Three20 TTTableViewController (editing a table and moving individual cells up or down) it does not scroll with the cell being moved beyond the bounds of the tableview. When I do d...
[ "iphone", "ios", "three20", "editing" ]
0
1
312
2
0
2011-05-31T19:19:08.927000
2011-06-01T04:48:07.533000
6,192,458
6,192,606
click() jquery function not available on new divs
During the running of my website i create new divs using jquery with class "a". I have defined a click() function for "a" class as follows: $(document).ready(function() { $(".a").click(function(){ $(".a").hide(); }); }); Problem is that the new divs created with the same class do not call this function when clicked. Ot...
$(document).delegate('.a', 'click', function() { $(this).hide(); });
click() jquery function not available on new divs During the running of my website i create new divs using jquery with class "a". I have defined a click() function for "a" class as follows: $(document).ready(function() { $(".a").click(function(){ $(".a").hide(); }); }); Problem is that the new divs created with the sam...
TITLE: click() jquery function not available on new divs QUESTION: During the running of my website i create new divs using jquery with class "a". I have defined a click() function for "a" class as follows: $(document).ready(function() { $(".a").click(function(){ $(".a").hide(); }); }); Problem is that the new divs cr...
[ "jquery", "html", "click", "onclick" ]
5
4
266
4
0
2011-05-31T19:19:49.480000
2011-05-31T19:34:26.530000
6,192,465
6,192,626
Getting selected text from UIMenuController
I'm trying to get the selected text when performing actions with a UIMenuController. How do I get the selected text out? I'm using a UIWebView at the moment, but would like a universal solution if there is one.
You should be able to get the data from UIPasteboard. It should be something like [UIPasteboard generalPasteboard].string for text.
Getting selected text from UIMenuController I'm trying to get the selected text when performing actions with a UIMenuController. How do I get the selected text out? I'm using a UIWebView at the moment, but would like a universal solution if there is one.
TITLE: Getting selected text from UIMenuController QUESTION: I'm trying to get the selected text when performing actions with a UIMenuController. How do I get the selected text out? I'm using a UIWebView at the moment, but would like a universal solution if there is one. ANSWER: You should be able to get the data fro...
[ "iphone", "ios", "ipad" ]
3
4
2,487
1
0
2011-05-31T19:20:21.843000
2011-05-31T19:36:43.793000
6,192,475
6,192,524
Using MVC's AuthorizeAttribute with multiple groups of Roles?
What I want to do is a two-level role check on an action handler. For example, Require that the users is in at least one of the following groups: SysAdmins, Managers AND in at least one of the following groups: HR, Payroll, Executive. Initial guess was that this might be the way to do this but I don't think it is: [Aut...
You'll need your own attribute. Here's mine: public class AuthorizationAttribute: ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { var portalModel = ContextCache.Get(ContextCache.PortalModelSessionCache); var requestedController = filterContext.RouteData.GetRequire...
Using MVC's AuthorizeAttribute with multiple groups of Roles? What I want to do is a two-level role check on an action handler. For example, Require that the users is in at least one of the following groups: SysAdmins, Managers AND in at least one of the following groups: HR, Payroll, Executive. Initial guess was that ...
TITLE: Using MVC's AuthorizeAttribute with multiple groups of Roles? QUESTION: What I want to do is a two-level role check on an action handler. For example, Require that the users is in at least one of the following groups: SysAdmins, Managers AND in at least one of the following groups: HR, Payroll, Executive. Initi...
[ "asp.net-mvc", "asp.net-mvc-2", "authentication", "authorization" ]
3
8
6,067
2
0
2011-05-31T19:21:27.897000
2011-05-31T19:26:54.890000
6,192,476
6,192,501
JSP not finding property in bean
My JSP gives an error showing that it is not able to find a property in a DTO and yet in the DTO the property is really there. Below is the error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperE...
You missed standard setter/getter in dateDto Make it public class dateDto { private Date date; public dateDto() { } public dateDto(Date date) { this.date =date; } public Date getDate() { return this.date; } public Date setDate(Date d) { this.date = d; } }
JSP not finding property in bean My JSP gives an error showing that it is not able to find a property in a DTO and yet in the DTO the property is really there. Below is the error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exc...
TITLE: JSP not finding property in bean QUESTION: My JSP gives an error showing that it is not able to find a property in a DTO and yet in the DTO the property is really there. Below is the error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling ...
[ "java", "jsp", "javabeans" ]
2
4
7,750
2
0
2011-05-31T19:21:40.790000
2011-05-31T19:24:25.540000
6,192,478
6,192,981
Error installing Windows Service using InstallUtil.exe
I am having some issues installing my Windows Service. I followed Matt's instructions here to create my service: Easiest language for creating a Windows service The ServiceAccount is set to User, although I have tried LocalService, LocalSystem and NetworkService. The purpose of my Windows Service is to create a Host fo...
Try moving the service and its dependencies to the C: drive and trying again, especially if H: is a network drive.
Error installing Windows Service using InstallUtil.exe I am having some issues installing my Windows Service. I followed Matt's instructions here to create my service: Easiest language for creating a Windows service The ServiceAccount is set to User, although I have tried LocalService, LocalSystem and NetworkService. T...
TITLE: Error installing Windows Service using InstallUtil.exe QUESTION: I am having some issues installing my Windows Service. I followed Matt's instructions here to create my service: Easiest language for creating a Windows service The ServiceAccount is set to User, although I have tried LocalService, LocalSystem and...
[ "wcf", "windows-7", "windows-services" ]
7
4
10,101
1
0
2011-05-31T19:21:58.443000
2011-05-31T20:10:30.313000
6,192,482
6,192,664
shouldAutoRotateToInterface issues with setting up frames
I have the following: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { float xCenter; float yCenter; if (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown){ NSLog(@"PORTRAIT ORIENTATION"); xCenter = 384...
shouldAutorotateToInterfaceOrientation: is called prior to any rotations. It is called to verify which orientations are supported to see if it needs to rotate. You will have to use the methods listed here.
shouldAutoRotateToInterface issues with setting up frames I have the following: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { float xCenter; float yCenter; if (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortrait...
TITLE: shouldAutoRotateToInterface issues with setting up frames QUESTION: I have the following: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { float xCenter; float yCenter; if (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceO...
[ "iphone", "objective-c", "ipad" ]
0
0
210
1
0
2011-05-31T19:22:06.660000
2011-05-31T19:41:18.350000
6,192,483
6,192,535
Doxygen comment inside a macro
My problem is the following: I have a set of files with the same parameters for constructors. I defined the parameters of a constructor inside a macro which is used in each file. For example, the following constructor: Planar(BSPF_IMAGE_FORMAT_STD_CONST_PARAMS_3); uses the BSPF_IMAGE_FORMAT_STD_CONST_PARAMS_3 macro whi...
Macros are always expanded without a line break, this got nothing to do with doxygen. However, a solution is relativly simple: Have an extra text-file ( "BSPF_IMAGE_FORMAT_STD_CONST_PARAMS_3.txt" or similar) that contains the comment specific to that define, an extra #define BSPF_IMAGE_FORMAT_STD_CONST_PARAMS_3_INCLUDE...
Doxygen comment inside a macro My problem is the following: I have a set of files with the same parameters for constructors. I defined the parameters of a constructor inside a macro which is used in each file. For example, the following constructor: Planar(BSPF_IMAGE_FORMAT_STD_CONST_PARAMS_3); uses the BSPF_IMAGE_FORM...
TITLE: Doxygen comment inside a macro QUESTION: My problem is the following: I have a set of files with the same parameters for constructors. I defined the parameters of a constructor inside a macro which is used in each file. For example, the following constructor: Planar(BSPF_IMAGE_FORMAT_STD_CONST_PARAMS_3); uses t...
[ "c++", "macros", "doxygen" ]
1
2
1,790
1
0
2011-05-31T19:22:11.207000
2011-05-31T19:28:03.517000
6,192,486
6,192,523
XmlDocument Load vs. LoadXml with Right Quote
I am seeing a difference between the way XmlDocument Load( ) and LoadXml( ) work in.NET 2.0. Given the XML document below (note the use of a right quote, ascii code 146): Some Data ’ Why does it load fine with LoadXml( ) when passed in as a string but fails if passed in to Load( ) as a document. I.E. and other XML edit...
The difference is the encoding. When loading from a file, utf-8 decoding is applied and your code 146 is probably not valid utf-8 in your case. LoadXml ignores the encoding because.Net strings do not need to be decoded. Therfore your special character is a valid character and everything is fine.
XmlDocument Load vs. LoadXml with Right Quote I am seeing a difference between the way XmlDocument Load( ) and LoadXml( ) work in.NET 2.0. Given the XML document below (note the use of a right quote, ascii code 146): Some Data ’ Why does it load fine with LoadXml( ) when passed in as a string but fails if passed in to ...
TITLE: XmlDocument Load vs. LoadXml with Right Quote QUESTION: I am seeing a difference between the way XmlDocument Load( ) and LoadXml( ) work in.NET 2.0. Given the XML document below (note the use of a right quote, ascii code 146): Some Data ’ Why does it load fine with LoadXml( ) when passed in as a string but fail...
[ ".net", "xml" ]
2
5
2,047
2
0
2011-05-31T19:22:33.513000
2011-05-31T19:26:45.503000
6,192,487
6,192,830
Loop through a bunch of folderish content, which may be itself folderish?
Suppose I have a content type, Folder, with 4 items. + MyObject - Child1 - Child2 - Child3 + Child4 - Child5 - Child6 Suppose I have another content type (let's call it Alias ). This Alias is mainly a reference to another object but folderish: it can contain a bunch of other aliases. I'm going to use --> to indicate th...
The most elegant and Pythonic solution is to write a recursive generator. Assuming this is a method: def iter_preorder(self): yield self # check for folderishness here if a non-folderish # node may have children as well for x in self.children: for y in x.iter_preorder(): yield y Then for x in tree.iter_preorder(): do_a...
Loop through a bunch of folderish content, which may be itself folderish? Suppose I have a content type, Folder, with 4 items. + MyObject - Child1 - Child2 - Child3 + Child4 - Child5 - Child6 Suppose I have another content type (let's call it Alias ). This Alias is mainly a reference to another object but folderish: it...
TITLE: Loop through a bunch of folderish content, which may be itself folderish? QUESTION: Suppose I have a content type, Folder, with 4 items. + MyObject - Child1 - Child2 - Child3 + Child4 - Child5 - Child6 Suppose I have another content type (let's call it Alias ). This Alias is mainly a reference to another object...
[ "python", "recursion", "plone" ]
0
6
316
4
0
2011-05-31T19:22:35.573000
2011-05-31T19:57:22.123000
6,192,493
6,192,584
Nested Array Troubleshoot for Perl
I am having trouble with my array of references which point to another array. Here's a snippet of my code: # @bah is a local variable array that's been populated, @foo is also initialized as a global variable $foo[9] = \@bah; # this works perfectly, printing the first element of the array @bah print $foo[9][0]."\n"; ...
Always use strict; and use warnings;. The @ dereference takes precedence, so @$foo[9] expects $foo to be an array reference and gets element 9 from that array. You want @{$foo[9]}. use strict would have alerted you that $foo was being used, not @foo. For some easily memorizable rules for dereferencing, see http://perlm...
Nested Array Troubleshoot for Perl I am having trouble with my array of references which point to another array. Here's a snippet of my code: # @bah is a local variable array that's been populated, @foo is also initialized as a global variable $foo[9] = \@bah; # this works perfectly, printing the first element of the ...
TITLE: Nested Array Troubleshoot for Perl QUESTION: I am having trouble with my array of references which point to another array. Here's a snippet of my code: # @bah is a local variable array that's been populated, @foo is also initialized as a global variable $foo[9] = \@bah; # this works perfectly, printing the fir...
[ "perl", "multidimensional-array" ]
0
11
133
2
0
2011-05-31T19:23:34.293000
2011-05-31T19:31:57.943000
6,192,496
6,192,534
Generating random password in bulk
I use this source code for generating random passwords: public string GetRandomPasswordUsingGUID(int length) { // Get the GUID string guidResult = System.Guid.NewGuid().ToString(); // Remove the hyphens guidResult = guidResult.Replace("-", string.Empty); // Make sure length is valid if (length <= 0 || length > guidRe...
GUIDs are not random, they are only unique (within a single system). Even a random number generator has limits on it, the minimum and maximum values it will return, and being truly random means you could get the same result over and over again, you just can't tell. Are you sure you mean random, as opposed to strong? ht...
Generating random password in bulk I use this source code for generating random passwords: public string GetRandomPasswordUsingGUID(int length) { // Get the GUID string guidResult = System.Guid.NewGuid().ToString(); // Remove the hyphens guidResult = guidResult.Replace("-", string.Empty); // Make sure length is valid...
TITLE: Generating random password in bulk QUESTION: I use this source code for generating random passwords: public string GetRandomPasswordUsingGUID(int length) { // Get the GUID string guidResult = System.Guid.NewGuid().ToString(); // Remove the hyphens guidResult = guidResult.Replace("-", string.Empty); // Make su...
[ "c#", "asp.net", "random", "passwords" ]
4
7
1,473
5
0
2011-05-31T19:24:01.577000
2011-05-31T19:28:03.297000
6,192,499
6,192,585
Select records based on what a field begins with?
I have a database with a table that has identifiers c1, c2, c3..etc.. Instead of writing a query that has a bunch of OR s in it, how can I modify the below query with something that will catch all the records that begin with a certain letter? SELECT Person.spineinjuryAdmit, tblComorbidity.comorbidityexplanation, Count(...
SELECT Person.spineinjuryAdmit, tblComorbidity.comorbidityexplanation, Count(tblComorbidity.comorbidityexplanation) AS CountOfcomorbidityexplanation FROM tblKentuckyCounties INNER JOIN (tblComorbidity INNER JOIN (Person INNER JOIN tblComorbidityPerson ON Person.PersonID = tblComorbidityPerson.personID) ON tblComorbidit...
Select records based on what a field begins with? I have a database with a table that has identifiers c1, c2, c3..etc.. Instead of writing a query that has a bunch of OR s in it, how can I modify the below query with something that will catch all the records that begin with a certain letter? SELECT Person.spineinjuryAd...
TITLE: Select records based on what a field begins with? QUESTION: I have a database with a table that has identifiers c1, c2, c3..etc.. Instead of writing a query that has a bunch of OR s in it, how can I modify the below query with something that will catch all the records that begin with a certain letter? SELECT Pe...
[ "sql", "ms-access", "ms-access-2007" ]
15
5
84,177
6
0
2011-05-31T19:24:21.347000
2011-05-31T19:32:04.167000
6,192,509
6,192,540
What is the alternative to using hover in selenium c# (hover is now deprecated)?
I'm using Selenium for c# version 1.0.0.0. I noticed IRenderedWebElement.hover() is deprecated and the deprecated message says to use the "user interactions API instead". When I google "user interactions API" I get this url: http://code.google.com/p/selenium/wiki/AdvancedUserInteractions ActionChainsGenerator builder =...
If the C# version corresponds to the Java version then the reason you don't see those APIs is because they're only available in the current trunk. As I understand it, a new release going to be out 'soon'. You can actually build from the current trunk to get access to these functions (it's very easy to do).
What is the alternative to using hover in selenium c# (hover is now deprecated)? I'm using Selenium for c# version 1.0.0.0. I noticed IRenderedWebElement.hover() is deprecated and the deprecated message says to use the "user interactions API instead". When I google "user interactions API" I get this url: http://code.go...
TITLE: What is the alternative to using hover in selenium c# (hover is now deprecated)? QUESTION: I'm using Selenium for c# version 1.0.0.0. I noticed IRenderedWebElement.hover() is deprecated and the deprecated message says to use the "user interactions API instead". When I google "user interactions API" I get this u...
[ "c#", "selenium", "hover", "deprecated" ]
1
1
929
1
0
2011-05-31T19:25:22.457000
2011-05-31T19:28:17.920000
6,192,512
6,195,595
Store enum as string in database
I am experimenting with dapper. I have a class which has an enum and the values are stored as strings in the database. This works with FluentNHibernate using GenericEnumMapper Is it possible to do the same with Dapper?
This is not built in at the moment, there is a proposed solution for this here: http://code.google.com/p/dapper-dot-net/issues/detail?id=24 which we are yet to decide on. I like the idea of extensible type converters As it stands the cleanest way to do this would be to define shadow property eg: class MyType { public M...
Store enum as string in database I am experimenting with dapper. I have a class which has an enum and the values are stored as strings in the database. This works with FluentNHibernate using GenericEnumMapper Is it possible to do the same with Dapper?
TITLE: Store enum as string in database QUESTION: I am experimenting with dapper. I have a class which has an enum and the values are stored as strings in the database. This works with FluentNHibernate using GenericEnumMapper Is it possible to do the same with Dapper? ANSWER: This is not built in at the moment, there...
[ "c#", "orm", "enums", "dapper" ]
17
16
6,717
3
0
2011-05-31T19:25:59.800000
2011-06-01T02:27:14.850000
6,192,518
6,192,564
What's the difference between using statement and adding a reference?
In Visual Studio, when do you have to add a reference to a dll? I always try to have a minimum of references in my projects, I try to only include the ones that are really necessary. I would think that I only need a reference if I have a using statement in my source. But that's not always enough. For instance, I have a...
You have to add a reference to an assembly the class resides in, and any dependencies, that includes return types from other assembly (ie. a method returns a DbCommand ) base class or interface from other assembly (ie. a class derives from DbCommand or implements an interface)
What's the difference between using statement and adding a reference? In Visual Studio, when do you have to add a reference to a dll? I always try to have a minimum of references in my projects, I try to only include the ones that are really necessary. I would think that I only need a reference if I have a using statem...
TITLE: What's the difference between using statement and adding a reference? QUESTION: In Visual Studio, when do you have to add a reference to a dll? I always try to have a minimum of references in my projects, I try to only include the ones that are really necessary. I would think that I only need a reference if I h...
[ "c#", "visual-studio" ]
21
8
11,550
7
0
2011-05-31T19:26:12.967000
2011-05-31T19:29:51.017000
6,192,525
6,192,720
Reference an assembly from a shared location or the GAC with Unity
Is it possible to reference an assembly from a shared location or the GAC with Unity? Assume I have two projects (under the same solution): MyProject.Data (Repository interfaces) MyProject.Data.EntityFramework (Repository Entity Framework Implementation) I want to use IoC in an ASP.NET MVC application (MyProject.Web) w...
Unity can only instantiate types it can get hold of, so your MyProject.Data.EntityFramework assembly has to be in your MVC output directory if you want to use its types. If you don't want to directly reference the project you could copy the assembly in using a build action, but going down that route means you have to c...
Reference an assembly from a shared location or the GAC with Unity Is it possible to reference an assembly from a shared location or the GAC with Unity? Assume I have two projects (under the same solution): MyProject.Data (Repository interfaces) MyProject.Data.EntityFramework (Repository Entity Framework Implementation...
TITLE: Reference an assembly from a shared location or the GAC with Unity QUESTION: Is it possible to reference an assembly from a shared location or the GAC with Unity? Assume I have two projects (under the same solution): MyProject.Data (Repository interfaces) MyProject.Data.EntityFramework (Repository Entity Framew...
[ "asp.net", "interface", "inversion-of-control", "unity-container", "gac" ]
0
1
692
1
0
2011-05-31T19:26:57.017000
2011-05-31T19:47:17.130000
6,192,528
6,192,629
Merge colors using javascript
Let say I have some element with background and foreground colors. Let say there could be both colors specified in different formats (any that could be specified in style attribute) like background = 'white' or 'transparent', foreground = 'rgb(0, 0, 0)'. What is simplest way to merge these colors using pure javascript ...
I believe setting opacity CSS attribute to half ( 0.5 ) of the element on the front will get you there. Alternatively, if you are using jQuery and you really want to get this into JavaScript, you can get both colors with jQuery's.css(), which returns something like rgb(0,0,0), then make averages of each base color (red...
Merge colors using javascript Let say I have some element with background and foreground colors. Let say there could be both colors specified in different formats (any that could be specified in style attribute) like background = 'white' or 'transparent', foreground = 'rgb(0, 0, 0)'. What is simplest way to merge these...
TITLE: Merge colors using javascript QUESTION: Let say I have some element with background and foreground colors. Let say there could be both colors specified in different formats (any that could be specified in style attribute) like background = 'white' or 'transparent', foreground = 'rgb(0, 0, 0)'. What is simplest ...
[ "javascript" ]
2
4
2,418
3
0
2011-05-31T19:27:13.517000
2011-05-31T19:36:52.077000
6,192,529
6,192,570
Count the number of occurrences of each character in a string, ignoring CRs
I'm scanning through all characters in a textbox. Then the program counts how many of each character is in the textbox. Here's the code which adds all characters to a list: For each c as char in TxtBox list.add(c) Next Everything's working fine, except this will also add returns to the list, which I don't want. I thoug...
You would also need to exclude chr(13). 10 = new line, 13 = carriage return. For each c as char in TxtBox if c <> chr(10) and c <> chr(13) then list.add(c) end if Give that a shot.
Count the number of occurrences of each character in a string, ignoring CRs I'm scanning through all characters in a textbox. Then the program counts how many of each character is in the textbox. Here's the code which adds all characters to a list: For each c as char in TxtBox list.add(c) Next Everything's working fine...
TITLE: Count the number of occurrences of each character in a string, ignoring CRs QUESTION: I'm scanning through all characters in a textbox. Then the program counts how many of each character is in the textbox. Here's the code which adds all characters to a list: For each c as char in TxtBox list.add(c) Next Everyth...
[ ".net", "vb.net" ]
1
7
870
4
0
2011-05-31T19:27:17.797000
2011-05-31T19:30:33.280000
6,192,542
6,192,648
Limitations of Java Anonymous Classes compared to Objective-C Blocks
I'm just starting to wrap my head around first order functions and closures after discovering blocks in Objective-C. Java is another language where I've heard about closures (or lack thereof) and how anonymous classes make up for this somewhat. I can definitely see the advantages of closures as blocks in Objective-C, b...
Java anonymous classes are really, really wordy. Apart from the vast amounts of boilerplate that you need just to define them, some of Java's design decisions mean that a lot of common tasks are much more verbose than in other languages. For example, importing mutable upvalues into the closure is a pain in the arse in ...
Limitations of Java Anonymous Classes compared to Objective-C Blocks I'm just starting to wrap my head around first order functions and closures after discovering blocks in Objective-C. Java is another language where I've heard about closures (or lack thereof) and how anonymous classes make up for this somewhat. I can ...
TITLE: Limitations of Java Anonymous Classes compared to Objective-C Blocks QUESTION: I'm just starting to wrap my head around first order functions and closures after discovering blocks in Objective-C. Java is another language where I've heard about closures (or lack thereof) and how anonymous classes make up for thi...
[ "java", "objective-c", "closures", "block" ]
6
10
1,874
2
0
2011-05-31T19:28:18.107000
2011-05-31T19:39:24.447000
6,192,553
6,193,234
How to parse json, using org-json libraries?
Looking for org-json solutions only please ** Suppose you deal with a structure, as follows. Using json-org, how can i get an array of Tests, if this entire json is represented in a String s? Using Google's gson, it's easy to do by testing what type given object is... i am missing something simple here with json-org li...
It so happens i got it before someone else had a chance to help. In case someone else has similar question, i am posting an answer below: JSONObject o = new JSONObject(s); JSONArray arrayOfTests = (JSONArray) ((JSONObject) o.get("Groups")).get("Test"); for (int i = 0; i < arrayOfTests.length(); i++) { System.out.prin...
How to parse json, using org-json libraries? Looking for org-json solutions only please ** Suppose you deal with a structure, as follows. Using json-org, how can i get an array of Tests, if this entire json is represented in a String s? Using Google's gson, it's easy to do by testing what type given object is... i am m...
TITLE: How to parse json, using org-json libraries? QUESTION: Looking for org-json solutions only please ** Suppose you deal with a structure, as follows. Using json-org, how can i get an array of Tests, if this entire json is represented in a String s? Using Google's gson, it's easy to do by testing what type given o...
[ "java", "json", "parsing" ]
4
8
14,130
1
0
2011-05-31T19:28:58.090000
2011-05-31T20:34:36.750000
6,192,563
6,195,711
Detect Windows (IE) proxy settings changes
I'm using WinHttpGetIEProxyConfigForCurrentUser and friends to gather the current proxy information when my app starts as doing it before each request seems to degrade performance greatly with it something sitting for a few seconds gathering the proxy data. Is there a way to detect when the Windows proxy settings have ...
Not sure if there is a better way, but you could always take the nuclear option and use RegNotifyChangeKeyValue with HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings.
Detect Windows (IE) proxy settings changes I'm using WinHttpGetIEProxyConfigForCurrentUser and friends to gather the current proxy information when my app starts as doing it before each request seems to degrade performance greatly with it something sitting for a few seconds gathering the proxy data. Is there a way to d...
TITLE: Detect Windows (IE) proxy settings changes QUESTION: I'm using WinHttpGetIEProxyConfigForCurrentUser and friends to gather the current proxy information when my app starts as doing it before each request seems to degrade performance greatly with it something sitting for a few seconds gathering the proxy data. I...
[ "c++", "windows", "internet-explorer", "winapi" ]
3
2
3,338
3
0
2011-05-31T19:29:50.273000
2011-06-01T02:46:06.760000
6,192,587
6,192,622
In Ant, how to specify the source code to be compiled
I am using an Ant script for building Java project. In the source code file, src, I have two files, test1.java, test2.java and test3.java. At present, I only want to compile test1.java and test2.java. My ant script has sth like This script essentially compiles all three java file. How to modify the above one, in specif...
You can simply add a nested exclude element in the javac task. See here for example about how to use nested include and exclude elements to control the files that are built.
In Ant, how to specify the source code to be compiled I am using an Ant script for building Java project. In the source code file, src, I have two files, test1.java, test2.java and test3.java. At present, I only want to compile test1.java and test2.java. My ant script has sth like This script essentially compiles all t...
TITLE: In Ant, how to specify the source code to be compiled QUESTION: I am using an Ant script for building Java project. In the source code file, src, I have two files, test1.java, test2.java and test3.java. At present, I only want to compile test1.java and test2.java. My ant script has sth like This script essentia...
[ "java", "ant" ]
0
0
179
2
0
2011-05-31T19:32:07.560000
2011-05-31T19:36:07.287000
6,192,592
6,192,824
Redirect to page with .htaccess password
Is it possible to redirect a 'person' to a folder on a website which is protected by a passworded.htaccess. Possibly by the use of php or otherwise, other than the "http://user:pwd@web.site" way? Or is it best just to script your own folder/file view of these protected areas.
Most browsers will issue warnings about the embedded username/password, as that sort of link has been traditionally abused by spammers to cloak their penis pill URLs behind "normal looking" links. If you want to do an automatic login, redirect with an encrypted token of some sort that the protected site can decrypt and...
Redirect to page with .htaccess password Is it possible to redirect a 'person' to a folder on a website which is protected by a passworded.htaccess. Possibly by the use of php or otherwise, other than the "http://user:pwd@web.site" way? Or is it best just to script your own folder/file view of these protected areas.
TITLE: Redirect to page with .htaccess password QUESTION: Is it possible to redirect a 'person' to a folder on a website which is protected by a passworded.htaccess. Possibly by the use of php or otherwise, other than the "http://user:pwd@web.site" way? Or is it best just to script your own folder/file view of these p...
[ "php", ".htaccess", "redirect" ]
1
2
843
1
0
2011-05-31T19:32:36.803000
2011-05-31T19:56:55.943000
6,192,596
6,192,653
How to select multiple elements that are children of given element?
I have and I need to select all pre and div elements that are children of #mydiv. I could do it this way: div#mydiv > pre, div#mydiv > div but, can it be done so that #mydiv is referenced only once? div#mydiv > pre, div will select all div s on the page regardless if they're children of #mydiv, so the comma isn't a way...
You'll have to reference #mydiv twice... #mydiv > pre, #mydiv > div I removed the extraneous div element selector as the ID is specific enough.
How to select multiple elements that are children of given element? I have and I need to select all pre and div elements that are children of #mydiv. I could do it this way: div#mydiv > pre, div#mydiv > div but, can it be done so that #mydiv is referenced only once? div#mydiv > pre, div will select all div s on the pag...
TITLE: How to select multiple elements that are children of given element? QUESTION: I have and I need to select all pre and div elements that are children of #mydiv. I could do it this way: div#mydiv > pre, div#mydiv > div but, can it be done so that #mydiv is referenced only once? div#mydiv > pre, div will select al...
[ "css", "css-selectors" ]
70
67
68,928
4
0
2011-05-31T19:33:06.913000
2011-05-31T19:40:00.453000