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,252,622
6,252,686
iOS: Compare two NSDate-s without time portion
I want to compare two dates: date1 and date2 2011-06-06 12:59:48.994 Project[419:707] firstDate:2011-06-06 10:59:21 +0000 2011-06-06 12:59:49.004 Project[419:707] selectedData:2011-06-06 10:59:17 +0000 but these dates have different time and when I use NSOrderedSame it don't work fine, how can I solve? my code: NSDate ...
NSCalendar *calendar = [NSCalendar currentCalendar]; NSInteger comps = (NSCalendarUnitDay | NSCalendarUnitMonth | NSCalendarUnitYear); NSDateComponents *date1Components = [calendar components:comps fromDate: date1]; NSDateComponents *date2Components = [calendar components:comps fromDate: date2]; date1 = [calendar dat...
iOS: Compare two NSDate-s without time portion I want to compare two dates: date1 and date2 2011-06-06 12:59:48.994 Project[419:707] firstDate:2011-06-06 10:59:21 +0000 2011-06-06 12:59:49.004 Project[419:707] selectedData:2011-06-06 10:59:17 +0000 but these dates have different time and when I use NSOrderedSame it don...
TITLE: iOS: Compare two NSDate-s without time portion QUESTION: I want to compare two dates: date1 and date2 2011-06-06 12:59:48.994 Project[419:707] firstDate:2011-06-06 10:59:21 +0000 2011-06-06 12:59:49.004 Project[419:707] selectedData:2011-06-06 10:59:17 +0000 but these dates have different time and when I use NS...
[ "objective-c", "ios", "cocoa-touch", "nsdate" ]
27
53
24,262
5
0
2011-06-06T13:20:53.007000
2011-06-06T13:26:05.207000
6,252,629
6,252,653
How to select these elements
I'd like to handler all elements with the attribute rel inside of an a elements that start with string lightbox. How can I do it with jQuery?
Use the attribute starts with selector. $('a [rel^="lightbox"]') EDIT: having re-read your question, it sounds like this may be what you want: $('a[id^="lightbox"] [rel]') This selects all elements that have the attribute rel and are within an a tag that has an ID starting with lightbox.
How to select these elements I'd like to handler all elements with the attribute rel inside of an a elements that start with string lightbox. How can I do it with jQuery?
TITLE: How to select these elements QUESTION: I'd like to handler all elements with the attribute rel inside of an a elements that start with string lightbox. How can I do it with jQuery? ANSWER: Use the attribute starts with selector. $('a [rel^="lightbox"]') EDIT: having re-read your question, it sounds like this m...
[ "jquery", "jquery-selectors" ]
0
2
75
4
0
2011-06-06T13:21:16.437000
2011-06-06T13:23:03.203000
6,252,636
6,252,939
clojure macro if-empty?
I have written a if-pred? macro as follows (defmacro if-pred? ([pred lst then] `(if (~pred ~lst) ~then nil)) ([pred lst then else] `(if (~pred ~lst) ~then ~else))) Now I want to construct a if-empty? macro from that. (defmacro if-empty? [lst then & else] (if-pred? empty? lst then else)) I want to use if-empty? like: (i...
You're not quoting the expansion of (defmacro if-empty?...), and you're forcing the optional else argument into a list. (defmacro if-empty? ([lst then else] `(if-pred? empty? ~lst ~then ~else)) ([lst then] `(if-pred? empty? ~lst ~then)))
clojure macro if-empty? I have written a if-pred? macro as follows (defmacro if-pred? ([pred lst then] `(if (~pred ~lst) ~then nil)) ([pred lst then else] `(if (~pred ~lst) ~then ~else))) Now I want to construct a if-empty? macro from that. (defmacro if-empty? [lst then & else] (if-pred? empty? lst then else)) I want t...
TITLE: clojure macro if-empty? QUESTION: I have written a if-pred? macro as follows (defmacro if-pred? ([pred lst then] `(if (~pred ~lst) ~then nil)) ([pred lst then else] `(if (~pred ~lst) ~then ~else))) Now I want to construct a if-empty? macro from that. (defmacro if-empty? [lst then & else] (if-pred? empty? lst th...
[ "macros", "clojure" ]
2
4
428
4
0
2011-06-06T13:21:54.377000
2011-06-06T13:44:37.980000
6,252,644
6,252,669
Create an array with tree elements in Javascript
I need to create an array from tree elements in Javascript and being a newbie I don't know how to achieve this. pseudo-code: function make_array_of_tree_node(tree_node) { for (var i = 0; i < tree_node.childCount; i ++) { var node = tree_node_node.getChild(i); if (node.type ==0) { // Here I'd like to put a link (node.ti...
You can declare an array like this: var nodes = []; Then you can add things to it with: nodes.push(something); That adds to the end of the array; in that sense it's kind-of like a list. You can access elements by numeric indexes, starting with zero. The length of the array is maintained for you: var len = nodes.length;...
Create an array with tree elements in Javascript I need to create an array from tree elements in Javascript and being a newbie I don't know how to achieve this. pseudo-code: function make_array_of_tree_node(tree_node) { for (var i = 0; i < tree_node.childCount; i ++) { var node = tree_node_node.getChild(i); if (node.ty...
TITLE: Create an array with tree elements in Javascript QUESTION: I need to create an array from tree elements in Javascript and being a newbie I don't know how to achieve this. pseudo-code: function make_array_of_tree_node(tree_node) { for (var i = 0; i < tree_node.childCount; i ++) { var node = tree_node_node.getChi...
[ "javascript", "arrays", "function", "tree" ]
2
2
2,615
1
0
2011-06-06T13:22:20.217000
2011-06-06T13:24:40.933000
6,252,649
6,252,723
Can't upload APK due to "The file is invalid: ERROR: dump failed because no AndroidManifest.xml found"
First: I'm not help vampire) I'm fighting with this issue for two days and I'm desperate to find solution. I've googled for the solution all over the inet and none is my case - this is the final stage and it feels hopeless. To be clear: messing with AndroidManifest.xml doesn't help (no empty or unclosed tags etc). Nor ...
The maximum size of an Android app to be uploaded to Android Market is 50MB. If you're even one byte over this, I believe that the upload will fail. See this blog post for reference.
Can't upload APK due to "The file is invalid: ERROR: dump failed because no AndroidManifest.xml found" First: I'm not help vampire) I'm fighting with this issue for two days and I'm desperate to find solution. I've googled for the solution all over the inet and none is my case - this is the final stage and it feels hop...
TITLE: Can't upload APK due to "The file is invalid: ERROR: dump failed because no AndroidManifest.xml found" QUESTION: First: I'm not help vampire) I'm fighting with this issue for two days and I'm desperate to find solution. I've googled for the solution all over the inet and none is my case - this is the final stag...
[ "android", "upload", "android-manifest", "apk" ]
0
1
1,992
2
0
2011-06-06T13:22:48.030000
2011-06-06T13:29:02.020000
6,252,660
6,252,698
python & suds "ImportError: cannot import name getLogger"
I'm using Ubuntu 11.04 (natty). I have been using Suds to consume a SOAP web service. Everything was working fine... until it wasn't. I can no longer import Suds. I've uninstalled and re-installed Suds from the Ubuntu repositories but still get the same import error (see IDLE traceback below). I'm using Python 2.7.1 an...
logging is a standard module of Python. There are several possible reasons why Python can't find it anymore: The is another logging module in the path (print sys.path to get a list of paths Python will search) Someone changed PYTHONPATH (the default Python search path) Someone messed with the Python installation (delet...
python & suds "ImportError: cannot import name getLogger" I'm using Ubuntu 11.04 (natty). I have been using Suds to consume a SOAP web service. Everything was working fine... until it wasn't. I can no longer import Suds. I've uninstalled and re-installed Suds from the Ubuntu repositories but still get the same import e...
TITLE: python & suds "ImportError: cannot import name getLogger" QUESTION: I'm using Ubuntu 11.04 (natty). I have been using Suds to consume a SOAP web service. Everything was working fine... until it wasn't. I can no longer import Suds. I've uninstalled and re-installed Suds from the Ubuntu repositories but still get...
[ "python", "suds", "importerror" ]
1
9
3,213
1
0
2011-06-06T13:23:40.477000
2011-06-06T13:27:15.517000
6,252,662
6,252,725
Why should i use a Toolkit to implemement MVVM pattern
Today i was doing a POC using MVVM Light Toolkit. My Senoir asked why do we have to use MVVM light toolkit. He said we have to explain it to client that why do we want to use it. I tried to suggest things like Built in classes for Commands,Messages but i dont thinks it was strong enough. What are the Pros and Cons of u...
I think the same kind of question was asked few minutes ago Custom MVVM implementation Vs. PRISM Please, try to search just a bit before posting this kind of questions;)
Why should i use a Toolkit to implemement MVVM pattern Today i was doing a POC using MVVM Light Toolkit. My Senoir asked why do we have to use MVVM light toolkit. He said we have to explain it to client that why do we want to use it. I tried to suggest things like Built in classes for Commands,Messages but i dont think...
TITLE: Why should i use a Toolkit to implemement MVVM pattern QUESTION: Today i was doing a POC using MVVM Light Toolkit. My Senoir asked why do we have to use MVVM light toolkit. He said we have to explain it to client that why do we want to use it. I tried to suggest things like Built in classes for Commands,Message...
[ "wpf", "mvvm-light", "toolkit" ]
0
1
244
2
0
2011-06-06T13:24:18.890000
2011-06-06T13:29:09.440000
6,252,668
6,252,832
How to simplify this code in VB.NET
I have following code for 3 DataGridView Controls in my VB.NET winform application. How can I simplify this code? With DataGridView1.Columns.Add("Column 0", "TaskName").AutoResizeColumns() End With With DataGridView2.Columns.Add("Column 0", "TaskName").AutoResizeColumns() End With With DataGridView3.Columns.Add("Colu...
You could; For Each o As DataGridView In New DataGridView() {DataGridView1, DataGridView2, DataGridView3} o.Columns.Add("Column 0", "TaskName") o.AutoResizeColumns() Next
How to simplify this code in VB.NET I have following code for 3 DataGridView Controls in my VB.NET winform application. How can I simplify this code? With DataGridView1.Columns.Add("Column 0", "TaskName").AutoResizeColumns() End With With DataGridView2.Columns.Add("Column 0", "TaskName").AutoResizeColumns() End With ...
TITLE: How to simplify this code in VB.NET QUESTION: I have following code for 3 DataGridView Controls in my VB.NET winform application. How can I simplify this code? With DataGridView1.Columns.Add("Column 0", "TaskName").AutoResizeColumns() End With With DataGridView2.Columns.Add("Column 0", "TaskName").AutoResizeCo...
[ ".net", "vb.net" ]
2
4
364
3
0
2011-06-06T13:24:38.267000
2011-06-06T13:36:49.590000
6,252,677
6,252,740
Supported locations for distributing applications
I get the following information from http://www.google.com/support/androidmarket/developer/bin/answer.py?answer=138294 The developers can also choose free application distribution to users in the "Rest of the world" -- with the option to exclude distribution in the following countries: One of the excluded distribution ...
It is an option to exclude distribution to Malaysia. It is not a requirement. That means developers can decide to not distribute their application in Malaysia, but they will anyways because it's only an option. Not mandatory.
Supported locations for distributing applications I get the following information from http://www.google.com/support/androidmarket/developer/bin/answer.py?answer=138294 The developers can also choose free application distribution to users in the "Rest of the world" -- with the option to exclude distribution in the foll...
TITLE: Supported locations for distributing applications QUESTION: I get the following information from http://www.google.com/support/androidmarket/developer/bin/answer.py?answer=138294 The developers can also choose free application distribution to users in the "Rest of the world" -- with the option to exclude distri...
[ "android" ]
0
1
56
1
0
2011-06-06T13:25:27.157000
2011-06-06T13:30:00.557000
6,252,678
6,252,782
Converting a date string to a DateTime object using Joda Time library
I have a date as a string in the following format "04/02/2011 20:27:05". I am using Joda-Time library and would like to convert it to DateTime object. I did: DateTime dt = new DateTime("04/02/2011 20:27:05") But I'm getting the following error: Invalid format: "04/02/2011 14:42:17" is malformed at "/02/2011 14:42:17" H...
Use DateTimeFormat: DateTimeFormatter formatter = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss"); DateTime dt = formatter.parseDateTime(string);
Converting a date string to a DateTime object using Joda Time library I have a date as a string in the following format "04/02/2011 20:27:05". I am using Joda-Time library and would like to convert it to DateTime object. I did: DateTime dt = new DateTime("04/02/2011 20:27:05") But I'm getting the following error: Inval...
TITLE: Converting a date string to a DateTime object using Joda Time library QUESTION: I have a date as a string in the following format "04/02/2011 20:27:05". I am using Joda-Time library and would like to convert it to DateTime object. I did: DateTime dt = new DateTime("04/02/2011 20:27:05") But I'm getting the foll...
[ "java", "datetime", "jodatime" ]
257
504
425,217
10
0
2011-06-06T13:25:28.073000
2011-06-06T13:33:05.563000
6,252,679
6,252,803
Check if two arrays contain only the same keys
What's the fastest way to compare if the keys of two arrays are equal? for eg. array1: array2: 'abc' => 46, 'abc' => 46, 'def' => 134, 'def' => 134, 'xyz' => 34, 'xyz' => 34, in this case result should be TRUE (same keys) and: array1: array2: 'abc' => 46, 'abc' => 46, 'def' => 134, 'def' => 134, 'qwe' => 34, 'xyz' =>...
Use array_diff_key, that is what it is for. As you said, it returns an empty array; that is what it is supposed to do. Given array_diff_key($array1, $array2), it will return an empty array if all of array1's keys exist in array2. To make sure that the arrays are equal, you then need to make sure all of array2's keys ex...
Check if two arrays contain only the same keys What's the fastest way to compare if the keys of two arrays are equal? for eg. array1: array2: 'abc' => 46, 'abc' => 46, 'def' => 134, 'def' => 134, 'xyz' => 34, 'xyz' => 34, in this case result should be TRUE (same keys) and: array1: array2: 'abc' => 46, 'abc' => 46, 'd...
TITLE: Check if two arrays contain only the same keys QUESTION: What's the fastest way to compare if the keys of two arrays are equal? for eg. array1: array2: 'abc' => 46, 'abc' => 46, 'def' => 134, 'def' => 134, 'xyz' => 34, 'xyz' => 34, in this case result should be TRUE (same keys) and: array1: array2: 'abc' => 4...
[ "php", "arrays", "multidimensional-array", "key", "comparison" ]
5
21
25,990
4
0
2011-06-06T13:25:28.823000
2011-06-06T13:34:42.863000
6,252,680
6,252,863
The confusion about * {margin:0; padding:0;}
In some articles that I've read, the use of * {margin:0; padding:0;} is discouraged as it would affect the web site's performance. So I turned to a reset.css stylesheet. But I'm wondering, how does it affect the performance?
The reasoning behind this was discussed in this Eric Meyer post. This is why so many people zero out their padding and margins on everything by way of the universal selector. That’s a good start, but it does unfortunately mean that all elements will have their padding and margin zeroed, including form elements like tex...
The confusion about * {margin:0; padding:0;} In some articles that I've read, the use of * {margin:0; padding:0;} is discouraged as it would affect the web site's performance. So I turned to a reset.css stylesheet. But I'm wondering, how does it affect the performance?
TITLE: The confusion about * {margin:0; padding:0;} QUESTION: In some articles that I've read, the use of * {margin:0; padding:0;} is discouraged as it would affect the web site's performance. So I turned to a reset.css stylesheet. But I'm wondering, how does it affect the performance? ANSWER: The reasoning behind th...
[ "css", "padding", "margin", "css-reset" ]
6
9
9,195
5
0
2011-06-06T13:25:29.847000
2011-06-06T13:39:51.163000
6,252,682
6,252,745
problem calling a function in php mysqli
the following is the class i tried to develop in oo way in php but as a begginer in php oo i am getting and error message which i do not know how to solve. please point out the fault thanks. class MySQLi_DB extends mysqli { private static $_instance = null; private function __construct($db="test",$host="localhost", $u...
According to this page mysqli_result::fetch_all() is only available when the MySQL native driver is installed. Please ensure that it is installed and enabled for you configuration.
problem calling a function in php mysqli the following is the class i tried to develop in oo way in php but as a begginer in php oo i am getting and error message which i do not know how to solve. please point out the fault thanks. class MySQLi_DB extends mysqli { private static $_instance = null; private function __c...
TITLE: problem calling a function in php mysqli QUESTION: the following is the class i tried to develop in oo way in php but as a begginer in php oo i am getting and error message which i do not know how to solve. please point out the fault thanks. class MySQLi_DB extends mysqli { private static $_instance = null; pr...
[ "php", "oop" ]
1
1
880
1
0
2011-06-06T13:25:38.780000
2011-06-06T13:30:23.650000
6,252,704
6,252,829
ActiveAdmin Comment model not working properly
I created a blog by following the Getting Started with Rails precisely. And then I following the tutorial here to try ActiveAdmin: http://activeadmin.info/documentation.html. It's working fine for the Post and Tag models (I logged in and created/add/edited stuff) but not the Comment model. rails generate active_admin:r...
Look like a bug (ActiveAdmin has it's own built-in Comment model/class already): https://github.com/gregbell/active_admin/issues/64 A possible workaround could be to give your Comment model a different name within in app/admin/comments.rb: ActiveAdmin.register Comment,:as => "PostComment" do
ActiveAdmin Comment model not working properly I created a blog by following the Getting Started with Rails precisely. And then I following the tutorial here to try ActiveAdmin: http://activeadmin.info/documentation.html. It's working fine for the Post and Tag models (I logged in and created/add/edited stuff) but not t...
TITLE: ActiveAdmin Comment model not working properly QUESTION: I created a blog by following the Getting Started with Rails precisely. And then I following the tutorial here to try ActiveAdmin: http://activeadmin.info/documentation.html. It's working fine for the Post and Tag models (I logged in and created/add/edite...
[ "ruby-on-rails", "ruby", "activeadmin" ]
20
47
7,631
4
0
2011-06-06T13:27:47.983000
2011-06-06T13:36:40.320000
6,252,705
6,252,730
Subversion deployment onto Windows environment
I need to deploy an source control enviroment. I have heard Visual Source Safe is rubbish and to avoid it. So I have been looking into SVN, but what I don't understand is how to deploy this? We have one development server which holds all of our content, I need it so the 10+ developers can sign out files/folders work on...
Have a look at http://www.visualsvn.com/server/ which is a free SVN server for Windows. It's very easy to setup and configure.
Subversion deployment onto Windows environment I need to deploy an source control enviroment. I have heard Visual Source Safe is rubbish and to avoid it. So I have been looking into SVN, but what I don't understand is how to deploy this? We have one development server which holds all of our content, I need it so the 10...
TITLE: Subversion deployment onto Windows environment QUESTION: I need to deploy an source control enviroment. I have heard Visual Source Safe is rubbish and to avoid it. So I have been looking into SVN, but what I don't understand is how to deploy this? We have one development server which holds all of our content, I...
[ "windows", "svn", "iis" ]
1
4
247
1
0
2011-06-06T13:27:54.037000
2011-06-06T13:29:18.107000
6,252,706
6,252,800
How to autoremove folders/files from a SVN repo automatically?
Im using SVN for the first time, so probably this is a basic question. The app im using under svn, the problem is that one task of the application is to add/remove folders/files automatically; When i commit, i want to update the repository with the current folder tree. I saw how to add all created files/folder, with sv...
You should always use svn delete rather than just deleting folders/files from the repo. That being said, it looks like someone wrote a script to do this: svn commit missing file automatically
How to autoremove folders/files from a SVN repo automatically? Im using SVN for the first time, so probably this is a basic question. The app im using under svn, the problem is that one task of the application is to add/remove folders/files automatically; When i commit, i want to update the repository with the current ...
TITLE: How to autoremove folders/files from a SVN repo automatically? QUESTION: Im using SVN for the first time, so probably this is a basic question. The app im using under svn, the problem is that one task of the application is to add/remove folders/files automatically; When i commit, i want to update the repository...
[ "svn", "tree", "directory" ]
1
1
767
2
0
2011-06-06T13:27:59.450000
2011-06-06T13:34:32.613000
6,252,712
6,253,602
Connecting Tables in Microsoft Access 2010
I'm new in creating database in Microsoft Access, I'm trying to figure out how to connect tables in it. I have 3 tables, I named it as Products, Suppliers, and Prod_Supp. In my Prod_Supp table I have fields where it is also a field in my Products and Suppliers table. What I want to do is that when I enter data in Prod_...
Sounds like the Prod_Supp is a link-table between Products en Suppliers for both having a n-to-n relation to each other. In that case: there always hás to be a Supplier and a Product before you can link them together. So the Prod_Supp table has just 2 fields, and 2 fields only: a foreign key to Supplier.ID and a foreig...
Connecting Tables in Microsoft Access 2010 I'm new in creating database in Microsoft Access, I'm trying to figure out how to connect tables in it. I have 3 tables, I named it as Products, Suppliers, and Prod_Supp. In my Prod_Supp table I have fields where it is also a field in my Products and Suppliers table. What I wa...
TITLE: Connecting Tables in Microsoft Access 2010 QUESTION: I'm new in creating database in Microsoft Access, I'm trying to figure out how to connect tables in it. I have 3 tables, I named it as Products, Suppliers, and Prod_Supp. In my Prod_Supp table I have fields where it is also a field in my Products and Supplier...
[ "database", "ms-access", "ms-access-2010" ]
1
2
441
1
0
2011-06-06T13:28:20.557000
2011-06-06T14:33:57.613000
6,252,715
6,265,833
Is TFS and WebDAV usable together?
The company I work for is a Microsoft partner and we are trying to test out Team Foundation Server 2010 to see if it can be an answer to our "NO VERSION CONTROL" problem. However, we have several designers, all of which use Dreamweaver. Dreamweaver supports WebDAV and so does IIS. Is there a way to connect (including c...
TFS client-server connection is web services, but these are WS-* style operations. In theory one could use the TFS client code to create one's own WebDAV based API, but there is nothing out of the box.
Is TFS and WebDAV usable together? The company I work for is a Microsoft partner and we are trying to test out Team Foundation Server 2010 to see if it can be an answer to our "NO VERSION CONTROL" problem. However, we have several designers, all of which use Dreamweaver. Dreamweaver supports WebDAV and so does IIS. Is ...
TITLE: Is TFS and WebDAV usable together? QUESTION: The company I work for is a Microsoft partner and we are trying to test out Team Foundation Server 2010 to see if it can be an answer to our "NO VERSION CONTROL" problem. However, we have several designers, all of which use Dreamweaver. Dreamweaver supports WebDAV an...
[ "web-services", "iis", "tfs", "msdn" ]
1
2
975
1
0
2011-06-06T13:28:28.760000
2011-06-07T13:21:35.437000
6,252,716
6,252,949
how can we come to know that which frame work is missing in our code
I have got some code from my client. I have tried to build that code but it gave following error Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 There are many frameworks and libraries used in this project. How can we come to know which file or framework is missin...
Are you sure the error is about a framework? If you look closely at the error message in Build Results, there should be more info about it (if you click on a disclosure button on the message's right). Here's a screenshot from Xcode 3.
how can we come to know that which frame work is missing in our code I have got some code from my client. I have tried to build that code but it gave following error Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 There are many frameworks and libraries used in th...
TITLE: how can we come to know that which frame work is missing in our code QUESTION: I have got some code from my client. I have tried to build that code but it gave following error Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 There are many frameworks and li...
[ "iphone", "xcode" ]
0
2
61
1
0
2011-06-06T13:28:34.037000
2011-06-06T13:45:31.387000
6,252,721
6,252,828
Best way to implement a file access check in a loop
I'm trying to find a better way to check for file access in a loop. Here's my code: while (true) { try { using (FileStream Fs = new FileStream(fileName, FileMode.Open, FileAccess.Write)) using (StreamReader stream = new StreamReader(Fs)) { break; } } catch (FileNotFoundException) { break; } catch (ArgumentException) {...
I wrote this the other day. public static void Retry(Action fileAction, int iteration) { try { fileAction.Invoke(); } catch (IOException) { if (interation < MaxRetries) { System.Threading.Thread.Sleep(IterationThrottleMS); Retry(fileAction, ++iteration); } else { throw; } } } You would have to declare MaxRetries and It...
Best way to implement a file access check in a loop I'm trying to find a better way to check for file access in a loop. Here's my code: while (true) { try { using (FileStream Fs = new FileStream(fileName, FileMode.Open, FileAccess.Write)) using (StreamReader stream = new StreamReader(Fs)) { break; } } catch (FileNotFou...
TITLE: Best way to implement a file access check in a loop QUESTION: I'm trying to find a better way to check for file access in a loop. Here's my code: while (true) { try { using (FileStream Fs = new FileStream(fileName, FileMode.Open, FileAccess.Write)) using (StreamReader stream = new StreamReader(Fs)) { break; } }...
[ "c#", "permissions" ]
0
0
676
1
0
2011-06-06T13:28:56.263000
2011-06-06T13:36:27.933000
6,252,724
6,252,768
Different Target .Net Framework on each C# Project
is it ok if i have this X project using.net2.0, and that X project is calling Y project which is using.net3.5.. i got customized buttons in Y project and im using that button in X project also, there's a method in Y project that has LINQ and X project is calling that method... i cant test it because i installed the lat...
If the 3.5 framework is not installed on the machine that executes this, it will fail as System.Linq.dll won't exist. You can use LINQBridge with.NET 2.0 and C# 3.0 (which will give you access to a re-implementation of LINQ-to-Objects) but in reality it may be easier to get the client to upgrade. 2.0 is pretty old now....
Different Target .Net Framework on each C# Project is it ok if i have this X project using.net2.0, and that X project is calling Y project which is using.net3.5.. i got customized buttons in Y project and im using that button in X project also, there's a method in Y project that has LINQ and X project is calling that m...
TITLE: Different Target .Net Framework on each C# Project QUESTION: is it ok if i have this X project using.net2.0, and that X project is calling Y project which is using.net3.5.. i got customized buttons in Y project and im using that button in X project also, there's a method in Y project that has LINQ and X project...
[ "c#", "linq" ]
1
3
115
2
0
2011-06-06T13:29:02.473000
2011-06-06T13:31:56.403000
6,252,734
6,252,763
C#: How to use the char overload for string.Replace() to replace with nothing?
I have the following extension method (which is invalid and does not compile ATM): public static string Strip( this string str, char[] charsToStrip ) { foreach( char c in charsToStrip ) { str.Replace( c, "" ); } return str; } The str.Replace() call needs to invoke the 'char' overload of Replace(), however using this o...
Try: str = str.Replace(c.ToString(), String.Empty); Note that instances of string are immutable. As such, you need to assign the result of String.Replace otherwise the result is lost.
C#: How to use the char overload for string.Replace() to replace with nothing? I have the following extension method (which is invalid and does not compile ATM): public static string Strip( this string str, char[] charsToStrip ) { foreach( char c in charsToStrip ) { str.Replace( c, "" ); } return str; } The str.Replac...
TITLE: C#: How to use the char overload for string.Replace() to replace with nothing? QUESTION: I have the following extension method (which is invalid and does not compile ATM): public static string Strip( this string str, char[] charsToStrip ) { foreach( char c in charsToStrip ) { str.Replace( c, "" ); } return str...
[ "c#", "string" ]
1
8
743
2
0
2011-06-06T13:29:40.553000
2011-06-06T13:31:40.367000
6,252,757
6,253,258
Stored Procedure Transaction
I have never used a Transaction, Commit and Rollback before and now I need to use one. I have checked around online, etc for examples to make sure that I am in fact using this correctly but I am still not sure if I have coded this correct. I am hoping someone can review and advise me if this seems correct. Basically I ...
Oh well i rewrite quickly your SP using the concept TRY CATCH and the TRANSACTION as you requested but i didnt check it. This code will work in SQL 2005/2008 Let me know if this feedback can be useful for you CREATE PROCEDURE [dbo].[spReopenClosed] ( @Return_Message VARCHAR(1024) = '' OUT, @IID uniqueidentifier, @OpenD...
Stored Procedure Transaction I have never used a Transaction, Commit and Rollback before and now I need to use one. I have checked around online, etc for examples to make sure that I am in fact using this correctly but I am still not sure if I have coded this correct. I am hoping someone can review and advise me if thi...
TITLE: Stored Procedure Transaction QUESTION: I have never used a Transaction, Commit and Rollback before and now I need to use one. I have checked around online, etc for examples to make sure that I am in fact using this correctly but I am still not sure if I have coded this correct. I am hoping someone can review an...
[ "sql-server", "stored-procedures", "transactions", "commit", "rollback" ]
17
33
49,065
2
0
2011-06-06T13:31:19.400000
2011-06-06T14:07:48.663000
6,252,758
6,252,953
Python: default comparison
In Python 2.7, I define an empty new-style class: In [43]: class C(object): pass....: then create a list of instances of the new class: In [44]: c = [C() for i in xrange(10)] then attempt to sort the list: In [45]: sorted(c) Out[45]: [<__main__.C object at 0x1950a490>, <__main__.C object at 0x1950a4d0>,... <__main__.C ...
I think the only rationale is that it is convenient that objects can be sorted and e.g. used as dictionary keys with some default behavior. The relevant chapter in the language definition is here: https://docs.python.org/2/reference/expressions.html#not-in "The choice whether one object is considered smaller or larger ...
Python: default comparison In Python 2.7, I define an empty new-style class: In [43]: class C(object): pass....: then create a list of instances of the new class: In [44]: c = [C() for i in xrange(10)] then attempt to sort the list: In [45]: sorted(c) Out[45]: [<__main__.C object at 0x1950a490>, <__main__.C object at 0...
TITLE: Python: default comparison QUESTION: In Python 2.7, I define an empty new-style class: In [43]: class C(object): pass....: then create a list of instances of the new class: In [44]: c = [C() for i in xrange(10)] then attempt to sort the list: In [45]: sorted(c) Out[45]: [<__main__.C object at 0x1950a490>, <__ma...
[ "python", "object", "comparison" ]
10
16
4,958
3
0
2011-06-06T13:31:25.080000
2011-06-06T13:45:49.317000
6,252,760
6,254,616
How to calculate Polygon points from a simple line for a specific width?
I currently develop an application that creates polygons from lines and I experience a small problem: I have a set of points, representing a line. I would like to create a polygon that displays the line with a specific width (e.g. for a street). I have several ideas how to calculate the outer polygon points, but I thin...
What you are looking for is a polygon (or line) offsetting algorithm. This is not necessarily an easy problem to solve, by the way: An algorithm for inflating/deflating (offsetting, buffering) polygons. For the last couple of weeks I've been working on a line offsetting algorithm for Maperitive. In my case I only neede...
How to calculate Polygon points from a simple line for a specific width? I currently develop an application that creates polygons from lines and I experience a small problem: I have a set of points, representing a line. I would like to create a polygon that displays the line with a specific width (e.g. for a street). I...
TITLE: How to calculate Polygon points from a simple line for a specific width? QUESTION: I currently develop an application that creates polygons from lines and I experience a small problem: I have a set of points, representing a line. I would like to create a polygon that displays the line with a specific width (e.g...
[ "language-agnostic", "line", "polygon", "openstreetmap" ]
4
4
4,267
1
0
2011-06-06T13:31:30.930000
2011-06-06T15:50:29.117000
6,252,785
6,254,633
WinNT giving to much information. I need to narrow down to just Machine Names
Dim de As New System.DirectoryServices.DirectoryEntry() Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click de.Path = "WinNT://*****".Replace("*****", ActiveDirectory.Domain.GetCurrentDomain.Name) Dim Mystream As Object MsgBox("Please choose the place you want th...
I'm not sure if there is much difference in our active directory setups, but I ran the following code in a console application and it only output the AD Names (as expected): Module Module1 Sub Main() Using de As New System.DirectoryServices.DirectoryEntry de.Path = "WinNT://*****".Replace("*****", System.DirectoryServ...
WinNT giving to much information. I need to narrow down to just Machine Names Dim de As New System.DirectoryServices.DirectoryEntry() Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click de.Path = "WinNT://*****".Replace("*****", ActiveDirectory.Domain.GetCurrentD...
TITLE: WinNT giving to much information. I need to narrow down to just Machine Names QUESTION: Dim de As New System.DirectoryServices.DirectoryEntry() Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click de.Path = "WinNT://*****".Replace("*****", ActiveDirectory....
[ "vb.net", "visual-studio-2010" ]
1
1
638
2
0
2011-06-06T13:33:26.363000
2011-06-06T15:51:59.547000
6,252,791
6,253,047
gwt-g2d: How to detect if point is in shape?
I'm trying to detect if a point is within an gwt-g2d shape. Does anybody know how this is possible? I just can determine if the point is within any path in the context. Lets say I have a context with two rectangle (A & B) and want to determine in which rectangle the mouse is, how can I do this? ________________________...
You could look up the point-in-polygon problem. If you have a lot of polygons people also tend to narrow down the possibilities by storing the left,right,bottom, and top-most points of a polygon (or storing the radius and center point of a circle enclosing the polygon) so that they can quickly determine whether the poi...
gwt-g2d: How to detect if point is in shape? I'm trying to detect if a point is within an gwt-g2d shape. Does anybody know how this is possible? I just can determine if the point is within any path in the context. Lets say I have a context with two rectangle (A & B) and want to determine in which rectangle the mouse is...
TITLE: gwt-g2d: How to detect if point is in shape? QUESTION: I'm trying to detect if a point is within an gwt-g2d shape. Does anybody know how this is possible? I just can determine if the point is within any path in the context. Lets say I have a context with two rectangle (A & B) and want to determine in which rect...
[ "java", "gwt", "shapes", "point-in-polygon" ]
0
0
969
2
0
2011-06-06T13:33:51.193000
2011-06-06T13:52:34.727000
6,252,793
6,252,924
Possible to send a POX request, but receive a SOAP response from a service?
I want to send something like: Once I receive the request, I want to read in the Credentials, verify it. If it is verified, I will send back a soap response. How can I do this?
With build in stuff you can't. You can turn off the SOAP processing by either using REST service or custom binding with MessageVersion.None and you must build valid SOAP response manually like any other XML document.
Possible to send a POX request, but receive a SOAP response from a service? I want to send something like: Once I receive the request, I want to read in the Credentials, verify it. If it is verified, I will send back a soap response. How can I do this?
TITLE: Possible to send a POX request, but receive a SOAP response from a service? QUESTION: I want to send something like: Once I receive the request, I want to read in the Credentials, verify it. If it is verified, I will send back a soap response. How can I do this? ANSWER: With build in stuff you can't. You can t...
[ "wcf" ]
0
2
131
1
0
2011-06-06T13:34:00.523000
2011-06-06T13:43:42.673000
6,252,799
6,264,871
Search box in a jQuery ajax success page - issues in loop
Firstly, there have some tag links in my main page. click each one, post value to b.php with jquery.ajax and turn back value in div#result. b.php have a search box. when search something in it. the result data will still show in the div#result. my problem is: I know if I will do jQuery ajax in the b.php, I shall write ...
When a new element is introduced to the page the jQuery.click() method becomes useless because it can only see elements that were part of the original DOM. What you need to use instead is the jQuery.live() method which allows you to bind events to elements that were created after the DOM was loaded. You can read more a...
Search box in a jQuery ajax success page - issues in loop Firstly, there have some tag links in my main page. click each one, post value to b.php with jquery.ajax and turn back value in div#result. b.php have a search box. when search something in it. the result data will still show in the div#result. my problem is: I ...
TITLE: Search box in a jQuery ajax success page - issues in loop QUESTION: Firstly, there have some tag links in my main page. click each one, post value to b.php with jquery.ajax and turn back value in div#result. b.php have a search box. when search something in it. the result data will still show in the div#result....
[ "javascript", "jquery" ]
2
2
1,016
3
0
2011-06-06T13:34:28.623000
2011-06-07T12:04:02.397000
6,252,804
6,253,073
git: creating remote branch failed
I tried creating remote branch devel using: git push origin origin:refs/heads/devel But it fails with: error: src refspec devel does not match any. error: failed to push some refs to 'git@***.com:***/abcd.git' What's going on? EDIT: I am following: This Tutorial
If devel is your local branch, then this is sufficient: git push origin devel Your example doesn't work, because you try to push "origin" branch to remote repository ("origin"), but you don't have branch named "origin" (first origin here) in local repository. You can run: git push origin devel:refs/heads/devel # ^ ^ # ...
git: creating remote branch failed I tried creating remote branch devel using: git push origin origin:refs/heads/devel But it fails with: error: src refspec devel does not match any. error: failed to push some refs to 'git@***.com:***/abcd.git' What's going on? EDIT: I am following: This Tutorial
TITLE: git: creating remote branch failed QUESTION: I tried creating remote branch devel using: git push origin origin:refs/heads/devel But it fails with: error: src refspec devel does not match any. error: failed to push some refs to 'git@***.com:***/abcd.git' What's going on? EDIT: I am following: This Tutorial ANS...
[ "linux", "git" ]
1
2
306
2
0
2011-06-06T13:34:43.223000
2011-06-06T13:54:08.173000
6,252,806
6,253,367
how to use explicit transactions without nested transactions
ok, so Ayende recommends always using a transaction, even for read operations. but supposing I have the following scenario: public Employee GetEmployeeByName(string name) { using (ITransaction tx = CurrentSession.BeginTransaction()) { return dao.GetEmployeeByName(name); } } public void SaveNewEmployee(Employee employe...
Typically you would get around it by using a unit of work pattern in which you can start your transaction at the same time you open your session. That is to say at the beginning of the unit of work. And you would commit it at the end of the unit of work.
how to use explicit transactions without nested transactions ok, so Ayende recommends always using a transaction, even for read operations. but supposing I have the following scenario: public Employee GetEmployeeByName(string name) { using (ITransaction tx = CurrentSession.BeginTransaction()) { return dao.GetEmployeeBy...
TITLE: how to use explicit transactions without nested transactions QUESTION: ok, so Ayende recommends always using a transaction, even for read operations. but supposing I have the following scenario: public Employee GetEmployeeByName(string name) { using (ITransaction tx = CurrentSession.BeginTransaction()) { return...
[ "nhibernate" ]
0
2
134
1
0
2011-06-06T13:34:55.127000
2011-06-06T14:15:50.160000
6,252,816
6,255,204
CRM 4.0 Custom Activity View
The problem: We need to display Activities with thier regarding objects fixed set of attributes. Example: Activity Type; Regarding Object Name; Regarding Object Status; Regarding Object Priority;... What is the best way to achieve that? I'm thinking to solve this by: Create a Custom entity and include all 'activitypoin...
The only other way I would propose is a custom web application that mocks the normal views. You can use the CRM styles to make it look the same as other views. On load, have it retrieve all activities you want using SQL if on-premise or RetrieveMultiple if hosted. This way you would have more flexibility in terms of se...
CRM 4.0 Custom Activity View The problem: We need to display Activities with thier regarding objects fixed set of attributes. Example: Activity Type; Regarding Object Name; Regarding Object Status; Regarding Object Priority;... What is the best way to achieve that? I'm thinking to solve this by: Create a Custom entity ...
TITLE: CRM 4.0 Custom Activity View QUESTION: The problem: We need to display Activities with thier regarding objects fixed set of attributes. Example: Activity Type; Regarding Object Name; Regarding Object Status; Regarding Object Priority;... What is the best way to achieve that? I'm thinking to solve this by: Creat...
[ "dynamics-crm-4", "dynamic-sql", "microsoft-dynamics" ]
0
0
471
1
0
2011-06-06T13:35:56.670000
2011-06-06T16:37:55.733000
6,252,819
6,289,205
Find Recursive Group Membership (Active Directory) using C#
I am looking to get a list of all of the groups that a user is a member of in Active Directory, both explicitly listed in the memberOf property list as well as implicitly through nested group membership. For example, if I examine UserA and UserA is a part of GroupA and GroupB, I also want to list GroupC if GroupB is a ...
Thirst thanks for this an interesting question. Next, just a correction, you say: I've looked into the following LDAP code to get all of the memberOf entries at once: (memberOf:1.2.840.113556.1.4.1941:={0}) You don't make it work. I remember I make it work when I learnt about its existence, but it was in an LDIFDE.EXE ...
Find Recursive Group Membership (Active Directory) using C# I am looking to get a list of all of the groups that a user is a member of in Active Directory, both explicitly listed in the memberOf property list as well as implicitly through nested group membership. For example, if I examine UserA and UserA is a part of G...
TITLE: Find Recursive Group Membership (Active Directory) using C# QUESTION: I am looking to get a list of all of the groups that a user is a member of in Active Directory, both explicitly listed in the memberOf property list as well as implicitly through nested group membership. For example, if I examine UserA and Us...
[ "c#", ".net", "active-directory" ]
33
26
29,986
6
0
2011-06-06T13:36:11.053000
2011-06-09T07:02:51.117000
6,252,820
6,254,347
Setting the forgotten password from email address in Sitecore
I am trying to configure Sitecore to send emails from a specific email address when a CMS user goes through to reset their password. Currently the email is sent from someone@example.com but it isn't in any of the config files.
You won't find from email address in a config file because it is hard-coded. You can change this manually by going to [website_root]/sitecore/login/passwordrecovery.aspx and editing MailDefinition.From property on line 39. Edit: Might be a good idea to edit codebehind for that page and pull sender address from a config...
Setting the forgotten password from email address in Sitecore I am trying to configure Sitecore to send emails from a specific email address when a CMS user goes through to reset their password. Currently the email is sent from someone@example.com but it isn't in any of the config files.
TITLE: Setting the forgotten password from email address in Sitecore QUESTION: I am trying to configure Sitecore to send emails from a specific email address when a CMS user goes through to reset their password. Currently the email is sent from someone@example.com but it isn't in any of the config files. ANSWER: You ...
[ "sitecore", "sitecore6" ]
4
7
2,204
1
0
2011-06-06T13:36:11.397000
2011-06-06T15:29:45.960000
6,252,833
6,253,254
Mapping basic typedef aliases with ctypes?
I understand how to define structs in Python with ctypes, but I can't seem to find any documentation on how to handle basic aliases. For example 64-bit integers in SQLite: #ifdef SQLITE_INT64_TYPE typedef SQLITE_INT64_TYPE sqlite_int64; typedef unsigned SQLITE_INT64_TYPE sqlite_uint64; #elif defined(_MSC_VER) || define...
While this certainly isn't the 'correct' way to handle this, short of using the C API instead of ctypes, this is the only solution. By the time ctypes runs, the typedef information has been removed - it doesn't appear as symbols in the compiled library.
Mapping basic typedef aliases with ctypes? I understand how to define structs in Python with ctypes, but I can't seem to find any documentation on how to handle basic aliases. For example 64-bit integers in SQLite: #ifdef SQLITE_INT64_TYPE typedef SQLITE_INT64_TYPE sqlite_int64; typedef unsigned SQLITE_INT64_TYPE sqlit...
TITLE: Mapping basic typedef aliases with ctypes? QUESTION: I understand how to define structs in Python with ctypes, but I can't seem to find any documentation on how to handle basic aliases. For example 64-bit integers in SQLite: #ifdef SQLITE_INT64_TYPE typedef SQLITE_INT64_TYPE sqlite_int64; typedef unsigned SQLIT...
[ "python", "c", "typedef", "ctypes" ]
4
3
1,324
1
0
2011-06-06T13:36:50.867000
2011-06-06T14:07:39.553000
6,252,839
6,252,944
UI slow at updating ObservableCollection<T> in TreeView control
Scenario I have a TreeView that is bound to ObservableCollection. The collection gets modified every time the end-user modifies their filters. When users modify their filters a call to the database is made (takes 1-2ms tops) and the data returned gets parsed to create a hierarchy. I also have some XAML that ensures eac...
The problem is probably the foreach loop. Every time you add an object the CollectionChanged event is fired and the tree is rebuilt. You do not want to use an ObservableCollection if all you do is clear the whole list and replace it with a new one, use a List and fire a PropertyChanged event once the data is fully load...
UI slow at updating ObservableCollection<T> in TreeView control Scenario I have a TreeView that is bound to ObservableCollection. The collection gets modified every time the end-user modifies their filters. When users modify their filters a call to the database is made (takes 1-2ms tops) and the data returned gets pars...
TITLE: UI slow at updating ObservableCollection<T> in TreeView control QUESTION: Scenario I have a TreeView that is bound to ObservableCollection. The collection gets modified every time the end-user modifies their filters. When users modify their filters a call to the database is made (takes 1-2ms tops) and the data ...
[ "c#", "wpf", "xaml" ]
2
6
3,690
2
0
2011-06-06T13:37:47.743000
2011-06-06T13:44:46.157000
6,252,840
6,253,033
Custom Boolean wrapper in Actionscript
I'm in the process of writing a Java Boolean equivalent in Actionscript since Actionscript Boolean does not support null so I have to write my custom boolean. Does any have any idea how can I do this?
In order to make a custom boolean class, you will need to start by constructing that class. Here is a link to an Adobe article giving a brief intro on classes. You will probably want lots of functionality in this class, similar to Java, so look through this page to see exactly what the Java Boolean class can do. I am u...
Custom Boolean wrapper in Actionscript I'm in the process of writing a Java Boolean equivalent in Actionscript since Actionscript Boolean does not support null so I have to write my custom boolean. Does any have any idea how can I do this?
TITLE: Custom Boolean wrapper in Actionscript QUESTION: I'm in the process of writing a Java Boolean equivalent in Actionscript since Actionscript Boolean does not support null so I have to write my custom boolean. Does any have any idea how can I do this? ANSWER: In order to make a custom boolean class, you will nee...
[ "java", "actionscript-3", "boolean" ]
1
2
593
2
0
2011-06-06T13:37:51.417000
2011-06-06T13:51:54.997000
6,252,852
6,253,091
How do you go about writing "dynamic sql" filters using querystring values in ASP.NET MVC?
I just can't seem to wrap my mind around this concept... I want to allow users to apply a number of "filters" to a dataset (preferably in the querystring to allow bookmarking the filtered results), retrieved using Rob Conery's Massive dynamic data access "tool". I could simply write a whole bunch of if's, then write a ...
I think the concept is a bit broad to say there's a pattern/best practice for doing something like this. That said, I think using something like LINQ to SQL or Entity Framework would make a good dynamic query engine because you can do stuff like this: var query = DBContext.Items.Select(x => x.Name); switch(QueryString...
How do you go about writing "dynamic sql" filters using querystring values in ASP.NET MVC? I just can't seem to wrap my mind around this concept... I want to allow users to apply a number of "filters" to a dataset (preferably in the querystring to allow bookmarking the filtered results), retrieved using Rob Conery's Ma...
TITLE: How do you go about writing "dynamic sql" filters using querystring values in ASP.NET MVC? QUESTION: I just can't seem to wrap my mind around this concept... I want to allow users to apply a number of "filters" to a dataset (preferably in the querystring to allow bookmarking the filtered results), retrieved usi...
[ "sql", "dynamic", "asp.net-mvc" ]
1
1
769
1
0
2011-06-06T13:38:51.520000
2011-06-06T13:55:36.617000
6,252,864
6,252,948
Are uninitialized pointers in objects with static storage duration initialized to NULL, or to all-zeros?
out of curiousity and because I don't have my copy of the standard at hand right now: Given an implementation where null pointers are not represented by an all-zeros pattern, will uninitialized pointer members of objects with static storage duration be initialized to the proper null pointer value, or to an all-zeros va...
The standard says (8.5/4): To zero-initialize an object of type T means: — if T is a scalar type, the object is set to the value 0 (zero), taken as an integral constant expession, converted to T — if T is a non-union class type, each non-static data member and each base-class subobject is zero-initialized; So f is effe...
Are uninitialized pointers in objects with static storage duration initialized to NULL, or to all-zeros? out of curiousity and because I don't have my copy of the standard at hand right now: Given an implementation where null pointers are not represented by an all-zeros pattern, will uninitialized pointer members of ob...
TITLE: Are uninitialized pointers in objects with static storage duration initialized to NULL, or to all-zeros? QUESTION: out of curiousity and because I don't have my copy of the standard at hand right now: Given an implementation where null pointers are not represented by an all-zeros pattern, will uninitialized poi...
[ "c++", "standards-compliance", "language-lawyer" ]
4
5
302
2
0
2011-06-06T13:39:53.407000
2011-06-06T13:45:20.583000
6,252,866
6,262,706
Dragable and Clickable Push pin AJAX Bing Maps
I'm trying to create a dragable push pin. However when I do this all other events, mousedown, click, dblclick, etc. all don't come through any more. How would I go about creating a push pin that is both draggable and able to receive click events? Thanks!
http://www.garzilla.net/vemaps/Draggable-Push-Pins-with-Bing-Maps-7.aspx
Dragable and Clickable Push pin AJAX Bing Maps I'm trying to create a dragable push pin. However when I do this all other events, mousedown, click, dblclick, etc. all don't come through any more. How would I go about creating a push pin that is both draggable and able to receive click events? Thanks!
TITLE: Dragable and Clickable Push pin AJAX Bing Maps QUESTION: I'm trying to create a dragable push pin. However when I do this all other events, mousedown, click, dblclick, etc. all don't come through any more. How would I go about creating a push pin that is both draggable and able to receive click events? Thanks! ...
[ "javascript", "bing-maps" ]
0
1
493
1
0
2011-06-06T13:40:16.560000
2011-06-07T08:43:32.693000
6,252,875
6,253,056
Why google-collections contains semantically equal functions and strange generics?
Why google-collections or guava contains semantically equal functions? example: static Predicate and(Predicate... components) static Predicate and(Predicate first, Predicate second) I.e. all functions that can accept several arguments. The second question why do defintion of such functions use generic instead of?
To answer the first question, the varargs version ( Predicate... ) will give you a warning about the unchecked creation of a generic array when called with several generic predicates (e.g. Predicate ). For the common case of combining two predicates, you don't get that warning. To answer the second question, taking Pre...
Why google-collections contains semantically equal functions and strange generics? Why google-collections or guava contains semantically equal functions? example: static Predicate and(Predicate... components) static Predicate and(Predicate first, Predicate second) I.e. all functions that can accept several arguments. ...
TITLE: Why google-collections contains semantically equal functions and strange generics? QUESTION: Why google-collections or guava contains semantically equal functions? example: static Predicate and(Predicate... components) static Predicate and(Predicate first, Predicate second) I.e. all functions that can accept s...
[ "java", "generics", "guava" ]
2
7
398
2
0
2011-06-06T13:40:43.410000
2011-06-06T13:53:09.003000
6,252,882
6,253,545
using REPLACE in WHERE clause to check spelling permutations - MS SQL
I have a table like: | id | lastname | firstname | | 1 | doe | john | | 2 | oman | donald | | 3 | o'neill | james | | 4 | onackers | sharon | Essentially, users are going to be searching by the first letters of the last name. I want to be able to return results that contain and don't contain punctuation from the databa...
Depending on how complex your scenario can get, this will be lots of work, and slow too. But there's a more flexible approach. Consider something like this, referred to as initialTable: | id | lastname | firstname | | 1 | o'malley | josé | | 2 | omállèy | dònáld | | 3 | o'neill | jámès | | 4 | onackers | sharon | Maybe...
using REPLACE in WHERE clause to check spelling permutations - MS SQL I have a table like: | id | lastname | firstname | | 1 | doe | john | | 2 | oman | donald | | 3 | o'neill | james | | 4 | onackers | sharon | Essentially, users are going to be searching by the first letters of the last name. I want to be able to ret...
TITLE: using REPLACE in WHERE clause to check spelling permutations - MS SQL QUESTION: I have a table like: | id | lastname | firstname | | 1 | doe | john | | 2 | oman | donald | | 3 | o'neill | james | | 4 | onackers | sharon | Essentially, users are going to be searching by the first letters of the last name. I want...
[ "sql", "sql-server", "replace", "where-clause" ]
6
3
42,754
6
0
2011-06-06T13:41:25.750000
2011-06-06T14:29:49.890000
6,252,891
6,252,995
MVC Action History
I have two actions that list out items. Index() lists out all items and Filtered(string foo) filters the list of items based on foo. When a user creates a new item, I want to be able to redirect them back to either Index() or Filtered(string foo) based on where they were before. How can I do this, or rework my actions ...
You could modify your ActionResult to accept a string that contains the URL path the user comes from. Something like this: [HttpPost] public ActionResult CreateFoo(Blah model, string returnUrl) { // Do something here if (!String.IsNullOrEmpty(returnUrl)) // As long as a return URL was passed { return Redirect(returnUrl...
MVC Action History I have two actions that list out items. Index() lists out all items and Filtered(string foo) filters the list of items based on foo. When a user creates a new item, I want to be able to redirect them back to either Index() or Filtered(string foo) based on where they were before. How can I do this, or...
TITLE: MVC Action History QUESTION: I have two actions that list out items. Index() lists out all items and Filtered(string foo) filters the list of items based on foo. When a user creates a new item, I want to be able to redirect them back to either Index() or Filtered(string foo) based on where they were before. How...
[ "model-view-controller", "action" ]
0
0
415
1
0
2011-06-06T13:41:48.713000
2011-06-06T13:49:13.987000
6,252,898
6,253,002
WPF: how to bind ComboBox ItemsSource in code?
I need to convert this following XAML into code-behind: However, this code doesn't compile: new ComboBox() { SelectedItem = new Binding("Level"), ItemsSource = new Binding("Levels") } The error: "Cannot implicitly convert type 'System.Windows.Data.Binding' to 'System.Collections.IEnumerable'. An explicit conversion exi...
ComboBox cbo=new ComboBox(); cbo.SetBinding(ComboBox.SelectedItemProperty,new Binding("Level"){ /* set properties here*/}); cbo.SetBinding(ComboBox.ItemsSourceProperty,new Binding("Levels"));....
WPF: how to bind ComboBox ItemsSource in code? I need to convert this following XAML into code-behind: However, this code doesn't compile: new ComboBox() { SelectedItem = new Binding("Level"), ItemsSource = new Binding("Levels") } The error: "Cannot implicitly convert type 'System.Windows.Data.Binding' to 'System.Colle...
TITLE: WPF: how to bind ComboBox ItemsSource in code? QUESTION: I need to convert this following XAML into code-behind: However, this code doesn't compile: new ComboBox() { SelectedItem = new Binding("Level"), ItemsSource = new Binding("Levels") } The error: "Cannot implicitly convert type 'System.Windows.Data.Binding...
[ "wpf", "binding", "itemssource" ]
2
3
10,589
1
0
2011-06-06T13:42:14.487000
2011-06-06T13:49:19.213000
6,252,903
6,266,116
Is it secure to store userName/Password in session state in order to do a One-Time-Pin login?
We are building an ASP.NET MVC3 web application for a client. In this application, the client would like the user to log on using his username/password combination. However, if the userName password is correct, a one-time-pin should be sent to the user's cell phone. The user should only be authenticated once he enters ...
I will answer my own question with information that I have gathered over the past 24 hours. Hopefully this is correct. What worried me about the proposed solution is the short period of time that we rely solely on Session state to store the fact that the user was authenticated. (because only after the OTP is entered do...
Is it secure to store userName/Password in session state in order to do a One-Time-Pin login? We are building an ASP.NET MVC3 web application for a client. In this application, the client would like the user to log on using his username/password combination. However, if the userName password is correct, a one-time-pin ...
TITLE: Is it secure to store userName/Password in session state in order to do a One-Time-Pin login? QUESTION: We are building an ASP.NET MVC3 web application for a client. In this application, the client would like the user to log on using his username/password combination. However, if the userName password is correc...
[ "security", "asp.net-mvc-3" ]
3
2
2,357
1
0
2011-06-06T13:42:39.887000
2011-06-07T13:42:31.863000
6,252,906
6,252,969
How can I add a padding-bottom to a display: inline element?
I am displaying an "h5" html tag inline along with a "p" html tag inline but I need a padding or margin on the bottom of the paragraph so there is a gap in between the next h5 and p tags. How could I go by doing this? Currently here is an example of what it looks like THIS IS THE h5 - this is the paragraph THIS IS THE ...
Instead of having the h5 and p as inline elements you can simply float them to the left and clear left on the h5. This way you can easily set a bottom margin on the h5 and p without issue. Here's an example on JSFiddle CSS: h5,p{float:left;margin-bottom:10px;} h5{clear:left;margin-right:5px;} UPDATE Here's a second ex...
How can I add a padding-bottom to a display: inline element? I am displaying an "h5" html tag inline along with a "p" html tag inline but I need a padding or margin on the bottom of the paragraph so there is a gap in between the next h5 and p tags. How could I go by doing this? Currently here is an example of what it l...
TITLE: How can I add a padding-bottom to a display: inline element? QUESTION: I am displaying an "h5" html tag inline along with a "p" html tag inline but I need a padding or margin on the bottom of the paragraph so there is a gap in between the next h5 and p tags. How could I go by doing this? Currently here is an ex...
[ "html", "css", "layout" ]
1
3
1,049
4
0
2011-06-06T13:42:52.133000
2011-06-06T13:47:37.303000
6,252,909
6,253,331
array as rvalue on single line which works with C++2003?
I am parsing some text and it would make my life easier if i can use arrays are rvalues rather then defining it on their own line. I have done this int a[]={1,2,3}; //its own line. Do not want and func([]()->int*{static int a[]={1,2,3}; return a; }()); //It compiles but untested. It doesn't compile with 2003 i tried fu...
func([]()->int*{int a[]={1,2,3}; return a; }()); //works well on C++0x. I find interesting the comment works well. I am not a lambda lawyer, but I believe that the code above is returning a pointer into a local variable, and that is undefined behavior, so even if that compiles that does not mean that it is correct. As ...
array as rvalue on single line which works with C++2003? I am parsing some text and it would make my life easier if i can use arrays are rvalues rather then defining it on their own line. I have done this int a[]={1,2,3}; //its own line. Do not want and func([]()->int*{static int a[]={1,2,3}; return a; }()); //It compi...
TITLE: array as rvalue on single line which works with C++2003? QUESTION: I am parsing some text and it would make my life easier if i can use arrays are rvalues rather then defining it on their own line. I have done this int a[]={1,2,3}; //its own line. Do not want and func([]()->int*{static int a[]={1,2,3}; return a...
[ "c++", "iso" ]
1
4
70
3
0
2011-06-06T13:43:00.300000
2011-06-06T14:13:22.050000
6,252,912
6,253,226
CUDA function call from anther cu file
I have two cuda files say A and B. I need to call a function from A to B like.. __device__ int add(int a, int b) //this is a function in A { return a+b; } __device__ void fun1(int a, int b) //this is a function in B { int c = A.add(a,b); } How can I do this?? Can I use static keyword? Please give me an example..
The short answer is that you can't. CUDA only supports internal linkage, thus everything needed to compile a kernel must be defined within the same translation unit. What you might be able to do is put the functions into a header file like this: // Both functions in func.cuh #pragma once __device__ inline int add(int a...
CUDA function call from anther cu file I have two cuda files say A and B. I need to call a function from A to B like.. __device__ int add(int a, int b) //this is a function in A { return a+b; } __device__ void fun1(int a, int b) //this is a function in B { int c = A.add(a,b); } How can I do this?? Can I use static key...
TITLE: CUDA function call from anther cu file QUESTION: I have two cuda files say A and B. I need to call a function from A to B like.. __device__ int add(int a, int b) //this is a function in A { return a+b; } __device__ void fun1(int a, int b) //this is a function in B { int c = A.add(a,b); } How can I do this?? Ca...
[ "cuda" ]
4
4
3,206
2
0
2011-06-06T13:43:04.783000
2011-06-06T14:05:06.337000
6,252,913
6,253,004
jshint unescaped characters in regular expression
I am trying to cleanup some Javascript code using jshint. In a third-party script that is being used, jshint complains about unescaped javascript in this line: var cleanString = deaccentedString.replace(/([|()[{.+*?^$\\])/g,"\\$1"); I'd also like to understand what this regular expression does, but I don't see it. Can ...
It matches any of the following characters: |()[{.+*?^$\ and replaces it with its escaped counterpart (backslash plus that character). While it is legal in many regex dialects to include an unescaped [ inside a character class, it can trigger an error in others, so try this: var cleanString = deaccentedString.replace(/...
jshint unescaped characters in regular expression I am trying to cleanup some Javascript code using jshint. In a third-party script that is being used, jshint complains about unescaped javascript in this line: var cleanString = deaccentedString.replace(/([|()[{.+*?^$\\])/g,"\\$1"); I'd also like to understand what this...
TITLE: jshint unescaped characters in regular expression QUESTION: I am trying to cleanup some Javascript code using jshint. In a third-party script that is being used, jshint complains about unescaped javascript in this line: var cleanString = deaccentedString.replace(/([|()[{.+*?^$\\])/g,"\\$1"); I'd also like to un...
[ "javascript", "regex", "jshint" ]
3
5
2,638
2
0
2011-06-06T13:43:07.290000
2011-06-06T13:49:33.003000
6,252,925
6,289,061
CruiseControl.NET getting error on a build
Getting the following on any build running on CC.NET V1.6 on a server. I have made sure the user running the CC.NET Service is a member of the Administrators group on the server.... So why am I getting this error? Error Message: System.ArgumentException: Access to the path is denied. at System.IO.FileSystemInfo.set_Att...
(moving the comments into a proper answer) DavieDave: they have a bug report on their site saying this was fixed in 1.6. Somehow magically this is working now. Me: cleanCopy not working is also a known bug. The "unused node detected" error message should not be ignored - it means you have a typo in your configuration a...
CruiseControl.NET getting error on a build Getting the following on any build running on CC.NET V1.6 on a server. I have made sure the user running the CC.NET Service is a member of the Administrators group on the server.... So why am I getting this error? Error Message: System.ArgumentException: Access to the path is ...
TITLE: CruiseControl.NET getting error on a build QUESTION: Getting the following on any build running on CC.NET V1.6 on a server. I have made sure the user running the CC.NET Service is a member of the Administrators group on the server.... So why am I getting this error? Error Message: System.ArgumentException: Acce...
[ "visual-studio-2010", "cruisecontrol.net" ]
1
1
675
1
0
2011-06-06T13:43:43.987000
2011-06-09T06:47:59.603000
6,252,934
6,253,280
Deploying WAR from maven
I wrote an integration test where the test starts an application server and deploys a WAR file in it. The test works fine when I run it from eclipse but when it is run from maven during building, it says that maven cant locate the WAR file. How do I make maven look into the directory for which the WAR file is in (where...
There exists a property ${project.build.directory} that results in the path to your "target" dir. (See: here ) Maybe that helps you?
Deploying WAR from maven I wrote an integration test where the test starts an application server and deploys a WAR file in it. The test works fine when I run it from eclipse but when it is run from maven during building, it says that maven cant locate the WAR file. How do I make maven look into the directory for which ...
TITLE: Deploying WAR from maven QUESTION: I wrote an integration test where the test starts an application server and deploys a WAR file in it. The test works fine when I run it from eclipse but when it is run from maven during building, it says that maven cant locate the WAR file. How do I make maven look into the di...
[ "java", "maven", "war" ]
0
2
198
1
0
2011-06-06T13:44:15.010000
2011-06-06T14:09:50.007000
6,252,962
6,253,912
HTACCESS Rewrite rules
I need help to redirect the following URL (in htaccess) http:www.domain.com/article/the-bp-oil-spill-one-year-later/19918396/20110420/ To http:www.domain.com/article/the-bp-oil-spill-one-year-later/19918396/2011/04/20/ my original rewrite is: RewriteRule ^article/([^/]+)/([0-999999999]+)/([0-99999999]+)/?$ /index.php?a...
Are you after something like this: URL Example: blah/20080101/ RewriteRule ^blah/([0-9]{0,4})([0-9]{0,2})([0-9]{0,2})/$ /blah/$1/$2/$3/ Would output: /blah/2008/01/01/
HTACCESS Rewrite rules I need help to redirect the following URL (in htaccess) http:www.domain.com/article/the-bp-oil-spill-one-year-later/19918396/20110420/ To http:www.domain.com/article/the-bp-oil-spill-one-year-later/19918396/2011/04/20/ my original rewrite is: RewriteRule ^article/([^/]+)/([0-999999999]+)/([0-9999...
TITLE: HTACCESS Rewrite rules QUESTION: I need help to redirect the following URL (in htaccess) http:www.domain.com/article/the-bp-oil-spill-one-year-later/19918396/20110420/ To http:www.domain.com/article/the-bp-oil-spill-one-year-later/19918396/2011/04/20/ my original rewrite is: RewriteRule ^article/([^/]+)/([0-999...
[ ".htaccess" ]
1
1
112
2
0
2011-06-06T13:46:56.357000
2011-06-06T14:55:16.837000
6,252,963
6,253,339
Side effects of defining a structure inside a class
A newbie vb.net question What is the side effects of defining a structure inside a class (name it X), and create a property inside that class of the type X?
There are no side-effects. The only effect is that the structure is within the scope of the class, that is, if you want to use the scope from outside the class it has to be declared as Public and you nee to qualify the name explicitly as OuterClassName.InnerStructureName when using it. Notably (and unlike in Java), the...
Side effects of defining a structure inside a class A newbie vb.net question What is the side effects of defining a structure inside a class (name it X), and create a property inside that class of the type X?
TITLE: Side effects of defining a structure inside a class QUESTION: A newbie vb.net question What is the side effects of defining a structure inside a class (name it X), and create a property inside that class of the type X? ANSWER: There are no side-effects. The only effect is that the structure is within the scope...
[ "vb.net", "class", "structure", "side-effects" ]
2
3
994
1
0
2011-06-06T13:47:00.257000
2011-06-06T14:13:59.230000
6,252,966
6,253,150
php exec how to calculate time?
I'm trying to implement some kind of 'multiprocessing' in php for my task. The task is to check the status of every device in our network. For that i decided to use looped exec and it works. But i don't know whether it works fine or not: $command = "php scan_part.php $i > null &"; exec($command); This calls scan_part.p...
Use proc_open to launch your script instead of exec. Proc_open lets you wait until a process is done through proc_close, which waits until the termination of the program. $starttime = microtime(true); $processes = array(); // stdin, stdout, stderr- take no input, save no output $descriptors = array( 0 => array("file", ...
php exec how to calculate time? I'm trying to implement some kind of 'multiprocessing' in php for my task. The task is to check the status of every device in our network. For that i decided to use looped exec and it works. But i don't know whether it works fine or not: $command = "php scan_part.php $i > null &"; exec($...
TITLE: php exec how to calculate time? QUESTION: I'm trying to implement some kind of 'multiprocessing' in php for my task. The task is to check the status of every device in our network. For that i decided to use looped exec and it works. But i don't know whether it works fine or not: $command = "php scan_part.php $i...
[ "php", "exec" ]
2
7
1,354
5
0
2011-06-06T13:47:15.790000
2011-06-06T13:59:14.073000
6,252,970
6,254,261
Embed Flash using SWFObject with Strict Doctype
Having a problem embedding a flash chatroom under a doctype equaling strict using the SWFObject Without the doctype of strict i lose the margin:auto usage under IE. Using the doctype of strict the flash chat room doesnt load properly at all. I read the swfobject embedding techniques for doctype of strict but can not ac...
I don't think that the doc type has anything to do with your issue! Are you using the last version of SWFObject (I think that the embed method you're using is old...)? Anyway, the line so.write("flash_chat_swf"); should be replaced by so.write("flash_swf"); // corresponds to the div id the flash should be written in An...
Embed Flash using SWFObject with Strict Doctype Having a problem embedding a flash chatroom under a doctype equaling strict using the SWFObject Without the doctype of strict i lose the margin:auto usage under IE. Using the doctype of strict the flash chat room doesnt load properly at all. I read the swfobject embedding...
TITLE: Embed Flash using SWFObject with Strict Doctype QUESTION: Having a problem embedding a flash chatroom under a doctype equaling strict using the SWFObject Without the doctype of strict i lose the margin:auto usage under IE. Using the doctype of strict the flash chat room doesnt load properly at all. I read the s...
[ "flash", "html", "doctype", "swfobject" ]
1
1
804
1
0
2011-06-06T13:47:39.870000
2011-06-06T15:22:57.290000
6,252,981
6,253,088
C# Xml Value always getting null
I have the following Xml in my Resources.xmltest: 0 Pending 222131 InvNum=123 I've tried several ways to get the values, Result,Message,PNRef,ExtData, out of it and I've had no luck. I always get a null value for the NodePath so it never goes into the loop: var XmlDoc = new XmlDocument(); XmlDoc.LoadXml(Resources.xmlt...
That is because the node isn't called response; you need to take the namespace into account: var XmlDoc = new XmlDocument(); var nsmgr = new XmlNamespaceManager(XmlDoc.NameTable); nsmgr.AddNamespace("x", "http://DFISofft.com/SmartPayments/"); XmlDoc.LoadXml(yourXml); XmlElement NodePath = (XmlElement)XmlDoc.SelectSingl...
C# Xml Value always getting null I have the following Xml in my Resources.xmltest: 0 Pending 222131 InvNum=123 I've tried several ways to get the values, Result,Message,PNRef,ExtData, out of it and I've had no luck. I always get a null value for the NodePath so it never goes into the loop: var XmlDoc = new XmlDocument(...
TITLE: C# Xml Value always getting null QUESTION: I have the following Xml in my Resources.xmltest: 0 Pending 222131 InvNum=123 I've tried several ways to get the values, Result,Message,PNRef,ExtData, out of it and I've had no luck. I always get a null value for the NodePath so it never goes into the loop: var XmlDoc ...
[ "c#", "xml", "parsing" ]
1
2
1,555
5
0
2011-06-06T13:48:23.863000
2011-06-06T13:55:18.363000
6,252,986
6,253,060
How I can read and excute a big xml file?
my code gives me error: "'.', hexadecimal value 0x00, is an invalid character. Line 2, position 1." string FileName = "20110606 100419 ServerForShop 1.xml"; string root = Server.MapPath("~/Include/Xml Files/Patch/"); var custs = from c in XElement.Load(root + FileName).Elements("Update") select c; I want to read and e...
I would recommend looking here for some samples http://support.microsoft.com/kb/307548 and perhaps here How does one parse XML files?
How I can read and excute a big xml file? my code gives me error: "'.', hexadecimal value 0x00, is an invalid character. Line 2, position 1." string FileName = "20110606 100419 ServerForShop 1.xml"; string root = Server.MapPath("~/Include/Xml Files/Patch/"); var custs = from c in XElement.Load(root + FileName).Element...
TITLE: How I can read and excute a big xml file? QUESTION: my code gives me error: "'.', hexadecimal value 0x00, is an invalid character. Line 2, position 1." string FileName = "20110606 100419 ServerForShop 1.xml"; string root = Server.MapPath("~/Include/Xml Files/Patch/"); var custs = from c in XElement.Load(root +...
[ "c#", "linq", "linq-to-xml" ]
0
1
450
1
0
2011-06-06T13:48:35.563000
2011-06-06T13:53:16.053000
6,252,987
6,253,250
Upgrade Current Target For Iphone Doesn't Do Anything
I am trying to upgrade my app so that it looks normal on the ipad. I created a new Target, and then went to upgrade current target for iphone. It created a Resources-iPad folder but it is empty. I don't see any new files either. Am i missing something?
You should be selecting 'upgrade current target' on your existing iphone target. Creating a new target first will create an updated version of that, which will be empty.
Upgrade Current Target For Iphone Doesn't Do Anything I am trying to upgrade my app so that it looks normal on the ipad. I created a new Target, and then went to upgrade current target for iphone. It created a Resources-iPad folder but it is empty. I don't see any new files either. Am i missing something?
TITLE: Upgrade Current Target For Iphone Doesn't Do Anything QUESTION: I am trying to upgrade my app so that it looks normal on the ipad. I created a new Target, and then went to upgrade current target for iphone. It created a Resources-iPad folder but it is empty. I don't see any new files either. Am i missing someth...
[ "iphone", "ipad" ]
0
0
64
1
0
2011-06-06T13:48:37.583000
2011-06-06T14:07:13.283000
6,252,991
6,253,048
Selected Dropdown value changes when validation fails-ASP.NET MVC
I am using MVC 3 with ASP.NET. I have a dropdown box and getting it populated from database. I am using validation on the View. If it fails the validation, I am displaying the same view with errors being caught in ViewDate.ModelState.AddModelError. I am checking for the ViewData.Modelstate.IsValid property if true then...
In the action that handles the form submission and validation, make sure you set the properties on your model object from the form before rendering the form view. For example, in this question you can see how the Dinner object parameter in the Create action is reused when the View() is returned.
Selected Dropdown value changes when validation fails-ASP.NET MVC I am using MVC 3 with ASP.NET. I have a dropdown box and getting it populated from database. I am using validation on the View. If it fails the validation, I am displaying the same view with errors being caught in ViewDate.ModelState.AddModelError. I am ...
TITLE: Selected Dropdown value changes when validation fails-ASP.NET MVC QUESTION: I am using MVC 3 with ASP.NET. I have a dropdown box and getting it populated from database. I am using validation on the View. If it fails the validation, I am displaying the same view with errors being caught in ViewDate.ModelState.Ad...
[ "model-view-controller", "asp.net-mvc-3" ]
2
0
2,321
2
0
2011-06-06T13:49:04.750000
2011-06-06T13:52:43.087000
6,252,997
6,253,087
JDBC insert or update practice
I need to insert a record to table if the record doesn't exist, and to update a record if the record exists in the table. Of course, I can write: p-code: SELECT * FROM table1 WHERE id='abc' by JDBC if(exists) UPDATE table1 SET... WHERE id='abc' by JDBC; else INSERT INTO table1... by JDBC; However, I don't think the cod...
It depends on what type of database your are using and whether or not you can take advantage of database specific features. MySQL for instance lets you do the following: INSERT INTO territories (code, territory) VALUES ('NO', 'Norway') ON DUPLICATE KEY UPDATE territory = 'Norway' However, the above is not standard (SQL...
JDBC insert or update practice I need to insert a record to table if the record doesn't exist, and to update a record if the record exists in the table. Of course, I can write: p-code: SELECT * FROM table1 WHERE id='abc' by JDBC if(exists) UPDATE table1 SET... WHERE id='abc' by JDBC; else INSERT INTO table1... by JDBC;...
TITLE: JDBC insert or update practice QUESTION: I need to insert a record to table if the record doesn't exist, and to update a record if the record exists in the table. Of course, I can write: p-code: SELECT * FROM table1 WHERE id='abc' by JDBC if(exists) UPDATE table1 SET... WHERE id='abc' by JDBC; else INSERT INTO ...
[ "java", "jdbc", "insert-update" ]
10
10
19,982
4
0
2011-06-06T13:49:14.573000
2011-06-06T13:55:17.783000
6,253,000
6,253,030
How to find rows which has a certain char less than a certain count?
I am trying to write a shell / perl command which will give me the row numbers, which has number of fields less than a certain count. E.g. I have a comma-delimited text file. I am trying to find those rows which has less than, say 15, fields. So I guess the problem essentially boils down to returning rows which has les...
You can do this easily in bash by calling awk. This sort of script is exactly what awk was designed to do. awk -F, '{ if (NF < 15 ) print NR "," $0 }' fileToTest -F, tells awk to split each line on the comma char, AND NF (Number_of_Fields) indicates how many fields where split in each line. Change the 15 value as neede...
How to find rows which has a certain char less than a certain count? I am trying to write a shell / perl command which will give me the row numbers, which has number of fields less than a certain count. E.g. I have a comma-delimited text file. I am trying to find those rows which has less than, say 15, fields. So I gue...
TITLE: How to find rows which has a certain char less than a certain count? QUESTION: I am trying to write a shell / perl command which will give me the row numbers, which has number of fields less than a certain count. E.g. I have a comma-delimited text file. I am trying to find those rows which has less than, say 15...
[ "perl", "bash", "shell" ]
2
6
229
3
0
2011-06-06T13:49:17.030000
2011-06-06T13:51:43.103000
6,253,014
6,253,092
php Header to redirect when post - redirect troubles
header('Location:../pages/my-files.php?parent_id='. $_POST['parent_id']); The above needs to redirect the user when a form is submitted, using a hidden variable for _parent_id. However for some reason the user is bieng redirected (or seems to be by looking at the browser URL) to simply../pages/my-files.php Any ideas? P...
Have you tried to encode $_POST['parent_id'] for use in a url? header('Location:../pages/my-files.php?parent_id='. rawurlencode($_POST['parent_id'])); But it must be something else because your code looks ok. Are you shure that you are redirecting from that point and not from another? Have you tried putting a die() jus...
php Header to redirect when post - redirect troubles header('Location:../pages/my-files.php?parent_id='. $_POST['parent_id']); The above needs to redirect the user when a form is submitted, using a hidden variable for _parent_id. However for some reason the user is bieng redirected (or seems to be by looking at the bro...
TITLE: php Header to redirect when post - redirect troubles QUESTION: header('Location:../pages/my-files.php?parent_id='. $_POST['parent_id']); The above needs to redirect the user when a form is submitted, using a hidden variable for _parent_id. However for some reason the user is bieng redirected (or seems to be by ...
[ "php", "post", "redirect", "header", "get" ]
3
3
484
1
0
2011-06-06T13:50:12.023000
2011-06-06T13:55:37.340000
6,253,016
6,253,248
Django URL pattern with a list
I have a list with category names, e.g. cats = ["tv", "movie", "theater"]. I would like to write a url pattern to catch only URLs which contain one of the items in the list, such as: url(r'^site/CATEGORY_NAME/$', 'mainsite.views.home'), so that CATEGORY_NAME can only one one of the items in the list cats. How can I do ...
You can build part of a regular expression from the list by using python's string join method, and then use that in the URL pattern. For example: cats = ["tv", "movie", "theater"] cats_re = '(?:' + '|'.join(cats) + ')' #...then... url(r'^site/' + cats_re + '/$', 'mainsite.views.home'), In this case, the whole regular ...
Django URL pattern with a list I have a list with category names, e.g. cats = ["tv", "movie", "theater"]. I would like to write a url pattern to catch only URLs which contain one of the items in the list, such as: url(r'^site/CATEGORY_NAME/$', 'mainsite.views.home'), so that CATEGORY_NAME can only one one of the items ...
TITLE: Django URL pattern with a list QUESTION: I have a list with category names, e.g. cats = ["tv", "movie", "theater"]. I would like to write a url pattern to catch only URLs which contain one of the items in the list, such as: url(r'^site/CATEGORY_NAME/$', 'mainsite.views.home'), so that CATEGORY_NAME can only one...
[ "django" ]
2
7
5,601
3
0
2011-06-06T13:50:28.447000
2011-06-06T14:06:55.577000
6,253,017
6,253,278
Reflection + Linq + DbSet
I use EF code-first 4.1. in my application. Now I want to get entities through WCF services using generic types. I'm trying to reflect generic type and invoke the method ToList of DbSet Object. Here is my code: public string GetAllEntries(string objectType) { try { var mdc = Globals.DbConnection.Create(@"some_db_connec...
ToLIst() is not a member of DbSet/ObjectSet but is an extension method. You can try this instead var method = typeof(Enumerable).GetMethod("ToList"); var generic = method.MakeGenericMethod(genericType); generic.Invoke(invokeSet, null);
Reflection + Linq + DbSet I use EF code-first 4.1. in my application. Now I want to get entities through WCF services using generic types. I'm trying to reflect generic type and invoke the method ToList of DbSet Object. Here is my code: public string GetAllEntries(string objectType) { try { var mdc = Globals.DbConnecti...
TITLE: Reflection + Linq + DbSet QUESTION: I use EF code-first 4.1. in my application. Now I want to get entities through WCF services using generic types. I'm trying to reflect generic type and invoke the method ToList of DbSet Object. Here is my code: public string GetAllEntries(string objectType) { try { var mdc = ...
[ "linq", "reflection", "entity-framework-4.1", "ef-code-first" ]
4
5
4,342
3
0
2011-06-06T13:50:39.750000
2011-06-06T14:09:41.267000
6,253,029
6,253,253
How to get contacts from native phonebook in android
I want to display all native contacts in a list and make user to add contacts from the list (Multiple contacts)to my application database.How to dothis can any one give me idea or share some code.. thanks in advance..
I used this code on Android 2.1. It pulls down anyone who has a phone number (as defined by the String SELECTION variable) and returns a List of type Person. Person is an object that held the name and phone number of the user. You will have to implement a Person object in order to use this code, but it works perfectly:...
How to get contacts from native phonebook in android I want to display all native contacts in a list and make user to add contacts from the list (Multiple contacts)to my application database.How to dothis can any one give me idea or share some code.. thanks in advance..
TITLE: How to get contacts from native phonebook in android QUESTION: I want to display all native contacts in a list and make user to add contacts from the list (Multiple contacts)to my application database.How to dothis can any one give me idea or share some code.. thanks in advance.. ANSWER: I used this code on An...
[ "android" ]
4
13
13,428
2
0
2011-06-06T13:51:40.623000
2011-06-06T14:07:30.007000
6,253,041
6,253,069
Why can't I view branches remotely
I have a repository set up on a server running Git, the repository has an authoritive / bare repository connected to it. If I then set up a local version of the repository on my development machine with: git clone //ip-address/projectfolder/project.git I can view all of the code without any problems. However, when I cr...
Try git fetch origin This will get all branches from the remote repo and store them under remotes/origin/ branchname example: ptimac:pfus pti$ git fetch origin remote: Counting objects: 2283, done. remote: Compressing objects: 100% (892/892), done. remote: Total 2009 (delta 990), reused 1698 (delta 688) Receiving objec...
Why can't I view branches remotely I have a repository set up on a server running Git, the repository has an authoritive / bare repository connected to it. If I then set up a local version of the repository on my development machine with: git clone //ip-address/projectfolder/project.git I can view all of the code witho...
TITLE: Why can't I view branches remotely QUESTION: I have a repository set up on a server running Git, the repository has an authoritive / bare repository connected to it. If I then set up a local version of the repository on my development machine with: git clone //ip-address/projectfolder/project.git I can view all...
[ "git" ]
5
14
4,906
1
0
2011-06-06T13:52:20.057000
2011-06-06T13:54:03.157000
6,253,055
6,253,107
JNI: Converting C Function To Java Style Function
Background I am working with functions which which passes arguments as pointers. I need to convert a function which is written in C to JAVA with the same behavior as in C. I am developing for Android in Eclipse under Windows. C Function Example int testFunction( char* firstName, char* SecomdName, char* lastname, int ag...
There's a few things you could do. You could create a bean class that contains the fields you want to create, ie something like: public class Names { String firstName; String secondName; String lastName; int returnValue; // getters/constructors etc ommitted... } Your testFunction could then instantiate a Names object ...
JNI: Converting C Function To Java Style Function Background I am working with functions which which passes arguments as pointers. I need to convert a function which is written in C to JAVA with the same behavior as in C. I am developing for Android in Eclipse under Windows. C Function Example int testFunction( char* f...
TITLE: JNI: Converting C Function To Java Style Function QUESTION: Background I am working with functions which which passes arguments as pointers. I need to convert a function which is written in C to JAVA with the same behavior as in C. I am developing for Android in Eclipse under Windows. C Function Example int tes...
[ "java", "android", "c", "function", "pointers" ]
2
3
324
4
0
2011-06-06T13:53:07.217000
2011-06-06T13:56:33.333000
6,253,064
6,282,884
How to tell doxygen to use /** as class doc instead /*! \class
I'm trying to switch from phpDocumentor to doxygen, but all my classes are documented in the following style: /** * DESCRIPTION * * @category PHP * @package UserManagement.Class * @author Name * @copyright 2011 Company * @link http://www.company.com */ but doxygen does not recognize that as the class doc unless I chang...
I found the problem (but not the real solution): Doxygen does not like the @category & @package in the class doc block. If I remove them it works.
How to tell doxygen to use /** as class doc instead /*! \class I'm trying to switch from phpDocumentor to doxygen, but all my classes are documented in the following style: /** * DESCRIPTION * * @category PHP * @package UserManagement.Class * @author Name * @copyright 2011 Company * @link http://www.company.com */ but ...
TITLE: How to tell doxygen to use /** as class doc instead /*! \class QUESTION: I'm trying to switch from phpDocumentor to doxygen, but all my classes are documented in the following style: /** * DESCRIPTION * * @category PHP * @package UserManagement.Class * @author Name * @copyright 2011 Company * @link http://www.c...
[ "php", "doxygen" ]
1
2
894
3
0
2011-06-06T13:53:33.347000
2011-06-08T17:36:07.333000
6,253,067
6,253,116
java name of folder in which java is installed
Hi is there a chance to find where is java installed on windows?? Becouse my application use JCE but not all algoritms are installed and I have to download some files like its writen here. Edit: Another question, how to check if JCE is istall and contains such algotitm (DES)??
It is typically installed under c:\Program Files\Java\{JRE Release) Otherwise you can find the JDK home if it is installed by the JAVA_HOME environment variable.
java name of folder in which java is installed Hi is there a chance to find where is java installed on windows?? Becouse my application use JCE but not all algoritms are installed and I have to download some files like its writen here. Edit: Another question, how to check if JCE is istall and contains such algotitm (DE...
TITLE: java name of folder in which java is installed QUESTION: Hi is there a chance to find where is java installed on windows?? Becouse my application use JCE but not all algoritms are installed and I have to download some files like its writen here. Edit: Another question, how to check if JCE is istall and contains...
[ "java", "windows" ]
1
1
96
3
0
2011-06-06T13:53:53.837000
2011-06-06T13:57:09.773000
6,253,081
6,253,136
Returning a static Class in PHP
I am working on a backend project. I need to return a static object withing another static object: Class this_is_a_very_long_class_name { public static function call() { return self; } public static function script_link($link) { //doing stuff here... } } Class Main { public static function view() { // trying to retur...
You don't need that. Use View::script_link(); Also this is wrong and misleading view()->script_link because script_link is static Addendum If you your problem is your class name length I suggest you to create simple wrapper for this. function createLink($string){ return VERY_LONG_CLASS_NAME_HELLO_PHP_NAMESPACE::script_...
Returning a static Class in PHP I am working on a backend project. I need to return a static object withing another static object: Class this_is_a_very_long_class_name { public static function call() { return self; } public static function script_link($link) { //doing stuff here... } } Class Main { public static func...
TITLE: Returning a static Class in PHP QUESTION: I am working on a backend project. I need to return a static object withing another static object: Class this_is_a_very_long_class_name { public static function call() { return self; } public static function script_link($link) { //doing stuff here... } } Class Main { ...
[ "php", "static-classes" ]
1
1
7,082
6
0
2011-06-06T13:54:42.417000
2011-06-06T13:58:20.240000
6,253,082
6,253,105
Shopping cart Asp.net
I have a aspx page and inside I have called a.ascx page which is the shopping cart, on the aspx page I have a lot of links to the books and we can add the books to the shopping cart. On clicking the add button i store the bookid,name,price in a cookie and on the ascx page i get the copy and paste the value in the shopp...
You need to return false; from the onclick handler to prevent the browser from following the default action.
Shopping cart Asp.net I have a aspx page and inside I have called a.ascx page which is the shopping cart, on the aspx page I have a lot of links to the books and we can add the books to the shopping cart. On clicking the add button i store the bookid,name,price in a cookie and on the ascx page i get the copy and paste ...
TITLE: Shopping cart Asp.net QUESTION: I have a aspx page and inside I have called a.ascx page which is the shopping cart, on the aspx page I have a lot of links to the books and we can add the books to the shopping cart. On clicking the add button i store the bookid,name,price in a cookie and on the ascx page i get t...
[ "javascript", "asp.net" ]
0
1
610
2
0
2011-06-06T13:54:52.730000
2011-06-06T13:56:31.650000
6,253,101
6,256,859
Need to build a url and work with the returned result
I would like to start with a little script that fetches the examination results of me and my friends from our university website. I would like to pass it the roll number as the post parameter and work with the returned data, I don't know how to create the post string. It would be great if someone could tell me where to...
I've written a solution here just as a reference for whatever you might come up with. There are multiple ways of attacking this. #fetch_scores.rb require 'open-uri' #define a constant named URL so if the results URL changes we don't #need to replace a hardcoded URL everywhere. URL = "http://www.nitt.edu/prm/ShowResul...
Need to build a url and work with the returned result I would like to start with a little script that fetches the examination results of me and my friends from our university website. I would like to pass it the roll number as the post parameter and work with the returned data, I don't know how to create the post strin...
TITLE: Need to build a url and work with the returned result QUESTION: I would like to start with a little script that fetches the examination results of me and my friends from our university website. I would like to pass it the roll number as the post parameter and work with the returned data, I don't know how to cre...
[ "ruby", "http-post" ]
0
1
402
3
0
2011-06-06T13:56:11.450000
2011-06-06T19:13:54.223000
6,253,132
6,260,139
Which perl module for creating/updating bugs on Bugzilla 4.0.1?
I have a large amount of bugs from Jira and Github that I want to transfer to Bugzilla. I can easily get the Jira bugs via xml and Github through the Net::Github API. The issue is with creating the bugs on Bugzilla. I have the login information 100% correct, but the bugs won't commit. I am using the module found at htt...
Solution was to use the Bugzilla3 module, but not all of its features work 100% with Bugzilla 4.0.1... It also lacks the ability to update submitted bugs, so we just moved all of the bugs to a new component, deleted that component, and ran the script again to compensate.
Which perl module for creating/updating bugs on Bugzilla 4.0.1? I have a large amount of bugs from Jira and Github that I want to transfer to Bugzilla. I can easily get the Jira bugs via xml and Github through the Net::Github API. The issue is with creating the bugs on Bugzilla. I have the login information 100% correc...
TITLE: Which perl module for creating/updating bugs on Bugzilla 4.0.1? QUESTION: I have a large amount of bugs from Jira and Github that I want to transfer to Bugzilla. I can easily get the Jira bugs via xml and Github through the Net::Github API. The issue is with creating the bugs on Bugzilla. I have the login infor...
[ "perl", "cpan", "bugzilla" ]
2
1
1,075
2
0
2011-06-06T13:58:06.560000
2011-06-07T02:39:48.097000
6,253,137
6,253,563
Many-to-Many Design, 2 kind of relationship on the same objects?
For example, one User has joined many Groups, one Group has many User members. This is a normal many-to-many relation. However, I want to identify users as 'member' and 'owner': One group will have many 'owner' and many 'member'; each user can be either owner or member of a group. As same time, 'owner' should also be a...
You need the following tables: USERS GROUPS ROLES USERGROUPROLE The USERGROUPROLE table is this: userid references USER groupid references GROUPS roleid referencees ROLES Primary key (userid, groupid, roleid) This would permit owner of a group to be also a member of the group. It would allow the group to have multiple...
Many-to-Many Design, 2 kind of relationship on the same objects? For example, one User has joined many Groups, one Group has many User members. This is a normal many-to-many relation. However, I want to identify users as 'member' and 'owner': One group will have many 'owner' and many 'member'; each user can be either o...
TITLE: Many-to-Many Design, 2 kind of relationship on the same objects? QUESTION: For example, one User has joined many Groups, one Group has many User members. This is a normal many-to-many relation. However, I want to identify users as 'member' and 'owner': One group will have many 'owner' and many 'member'; each us...
[ "ruby-on-rails-3", "many-to-many" ]
1
2
162
1
0
2011-06-06T13:58:27.733000
2011-06-06T14:31:05.507000
6,253,142
6,253,237
Intellisense with Resharper in break mode
I'm using the latest version of Resharper (5.1.3) with the intellisense (Code completion and parameter info). I'm programming in c#. The intellisense of Resharper is very nice and work perfectly when the application is not running but when I run my WinForms project and hit Ctrl+Break (Break all and using edit and conti...
It still works if you press ctrl+space yourself. I suppose it's by design, so nothing we can do about that. It still gives the info when you explicitly ask for it by pressing ctrl+space or whatever your keyboard shortcut is, so it's not that bad.
Intellisense with Resharper in break mode I'm using the latest version of Resharper (5.1.3) with the intellisense (Code completion and parameter info). I'm programming in c#. The intellisense of Resharper is very nice and work perfectly when the application is not running but when I run my WinForms project and hit Ctrl...
TITLE: Intellisense with Resharper in break mode QUESTION: I'm using the latest version of Resharper (5.1.3) with the intellisense (Code completion and parameter info). I'm programming in c#. The intellisense of Resharper is very nice and work perfectly when the application is not running but when I run my WinForms pr...
[ "c#", "visual-studio-2010", "resharper", "intellisense", "code-completion" ]
2
1
441
1
0
2011-06-06T13:58:45.707000
2011-06-06T14:05:54.703000
6,253,143
6,253,224
Directory size mismatch after file copy
Hopefully someone has seen this before. I'm trying to copy all directory contents from the source to a different directory, and for this I started using the Commons FileUtils.copyDirectorytoDirectory method(File src, File dest). The code is pretty simple: public static void copyDirtoDir(String src, String dest) { File ...
Not sure what's going on, but you can use diff to diff directories. I'm sure that will pin down the differences easily.
Directory size mismatch after file copy Hopefully someone has seen this before. I'm trying to copy all directory contents from the source to a different directory, and for this I started using the Commons FileUtils.copyDirectorytoDirectory method(File src, File dest). The code is pretty simple: public static void copyD...
TITLE: Directory size mismatch after file copy QUESTION: Hopefully someone has seen this before. I'm trying to copy all directory contents from the source to a different directory, and for this I started using the Commons FileUtils.copyDirectorytoDirectory method(File src, File dest). The code is pretty simple: public...
[ "java", "apache", "nio", "apache-commons" ]
1
1
606
2
0
2011-06-06T13:58:45.723000
2011-06-06T14:04:56.990000
6,253,145
6,253,297
How can I create a group of radio menu items in WPF?
WPF seems to be lacking a RadioMenuItem class or similar functionality. In Windows.Forms, menu items had a RadioChecked property, but WPF menu items only have IsChecked. I can put actual RadioButton s in a MenuItem, but this feels weird and looks awkward. How can I create a group of menu items that function like radio ...
Change the Template of the MenuItem to display a RadioButton instead of the standard display
How can I create a group of radio menu items in WPF? WPF seems to be lacking a RadioMenuItem class or similar functionality. In Windows.Forms, menu items had a RadioChecked property, but WPF menu items only have IsChecked. I can put actual RadioButton s in a MenuItem, but this feels weird and looks awkward. How can I c...
TITLE: How can I create a group of radio menu items in WPF? QUESTION: WPF seems to be lacking a RadioMenuItem class or similar functionality. In Windows.Forms, menu items had a RadioChecked property, but WPF menu items only have IsChecked. I can put actual RadioButton s in a MenuItem, but this feels weird and looks aw...
[ "c#", ".net", "wpf", "winforms", "radio-button" ]
6
2
6,695
2
0
2011-06-06T13:58:55.187000
2011-06-06T14:10:47.493000
6,253,147
6,255,145
Rspec getting undefined method error when I try to use fill_in on text field
Totally revising this question, since I fixed the first issue but have ran into a new one. My code now looks like this- it 'should return on a partial match of Subject ID' do visit newpatient_path fill_in:subject_id,:with => "0303" click_button "Find Patient" response.should redirect_to(searchresult_path()) end When I ...
I am no Webrat expert, but doesn't the fill_in method expect a String as its first argument? You are passing a Symbol; don't know whether that's allowed.
Rspec getting undefined method error when I try to use fill_in on text field Totally revising this question, since I fixed the first issue but have ran into a new one. My code now looks like this- it 'should return on a partial match of Subject ID' do visit newpatient_path fill_in:subject_id,:with => "0303" click_butto...
TITLE: Rspec getting undefined method error when I try to use fill_in on text field QUESTION: Totally revising this question, since I fixed the first issue but have ran into a new one. My code now looks like this- it 'should return on a partial match of Subject ID' do visit newpatient_path fill_in:subject_id,:with => ...
[ "ruby-on-rails", "rspec" ]
0
1
670
1
0
2011-06-06T13:59:03.293000
2011-06-06T16:32:31.843000
6,253,149
6,253,485
Extract columns from two different database in sqlite3
Is it possible to extract columns from two different database in sqlite3? My problem is, I have two tables in two different database and I want to retrieve columns from tables from these two database. To make it more clear, here is my pseudocode. "SELECT Table_FromFirstDatabase.product FROM MyFirstDatabase.Table_FromFi...
You can do that: ATTACH statements in SQLite. Note that you could probably use SELECT t1.product FROM db1.tbl1 AS t1 EXCEPT (other select statement) instead of WHERE NOT IN
Extract columns from two different database in sqlite3 Is it possible to extract columns from two different database in sqlite3? My problem is, I have two tables in two different database and I want to retrieve columns from tables from these two database. To make it more clear, here is my pseudocode. "SELECT Table_From...
TITLE: Extract columns from two different database in sqlite3 QUESTION: Is it possible to extract columns from two different database in sqlite3? My problem is, I have two tables in two different database and I want to retrieve columns from tables from these two database. To make it more clear, here is my pseudocode. ...
[ "sql", "sqlite" ]
1
1
221
2
0
2011-06-06T13:59:09.213000
2011-06-06T14:24:25.060000
6,253,151
6,253,329
Best tree structure for Multi-dimensional data
To organize multi-dimensional data, What is the most useful and efficient tree data structure? (eg, K-D-B tree, region quadtree, R-tree) I want to know best search time and best space utilization tree structure.
It highly depends on how your data is distributed in the space and how you want to search for it (what are the criteria you query for?). It is very easy to find the right quad-tree bin given a location in space, on the other hand it introduces more overhead than a well-shaped kd-tree. There is a reason why all of these...
Best tree structure for Multi-dimensional data To organize multi-dimensional data, What is the most useful and efficient tree data structure? (eg, K-D-B tree, region quadtree, R-tree) I want to know best search time and best space utilization tree structure.
TITLE: Best tree structure for Multi-dimensional data QUESTION: To organize multi-dimensional data, What is the most useful and efficient tree data structure? (eg, K-D-B tree, region quadtree, R-tree) I want to know best search time and best space utilization tree structure. ANSWER: It highly depends on how your data...
[ "data-structures", "tree", "multidimensional-array" ]
2
1
938
2
0
2011-06-06T13:59:24.770000
2011-06-06T14:13:11.613000
6,253,155
6,253,446
makefile conditionals
Note: using MinGW's make (should be GNU make) i have a couple of -include statements in my makefile to import dependencies which were generated using g++ -MM. However I would like to only do this when necessary. I have several different build targets and I don't want all of their respective dependency files to be inclu...
If you really don't want to include those files needlessly, you have a couple of options: You can put in a conditional as Diego Sevilla suggests (but I would recommend using MAKECMDGOALS so that you can write a more flexible version, specific to targets, e.g. you'll include foo.d if and only if you're making foo.o ). Y...
makefile conditionals Note: using MinGW's make (should be GNU make) i have a couple of -include statements in my makefile to import dependencies which were generated using g++ -MM. However I would like to only do this when necessary. I have several different build targets and I don't want all of their respective depend...
TITLE: makefile conditionals QUESTION: Note: using MinGW's make (should be GNU make) i have a couple of -include statements in my makefile to import dependencies which were generated using g++ -MM. However I would like to only do this when necessary. I have several different build targets and I don't want all of their...
[ "include", "makefile", "conditional-statements" ]
1
3
4,765
3
0
2011-06-06T13:59:36.617000
2011-06-06T14:22:05.437000
6,253,159
6,253,459
Using lapply with changing arguments
R textbooks continue to promote the use of lapply instead of loops. This is easy even for functions with arguments like lapply(somelist, f, a=1, b=2) but what if the arguments change depending on the list element? Assume my somelist consists of: somelist$USA somelist$Europe somelist$Switzerland plus there is anotherlis...
Apply over list names rather than list elements. E.g.: somelist <- list('USA'=rnorm(10), 'Europe'=rnorm(10), 'Switzerland'=rnorm(10)) anotherlist <- list('USA'=5, 'Europe'=10, 'Switzerland'=4) lapply(names(somelist), function(i) somelist[[i]] / anotherlist[[i]]) EDIT: You also ask if there is a way "except for a loop" ...
Using lapply with changing arguments R textbooks continue to promote the use of lapply instead of loops. This is easy even for functions with arguments like lapply(somelist, f, a=1, b=2) but what if the arguments change depending on the list element? Assume my somelist consists of: somelist$USA somelist$Europe somelist...
TITLE: Using lapply with changing arguments QUESTION: R textbooks continue to promote the use of lapply instead of loops. This is easy even for functions with arguments like lapply(somelist, f, a=1, b=2) but what if the arguments change depending on the list element? Assume my somelist consists of: somelist$USA someli...
[ "r", "lapply" ]
9
16
9,436
2
0
2011-06-06T13:59:59.307000
2011-06-06T14:22:48.947000
6,253,163
6,254,287
Passing XML string in the body of WCF REST service using WebInvoke
I'm a newbie to WCF, REST etc. I'm trying to write a service and a client. I want to pass xml as string to the service and get some response back. I am trying to pass the xml in the body to the POST method, but when I run my client, it just hangs. It works fine when I change the service to accept the parameter as a par...
Change your operation contract to use an XElement and the BodyStyle of Bare [WebInvoke(Method = "POST", UriTemplate = "getString", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml)] [OperationContract] string GetXml(XElement xmlstring); Additionally I sus...
Passing XML string in the body of WCF REST service using WebInvoke I'm a newbie to WCF, REST etc. I'm trying to write a service and a client. I want to pass xml as string to the service and get some response back. I am trying to pass the xml in the body to the POST method, but when I run my client, it just hangs. It wo...
TITLE: Passing XML string in the body of WCF REST service using WebInvoke QUESTION: I'm a newbie to WCF, REST etc. I'm trying to write a service and a client. I want to pass xml as string to the service and get some response back. I am trying to pass the xml in the body to the POST method, but when I run my client, it...
[ "xml", "wcf", "rest", "post", "webinvoke" ]
5
8
14,348
4
0
2011-06-06T14:00:17.623000
2011-06-06T15:25:26.720000
6,253,169
6,253,233
Automatic changes to $PATH in Bash
The project I work on has some executable scripts in the repository. These scripts are actually tools that automate some development tasks and I invoke them only when I'm inside the repo and they work only on files in the repo. My typical working session looks like this: $ cd $REPO $./tools/start-session $ some-script ...
On the right track, but don't use PS1 - you want PROMPT_COMMAND. For example: PROMPT_COMMAND='ls' will execute ls every time a new prompt appears. Whether this will solve you root problem I couldn't say, as I'm not sure I understand it properly.
Automatic changes to $PATH in Bash The project I work on has some executable scripts in the repository. These scripts are actually tools that automate some development tasks and I invoke them only when I'm inside the repo and they work only on files in the repo. My typical working session looks like this: $ cd $REPO $....
TITLE: Automatic changes to $PATH in Bash QUESTION: The project I work on has some executable scripts in the repository. These scripts are actually tools that automate some development tasks and I invoke them only when I'm inside the repo and they work only on files in the repo. My typical working session looks like t...
[ "bash", "path" ]
1
1
351
2
0
2011-06-06T14:00:52.780000
2011-06-06T14:05:38.737000
6,253,173
6,253,290
Testing Android project with jar dependecies
My Android project has a few jar libraries as dependencies. Alone, it compiles and works well. I wrote a little test project but running it I don't get any result (no tests passed or failed) nor any error, but in the logcat's output there are warnings like this: 06-06 14:55:43.533: INFO/dalvikvm(7049): Failed resolving...
Go to your project that uses.jar files (i.e. project under test). Click right button -> Properties-> Java Build Path -> Order and Export -> check libraries there
Testing Android project with jar dependecies My Android project has a few jar libraries as dependencies. Alone, it compiles and works well. I wrote a little test project but running it I don't get any result (no tests passed or failed) nor any error, but in the logcat's output there are warnings like this: 06-06 14:55:...
TITLE: Testing Android project with jar dependecies QUESTION: My Android project has a few jar libraries as dependencies. Alone, it compiles and works well. I wrote a little test project but running it I don't get any result (no tests passed or failed) nor any error, but in the logcat's output there are warnings like ...
[ "android", "testing" ]
7
16
9,571
3
0
2011-06-06T14:01:08.477000
2011-06-06T14:10:23.180000
6,253,176
6,253,202
Anonymous array indexing instead of a switch statement?
In Java, I find the following code much cleaner and easier to maintain than the corresponding bulky switch statement: try { selectedObj = new Object[] { objA, objB, objC, objD, }[unvalidatedIndex]; } catch (ArrayIndexOutOfBoundsException e) { selectedObj = objA; } opposed to switch (unvalidatedIndex) { case 0: selected...
Your first approach is fine. However, it is better to check the index first: Object[] arr = new Object[] {... }; if (i < 0 || i >= arr.length) i = 0; selectedObj = arr[i];
Anonymous array indexing instead of a switch statement? In Java, I find the following code much cleaner and easier to maintain than the corresponding bulky switch statement: try { selectedObj = new Object[] { objA, objB, objC, objD, }[unvalidatedIndex]; } catch (ArrayIndexOutOfBoundsException e) { selectedObj = objA; }...
TITLE: Anonymous array indexing instead of a switch statement? QUESTION: In Java, I find the following code much cleaner and easier to maintain than the corresponding bulky switch statement: try { selectedObj = new Object[] { objA, objB, objC, objD, }[unvalidatedIndex]; } catch (ArrayIndexOutOfBoundsException e) { sel...
[ "java", "switch-statement", "indexoutofboundsexception", "anonymous-arrays" ]
2
5
485
6
0
2011-06-06T14:01:27.677000
2011-06-06T14:03:16.780000
6,253,200
6,253,284
How do I get multiple add hoc builds under one provisioning profile?
I want two ad-hoc builds of my app to be be able to be installed at the same time on one device. I do not want to make an additional ad-hoc provisioning profile. (which is how I have done it in the past). The bundle identifier can not be changed since doing so will require a new provisioning profile. If there is an ans...
You need to make a wildcard provisioning profile. Set up a new appID in the provisioning portal. You simply make somthing like: com.myCompany.*. Then use that identifier in a new ad-hoc profile. Then any app that has an identifier that starts with com.myCompany can work with that profile. This has to be done in the iOS...
How do I get multiple add hoc builds under one provisioning profile? I want two ad-hoc builds of my app to be be able to be installed at the same time on one device. I do not want to make an additional ad-hoc provisioning profile. (which is how I have done it in the past). The bundle identifier can not be changed since...
TITLE: How do I get multiple add hoc builds under one provisioning profile? QUESTION: I want two ad-hoc builds of my app to be be able to be installed at the same time on one device. I do not want to make an additional ad-hoc provisioning profile. (which is how I have done it in the past). The bundle identifier can no...
[ "iphone", "ios" ]
1
2
126
1
0
2011-06-06T14:02:51.740000
2011-06-06T14:10:02.853000
6,253,201
6,259,308
For-loop Syntax Error in Sqlite3.c
cppcheck has determined that the following statement produces a syntax error in sqlite3.c: for(i=0; i nDb; i++){ Full function: SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){ int i; Btree *p; assert( sqlite3_mutex_held(db->mutex) ); for(i=0; i nDb; i++){ p = db->aDb[i].pBt; if( p && p->sharable ){ assert( p->wa...
Looks like a false positive, however I can't reproduce it using Cppcheck 1.48 and C source code for SQLite 3.7.6.3. If you're using different source or a different version, please log it as a bug.
For-loop Syntax Error in Sqlite3.c cppcheck has determined that the following statement produces a syntax error in sqlite3.c: for(i=0; i nDb; i++){ Full function: SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){ int i; Btree *p; assert( sqlite3_mutex_held(db->mutex) ); for(i=0; i nDb; i++){ p = db->aDb[i].pBt; if...
TITLE: For-loop Syntax Error in Sqlite3.c QUESTION: cppcheck has determined that the following statement produces a syntax error in sqlite3.c: for(i=0; i nDb; i++){ Full function: SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){ int i; Btree *p; assert( sqlite3_mutex_held(db->mutex) ); for(i=0; i nDb; i++){ p = ...
[ "c", "sqlite", "syntax-error", "cppcheck" ]
1
1
641
2
0
2011-06-06T14:03:12.690000
2011-06-06T23:50:41.063000
6,253,204
6,253,360
Sort lists by date?
I have a question. In my app I have saved in my database some lists. Each list has asociated a date in this format 6-June-2011. How can I order these lists by date? I wrote I function like that: public Cursor getAll(){ return (mDb.rawQuery("SELECT _id, Title, Shop, Data, Budget_allocated," + " Budget_spent FROM Lists ...
I don't know anything about android development, but it sounds like your date field is stored as a string rather than a date, is that correct? If so, you can either: Change your table so that field is a date (then it should compare correctly) Or store it in a standard format such that the default string comparison sort...
Sort lists by date? I have a question. In my app I have saved in my database some lists. Each list has asociated a date in this format 6-June-2011. How can I order these lists by date? I wrote I function like that: public Cursor getAll(){ return (mDb.rawQuery("SELECT _id, Title, Shop, Data, Budget_allocated," + " Budg...
TITLE: Sort lists by date? QUESTION: I have a question. In my app I have saved in my database some lists. Each list has asociated a date in this format 6-June-2011. How can I order these lists by date? I wrote I function like that: public Cursor getAll(){ return (mDb.rawQuery("SELECT _id, Title, Shop, Data, Budget_al...
[ "android", "database", "sql-order-by" ]
0
0
745
3
0
2011-06-06T14:03:19.360000
2011-06-06T14:15:26.857000
6,253,205
6,256,907
GSON: .isJsonNull() question
I am reading in a JSON file (using Google's GSON ). One of my tests checks program's behavior in event file a given key is missing. JsonElement value = e.getAsJsonObject().get(ENVIRONMENT); My expectation is that when.get(ing) this key, i would get null. Turns out i do. When i.get(ENVIRONMENT), value returned is null. ...
Never mind my first answer below. I'd read the question too quickly. It looks like this is a simple case of the documents lying -- or at least being misunderstood. Fortunately, code does not lie so easily and Gson is an open source project. Here's JsonObject.get(String): /** * Returns the member with the specified name...
GSON: .isJsonNull() question I am reading in a JSON file (using Google's GSON ). One of my tests checks program's behavior in event file a given key is missing. JsonElement value = e.getAsJsonObject().get(ENVIRONMENT); My expectation is that when.get(ing) this key, i would get null. Turns out i do. When i.get(ENVIRONME...
TITLE: GSON: .isJsonNull() question QUESTION: I am reading in a JSON file (using Google's GSON ). One of my tests checks program's behavior in event file a given key is missing. JsonElement value = e.getAsJsonObject().get(ENVIRONMENT); My expectation is that when.get(ing) this key, i would get null. Turns out i do. Wh...
[ "json", "null", "gson" ]
11
21
33,884
2
0
2011-06-06T14:03:26.903000
2011-06-06T19:18:39.720000
6,253,206
6,253,271
Use an existing property in assigning a value to a new Member
Pardon my title guys. I tried thinking hard but couldn't think of better title. My question is simple how can I do something like following in javascript. var blah={ try2:[45,56],try1:try2[0]}; console.log(blah);
You cannot do that in an object literal. You'd have to do: var blah = { try2: [45, 46] }; blah.try1 = blah.try2[0]; When you really want to be able to express that as a single expression, you can use an anonymous function: var blah = (function() { var obj = { try2: [45, 46] }; obj.try1 = obj.try2[0]; return obj; })();
Use an existing property in assigning a value to a new Member Pardon my title guys. I tried thinking hard but couldn't think of better title. My question is simple how can I do something like following in javascript. var blah={ try2:[45,56],try1:try2[0]}; console.log(blah);
TITLE: Use an existing property in assigning a value to a new Member QUESTION: Pardon my title guys. I tried thinking hard but couldn't think of better title. My question is simple how can I do something like following in javascript. var blah={ try2:[45,56],try1:try2[0]}; console.log(blah); ANSWER: You cannot do that...
[ "javascript" ]
1
0
40
3
0
2011-06-06T14:03:28.570000
2011-06-06T14:08:47.573000
6,253,207
6,253,274
Android repeatable dialog buttons
I'm building a dialog that lets you click the picture multiple times, and each time you click it it changes the picture. final Dialog dialog = new Dialog(ViewCase.this); dialog.setContentView(R.layout.viewcase_largeimage); dialog.setCancelable(true); dialog.setCanceledOnTouchOutside(true); dialog.setTitle(name); // sh...
In switch block you should always use break; after every case. Switch doesn't stop executing when it finds the right case, it goes forward and executes every case. Maybe this can be the problem, you need to try it.
Android repeatable dialog buttons I'm building a dialog that lets you click the picture multiple times, and each time you click it it changes the picture. final Dialog dialog = new Dialog(ViewCase.this); dialog.setContentView(R.layout.viewcase_largeimage); dialog.setCancelable(true); dialog.setCanceledOnTouchOutside(tr...
TITLE: Android repeatable dialog buttons QUESTION: I'm building a dialog that lets you click the picture multiple times, and each time you click it it changes the picture. final Dialog dialog = new Dialog(ViewCase.this); dialog.setContentView(R.layout.viewcase_largeimage); dialog.setCancelable(true); dialog.setCancele...
[ "android", "dialog", "imageview" ]
0
1
124
1
0
2011-06-06T14:03:49.567000
2011-06-06T14:09:20.180000
6,253,209
6,253,231
oval leaves the trail
I am trying to make a simple ball animation, that starts from 1 corner and goes to another corner of the panel. I have written a program for that. When I run the program the oval or ball leaves the trail. What I mean to say is that it leaves it's 'color trail' when the program runs. In my program timer fires an event e...
Try public void paintComponent(final Graphics g) { super.paintComponent(g); g.setColor(Color.black); g.drawOval(x,y,width,height); g.fillOval(x,y,width,height); }
oval leaves the trail I am trying to make a simple ball animation, that starts from 1 corner and goes to another corner of the panel. I have written a program for that. When I run the program the oval or ball leaves the trail. What I mean to say is that it leaves it's 'color trail' when the program runs. In my program ...
TITLE: oval leaves the trail QUESTION: I am trying to make a simple ball animation, that starts from 1 corner and goes to another corner of the panel. I have written a program for that. When I run the program the oval or ball leaves the trail. What I mean to say is that it leaves it's 'color trail' when the program ru...
[ "java", "swing", "user-interface", "graphics", "2d" ]
4
6
1,179
1
0
2011-06-06T14:03:53.810000
2011-06-06T14:05:32.937000
6,253,211
6,253,824
How do I check a check box in a pdf template
I would like to use data from a form and add to my pdf template. I use the following for textfields... PdfStamper formFiller = new PdfStamper(reader, ms); AcroFields formFields = formFiller.AcroFields; formFields.SetField("Name", formData.Name); How do I check a checkbox?
I think this should do the trick: formFields.SetField("checkBoxId", "Yes");
How do I check a check box in a pdf template I would like to use data from a form and add to my pdf template. I use the following for textfields... PdfStamper formFiller = new PdfStamper(reader, ms); AcroFields formFields = formFiller.AcroFields; formFields.SetField("Name", formData.Name); How do I check a checkbox?
TITLE: How do I check a check box in a pdf template QUESTION: I would like to use data from a form and add to my pdf template. I use the following for textfields... PdfStamper formFiller = new PdfStamper(reader, ms); AcroFields formFields = formFiller.AcroFields; formFields.SetField("Name", formData.Name); How do I ch...
[ "c#", ".net", "asp.net", "pdf", "itext" ]
1
3
4,629
1
0
2011-06-06T14:04:04.983000
2011-06-06T14:49:18.927000
6,253,212
6,253,270
How can I increase the default size 16px from Jquery-UI icon set?
I want to increase the size of JQuery icons from 16 to 24px.
im pretty sure that the icons are packed into a css sprite grid therefor cant be bigger... the only thing i could think of is adding a margin around it but then the icon would still be small in the middle of a bigger empty space. or even opening the sprite and making bigger icons!;) Here what i would try (you would sti...
How can I increase the default size 16px from Jquery-UI icon set? I want to increase the size of JQuery icons from 16 to 24px.
TITLE: How can I increase the default size 16px from Jquery-UI icon set? QUESTION: I want to increase the size of JQuery icons from 16 to 24px. ANSWER: im pretty sure that the icons are packed into a css sprite grid therefor cant be bigger... the only thing i could think of is adding a margin around it but then the i...
[ "jquery", "jquery-ui" ]
6
2
8,156
2
0
2011-06-06T14:04:10.687000
2011-06-06T14:08:44.870000
6,253,242
6,254,041
Customizing rich text editor toolbar in SharePoint 2010
Hi is there any way to customize SharePoint 2010 rich text editor toolbar? I don't need user to have all tools, just the one he needs like: B, I, U, font type, font-size and couple more. but the rest of them I would like to hide.
There are a bunch of attributes that you can add to your RichHtmlField tag in the Page Layout that controls some of those things: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.webcontrols.richhtmlfield_members.aspx
Customizing rich text editor toolbar in SharePoint 2010 Hi is there any way to customize SharePoint 2010 rich text editor toolbar? I don't need user to have all tools, just the one he needs like: B, I, U, font type, font-size and couple more. but the rest of them I would like to hide.
TITLE: Customizing rich text editor toolbar in SharePoint 2010 QUESTION: Hi is there any way to customize SharePoint 2010 rich text editor toolbar? I don't need user to have all tools, just the one he needs like: B, I, U, font type, font-size and couple more. but the rest of them I would like to hide. ANSWER: There a...
[ "sharepoint-2010" ]
1
1
1,995
1
0
2011-06-06T14:06:17.347000
2011-06-06T15:05:21.193000
6,253,244
6,253,879
How to make a child node visible = false in a Treeview Control
I'm having a windows form with a tree view control. This tree view has a Root node and 2 child nodes. My requirement is i need to hide the first child node. Is it possible to make visible false that particular child nod
Yes you could inherit from tree node and create your own behaviour. Like so. public class RootNode: TreeNode { public List ChildNodes { get; set; } public RootNode() { ChildNodes = new List (); } public void PopulateChildren() { this.Nodes.Clear(); var visibleNodes = ChildNodes.Where(x => x.Visible).ToArray(); this...
How to make a child node visible = false in a Treeview Control I'm having a windows form with a tree view control. This tree view has a Root node and 2 child nodes. My requirement is i need to hide the first child node. Is it possible to make visible false that particular child nod
TITLE: How to make a child node visible = false in a Treeview Control QUESTION: I'm having a windows form with a tree view control. This tree view has a Root node and 2 child nodes. My requirement is i need to hide the first child node. Is it possible to make visible false that particular child nod ANSWER: Yes you co...
[ "c#", "winforms", "treeview" ]
5
6
18,616
3
0
2011-06-06T14:06:21.240000
2011-06-06T14:53:07.417000
6,253,251
6,253,388
Django: How can I initialise a Charfield when using Add in an admin form?
I have a Charfield 'status' [with choices = (('A', 'aaa'), ('B', 'bbb'), ('C', ccc'),)] Can I initialise the field in the standard admin form to one of the choices? A drop down appears but no choice is selected by default.
Are you using the default option on the field? CharField(default='A', choices=(...))
Django: How can I initialise a Charfield when using Add in an admin form? I have a Charfield 'status' [with choices = (('A', 'aaa'), ('B', 'bbb'), ('C', ccc'),)] Can I initialise the field in the standard admin form to one of the choices? A drop down appears but no choice is selected by default.
TITLE: Django: How can I initialise a Charfield when using Add in an admin form? QUESTION: I have a Charfield 'status' [with choices = (('A', 'aaa'), ('B', 'bbb'), ('C', ccc'),)] Can I initialise the field in the standard admin form to one of the choices? A drop down appears but no choice is selected by default. ANSW...
[ "django", "django-admin", "initialization" ]
0
2
107
1
0
2011-06-06T14:07:19.567000
2011-06-06T14:17:30.127000
6,253,252
6,253,282
what does this xpath means "//Form/*[. = 'on']"
I am newbie in xml related things I am not able to understand: SelectNodes(@"//Form/*[. = 'on']"); Note: SelectNodes is a function of XmlNode.(related to XmlDocument ) Please tell me what this code snippet means?
. means the current element node, whatever it is. The predicate is checking the element's text node to see if it's the string 'on'. So that XPath query selects any nodes that are children of the Form node and have a value of on.
what does this xpath means "//Form/*[. = 'on']" I am newbie in xml related things I am not able to understand: SelectNodes(@"//Form/*[. = 'on']"); Note: SelectNodes is a function of XmlNode.(related to XmlDocument ) Please tell me what this code snippet means?
TITLE: what does this xpath means "//Form/*[. = 'on']" QUESTION: I am newbie in xml related things I am not able to understand: SelectNodes(@"//Form/*[. = 'on']"); Note: SelectNodes is a function of XmlNode.(related to XmlDocument ) Please tell me what this code snippet means? ANSWER: . means the current element node...
[ ".net", "xml", "xpath", "xmlnode", "selectnodes" ]
1
4
617
1
0
2011-06-06T14:07:27.323000
2011-06-06T14:09:51.333000
6,253,256
6,253,318
Setting processData to false in jQuery breaks my AJAX request
I've googled for a while now and can only find what processData: false does. I can't find anyone who has experienced this same issue. I'm passing JSON back to the server and do not want jQuery to automatically convert the data to a query string so I'm setting processData to false. I can see the request firing if I take...
You want to pass the data as JSON. You are passing a Javascript object. JSON is a way of serializing Javascript objects to strings so that they can be passed around without compatibility issues. You actually want to pass the JSON in a string: $.ajax({ url: myUrl, type: "POST", data: '{"foo": "bar"}', processData: false...
Setting processData to false in jQuery breaks my AJAX request I've googled for a while now and can only find what processData: false does. I can't find anyone who has experienced this same issue. I'm passing JSON back to the server and do not want jQuery to automatically convert the data to a query string so I'm settin...
TITLE: Setting processData to false in jQuery breaks my AJAX request QUESTION: I've googled for a while now and can only find what processData: false does. I can't find anyone who has experienced this same issue. I'm passing JSON back to the server and do not want jQuery to automatically convert the data to a query st...
[ "ajax", "json", "jquery" ]
24
25
67,126
3
0
2011-06-06T14:07:42.003000
2011-06-06T14:12:28.837000