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,182,924
6,182,987
Rails session -- current_user changes
I have a current_user variable set to the logged in user, this should be static for the duration of the session, but when I show one of the other users, I seem to "become" that user, with all of its permissions (or lack thereof) in my users controller: def show @user = User.find(params[:id]) respond_to do |format| for...
The current_user? method is incorrect. It sets the current_user to user, instead of returning whether current_user is the same as user. If you change it to the following everything will probably work as expected: def current_user?(user) @current_user == user end
Rails session -- current_user changes I have a current_user variable set to the logged in user, this should be static for the duration of the session, but when I show one of the other users, I seem to "become" that user, with all of its permissions (or lack thereof) in my users controller: def show @user = User.find(pa...
TITLE: Rails session -- current_user changes QUESTION: I have a current_user variable set to the logged in user, this should be static for the duration of the session, but when I show one of the other users, I seem to "become" that user, with all of its permissions (or lack thereof) in my users controller: def show @u...
[ "ruby-on-rails", "session" ]
1
2
1,435
2
0
2011-05-31T04:10:35.720000
2011-05-31T04:22:37.390000
6,182,932
6,182,961
Form submit called using Link. Need Help
I have tried different ways but no success. Googled but can not find this code working. I want to submit form by clicking Link. Below is the code. Link Click is called but submit function is bypassing. Save Page $(document).ready(function () { $("a.pageAddLink").live('click', function (ev) { ev.preventDefault(); //$("f...
Your code is binding the form-submit logic on click of the link when you should do this outside the click event. From what I can tell, you want the link to actually invoke the submit event of the form, not to declare how the submit event ought to behave: $("form#theForm").submit(function(e){ e.preventDefault(); alert("...
Form submit called using Link. Need Help I have tried different ways but no success. Googled but can not find this code working. I want to submit form by clicking Link. Below is the code. Link Click is called but submit function is bypassing. Save Page $(document).ready(function () { $("a.pageAddLink").live('click', fu...
TITLE: Form submit called using Link. Need Help QUESTION: I have tried different ways but no success. Googled but can not find this code working. I want to submit form by clicking Link. Below is the code. Link Click is called but submit function is bypassing. Save Page $(document).ready(function () { $("a.pageAddLink"...
[ "jquery" ]
1
2
80
2
0
2011-05-31T04:12:19.817000
2011-05-31T04:18:02.053000
6,182,936
6,182,973
Find N number subset in Array that sum to 0 [Subset Sum problem, that returns the subset]
I am trying to practice the interview question in the title For those who directly want to know my question, jump to "Smaller version of my Question". For more context, read on. =>For N = 2, We can simply use a Map. =>For N= 3, there is a n^2 solution: Finding three elements in an array whose sum is closest to a given ...
Just make S[s] contain the list of numbers that make that sum when it is possible: Let S[i] = the list of numbers that make up that sum and false (or null, something distinct from an empty list) otherwise. S[0] = empty list // we can always make sum 0: just don't choose any number S[i] = null for all i!= 0 for each nu...
Find N number subset in Array that sum to 0 [Subset Sum problem, that returns the subset] I am trying to practice the interview question in the title For those who directly want to know my question, jump to "Smaller version of my Question". For more context, read on. =>For N = 2, We can simply use a Map. =>For N= 3, th...
TITLE: Find N number subset in Array that sum to 0 [Subset Sum problem, that returns the subset] QUESTION: I am trying to practice the interview question in the title For those who directly want to know my question, jump to "Smaller version of my Question". For more context, read on. =>For N = 2, We can simply use a M...
[ "arrays", "dynamic", "dynamic-programming" ]
1
1
2,131
1
0
2011-05-31T04:13:14.027000
2011-05-31T04:19:55.667000
6,182,944
6,182,979
The 'this' prepended in function parameter with C#
The Real World Functional Programming has this code in page 65. The Tuple has two properties Item1 and Item2, and it has TupleExtensions class as follows. static class TupleExtensions { public static Tuple WithItems2 (this Tuple tuple, T2 newItem2) { // line3??? return Tuple.Create(tuple.Item1, newItme2); // line4??? }...
the this keyword, in this context, means that you are declaring an extension method. To declare an extension method you must be in the scope of a static class and the method must also be marked static. This would be an example namespace Utils { public static class StringExtension { public static int NonWhitespaceLength...
The 'this' prepended in function parameter with C# The Real World Functional Programming has this code in page 65. The Tuple has two properties Item1 and Item2, and it has TupleExtensions class as follows. static class TupleExtensions { public static Tuple WithItems2 (this Tuple tuple, T2 newItem2) { // line3??? return...
TITLE: The 'this' prepended in function parameter with C# QUESTION: The Real World Functional Programming has this code in page 65. The Tuple has two properties Item1 and Item2, and it has TupleExtensions class as follows. static class TupleExtensions { public static Tuple WithItems2 (this Tuple tuple, T2 newItem2) { ...
[ "c#", "this" ]
2
4
130
4
0
2011-05-31T04:14:26.163000
2011-05-31T04:21:16.913000
6,182,959
6,183,938
Rails 3 & Multilingual context (globalize2?)
globalize2 seems to be a bit dead. It has't been updated for more than a year. Also it does not mention weather it supports Rails 3 or not. Are there any globalization frameworks for Rails 3? Or any suggestions how to globalize my app without any frameworks? Thanks!
Please look at http://guides.rubyonrails.org/i18n.html. This is what we use in our application and it works quite well:) and for database translations you can use new version of globalize - globalize3. You can find it here: https://github.com/galetahub/globalize3
Rails 3 & Multilingual context (globalize2?) globalize2 seems to be a bit dead. It has't been updated for more than a year. Also it does not mention weather it supports Rails 3 or not. Are there any globalization frameworks for Rails 3? Or any suggestions how to globalize my app without any frameworks? Thanks!
TITLE: Rails 3 & Multilingual context (globalize2?) QUESTION: globalize2 seems to be a bit dead. It has't been updated for more than a year. Also it does not mention weather it supports Rails 3 or not. Are there any globalization frameworks for Rails 3? Or any suggestions how to globalize my app without any frameworks...
[ "ruby-on-rails" ]
1
3
685
1
0
2011-05-31T04:17:44.173000
2011-05-31T06:48:44.343000
6,182,960
6,182,986
How to work withJSON data after calling an AJAX function in jQuery
With this code: $("#mybutton").click(function(){ $.ajax({ url: '/Member/GetPinPoints/@Model.Id', type: "POST", dataType: "json", contentType: "application/json; charset=utf-8", success: function(data) { alert(data); }, error: function() { alert("error"); } }); return false; }); I am receiving a JSON object that looks...
Plain old JavaScript: for(var i = 0; i < data.length; i++){ for(var key in data[i]){ alert(key + ": " + data[i][key]); } } And jQuery: $.each(data, function(index, element){ $.each(element, function(key, value){ alert(key + ": " + value); }); }); You need to iterate in a nested loop since you need to go over all elemen...
How to work withJSON data after calling an AJAX function in jQuery With this code: $("#mybutton").click(function(){ $.ajax({ url: '/Member/GetPinPoints/@Model.Id', type: "POST", dataType: "json", contentType: "application/json; charset=utf-8", success: function(data) { alert(data); }, error: function() { alert("error"...
TITLE: How to work withJSON data after calling an AJAX function in jQuery QUESTION: With this code: $("#mybutton").click(function(){ $.ajax({ url: '/Member/GetPinPoints/@Model.Id', type: "POST", dataType: "json", contentType: "application/json; charset=utf-8", success: function(data) { alert(data); }, error: function(...
[ "c#", "jquery", "asp.net", "json", "asp.net-mvc-3" ]
0
4
1,303
3
0
2011-05-31T04:17:52.950000
2011-05-31T04:22:34.950000
6,182,964
6,183,002
Why are parentheses optional when using print in Python 2.7?
In Python 2.7 both the following will do the same print("Hello, World!") # Prints "Hello, World!" print "Hello, World!" # Prints "Hello, World!" However the following will not print("Hello,", "World!") # Prints the tuple: ("Hello,", "World!") print "Hello,", "World!" # Prints the words "Hello, World!" In Python 3.x p...
In Python 2.x print is actually a special statement and not a function*. This is also why it can't be used like: lambda x: print x Note that (expr) does not create a Tuple (it results in expr ), but, does. This likely results in the confusion between print (x) and print (x, y) in Python 2.7 (1) # 1 -- no tuple Mister! ...
Why are parentheses optional when using print in Python 2.7? In Python 2.7 both the following will do the same print("Hello, World!") # Prints "Hello, World!" print "Hello, World!" # Prints "Hello, World!" However the following will not print("Hello,", "World!") # Prints the tuple: ("Hello,", "World!") print "Hello,"...
TITLE: Why are parentheses optional when using print in Python 2.7? QUESTION: In Python 2.7 both the following will do the same print("Hello, World!") # Prints "Hello, World!" print "Hello, World!" # Prints "Hello, World!" However the following will not print("Hello,", "World!") # Prints the tuple: ("Hello,", "World!...
[ "python", "printing" ]
104
112
95,868
4
0
2011-05-31T04:18:27.897000
2011-05-31T04:25:02.863000
6,182,967
6,254,746
How to format a MySQL query into JSON using webpy?
I am trying to query a MySQL database using webpy. From the SQL query, I get the following. I tried to serialize the data using json.dumps(data) into JSON format, however I get an error indicating that the data is not serializable. I could probably iterate through each key value pair and put it into another dictionary ...
You can extend json.JSONEncoder to handle dates: I've not tested this using the Storage object as an argument, but as you say it works when there's no date in the query, I think this should work. (See the json module docs for information about extending the encoder object). import datetime, json class ExtendedEncoder(...
How to format a MySQL query into JSON using webpy? I am trying to query a MySQL database using webpy. From the SQL query, I get the following. I tried to serialize the data using json.dumps(data) into JSON format, however I get an error indicating that the data is not serializable. I could probably iterate through each...
TITLE: How to format a MySQL query into JSON using webpy? QUESTION: I am trying to query a MySQL database using webpy. From the SQL query, I get the following. I tried to serialize the data using json.dumps(data) into JSON format, however I get an error indicating that the data is not serializable. I could probably it...
[ "python", "mysql", "json", "web.py" ]
1
1
1,812
2
0
2011-05-31T04:18:39.063000
2011-06-06T15:59:29.467000
6,182,968
6,182,995
URL validation javascript jquery
I want to validate url and its need to be allow to with and with out http:// that means if user type as http://www.google.com or www.google.com should allow to the user.. i tried jquery validations class to do this.. no luck i tried regx as follow its also not working as i want. any help very appreciated
function checkURL(value) { var urlregex = new RegExp( "^((http|https|ftp)\://)*([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(2...
URL validation javascript jquery I want to validate url and its need to be allow to with and with out http:// that means if user type as http://www.google.com or www.google.com should allow to the user.. i tried jquery validations class to do this.. no luck i tried regx as follow its also not working as i want. any hel...
TITLE: URL validation javascript jquery QUESTION: I want to validate url and its need to be allow to with and with out http:// that means if user type as http://www.google.com or www.google.com should allow to the user.. i tried jquery validations class to do this.. no luck i tried regx as follow its also not working ...
[ "php", "javascript", "jquery", "regex" ]
0
0
1,946
4
0
2011-05-31T04:19:12.547000
2011-05-31T04:23:55.340000
6,182,993
6,183,007
PHP passing a class as a reference?
in Python, you could do something like this: class SomeClass(object): pass s = SomeClass someClassInstance = s() How could you accomplish the same effect in PHP? From what I understand, you cannot do this? Is this true?
You can create instances of dynamic class names; simply pass the name of the class as a string: class SomeClass {} $s = 'SomeClass'; $someClassInstance = new $s();
PHP passing a class as a reference? in Python, you could do something like this: class SomeClass(object): pass s = SomeClass someClassInstance = s() How could you accomplish the same effect in PHP? From what I understand, you cannot do this? Is this true?
TITLE: PHP passing a class as a reference? QUESTION: in Python, you could do something like this: class SomeClass(object): pass s = SomeClass someClassInstance = s() How could you accomplish the same effect in PHP? From what I understand, you cannot do this? Is this true? ANSWER: You can create instances of dynamic c...
[ "php", "python" ]
2
7
176
2
0
2011-05-31T04:23:48.457000
2011-05-31T04:25:38.857000
6,183,011
6,261,104
ajax response get returned, but sometimes doesn't trigger any actions or alerts
I've got a fairly standard ajax request, and the response is returned as an array. It works perfectly 90% of the time. Unfortunately 10% of the time, the request gets sent, response get's returned, but doesn't get displayed, and I can't even output to an alert. Firebug shows no errors with the response. I can open the ...
Have you tried rendering your data in your controller differently, like with a "render:json => @col_data.uniq"?
ajax response get returned, but sometimes doesn't trigger any actions or alerts I've got a fairly standard ajax request, and the response is returned as an array. It works perfectly 90% of the time. Unfortunately 10% of the time, the request gets sent, response get's returned, but doesn't get displayed, and I can't eve...
TITLE: ajax response get returned, but sometimes doesn't trigger any actions or alerts QUESTION: I've got a fairly standard ajax request, and the response is returned as an array. It works perfectly 90% of the time. Unfortunately 10% of the time, the request gets sent, response get's returned, but doesn't get displaye...
[ "jquery", "ruby-on-rails", "ajax" ]
1
3
1,112
2
0
2011-05-31T04:27:14.660000
2011-06-07T05:53:46.130000
6,183,017
6,187,638
how to vertically align elements in td tag
I want to align 3 elements in my tag vertically in the center/middle. These are the elements that I want to align: image button (a tag) top arrow image jquery slider image button (a tag) bottom arrow image Essentially the elements are there for vertically scrolling of a chart. They are a bit misaligned. I want them all...
Thanks to all for your help. I found the answer myself. This is the new code. Only the td tag has changed to add an additional attribute align=center. This will align all element within td tag in center.
how to vertically align elements in td tag I want to align 3 elements in my tag vertically in the center/middle. These are the elements that I want to align: image button (a tag) top arrow image jquery slider image button (a tag) bottom arrow image Essentially the elements are there for vertically scrolling of a chart....
TITLE: how to vertically align elements in td tag QUESTION: I want to align 3 elements in my tag vertically in the center/middle. These are the elements that I want to align: image button (a tag) top arrow image jquery slider image button (a tag) bottom arrow image Essentially the elements are there for vertically scr...
[ "html", "css" ]
31
15
94,874
4
0
2011-05-31T04:28:27.163000
2011-05-31T12:33:38.887000
6,183,019
6,183,055
Problem with Project Euler Problem 12
I'm having trouble with Project Euler's problem 12. My code is correctly generating the series, as far as I can tell, and it gets the correct solution to the test problem. I don't believe that long is getting overflowed because it does return a solution, just not the correct one. Any thoughts? The sequence of triangle ...
If x is a square numDivisors counts the square root of x twice.
Problem with Project Euler Problem 12 I'm having trouble with Project Euler's problem 12. My code is correctly generating the series, as far as I can tell, and it gets the correct solution to the test problem. I don't believe that long is getting overflowed because it does return a solution, just not the correct one. A...
TITLE: Problem with Project Euler Problem 12 QUESTION: I'm having trouble with Project Euler's problem 12. My code is correctly generating the series, as far as I can tell, and it gets the correct solution to the test problem. I don't believe that long is getting overflowed because it does return a solution, just not ...
[ "c#" ]
1
3
1,086
2
0
2011-05-31T04:28:37.153000
2011-05-31T04:37:09.317000
6,183,027
6,183,038
How to create N spans with no spaces in between in Rails 3?
To create n span s next to each other I do: <% n.times do |i| %> <%= content_tag(:span, i + 1) %> <% end %> The problem is that there is a space between the created span s. So, I tried to create them in one line: <% spans = "".html_safe %> <% n.times do |i| %> <% spans += content_tag(:span, i + 1) %> <% end %> <%= span...
If you check the HTML source you can see it's not a space, but a line-break (which in HTML is displayed as a space). If you put everything in one line the spaces are gone: <% n.times do |i| -%><%= content_tag(:span, i + 1) %><% end -%> This gives me the following output: 1 2 3 4 5
How to create N spans with no spaces in between in Rails 3? To create n span s next to each other I do: <% n.times do |i| %> <%= content_tag(:span, i + 1) %> <% end %> The problem is that there is a space between the created span s. So, I tried to create them in one line: <% spans = "".html_safe %> <% n.times do |i| %>...
TITLE: How to create N spans with no spaces in between in Rails 3? QUESTION: To create n span s next to each other I do: <% n.times do |i| %> <%= content_tag(:span, i + 1) %> <% end %> The problem is that there is a space between the created span s. So, I tried to create them in one line: <% spans = "".html_safe %> <%...
[ "ruby-on-rails", "ruby-on-rails-3" ]
1
2
206
2
0
2011-05-31T04:29:36.900000
2011-05-31T04:32:48.260000
6,183,030
6,183,107
jQuery Ajax/ASP.NET MVC JsonResult using dynamics, how do I access the JSON keys?
Here's the JSON string returned from my action: [{"Key":"Likes","Value":1},{"Key":"Loves","Value":0},{"Key":"Dislikes","Value":0},{"Key":"Message","Value":"Your vote has been changed"}] Here's how I'm trying to access them: $.ajax({ type: "POST", url: '/voteUrl', data: { id: '37', vote: $(this).attr('id') }, dataType: ...
You are returning an array, so to show all, you have to use for loop. Also in your current code, you are not accessing array by key. The correct code could be: success: function(result) { for(var i=0;i or if you have fixed length, than get the value directly instead of forloop or by comparing the key if you want to use...
jQuery Ajax/ASP.NET MVC JsonResult using dynamics, how do I access the JSON keys? Here's the JSON string returned from my action: [{"Key":"Likes","Value":1},{"Key":"Loves","Value":0},{"Key":"Dislikes","Value":0},{"Key":"Message","Value":"Your vote has been changed"}] Here's how I'm trying to access them: $.ajax({ type:...
TITLE: jQuery Ajax/ASP.NET MVC JsonResult using dynamics, how do I access the JSON keys? QUESTION: Here's the JSON string returned from my action: [{"Key":"Likes","Value":1},{"Key":"Loves","Value":0},{"Key":"Dislikes","Value":0},{"Key":"Message","Value":"Your vote has been changed"}] Here's how I'm trying to access th...
[ "c#", "jquery", "ajax", "json", "dynamic" ]
0
1
954
2
0
2011-05-31T04:30:38.730000
2011-05-31T04:47:55.710000
6,183,043
6,187,729
Is there any flag within the compiler to precompile IPV6 only
I have written the code for IPv6 implementation using a flag setting. The flag needs to be set in the header file before the compilation process if I need to enable IPv6 part. Is there any flag provided with the compiler itself so that I just need to use the statement #ifdef COMPILER_FLAG_FOR_IPV6 to enable IPv6 part o...
IPv6 compatibility is not dependent upon compiler support, rather OS-specific header files. There is no standard way of testing this as such. (As was pointed out you'd probably want CMake/AutoConf/Some other build system to detect this). You can also achieve what you seem to be looking for more directly, on Linux for e...
Is there any flag within the compiler to precompile IPV6 only I have written the code for IPv6 implementation using a flag setting. The flag needs to be set in the header file before the compilation process if I need to enable IPv6 part. Is there any flag provided with the compiler itself so that I just need to use the...
TITLE: Is there any flag within the compiler to precompile IPV6 only QUESTION: I have written the code for IPv6 implementation using a flag setting. The flag needs to be set in the header file before the compilation process if I need to enable IPv6 part. Is there any flag provided with the compiler itself so that I ju...
[ "ipv6" ]
2
2
242
1
0
2011-05-31T04:34:37.520000
2011-05-31T12:42:19.663000
6,183,044
6,183,165
Not Changing to Image Once Loaded (image gallery) - Javascript
I have been working on an image gallery in PHP and Javscript for a long time. The "selling point" of the gallery is that it pre-loads images so when you switch to the next image, you don't have to reload the page and it is almost instantaneous. The problem is that currently when you switch to a photo that has not been ...
You can try something like this, I have used this in a mobile gallery I have recently developed. var imageList = $('#imagelist'); //id of div tag imageList.empty(); var imageFiles = ' '; imageFiles = $.parseJSON(imageFiles); //convert to json for javascript readability var images = []; for(i = 0; i You can see I have ...
Not Changing to Image Once Loaded (image gallery) - Javascript I have been working on an image gallery in PHP and Javscript for a long time. The "selling point" of the gallery is that it pre-loads images so when you switch to the next image, you don't have to reload the page and it is almost instantaneous. The problem ...
TITLE: Not Changing to Image Once Loaded (image gallery) - Javascript QUESTION: I have been working on an image gallery in PHP and Javscript for a long time. The "selling point" of the gallery is that it pre-loads images so when you switch to the next image, you don't have to reload the page and it is almost instantan...
[ "javascript", "image-gallery" ]
0
0
292
1
0
2011-05-31T04:34:41.327000
2011-05-31T04:59:37.087000
6,183,062
6,191,636
Getting content carried by reference
I have a reference to a string object how can i get the data from it. Here is my sample: string key = "key1"; gpointer somepointer; GHashTable* myTable; g_hash_table_insert(myTable,&key1,somepointer); GList *keysList = g_hash_table_get_keys(myTable);// here i got keys previously set keysList = g_list_first(keysList);...
If keysList->data is gpointer ( void* ), I guess some cast like the following is needed: string recentKey = *(string*)keysList->data; Hope this helps
Getting content carried by reference I have a reference to a string object how can i get the data from it. Here is my sample: string key = "key1"; gpointer somepointer; GHashTable* myTable; g_hash_table_insert(myTable,&key1,somepointer); GList *keysList = g_hash_table_get_keys(myTable);// here i got keys previously s...
TITLE: Getting content carried by reference QUESTION: I have a reference to a string object how can i get the data from it. Here is my sample: string key = "key1"; gpointer somepointer; GHashTable* myTable; g_hash_table_insert(myTable,&key1,somepointer); GList *keysList = g_hash_table_get_keys(myTable);// here i got...
[ "c++", "gtk", "glib" ]
0
1
220
3
0
2011-05-31T04:39:11.890000
2011-05-31T18:07:35.627000
6,183,063
6,183,081
how could I randomize a jQuery tooltip
I am going to use on of the tooltip plugins listed in this question: jquery tooltip, but on click instead of hover How would I also setup a tooltip that randomized the text shown. For instance if you click a link you could be shown one of three possible messages: Message 1 Message 2 Message 3 ideas?
You usually have an array of messages and then generate a random index onclick. something like var messageArray = ["message 1", "message 2", "message 3"]; var randomNum = Math.floor(Math.random()*messageArray.size); var myMessage = messageArray[randomNum]; or something like that. refactor to use ajax/your db if you nee...
how could I randomize a jQuery tooltip I am going to use on of the tooltip plugins listed in this question: jquery tooltip, but on click instead of hover How would I also setup a tooltip that randomized the text shown. For instance if you click a link you could be shown one of three possible messages: Message 1 Message...
TITLE: how could I randomize a jQuery tooltip QUESTION: I am going to use on of the tooltip plugins listed in this question: jquery tooltip, but on click instead of hover How would I also setup a tooltip that randomized the text shown. For instance if you click a link you could be shown one of three possible messages:...
[ "jquery", "tooltip" ]
1
2
171
3
0
2011-05-31T04:39:33.140000
2011-05-31T04:43:07.850000
6,183,066
6,183,090
Pass an onclick event the id of the calling object
I'm having to work within an environment in which I cannot use additional frameworks. I am trying to send the id of a dynamically generated td to a function to be processed. Looks something like this: ' ' I'm just not sure (and cannot find after reading articles for an hour or so) how to pass the object's id. Any insig...
My guess is you could do the following in your GetLocation() function: var GetLocation = function(someObject){ var objectID = someObject.id; alert("the id is -> " + objectID); };
Pass an onclick event the id of the calling object I'm having to work within an environment in which I cannot use additional frameworks. I am trying to send the id of a dynamically generated td to a function to be processed. Looks something like this: ' ' I'm just not sure (and cannot find after reading articles for an...
TITLE: Pass an onclick event the id of the calling object QUESTION: I'm having to work within an environment in which I cannot use additional frameworks. I am trying to send the id of a dynamically generated td to a function to be processed. Looks something like this: ' ' I'm just not sure (and cannot find after readi...
[ "javascript", "dom-events" ]
0
3
10,091
2
0
2011-05-31T04:40:02.613000
2011-05-31T04:44:06.100000
6,183,075
6,195,554
How to access associated table attributes in validation before they are saved in Ruby on Rails
I want to be able to skip validation if a certain attribute is set to false, say status, problem is this model has many nested attributes to them, and they need to skip validation too if status is false. The purpose of such implantation is that if one wanted to save a draft of there form entry, for whatever reason, hav...
I've got it working, although hack-ish, solved the can't traverse associations since ids are nil by using the:inverse_of model Article has_many:sub_articles,:inverse_of =>:article validate_presence_of:body,:unless => Proc.new{|article|!article.status } model SubArticle belongs_to:article,:inverse_of =>:sub_articles h...
How to access associated table attributes in validation before they are saved in Ruby on Rails I want to be able to skip validation if a certain attribute is set to false, say status, problem is this model has many nested attributes to them, and they need to skip validation too if status is false. The purpose of such i...
TITLE: How to access associated table attributes in validation before they are saved in Ruby on Rails QUESTION: I want to be able to skip validation if a certain attribute is set to false, say status, problem is this model has many nested attributes to them, and they need to skip validation too if status is false. The...
[ "ruby-on-rails", "validation", "nested-attributes" ]
1
0
453
3
0
2011-05-31T04:41:46.103000
2011-06-01T02:14:22.117000
6,183,085
6,183,217
Adding scopes to the announcement endpoint
I'm currently implementing a service that uses WCF discovery and provides Discovery Endpoint and Announcement Endpoint. I also need to use scopes in order to filter announced/discovered endpoints on my client. Adding scopes to the Discovery Endpoint works great, but I can't figure out the right configuration for Announ...
Actually, just figured it out myself (well, with help of Configuration sample from MSDN that I didn't find earlier). The key is to apply DiscoveryBehavior to all discoverable service endpoints rather than to an announcement endpoint. So, This works and I get my scopes at client side. I hope it helps someone.
Adding scopes to the announcement endpoint I'm currently implementing a service that uses WCF discovery and provides Discovery Endpoint and Announcement Endpoint. I also need to use scopes in order to filter announced/discovered endpoints on my client. Adding scopes to the Discovery Endpoint works great, but I can't fi...
TITLE: Adding scopes to the announcement endpoint QUESTION: I'm currently implementing a service that uses WCF discovery and provides Discovery Endpoint and Announcement Endpoint. I also need to use scopes in order to filter announced/discovered endpoints on my client. Adding scopes to the Discovery Endpoint works gre...
[ "wcf", "service-discovery", "scopes" ]
0
0
1,686
1
0
2011-05-31T04:43:35.940000
2011-05-31T05:08:54.040000
6,183,117
6,187,081
Hibernate Many to Many linking to existing record
I have Many to Many relationship between 2 entities: Item and ItemCategory In class Item @ManyToMany(cascade={CascadeType.PERSIST,CascadeType.MERGE}) @JoinTable( name="LINK_ITEM_CATEGORY", joinColumns={@JoinColumn(name="ITEM_ID")}, inverseJoinColumns={@JoinColumn(name="CATEGORY_ID")} ) private Set associatedCategories ...
No. Since name is not the ID of the category, you may have severa categories with the same name. You might add a unique constraint, but Hibernate can't magically know that the ne category you add in the set should in fact be an existing category having the same name. When creating categories and adding them to the set,...
Hibernate Many to Many linking to existing record I have Many to Many relationship between 2 entities: Item and ItemCategory In class Item @ManyToMany(cascade={CascadeType.PERSIST,CascadeType.MERGE}) @JoinTable( name="LINK_ITEM_CATEGORY", joinColumns={@JoinColumn(name="ITEM_ID")}, inverseJoinColumns={@JoinColumn(name="...
TITLE: Hibernate Many to Many linking to existing record QUESTION: I have Many to Many relationship between 2 entities: Item and ItemCategory In class Item @ManyToMany(cascade={CascadeType.PERSIST,CascadeType.MERGE}) @JoinTable( name="LINK_ITEM_CATEGORY", joinColumns={@JoinColumn(name="ITEM_ID")}, inverseJoinColumns={...
[ "hibernate", "jpa", "many-to-many" ]
0
1
1,949
2
0
2011-05-31T04:49:37.707000
2011-05-31T11:47:17.963000
6,183,123
6,183,716
Prepend complex I to a sub-expression of an expression?
Consider this example: expr = a (1 + b + c d + Sqrt[-2 d e + fg + h^2] + a j ); Now I'd like to insert a complex I before the term in the square root and retain the rest of the expression. I know that expr has only one Sqrt term in it. So I tried the following: ToBoxes@# /. SqrtBox@x_:> RowBox[{I, " ", SqrtBox@x}] &[ e...
The parts of a box expression that aren't structural need to be strings. So you want In[1]:= expr = a (1 + b + c d + Sqrt[-2 d e + fg + h^2] + a j ); In[2]:= ToBoxes@# /. SqrtBox@x_:> RowBox[{"I", " ", SqrtBox@x}]&[expr]//ToExpression Out[2]= a (1 + b + c d + I Sqrt[-2 d e + fg + h^2] + a j)
Prepend complex I to a sub-expression of an expression? Consider this example: expr = a (1 + b + c d + Sqrt[-2 d e + fg + h^2] + a j ); Now I'd like to insert a complex I before the term in the square root and retain the rest of the expression. I know that expr has only one Sqrt term in it. So I tried the following: To...
TITLE: Prepend complex I to a sub-expression of an expression? QUESTION: Consider this example: expr = a (1 + b + c d + Sqrt[-2 d e + fg + h^2] + a j ); Now I'd like to insert a complex I before the term in the square root and retain the rest of the expression. I know that expr has only one Sqrt term in it. So I tried...
[ "wolfram-mathematica" ]
4
4
118
3
0
2011-05-31T04:51:04.697000
2011-05-31T06:21:50.443000
6,183,132
6,210,115
Django inlinemodeladmin extra option not working
I'm in the process of adding a user profile inline to the edit user page on django admin. So far the only problem is no matter what value I put in the "extra" option, the page always displays fields for 1 extra user profile record. I don't actually want to display any extra records, but I can't get the extra one to go ...
Ok, I've figured it out now. Bit of a silly mistake really. I upgraded my django version a while ago, but I forgot to update the django admin media files. When I checked my apache log, I found a few js erorrs relating to inlines.js and a couple of other files. Updating my admin js files with the ones from the django 1....
Django inlinemodeladmin extra option not working I'm in the process of adding a user profile inline to the edit user page on django admin. So far the only problem is no matter what value I put in the "extra" option, the page always displays fields for 1 extra user profile record. I don't actually want to display any ex...
TITLE: Django inlinemodeladmin extra option not working QUESTION: I'm in the process of adding a user profile inline to the edit user page on django admin. So far the only problem is no matter what value I put in the "extra" option, the page always displays fields for 1 extra user profile record. I don't actually want...
[ "django", "django-admin" ]
0
2
3,521
2
0
2011-05-31T04:53:02.277000
2011-06-02T03:40:56.943000
6,183,139
6,183,418
SQL Server database backup restore on lower version
How to restore a higher version SQL Server database backup file onto a lower version SQL Server? Using SQL Server 2008 R2 (10.50.1600), I made a backup file and now I want to restore it on my live server's SQL Server 2008 (10.00.1600). When I tried to restore the backup onto SQL Server 2008 it gives an error i.e. Resto...
No, is not possible to downgrade a database. 10.50.1600 is the SQL Server 2008 R2 version. There is absolutely no way you can restore or attach this database to the SQL Server 2008 instance you are trying to restore on (10.00.1600 is SQL Server 2008). Your only options are: upgrade this instance to SQL Server 2008 R2 o...
SQL Server database backup restore on lower version How to restore a higher version SQL Server database backup file onto a lower version SQL Server? Using SQL Server 2008 R2 (10.50.1600), I made a backup file and now I want to restore it on my live server's SQL Server 2008 (10.00.1600). When I tried to restore the back...
TITLE: SQL Server database backup restore on lower version QUESTION: How to restore a higher version SQL Server database backup file onto a lower version SQL Server? Using SQL Server 2008 R2 (10.50.1600), I made a backup file and now I want to restore it on my live server's SQL Server 2008 (10.00.1600). When I tried t...
[ "sql-server" ]
235
81
522,687
14
0
2011-05-31T04:55:41.877000
2011-05-31T05:36:43.680000
6,183,141
6,183,522
Port / Recode really big and old C++Builder code to Qt or CLI/Mono
Hello I need to remake some old C++Builder (6) project and make it for Linux/Windows. The main and big project parts is OPC Client (and some other clients) Working with database (currently MS SQL) but maybe porting to another one like postgres is another task. GUI Components for Tables / Reports / Graphics / Diagrams! ...
I'd go Qt for a few reasons: cross-platform UI using QSQL and correct plugin, you could have code working for both MsSql and PostGre (smoother transition, easier for testing) Qt is well documented and easy to deal with, moreover it compiles with Visual, thus preventing cygwin / mingwin mayhem on windows
Port / Recode really big and old C++Builder code to Qt or CLI/Mono Hello I need to remake some old C++Builder (6) project and make it for Linux/Windows. The main and big project parts is OPC Client (and some other clients) Working with database (currently MS SQL) but maybe porting to another one like postgres is anothe...
TITLE: Port / Recode really big and old C++Builder code to Qt or CLI/Mono QUESTION: Hello I need to remake some old C++Builder (6) project and make it for Linux/Windows. The main and big project parts is OPC Client (and some other clients) Working with database (currently MS SQL) but maybe porting to another one like ...
[ "c++", "visual-c++", "compiler-construction", "project", "c++builder-6" ]
2
3
180
2
0
2011-05-31T04:56:07.310000
2011-05-31T05:53:33.153000
6,183,142
6,183,180
How do I access a custom object field within a NSMutable Array?
I have a custom object like: #import @interface FaxRecipient: NSObject { NSString * contactID; NSString * name; NSString * fax; NSString * company; NSString * phone; } @property(nonatomic,retain)NSString *contactID; @property(nonatomic,retain)NSString *name; @property(nonatomic,retain)NSString *fax; @property(nonatom...
FaxRecipient *faxObject= [remoteRecipientItems objectAtIndex:indexPath.row];//This is ur object cell.textLabel.text=faxObject.name;//this sets the name
How do I access a custom object field within a NSMutable Array? I have a custom object like: #import @interface FaxRecipient: NSObject { NSString * contactID; NSString * name; NSString * fax; NSString * company; NSString * phone; } @property(nonatomic,retain)NSString *contactID; @property(nonatomic,retain)NSString *n...
TITLE: How do I access a custom object field within a NSMutable Array? QUESTION: I have a custom object like: #import @interface FaxRecipient: NSObject { NSString * contactID; NSString * name; NSString * fax; NSString * company; NSString * phone; } @property(nonatomic,retain)NSString *contactID; @property(nonatomic,...
[ "iphone", "ios" ]
0
5
86
1
0
2011-05-31T04:56:13.440000
2011-05-31T05:01:56.300000
6,183,147
6,183,286
Storing Friend Relationships in MongoDB?
I was wondering what the best way of storing friend relationship data using MongoDB is? Coming from mysql I had a separate table with friend relationships that had two foreign keys, each pointing to a friend in the "friendship" however, with MongoDB its possible to have arrays of references or even embedded documents.....
Keeping a list of friend_ids in a user, is what I'll recommend. Few reasons, 1.You query a user, and you have list of all friends upfront available. 2.The requests (pending, accepted) can be handled as well, by seeing that a respective ids should be present in both the user's friends list. So, I can get list of actual ...
Storing Friend Relationships in MongoDB? I was wondering what the best way of storing friend relationship data using MongoDB is? Coming from mysql I had a separate table with friend relationships that had two foreign keys, each pointing to a friend in the "friendship" however, with MongoDB its possible to have arrays o...
TITLE: Storing Friend Relationships in MongoDB? QUESTION: I was wondering what the best way of storing friend relationship data using MongoDB is? Coming from mysql I had a separate table with friend relationships that had two foreign keys, each pointing to a friend in the "friendship" however, with MongoDB its possibl...
[ "mongodb" ]
23
38
13,075
1
0
2011-05-31T04:56:52.053000
2011-05-31T05:19:34.010000
6,183,150
6,183,183
How to convert a integers between 0 and 25 to corresponding ASCII characters?
Say I have a number 0 that corresponds to the ASCII character a. How would I go about converting a number in the range 0 to 25 to letters in the alphabet? I have already tried adding 97 to the decimal value, but it just outputs the number+ 97. typedef enum { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u...
You should should be pasing %c to printf, not %d. The format specifier, tells printf how to interpret the supplied paramters. If you pass %d, it will interpret the arguments as an integer. By specifying %c, you tell it to interpret the argument as a character. The manpages / help for printf, eventually lead to some 'fo...
How to convert a integers between 0 and 25 to corresponding ASCII characters? Say I have a number 0 that corresponds to the ASCII character a. How would I go about converting a number in the range 0 to 25 to letters in the alphabet? I have already tried adding 97 to the decimal value, but it just outputs the number+ 97...
TITLE: How to convert a integers between 0 and 25 to corresponding ASCII characters? QUESTION: Say I have a number 0 that corresponds to the ASCII character a. How would I go about converting a number in the range 0 to 25 to letters in the alphabet? I have already tried adding 97 to the decimal value, but it just outp...
[ "c", "integer", "decimal", "character" ]
2
4
4,933
6
0
2011-05-31T04:57:22.623000
2011-05-31T05:02:19.457000
6,183,162
6,183,241
How can I set, get and destroy cookies in WordPress?
How can I set, get and destroy cookies in WordPress? I surfed the web but I can't get clear ideas, please help me find how.
You can either retrieve and manipulate cookies on the server side using PHP or client side, using JavaScript. In PHP, you set cookies using setcookie(). Note that this must be done before any output is sent to the browser which can be quite the challenge in Wordpress. You're pretty much limited to some of the early run...
How can I set, get and destroy cookies in WordPress? How can I set, get and destroy cookies in WordPress? I surfed the web but I can't get clear ideas, please help me find how.
TITLE: How can I set, get and destroy cookies in WordPress? QUESTION: How can I set, get and destroy cookies in WordPress? I surfed the web but I can't get clear ideas, please help me find how. ANSWER: You can either retrieve and manipulate cookies on the server side using PHP or client side, using JavaScript. In PHP...
[ "php", "wordpress", "cookies" ]
26
39
89,219
3
0
2011-05-31T04:59:21.347000
2011-05-31T05:11:46.237000
6,183,175
6,183,257
SQL find close matches
I'm trying to build a filtering system for products. Products have many attributes including price, size(cm) and (# of) sides. I want to construct an SQL query that always returns ALL the products but orders them on how closely they meet the search criteria. For example lets say I have the following products: Product A...
You basically have to come up with a 'distance' function for each row which returns 0 if all criteria match or some positive value indicating how close otherwise. Each of the different columns will have to have some weight as being off by $1 is not as far off as being off by 1 number of sides. For the price if it's bel...
SQL find close matches I'm trying to build a filtering system for products. Products have many attributes including price, size(cm) and (# of) sides. I want to construct an SQL query that always returns ALL the products but orders them on how closely they meet the search criteria. For example lets say I have the follow...
TITLE: SQL find close matches QUESTION: I'm trying to build a filtering system for products. Products have many attributes including price, size(cm) and (# of) sides. I want to construct an SQL query that always returns ALL the products but orders them on how closely they meet the search criteria. For example lets say...
[ "php", "mysql", "database", "oracle", "postgresql" ]
2
4
423
2
0
2011-05-31T05:01:32.917000
2011-05-31T05:15:31.487000
6,183,177
6,183,609
Repository Interface(s) in Domain-Driven Design
Regarding the contract between the domain and repository, I gather it's best to avoid an all-encompassing generic IRepository interface with methods such as Create() and Delete()? Unless, of course, it's natural to have these methods available for all the entities I'm working with. Which I imagine is a rare scenario. I...
I think you should only create an basic IRepository if the methods within the interface are used by all repositories. If you have some repositories that will implement only a part of the methods, than you should go for the more specialized interfaces. Also the last option will give you more flexibility in adding behavi...
Repository Interface(s) in Domain-Driven Design Regarding the contract between the domain and repository, I gather it's best to avoid an all-encompassing generic IRepository interface with methods such as Create() and Delete()? Unless, of course, it's natural to have these methods available for all the entities I'm wor...
TITLE: Repository Interface(s) in Domain-Driven Design QUESTION: Regarding the contract between the domain and repository, I gather it's best to avoid an all-encompassing generic IRepository interface with methods such as Create() and Delete()? Unless, of course, it's natural to have these methods available for all th...
[ "interface", "domain-driven-design", "dns", "repository" ]
1
2
1,817
4
0
2011-05-31T05:01:33.930000
2011-05-31T06:06:50.440000
6,183,178
6,183,489
Java program to simulate user saving a page in Firefox
I want to emulate a user saving a webpage into a directory (after login) from an external program in Java. I found that this kind of things are usually done in testing suites such as Selenium or iMacros. Still, how could this be done in normal Java program? Could I do it using DJnativeSwing?
You can perform the action with java.awt.Robot, which will really invoke Firefox. Or do you like to make a http-request with java? Did you think about images, videos, flash, javascript, cookies, referrer?
Java program to simulate user saving a page in Firefox I want to emulate a user saving a webpage into a directory (after login) from an external program in Java. I found that this kind of things are usually done in testing suites such as Selenium or iMacros. Still, how could this be done in normal Java program? Could I...
TITLE: Java program to simulate user saving a page in Firefox QUESTION: I want to emulate a user saving a webpage into a directory (after login) from an external program in Java. I found that this kind of things are usually done in testing suites such as Selenium or iMacros. Still, how could this be done in normal Jav...
[ "java", "browser" ]
0
0
501
1
0
2011-05-31T05:01:50.047000
2011-05-31T05:49:07.767000
6,183,179
6,183,256
Objective C: How to tell if an object is NSZombie now
I have NSZombieEnabled=YES set, and I want to do the following code - (NSString*) udid { if (udid == nil) { udid = [[UIDevice currentDevice] uniqueIdentifier]; NSLog(@"UDID=%@", udid); } return udid; } it turns out when udid is "released", it had been replaced with a Zombie, it's not nil. So I want to do something like...
A pointer to an object is never set to nil when the object is released. The pointer continues to point to the same memory location that it always did. That doesn't mean that whatever is now at that location is a valid object, however. For that reason, you should never use a pointer after you've released the object it p...
Objective C: How to tell if an object is NSZombie now I have NSZombieEnabled=YES set, and I want to do the following code - (NSString*) udid { if (udid == nil) { udid = [[UIDevice currentDevice] uniqueIdentifier]; NSLog(@"UDID=%@", udid); } return udid; } it turns out when udid is "released", it had been replaced with ...
TITLE: Objective C: How to tell if an object is NSZombie now QUESTION: I have NSZombieEnabled=YES set, and I want to do the following code - (NSString*) udid { if (udid == nil) { udid = [[UIDevice currentDevice] uniqueIdentifier]; NSLog(@"UDID=%@", udid); } return udid; } it turns out when udid is "released", it had b...
[ "objective-c", "nszombie" ]
2
3
2,394
2
0
2011-05-31T05:01:55.413000
2011-05-31T05:14:58.610000
6,183,181
6,186,394
How to add a custom widget to an element
GWT RootPanel.get("id") doesnt return me the div tags which are embedded in HTML elements. ex....... How do I get access to this div tag and "Add a widget". One of the things I tried was to get the element from the widget or widget.getElement() and add this to the append this element to an element gotten from DOM.getEl...
If by "HTML element" in your first sentence you actually mean "HTML widget", then you should use an HTMLPanel widget instead, and then simply use its add(Widget,String) or add(Widget,Element) method to add your widget within an existing sub-element. If you're actually talking about the "A widget that has an existing pa...
How to add a custom widget to an element GWT RootPanel.get("id") doesnt return me the div tags which are embedded in HTML elements. ex....... How do I get access to this div tag and "Add a widget". One of the things I tried was to get the element from the widget or widget.getElement() and add this to the append this el...
TITLE: How to add a custom widget to an element QUESTION: GWT RootPanel.get("id") doesnt return me the div tags which are embedded in HTML elements. ex....... How do I get access to this div tag and "Add a widget". One of the things I tried was to get the element from the widget or widget.getElement() and add this to ...
[ "gwt" ]
11
14
13,035
2
0
2011-05-31T05:02:03.057000
2011-05-31T10:45:29.340000
6,183,184
6,183,198
c# Stringbuilder: persisting a StringBuilder object into a varchar column - SQL Server
I have block of text read from a PDF document, using the ItextSharp library(method: GetResultantText()) Consider the text is outlined/formatted in paragraphs: *"Paragraph One. Paragraph Two.... Paragraph n "* Is there a way to use the C# StringBuilder object, or perhaps an alternate approach, to store the text while re...
I dont think that it should remove formatting and if it doing so Make use of " \r\n " after each paragraph and than store it.
c# Stringbuilder: persisting a StringBuilder object into a varchar column - SQL Server I have block of text read from a PDF document, using the ItextSharp library(method: GetResultantText()) Consider the text is outlined/formatted in paragraphs: *"Paragraph One. Paragraph Two.... Paragraph n "* Is there a way to use th...
TITLE: c# Stringbuilder: persisting a StringBuilder object into a varchar column - SQL Server QUESTION: I have block of text read from a PDF document, using the ItextSharp library(method: GetResultantText()) Consider the text is outlined/formatted in paragraphs: *"Paragraph One. Paragraph Two.... Paragraph n "* Is the...
[ "c#", "itext" ]
0
2
1,100
2
0
2011-05-31T05:02:19.660000
2011-05-31T05:05:02.153000
6,183,187
6,183,725
QSqlTableModel::setData() always returns false for bool column
I am trying to replace true and false values with checkboxes in QSqlTableModel for a database column with bool type. The following code appears to be work. QSqlTableModel::setData() does post data to back end and returns true for columns other than the bool column. The problem I encounter is that QSqlTableModel::setDat...
When calling bool r= QSqlTableModel::setData(idx,v,role); instead of passing the role try calling with Qt::EditRole as below. bool r= QSqlTableModel::setData(idx,v,Qt::EditRole); I haven't tried it but i guess that this should make it work.
QSqlTableModel::setData() always returns false for bool column I am trying to replace true and false values with checkboxes in QSqlTableModel for a database column with bool type. The following code appears to be work. QSqlTableModel::setData() does post data to back end and returns true for columns other than the bool...
TITLE: QSqlTableModel::setData() always returns false for bool column QUESTION: I am trying to replace true and false values with checkboxes in QSqlTableModel for a database column with bool type. The following code appears to be work. QSqlTableModel::setData() does post data to back end and returns true for columns o...
[ "qt", "qt4" ]
0
0
3,207
1
0
2011-05-31T05:02:39.023000
2011-05-31T06:23:00.933000
6,183,201
6,191,356
MS Dynamics CRM and Sharepoint integration issues
I've CRM server and 2 Sharepoint servers, one for internal operators among several agencies to manage customers' documents and applications, one for web-portal for public users to track changes e.g. of their applications, and the CRM defines business models and business processes. What should I consider in terms of int...
I wrote a pretty big article on what you need to do to get it all hooked together here. I did it on just 1 VM, however going across servers shouldn't be much more work. However essentially what it boils down to is installing the list control in SharePoint, setting up a SharePoint site in CRM2011 and then allowing the e...
MS Dynamics CRM and Sharepoint integration issues I've CRM server and 2 Sharepoint servers, one for internal operators among several agencies to manage customers' documents and applications, one for web-portal for public users to track changes e.g. of their applications, and the CRM defines business models and business...
TITLE: MS Dynamics CRM and Sharepoint integration issues QUESTION: I've CRM server and 2 Sharepoint servers, one for internal operators among several agencies to manage customers' documents and applications, one for web-portal for public users to track changes e.g. of their applications, and the CRM defines business m...
[ "sharepoint", "dynamics-crm", "integration" ]
1
2
489
1
0
2011-05-31T05:05:36.210000
2011-05-31T17:41:17.657000
6,183,213
6,184,409
Aggregate Root complexity in Domain-Driven Design
Where does one draw the line in the complexity of an aggregate? To clarify, if my aggregate has a list of ObjectA which has a list of ObjectB which has a list of ObjectC, should my aggregate be responsible for retrieving ObjectC? Or should I be looking at creating another aggregate to keep this complexity down to a cou...
In most cases the boundaries of the Aggregate should be the consistency boundaries needed for your model. That means that if changes to ObjectA or B or C need to be consistent with each other than they probably belong to the same Aggregate. The complexity ( business logic complexity ) should be handled by identifying a...
Aggregate Root complexity in Domain-Driven Design Where does one draw the line in the complexity of an aggregate? To clarify, if my aggregate has a list of ObjectA which has a list of ObjectB which has a list of ObjectC, should my aggregate be responsible for retrieving ObjectC? Or should I be looking at creating anoth...
TITLE: Aggregate Root complexity in Domain-Driven Design QUESTION: Where does one draw the line in the complexity of an aggregate? To clarify, if my aggregate has a list of ObjectA which has a list of ObjectB which has a list of ObjectC, should my aggregate be responsible for retrieving ObjectC? Or should I be looking...
[ "domain-driven-design", "aggregateroot" ]
4
7
758
2
0
2011-05-31T05:08:02.527000
2011-05-31T07:41:05.930000
6,183,216
6,198,472
Low Priority Long Running Task
I have an application that requires the executing of a relatively slow (15-30 second) task after launching (importing to core data). I'm looking for a good way to execute the task without causing the interface to appear slugish or frozen. I've tried: Chunking up the import into short operations and adding them to the m...
Chunking up the import into short operations and adding them to the main NSOperationQueue [my emphasis] If you put the operations on the main queue they will run on the main thread and impact the UI. You should create a new queue, set the maximum concurrency to 1 and then just add all the operations. Of course, on most...
Low Priority Long Running Task I have an application that requires the executing of a relatively slow (15-30 second) task after launching (importing to core data). I'm looking for a good way to execute the task without causing the interface to appear slugish or frozen. I've tried: Chunking up the import into short oper...
TITLE: Low Priority Long Running Task QUESTION: I have an application that requires the executing of a relatively slow (15-30 second) task after launching (importing to core data). I'm looking for a good way to execute the task without causing the interface to appear slugish or frozen. I've tried: Chunking up the impo...
[ "iphone", "objective-c", "cocoa-touch", "cocoa" ]
3
3
319
2
0
2011-05-31T05:08:50.630000
2011-06-01T08:44:41.330000
6,183,228
6,184,058
Elmah not working on live site
I am using elmah with an asp.net mvc 3 site and it works fine locally but when I upload it to my shared hosting site(iis 7) it does not seem to log any of the errors. I used nuget to grab the library and I was under the assumption that it set up all the stuff in the web.config that it needs. So I have no clue what I am...
if you have downloaded it with NuGet you should have all the config sections ready. Anyway, Try and check your system.webServer section:
Elmah not working on live site I am using elmah with an asp.net mvc 3 site and it works fine locally but when I upload it to my shared hosting site(iis 7) it does not seem to log any of the errors. I used nuget to grab the library and I was under the assumption that it set up all the stuff in the web.config that it nee...
TITLE: Elmah not working on live site QUESTION: I am using elmah with an asp.net mvc 3 site and it works fine locally but when I upload it to my shared hosting site(iis 7) it does not seem to log any of the errors. I used nuget to grab the library and I was under the assumption that it set up all the stuff in the web....
[ "asp.net-mvc", "asp.net-mvc-3", "elmah" ]
1
1
1,753
1
0
2011-05-31T05:10:21.887000
2011-05-31T07:03:58.383000
6,183,232
6,188,129
MySQL bulk update statement in Python
I wonder how I can do a bulk update using MySQL and Python. My requirement is like for x in range(0,100): NNN = some calculation ABC = some calculation query = update XXX set value = NNN, name = ABC where id = x con.execute(query) The problem here is it is executing 100 DB queries and makes the update process slow. Is ...
I agree we can do the calculation on the query. But it is not flexible for change and maintenance. Going for a MYSQL Stored Procedure is a nice option. But I have solved it in python scripts using the following steps. 1. Created a temp table to hold columns A, B and id. Python & MySQL support Bulk insert (see petefreit...
MySQL bulk update statement in Python I wonder how I can do a bulk update using MySQL and Python. My requirement is like for x in range(0,100): NNN = some calculation ABC = some calculation query = update XXX set value = NNN, name = ABC where id = x con.execute(query) The problem here is it is executing 100 DB queries ...
TITLE: MySQL bulk update statement in Python QUESTION: I wonder how I can do a bulk update using MySQL and Python. My requirement is like for x in range(0,100): NNN = some calculation ABC = some calculation query = update XXX set value = NNN, name = ABC where id = x con.execute(query) The problem here is it is executi...
[ "python", "mysql", "bulkinsert" ]
1
0
2,310
2
0
2011-05-31T05:10:52.633000
2011-05-31T13:12:46.780000
6,183,238
6,183,680
Merging/branching practices
Is there any good internet resource describing different practices for merging/branching regardless of source control tool? This should treat version to customers, development of features, bug fixers etc.
A good reference (that I mention in " When should you branch ") is: Chapter 7 of "How Software Evolves" (pdf) From Practical Perforce (Laura WINGERD - O'Reilly): it is a good introduction (VCS agnostic) to merge workflow between different kind of branches.
Merging/branching practices Is there any good internet resource describing different practices for merging/branching regardless of source control tool? This should treat version to customers, development of features, bug fixers etc.
TITLE: Merging/branching practices QUESTION: Is there any good internet resource describing different practices for merging/branching regardless of source control tool? This should treat version to customers, development of features, bug fixers etc. ANSWER: A good reference (that I mention in " When should you branch...
[ "version-control", "branching-and-merging" ]
4
3
182
2
0
2011-05-31T05:11:34.160000
2011-05-31T06:16:14.503000
6,183,239
6,183,319
How can I ensure that my database connection will be closed with the deferred execution of a linq query?
I have the following method: public IEnumerable GetFoo(int x, string y) { return from r in new GetFoo(x, y) select new Foo { x = r.Get ("x"), y = r.Get ("y"), z = r.Get ("z"), }; } GetFoo is a class that contains a stored procedure and implements IEnumerable. So, r is a DbDataReader. I want it to execute the query wher...
Linq is based on deferred loading. It is when you call ToList that it executes the command. Otherwise it does not execute it. So the answer to your questions is no. However, I am not sure, maybe code contracts can help where you mark methods, or call the above code in functions which returns a List. In that case develo...
How can I ensure that my database connection will be closed with the deferred execution of a linq query? I have the following method: public IEnumerable GetFoo(int x, string y) { return from r in new GetFoo(x, y) select new Foo { x = r.Get ("x"), y = r.Get ("y"), z = r.Get ("z"), }; } GetFoo is a class that contains a ...
TITLE: How can I ensure that my database connection will be closed with the deferred execution of a linq query? QUESTION: I have the following method: public IEnumerable GetFoo(int x, string y) { return from r in new GetFoo(x, y) select new Foo { x = r.Get ("x"), y = r.Get ("y"), z = r.Get ("z"), }; } GetFoo is a clas...
[ "c#", "linq", "linq-to-objects" ]
1
1
177
3
0
2011-05-31T05:11:36.620000
2011-05-31T05:23:34.237000
6,183,245
6,183,349
how to get names of worksheets in excel file?
i am new in JavaScript programming i want java script to find the names of worksheets in excel file scenario 1) file upload control in a HTML 2) when user selects the file 3) HTML text box should display comma separated names of worksheet | | _ | _ | |_ | | _ | |_ | | | _|_ | | _ | |_ | | _ | | | _ | _ | |_ | | _ | |__...
You haven't posted any code here, so I will assume you haven't even started this process and you need to know where to go. Basically, what you want to do is possible but it will be a lot of work and it will only work on Internet Explorer (because you use ActiveX). To start with, here is a forum post that gives some exa...
how to get names of worksheets in excel file? i am new in JavaScript programming i want java script to find the names of worksheets in excel file scenario 1) file upload control in a HTML 2) when user selects the file 3) HTML text box should display comma separated names of worksheet | | _ | _ | |_ | | _ | |_ | | | _|_...
TITLE: how to get names of worksheets in excel file? QUESTION: i am new in JavaScript programming i want java script to find the names of worksheets in excel file scenario 1) file upload control in a HTML 2) when user selects the file 3) HTML text box should display comma separated names of worksheet | | _ | _ | |_ | ...
[ "javascript" ]
4
0
8,225
3
0
2011-05-31T05:13:00.247000
2011-05-31T05:27:34.797000
6,183,252
6,183,301
how do i use the "-" character in grep?
i was hoping to use grep to check and see if permissions have been set correctly on a file... I am aware that the below situation is probably not ideal & not as concise as it could be but i am after individual properties such as the owners name and the permissions... I was going to use something like this: cd ~/Desktop...
Your problem is not the hyphen but several other syntax errors: you need to echo your data to get it into grep; you don't need to escape hyphens with backslashes; and you need to anchor your regular expression with a carat ^ (which will also avoid the hyphens-as-arguments problem mentioned by someone else). Here's a st...
how do i use the "-" character in grep? i was hoping to use grep to check and see if permissions have been set correctly on a file... I am aware that the below situation is probably not ideal & not as concise as it could be but i am after individual properties such as the owners name and the permissions... I was going ...
TITLE: how do i use the "-" character in grep? QUESTION: i was hoping to use grep to check and see if permissions have been set correctly on a file... I am aware that the below situation is probably not ideal & not as concise as it could be but i am after individual properties such as the owners name and the permissio...
[ "bash", "grep" ]
3
3
2,134
5
0
2011-05-31T05:13:56.010000
2011-05-31T05:20:42
6,183,253
6,183,282
I want to know the index of my website specific page on Google search engine
How can I find the index of specific web page of my website on google search engine? For instance I write the keywords in the textbox of google search engine as follows: "Deploy ASP.NET MVC" and press enter. Google gives me result like About 1,330,000 results (0.07 seconds), but I could not find the results on first 10...
There is no specific tool which can help you in this case. As the algorithm for google keeps changing very frequently and its confidential You can try following websites, But there is no guarantee to get the 100% accurate. http://www.keywordenvy.com/ http://www.keywordrankchecker.co.uk/
I want to know the index of my website specific page on Google search engine How can I find the index of specific web page of my website on google search engine? For instance I write the keywords in the textbox of google search engine as follows: "Deploy ASP.NET MVC" and press enter. Google gives me result like About 1...
TITLE: I want to know the index of my website specific page on Google search engine QUESTION: How can I find the index of specific web page of my website on google search engine? For instance I write the keywords in the textbox of google search engine as follows: "Deploy ASP.NET MVC" and press enter. Google gives me r...
[ "google-search" ]
1
1
1,443
2
0
2011-05-31T05:14:06.080000
2011-05-31T05:19:13.913000
6,183,263
6,183,290
Unable to create a new division with a name from a variable
var current = "current" + String(c) $(' ').appendTo('body'); var stt=""; stt = '#' + String(current); var fin= $(stt); fin.append(' '); document.getElementById(current).style.width="40%"; Unable to create the division with the name ("current" + c). In the style statement it says document.getElementById(current) is null
var current = "current" + String(c) $(' ').appendTo('body');
Unable to create a new division with a name from a variable var current = "current" + String(c) $(' ').appendTo('body'); var stt=""; stt = '#' + String(current); var fin= $(stt); fin.append(' '); document.getElementById(current).style.width="40%"; Unable to create the division with the name ("current" + c). In the styl...
TITLE: Unable to create a new division with a name from a variable QUESTION: var current = "current" + String(c) $(' ').appendTo('body'); var stt=""; stt = '#' + String(current); var fin= $(stt); fin.append(' '); document.getElementById(current).style.width="40%"; Unable to create the division with the name ("current"...
[ "javascript", "jquery", "html" ]
1
1
60
3
0
2011-05-31T05:16:18.557000
2011-05-31T05:19:54.710000
6,183,267
6,183,360
Pause and Resume for HTML5 canvas?
is there a way to pause / resume for HTML5 Canvas? Say my code: // Draw lines with decreasing widths for (i = 20; i > 0; i--) { var v=i*20 ctx.strokeStyle = "rgb("+v+", "+v+", "+v+")"; ctx.lineWidth = i; ctx.beginPath(); ctx.moveTo(55, 20 + (20 - i) * 24); ctx.lineTo(335, 20 + (20 - i) * 24); ctx.stroke(); } At the sta...
Try to draw the lines offscreen instead of "pausing" the canvas: http://kaioa.com/node/103 It will have the same result. var renderToCanvas = function (width, height, renderFunction) { var buffer = document.createElement('canvas'); buffer.width = width; buffer.height = height; renderFunction(buffer.getContext('2d')); r...
Pause and Resume for HTML5 canvas? is there a way to pause / resume for HTML5 Canvas? Say my code: // Draw lines with decreasing widths for (i = 20; i > 0; i--) { var v=i*20 ctx.strokeStyle = "rgb("+v+", "+v+", "+v+")"; ctx.lineWidth = i; ctx.beginPath(); ctx.moveTo(55, 20 + (20 - i) * 24); ctx.lineTo(335, 20 + (20 - i...
TITLE: Pause and Resume for HTML5 canvas? QUESTION: is there a way to pause / resume for HTML5 Canvas? Say my code: // Draw lines with decreasing widths for (i = 20; i > 0; i--) { var v=i*20 ctx.strokeStyle = "rgb("+v+", "+v+", "+v+")"; ctx.lineWidth = i; ctx.beginPath(); ctx.moveTo(55, 20 + (20 - i) * 24); ctx.lineTo...
[ "javascript", "html", "canvas" ]
3
2
3,209
2
0
2011-05-31T05:17:05.327000
2011-05-31T05:28:32.390000
6,183,269
6,183,325
Resizing image view in Portrait mode and landscape mode
Can anyone tell me about the way to resize my image view to show images in both portrait and landscape mode.i want to show them full screen.Please help Thanks, Christy
Use like imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; and also set leftmargin,right margin from above code
Resizing image view in Portrait mode and landscape mode Can anyone tell me about the way to resize my image view to show images in both portrait and landscape mode.i want to show them full screen.Please help Thanks, Christy
TITLE: Resizing image view in Portrait mode and landscape mode QUESTION: Can anyone tell me about the way to resize my image view to show images in both portrait and landscape mode.i want to show them full screen.Please help Thanks, Christy ANSWER: Use like imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth...
[ "iphone", "cocoa-touch", "xcode", "ipad", "uiimageview" ]
0
6
1,692
2
0
2011-05-31T05:17:09.927000
2011-05-31T05:24:06.747000
6,183,270
6,183,355
Inserting objects with oracle dbms
I'm trying to solve this: A user class with 50 fields is defined in.NET. I need to insert this fields in one table. Instance fields are same as table fields. Does Oracle have some type or something else like.NET object? For example: Define an object in oracle, define stored procedure to insert object in table, call sp ...
You may want to look into the Entity Framework kit for Oracle here
Inserting objects with oracle dbms I'm trying to solve this: A user class with 50 fields is defined in.NET. I need to insert this fields in one table. Instance fields are same as table fields. Does Oracle have some type or something else like.NET object? For example: Define an object in oracle, define stored procedure ...
TITLE: Inserting objects with oracle dbms QUESTION: I'm trying to solve this: A user class with 50 fields is defined in.NET. I need to insert this fields in one table. Instance fields are same as table fields. Does Oracle have some type or something else like.NET object? For example: Define an object in oracle, define...
[ "c#", "asp.net", "oracle" ]
1
2
174
1
0
2011-05-31T05:17:10.997000
2011-05-31T05:28:04.283000
6,183,274
6,183,601
What to do if two classes in same namespace gets included in two different libraries in C#
I have a program (Main application which consists of legacy code ) which consumes a library. Sadly, both main application and the library uses a classes (with same name and same properties) called Softwares.SoftwareXSD. When I use the class defined inside Softwares.SoftwareXSD, the main program complains about ambiguit...
If I understand your question right, you have two classes Softwares.SoftwareXSD in different assemblies (main application and library) whose fully-qualified name is identical. To resolve this, go to Solution Explorer in Visual Studio, expand "References", right click on the reference to your library and select properti...
What to do if two classes in same namespace gets included in two different libraries in C# I have a program (Main application which consists of legacy code ) which consumes a library. Sadly, both main application and the library uses a classes (with same name and same properties) called Softwares.SoftwareXSD. When I us...
TITLE: What to do if two classes in same namespace gets included in two different libraries in C# QUESTION: I have a program (Main application which consists of legacy code ) which consumes a library. Sadly, both main application and the library uses a classes (with same name and same properties) called Softwares.Soft...
[ "c#", ".net", "class-library" ]
3
9
2,405
3
0
2011-05-31T05:18:18.887000
2011-05-31T06:05:01.333000
6,183,276
6,183,321
How do I run Selenium in Xvfb?
I'm on EC2 instance. So there is no GUI. $pip install selenium $sudo apt-get install firefox xvfb Then I do this: $Xvfb:1 -screen 0 1024x768x24 2>&1 >/dev/null & $DISPLAY=:1 java -jar selenium-server-standalone-2.0b3.jar 05:08:31.227 INFO - Java: Sun Microsystems Inc. 19.0-b09 05:08:31.229 INFO - OS: Linux 2.6.32-305-...
open a terminal and run this command xhost +. This commands needs to be run every time you restart your machine. If everything works fine may be you can add this to startup commands Also make sure in your /etc/environment file there is a line export DISPLAY=:0.0 And then, run your tests to see if your issue is resolved...
How do I run Selenium in Xvfb? I'm on EC2 instance. So there is no GUI. $pip install selenium $sudo apt-get install firefox xvfb Then I do this: $Xvfb:1 -screen 0 1024x768x24 2>&1 >/dev/null & $DISPLAY=:1 java -jar selenium-server-standalone-2.0b3.jar 05:08:31.227 INFO - Java: Sun Microsystems Inc. 19.0-b09 05:08:31.2...
TITLE: How do I run Selenium in Xvfb? QUESTION: I'm on EC2 instance. So there is no GUI. $pip install selenium $sudo apt-get install firefox xvfb Then I do this: $Xvfb:1 -screen 0 1024x768x24 2>&1 >/dev/null & $DISPLAY=:1 java -jar selenium-server-standalone-2.0b3.jar 05:08:31.227 INFO - Java: Sun Microsystems Inc. 1...
[ "python", "linux", "user-interface", "unix", "selenium" ]
100
37
123,043
6
0
2011-05-31T05:18:33.607000
2011-05-31T05:23:41.990000
6,183,302
6,257,390
What are the advantages of using an external email sending provider?
Assuming I send 10k emails daily, does it make sense to switch to an external provider such as Sendgrid / Postmark / Amazon SES? Why? Is it because of my customers having a better chance of receiving the emails (ie. their servers have better reputation, they know better how to deal with SPF / DKIM / etc.)? Is it becaus...
All of the above! Do you want to spend your time fussing over your SMTP server? Do you want to always ensure that your SPF records and DKIM is correct? Do you want to spend a lot of time building your own methods of checking for delivers, - bounces, opens, and clicks? Do you want to spend a lot of time checking on the ...
What are the advantages of using an external email sending provider? Assuming I send 10k emails daily, does it make sense to switch to an external provider such as Sendgrid / Postmark / Amazon SES? Why? Is it because of my customers having a better chance of receiving the emails (ie. their servers have better reputatio...
TITLE: What are the advantages of using an external email sending provider? QUESTION: Assuming I send 10k emails daily, does it make sense to switch to an external provider such as Sendgrid / Postmark / Amazon SES? Why? Is it because of my customers having a better chance of receiving the emails (ie. their servers hav...
[ "email", "language-agnostic" ]
3
2
594
2
0
2011-05-31T05:21:09.077000
2011-06-06T20:03:25.113000
6,183,305
6,183,421
Access to asp.net web service
I wrote a little WS on asp.net, I can open it printing something like http://46.146.170.225/RouteGen/Service.asmx in address bar. It's all right, WS works. But if I print the same address in a browser on the other computer, the page isn't available. How to get access to my web server from other PC? (I need from Android...
Verify that the website, in IIS, is bound to a public-facing IP address. Right click on your website in IIS, and go to the bindings setting. Then, check the host field. It should have an IP address or domain name that is available publicly. Verify that your firewall has Port 80 open for incoming traffic
Access to asp.net web service I wrote a little WS on asp.net, I can open it printing something like http://46.146.170.225/RouteGen/Service.asmx in address bar. It's all right, WS works. But if I print the same address in a browser on the other computer, the page isn't available. How to get access to my web server from ...
TITLE: Access to asp.net web service QUESTION: I wrote a little WS on asp.net, I can open it printing something like http://46.146.170.225/RouteGen/Service.asmx in address bar. It's all right, WS works. But if I print the same address in a browser on the other computer, the page isn't available. How to get access to m...
[ "android", "asp.net", "web-services" ]
1
1
433
2
0
2011-05-31T05:21:28.140000
2011-05-31T05:37:01.063000
6,183,318
6,183,546
Getting NEW posts from a subreddit in JSON
How would I go about getting the new posts of a subreddit in JSON? Just tacking on.json to the url (http://www.reddit.com/r/SOME_SUBREDDIT/new.json) returns the following: { kind: "Listing" - data: { modhash: "" children: [ ] after: null before: null } } The children array doesn't contain any posts. I've come to find t...
The.json modifier should be put at the end of the path component, not the entire URL. The URL you're looking for is: http://www.reddit.com/r/subreddit/new.json?sort=new
Getting NEW posts from a subreddit in JSON How would I go about getting the new posts of a subreddit in JSON? Just tacking on.json to the url (http://www.reddit.com/r/SOME_SUBREDDIT/new.json) returns the following: { kind: "Listing" - data: { modhash: "" children: [ ] after: null before: null } } The children array doe...
TITLE: Getting NEW posts from a subreddit in JSON QUESTION: How would I go about getting the new posts of a subreddit in JSON? Just tacking on.json to the url (http://www.reddit.com/r/SOME_SUBREDDIT/new.json) returns the following: { kind: "Listing" - data: { modhash: "" children: [ ] after: null before: null } } The ...
[ "api", "reddit" ]
27
75
39,352
2
0
2011-05-31T05:23:33.480000
2011-05-31T05:57:35.460000
6,183,322
6,183,443
Using multiple UINavigationControllers for implementing login app
I am working on a navigation based application which involves LOGIN view. My approach to deal with the same navigation hierarchy (which was taking back to the login page)was Use two navigation controllers as soon as the user logs in create a new navigation controller assign the new view controller's root to the post lo...
Try the following way, take a navigationController in appDelegate say navController In loginViewController, after you login success, HomeViewController *svc=[[HomeViewController alloc]initWithNibName:@"HomeViewController" bundle:nil]; appdelegate.homeViewController=svc; appdelegate.navController.navigationBarHidden=Y...
Using multiple UINavigationControllers for implementing login app I am working on a navigation based application which involves LOGIN view. My approach to deal with the same navigation hierarchy (which was taking back to the login page)was Use two navigation controllers as soon as the user logs in create a new navigati...
TITLE: Using multiple UINavigationControllers for implementing login app QUESTION: I am working on a navigation based application which involves LOGIN view. My approach to deal with the same navigation hierarchy (which was taking back to the login page)was Use two navigation controllers as soon as the user logs in cre...
[ "iphone", "uinavigationcontroller", "navigation", "login-control", "uiwindow" ]
0
0
1,387
1
0
2011-05-31T05:23:49.773000
2011-05-31T05:40:33.963000
6,183,323
6,183,438
How to use html2pdf to print html pages
I am using html2pdf library in order to generate pdf from html file. I don't know how to check out width arrangements. I had this library from source forge. If anyone has idea about it or manual about html2pdf?
I think what you are asking is how to change the page width of the outputted PDF file. The answer is to change the width in the settings before you call AddPage(). Here is an example of how to do so: Here are the settings you will need: Basically, it would look something like this: require("html2fpdf.php"); $htmlFile =...
How to use html2pdf to print html pages I am using html2pdf library in order to generate pdf from html file. I don't know how to check out width arrangements. I had this library from source forge. If anyone has idea about it or manual about html2pdf?
TITLE: How to use html2pdf to print html pages QUESTION: I am using html2pdf library in order to generate pdf from html file. I don't know how to check out width arrangements. I had this library from source forge. If anyone has idea about it or manual about html2pdf? ANSWER: I think what you are asking is how to chan...
[ "php", "html2pdf" ]
0
7
31,037
1
0
2011-05-31T05:23:50.693000
2011-05-31T05:39:01.983000
6,183,330
6,185,249
visual studio 2010 crashing when build happens
my part of code is public int MyProperty { set { DoTask(); } } private void DoTask() { int MyValue = MyProperty; } I don't have Get accessor for MyProperty. I tried to get the value of it in DoTask(). When I build this application in VS2010, it is crashing insted of giving a build Error. Isn't this an error? Correct m...
The code should clearly NOT cause an infinite loop, as the Getter for MyProperty does not exist (read: not even private). The compiler should detect this. Nevertheless, a better design would be to provide a public getter for public settable properties. What your code will do is de-facto calling a method, so why would y...
visual studio 2010 crashing when build happens my part of code is public int MyProperty { set { DoTask(); } } private void DoTask() { int MyValue = MyProperty; } I don't have Get accessor for MyProperty. I tried to get the value of it in DoTask(). When I build this application in VS2010, it is crashing insted of givin...
TITLE: visual studio 2010 crashing when build happens QUESTION: my part of code is public int MyProperty { set { DoTask(); } } private void DoTask() { int MyValue = MyProperty; } I don't have Get accessor for MyProperty. I tried to get the value of it in DoTask(). When I build this application in VS2010, it is crashi...
[ "c#", "visual-studio-2010", "build", "crash" ]
2
0
1,027
3
0
2011-05-31T05:24:17.140000
2011-05-31T09:01:54.330000
6,183,341
6,183,595
Optimizing NOT IN query in Access SQL
I am new to Access and am using Access 2007. I am doing a simple query on a database that has a list of customers who visits a workshop. I want to send out reminders to the customers for their servicing 3 months from the last time they visited. I have created a query to be able to return me the list of customers who ha...
What about something like: SELECT a.debcode, a.debname, a.debstuff, b.most_recent AS last_over_three_months FROM debtor AS a INNER JOIN ( SELECT debcode, Max(invdate) AS most_recent FROM invoice GROUP BY debcode ) as b ON a.debcode= b.debcode WHERE (month(now()) - Month(most_recent) >2); You will have to tweak for your...
Optimizing NOT IN query in Access SQL I am new to Access and am using Access 2007. I am doing a simple query on a database that has a list of customers who visits a workshop. I want to send out reminders to the customers for their servicing 3 months from the last time they visited. I have created a query to be able to ...
TITLE: Optimizing NOT IN query in Access SQL QUESTION: I am new to Access and am using Access 2007. I am doing a simple query on a database that has a list of customers who visits a workshop. I want to send out reminders to the customers for their servicing 3 months from the last time they visited. I have created a qu...
[ "sql", "ms-access", "query-optimization" ]
1
1
4,921
3
0
2011-05-31T05:26:16.733000
2011-05-31T06:04:17.453000
6,183,345
6,183,523
traversing array, which can be of multiple depth
I have following array pattern. Array ( [0] => Array ( [label] => 2011 [subtable] => Array ( [0] => Array ( [label] => 05 [subtable] => Array ( [0] => Array ( [label] => /hello-world.html [url] => http://example.com/2011/05/hello-world.html ) [1] => Array ( [label] => /test-test-test.html [url] => http://example.com/2...
You may use array_walk_recursive for this: $parsed_array = array(); function parse_array($item, $key) { global $parsed_array; if(is_array($item) && isset($item['url'])) { $parsed_array[] = $item; } } array_walk_recursive($your_array, 'parse_array'); Or you may implement it using a recursive function: function parse_ar...
traversing array, which can be of multiple depth I have following array pattern. Array ( [0] => Array ( [label] => 2011 [subtable] => Array ( [0] => Array ( [label] => 05 [subtable] => Array ( [0] => Array ( [label] => /hello-world.html [url] => http://example.com/2011/05/hello-world.html ) [1] => Array ( [label] => /...
TITLE: traversing array, which can be of multiple depth QUESTION: I have following array pattern. Array ( [0] => Array ( [label] => 2011 [subtable] => Array ( [0] => Array ( [label] => 05 [subtable] => Array ( [0] => Array ( [label] => /hello-world.html [url] => http://example.com/2011/05/hello-world.html ) [1] => Ar...
[ "php" ]
0
0
118
1
0
2011-05-31T05:26:40.180000
2011-05-31T05:53:46.117000
6,183,358
6,183,430
DetailsView: Index was out of range
I'm trying to get the datakey value from DetailsView and paste it in a form. I've included all the datakeynames but still couldn't get the value to paste it in my formview but I've encountered this probles: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index I've...
This is an better way to access the values of DataItem bookid.Text = ((DataRowView)DetailsView1.DataItem)["bookid"].ToString(); employee.Text = ((DataRowView)DetailsView1.DataItem)["EmployeeID"].ToString();
DetailsView: Index was out of range I'm trying to get the datakey value from DetailsView and paste it in a form. I've included all the datakeynames but still couldn't get the value to paste it in my formview but I've encountered this probles: Index was out of range. Must be non-negative and less than the size of the co...
TITLE: DetailsView: Index was out of range QUESTION: I'm trying to get the datakey value from DetailsView and paste it in a form. I've included all the datakeynames but still couldn't get the value to paste it in my formview but I've encountered this probles: Index was out of range. Must be non-negative and less than ...
[ "c#", ".net", "asp.net", "detailsview" ]
0
1
1,276
2
0
2011-05-31T05:28:25.427000
2011-05-31T05:37:56.337000
6,183,363
6,183,454
Scroll smoothly to specific position using jQuery
How can I scroll smoothly to specific position using jQuery? I could scroll to top smoothly using jQuery with this code: $("#id").animate({"scrollTop": $("#id").scrollTop() + 100}); But now I want to scroll to position for example 200 of a page.
try this: $('html, body').animate({scrollTop: 200}, "slow"); //you can change "slow" to a number amount or remove it (default is 500) jsfiddle: http://jsfiddle.net/UPRkm/
Scroll smoothly to specific position using jQuery How can I scroll smoothly to specific position using jQuery? I could scroll to top smoothly using jQuery with this code: $("#id").animate({"scrollTop": $("#id").scrollTop() + 100}); But now I want to scroll to position for example 200 of a page.
TITLE: Scroll smoothly to specific position using jQuery QUESTION: How can I scroll smoothly to specific position using jQuery? I could scroll to top smoothly using jQuery with this code: $("#id").animate({"scrollTop": $("#id").scrollTop() + 100}); But now I want to scroll to position for example 200 of a page. ANSWE...
[ "jquery", "scroll" ]
2
5
6,231
2
0
2011-05-31T05:29:31.853000
2011-05-31T05:43:10.060000
6,183,366
6,186,924
How to get the Path of current selected file in Eclipse?
I want to get the path of current selected file in Eclipse workspace but my project is a simple view plug-in project. I just want to display the name/path of the file selected as soon as user opens the view.
You get the current selection as mentioned by @Danail Nachev. See http://www.eclipse.org/articles/Article-WorkbenchSelections/article.html for information on working with the selection service. Once you have the selection, the most common pattern is: if (selection instanceof IStructuredSelection) { IStructuredSelection...
How to get the Path of current selected file in Eclipse? I want to get the path of current selected file in Eclipse workspace but my project is a simple view plug-in project. I just want to display the name/path of the file selected as soon as user opens the view.
TITLE: How to get the Path of current selected file in Eclipse? QUESTION: I want to get the path of current selected file in Eclipse workspace but my project is a simple view plug-in project. I just want to display the name/path of the file selected as soon as user opens the view. ANSWER: You get the current selectio...
[ "eclipse", "eclipse-plugin" ]
2
5
11,079
2
0
2011-05-31T05:29:37.813000
2011-05-31T11:33:45.823000
6,183,370
6,183,403
Specifying some part of the page to be interpreted as plain text
I am beginner in web development, I am developing a site that allows user to post various discussions and others comment and reply on it. The problem I am facing is, the user can post almost anything, including code snippets and any other thing which might possible include single quotes, double quotes and even some htm...
To avoid the breaking of queries in database (which means you're not escaping them, leaving big holes for sql injection) you use mysql_real_escape_string($string) on the value before passing it to the query string, enclosing it in quotes also. Ex. $value = mysql_real_escape_string($value); // be sure to have an open co...
Specifying some part of the page to be interpreted as plain text I am beginner in web development, I am developing a site that allows user to post various discussions and others comment and reply on it. The problem I am facing is, the user can post almost anything, including code snippets and any other thing which migh...
TITLE: Specifying some part of the page to be interpreted as plain text QUESTION: I am beginner in web development, I am developing a site that allows user to post various discussions and others comment and reply on it. The problem I am facing is, the user can post almost anything, including code snippets and any othe...
[ "php", "mysql", "html" ]
2
1
80
5
0
2011-05-31T05:30:22.853000
2011-05-31T05:34:34.053000
6,183,374
6,183,495
Undoing last addremove in Mercurial?
I typed $ hg addremove but later realized that some of the files should not be part of the commit. What I should have done was to add these files to.hgignore and after that run addremove and commit. Is there a way of fixing this?
If you have not commited yet just use hg forget fileToForget or use Tortoise to remove the files. If you have committed and you don't mind the files to be part of history, just forget them and commit again. If you don't want them to be part of your repository history, and if commiting them is the very last operation yo...
Undoing last addremove in Mercurial? I typed $ hg addremove but later realized that some of the files should not be part of the commit. What I should have done was to add these files to.hgignore and after that run addremove and commit. Is there a way of fixing this?
TITLE: Undoing last addremove in Mercurial? QUESTION: I typed $ hg addremove but later realized that some of the files should not be part of the commit. What I should have done was to add these files to.hgignore and after that run addremove and commit. Is there a way of fixing this? ANSWER: If you have not commited y...
[ "mercurial" ]
8
16
3,820
2
0
2011-05-31T05:30:38
2011-05-31T05:49:41.337000
6,183,379
6,183,487
check alphanumeric characters in string in c#
I have used the following code but it is returning false though it should return true string check,zipcode; zipcode="10001 New York, NY"; check=isalphanumeric(zipcode) public static Boolean isAlphaNumeric(string strToCheck) { Regex rg = new Regex("[^a-zA-Z0-9]"); //if has non AlpahNumeric char, return false, else ret...
Try this one: public static Boolean isAlphaNumeric(string strToCheck) { Regex rg = new Regex(@"^[a-zA-Z0-9\s,]*$"); return rg.IsMatch(strToCheck); } It's more undestandable, if you specify in regex, what your string SHOULD contain, and not what it MUST NOT. In the example above: ^ - means start of the string []* - coul...
check alphanumeric characters in string in c# I have used the following code but it is returning false though it should return true string check,zipcode; zipcode="10001 New York, NY"; check=isalphanumeric(zipcode) public static Boolean isAlphaNumeric(string strToCheck) { Regex rg = new Regex("[^a-zA-Z0-9]"); //if has...
TITLE: check alphanumeric characters in string in c# QUESTION: I have used the following code but it is returning false though it should return true string check,zipcode; zipcode="10001 New York, NY"; check=isalphanumeric(zipcode) public static Boolean isAlphaNumeric(string strToCheck) { Regex rg = new Regex("[^a-zA-...
[ "c#" ]
29
65
76,973
9
0
2011-05-31T05:31:34.060000
2011-05-31T05:47:37.390000
6,183,382
6,183,425
event for all jQuery UI dialogs in a page
Is it possible to write a code for for example close event of all jQuery UI dialogs in a Page?
It is indeed possible. You can do something like: $(".ui-dialog-content").live("dialogclose", function() { // Do something. });
event for all jQuery UI dialogs in a page Is it possible to write a code for for example close event of all jQuery UI dialogs in a Page?
TITLE: event for all jQuery UI dialogs in a page QUESTION: Is it possible to write a code for for example close event of all jQuery UI dialogs in a Page? ANSWER: It is indeed possible. You can do something like: $(".ui-dialog-content").live("dialogclose", function() { // Do something. });
[ "jquery", "events", "jquery-ui", "jquery-ui-dialog" ]
1
2
121
1
0
2011-05-31T05:31:45.007000
2011-05-31T05:37:29.390000
6,183,385
6,183,529
Accessing web services in iPhone using SOAP without method names?
I am trying to access a webservice from my server using this tutorial consume web services.. i have been successful in accessing the web service and retrieving a string from it. but in most of the tutorials i have come across we need to give the method names in the web service thru the SOAP actions.. Is there any way i...
You can use WSDL from service and generate proxy. WSDL contains service methods list. Check this
Accessing web services in iPhone using SOAP without method names? I am trying to access a webservice from my server using this tutorial consume web services.. i have been successful in accessing the web service and retrieving a string from it. but in most of the tutorials i have come across we need to give the method n...
TITLE: Accessing web services in iPhone using SOAP without method names? QUESTION: I am trying to access a webservice from my server using this tutorial consume web services.. i have been successful in accessing the web service and retrieving a string from it. but in most of the tutorials i have come across we need to...
[ "objective-c", "web-services", "ios4" ]
1
0
288
2
0
2011-05-31T05:32:22.617000
2011-05-31T05:54:09.230000
6,183,389
6,183,508
Hibernate createQuery remove() in WHERE condition
let's say I have entity Person. When I try to use with hibernate createQuery, it remove ( ) in where condition. Example: Query query = session.createQuery("FROM Person WHERE name=? OR (id=? AND active=?)"); query.setParameter(1, "Test"); query.setParameter(2, 1); query.setParameter(3, 1); // and so on When I open debug...
AND has a higher precedence than OR in SQL so the two statements are equivalent. Hibernate removes the unnecessary parentheses.
Hibernate createQuery remove() in WHERE condition let's say I have entity Person. When I try to use with hibernate createQuery, it remove ( ) in where condition. Example: Query query = session.createQuery("FROM Person WHERE name=? OR (id=? AND active=?)"); query.setParameter(1, "Test"); query.setParameter(2, 1); query....
TITLE: Hibernate createQuery remove() in WHERE condition QUESTION: let's say I have entity Person. When I try to use with hibernate createQuery, it remove ( ) in where condition. Example: Query query = session.createQuery("FROM Person WHERE name=? OR (id=? AND active=?)"); query.setParameter(1, "Test"); query.setParam...
[ "java", "hibernate" ]
0
2
1,039
1
0
2011-05-31T05:32:34.937000
2011-05-31T05:51:08.437000
6,183,393
6,184,311
Media Recorder setMaxFileSize problem
I have a problem trying to set the max file size when recording video. The documentation for recorder.setMaxFileSize(long filesize_in_bytes) says long variable type for the argument. I have a method that returns the free space in long value. When I try to set this long variable as the argument it fails every time. Free...
I found the answer. I forgot that the FAT file system has a maximum file size of 4 GB. So if you use a large card like so many users have now, there may be over 4GB of free space. This is a file system limitation. There is also another stack overflow answer on this here
Media Recorder setMaxFileSize problem I have a problem trying to set the max file size when recording video. The documentation for recorder.setMaxFileSize(long filesize_in_bytes) says long variable type for the argument. I have a method that returns the free space in long value. When I try to set this long variable as ...
TITLE: Media Recorder setMaxFileSize problem QUESTION: I have a problem trying to set the max file size when recording video. The documentation for recorder.setMaxFileSize(long filesize_in_bytes) says long variable type for the argument. I have a method that returns the free space in long value. When I try to set this...
[ "android", "video", "record" ]
1
0
2,330
2
0
2011-05-31T05:32:58.437000
2011-05-31T07:31:36.397000
6,183,394
6,183,806
I have a big table in R, now I want to select the odd rows and paste a label before the first element of this row
A=matrix(0,4,2) A[1,1]=2 A[1,2]=3 A[2,1]=2 A[2,2]=3 A[3,1]=2 A[3,2]=3 A[4,1]=2 A[4,2]=3 Now I want to pick up row 2,4 and return this is odd before the first element of the row. But I don't know how to make a loop to pick up row 2,4
If I understand your question correctly, you want to display some text and the first element of all odd rows. You can try this: cat(paste("This is odd", A[c(2,4),1], "\n")) No need for a loop there. Should you want to work with a larger matrix, and take all odd rows, you can use seq(2, nrow(A), by=2) instead of c(2,4).
I have a big table in R, now I want to select the odd rows and paste a label before the first element of this row A=matrix(0,4,2) A[1,1]=2 A[1,2]=3 A[2,1]=2 A[2,2]=3 A[3,1]=2 A[3,2]=3 A[4,1]=2 A[4,2]=3 Now I want to pick up row 2,4 and return this is odd before the first element of the row. But I don't know how to mak...
TITLE: I have a big table in R, now I want to select the odd rows and paste a label before the first element of this row QUESTION: A=matrix(0,4,2) A[1,1]=2 A[1,2]=3 A[2,1]=2 A[2,2]=3 A[3,1]=2 A[3,2]=3 A[4,1]=2 A[4,2]=3 Now I want to pick up row 2,4 and return this is odd before the first element of the row. But I don...
[ "r", "loops", "select", "rows" ]
2
5
6,291
1
0
2011-05-31T05:33:01.190000
2011-05-31T06:32:26.060000
6,183,400
6,183,482
GPPG (bison) - How to implement an "expression expression" concept
We're using GPPG (essentially bison for C#) to generate a parser for a programming language. Everything is going great except for one really nasty bit. The language we are parsing has a sort of "implicit comparison" rule, where "expression expression" should be interpreted as "expression == expression". For example, th...
How about this: program: expression; expressionBase: Constant | expressionBase Plus expressionBase | expressionBase Times expressionBase; expression: expressionBase | expressionBase expression; You need to build the grammar from bottom to top, not mixing your low-level concepts (like expressionBase ) amd high-level o...
GPPG (bison) - How to implement an "expression expression" concept We're using GPPG (essentially bison for C#) to generate a parser for a programming language. Everything is going great except for one really nasty bit. The language we are parsing has a sort of "implicit comparison" rule, where "expression expression" s...
TITLE: GPPG (bison) - How to implement an "expression expression" concept QUESTION: We're using GPPG (essentially bison for C#) to generate a parser for a programming language. Everything is going great except for one really nasty bit. The language we are parsing has a sort of "implicit comparison" rule, where "expres...
[ "c#", "bison", "lalr", "gppg" ]
0
1
846
1
0
2011-05-31T05:34:12.577000
2011-05-31T05:46:41.137000
6,183,408
6,183,422
PHP throws error inside function even though the function is not executed on the page
If PHP is interpreted language(every line is executed as it is reached), how come it throws errors if the error occurs inside a function which is never executed? Or may be I don't get what interpreted means? For e.g
Because its syntax is first parsed in an attempt to tokenize it, before the PHP interpreter can begin.
PHP throws error inside function even though the function is not executed on the page If PHP is interpreted language(every line is executed as it is reached), how come it throws errors if the error occurs inside a function which is never executed? Or may be I don't get what interpreted means? For e.g
TITLE: PHP throws error inside function even though the function is not executed on the page QUESTION: If PHP is interpreted language(every line is executed as it is reached), how come it throws errors if the error occurs inside a function which is never executed? Or may be I don't get what interpreted means? For e.g ...
[ "php", "interpreted-language" ]
7
7
92
3
0
2011-05-31T05:34:43.477000
2011-05-31T05:37:01.700000
6,183,413
6,183,828
Port ScaleTransform.Changed event in from WPF to Silverlight
In WPF, the ScaleTransform has an event called Changed which raises whenever the scale X/Y is changed. But this event does not exist in Silverlight. Is there any way we can implement the same thing in Silverlight?
I found a workaround for this. Actually, we can hook CompositionTarget.Rendering event when the storyboard begins. After the storyboard is completed, we need unhook the event too to save the performance. In the Rendering event, we can get the dynamical value of the ScaleTransform's scale x/y and it solves my issue. Hop...
Port ScaleTransform.Changed event in from WPF to Silverlight In WPF, the ScaleTransform has an event called Changed which raises whenever the scale X/Y is changed. But this event does not exist in Silverlight. Is there any way we can implement the same thing in Silverlight?
TITLE: Port ScaleTransform.Changed event in from WPF to Silverlight QUESTION: In WPF, the ScaleTransform has an event called Changed which raises whenever the scale X/Y is changed. But this event does not exist in Silverlight. Is there any way we can implement the same thing in Silverlight? ANSWER: I found a workarou...
[ "wpf", "silverlight", "scaletransform" ]
0
1
569
1
0
2011-05-31T05:35:47.220000
2011-05-31T06:34:50.460000
6,183,415
6,183,498
classes managing own memory
Effective Java: Item 6: Eliminate obsolete object references. Generally speaking, whenever a class manages its own memory, the programmer should be alert for memory leaks. Whenever an element is freed, any object references contained in the element should be nulled out. I don't think I fully understood the description....
One simple example is ArrayList, where, when an element is deleted from the end of the list it has to null the array element, not simply decrease the "last element" index. Otherwise the object removed remains reachable by the ArrayList.
classes managing own memory Effective Java: Item 6: Eliminate obsolete object references. Generally speaking, whenever a class manages its own memory, the programmer should be alert for memory leaks. Whenever an element is freed, any object references contained in the element should be nulled out. I don't think I fully...
TITLE: classes managing own memory QUESTION: Effective Java: Item 6: Eliminate obsolete object references. Generally speaking, whenever a class manages its own memory, the programmer should be alert for memory leaks. Whenever an element is freed, any object references contained in the element should be nulled out. I d...
[ "java", "memory-leaks", "effective-java" ]
7
4
241
2
0
2011-05-31T05:36:03.850000
2011-05-31T05:50:05.940000
6,183,416
6,193,893
iOS xcode microphone volume detection?
What frameworks are required to detect how loud someone is talking into a microphone... Also, can anyone tell me what to search for in the documentation or google so I can create some code... What line of code would be commonly used when detecting volume levels of noise through the microphone? Thanks!
This seems to be a duplicate of: Realtime microphone sound level monitoring However, that question is old and the accepted answer links to a deprecated library. They now recommend that you instead use AVAudioRecorder. They suggest this tutorial and it seems to be what you are looking for.
iOS xcode microphone volume detection? What frameworks are required to detect how loud someone is talking into a microphone... Also, can anyone tell me what to search for in the documentation or google so I can create some code... What line of code would be commonly used when detecting volume levels of noise through th...
TITLE: iOS xcode microphone volume detection? QUESTION: What frameworks are required to detect how loud someone is talking into a microphone... Also, can anyone tell me what to search for in the documentation or google so I can create some code... What line of code would be commonly used when detecting volume levels o...
[ "ios", "xcode", "volume", "microphone", "ios-frameworks" ]
5
15
19,203
1
0
2011-05-31T05:36:22.180000
2011-05-31T21:40:56.650000
6,183,419
6,183,456
Automatically raise a event in ASP.NET C# to send emails
Is there a way in ASP.NET C# to raise a event on a given time daily to run a procedure and send emails to list of users with their sale report? In a way, I want to keep a thread active in background in app_start event in global file. I am on share hosting so don't have much power to update any setting on server as per ...
Why don't you build an application that send those emails and run it in a specific time using Windows Tasks Scheduler instead of keeping your application running all the time? This way, after your application sends the emails and accomplish its task, you could simply end it and start it again whenever you need.
Automatically raise a event in ASP.NET C# to send emails Is there a way in ASP.NET C# to raise a event on a given time daily to run a procedure and send emails to list of users with their sale report? In a way, I want to keep a thread active in background in app_start event in global file. I am on share hosting so don'...
TITLE: Automatically raise a event in ASP.NET C# to send emails QUESTION: Is there a way in ASP.NET C# to raise a event on a given time daily to run a procedure and send emails to list of users with their sale report? In a way, I want to keep a thread active in background in app_start event in global file. I am on sha...
[ "asp.net", "c#-3.0", "automation" ]
3
1
1,466
3
0
2011-05-31T05:36:54.587000
2011-05-31T05:43:19.810000
6,183,423
6,184,997
Clear back stack after activity is opened from web-browser by url "appname://com.appname/"
My application has an activity, that launches oauth-authorization process in browser, and finally browser receives redirect to url "appname://com.appname", that calls back to my activity. (activity declared that it can view such urls) Everything is OK, but if user presses "Back" he goes back to web browser. I want to c...
When click link appname://com.appname in web browser, the browser call your activity, but browser did not call finish itself, you can't change the browser. I think that make a new activity that has a webview inside can solve this. You will start that new activity instead of android browser. In the new activity, set web...
Clear back stack after activity is opened from web-browser by url "appname://com.appname/" My application has an activity, that launches oauth-authorization process in browser, and finally browser receives redirect to url "appname://com.appname", that calls back to my activity. (activity declared that it can view such ...
TITLE: Clear back stack after activity is opened from web-browser by url "appname://com.appname/" QUESTION: My application has an activity, that launches oauth-authorization process in browser, and finally browser receives redirect to url "appname://com.appname", that calls back to my activity. (activity declared that...
[ "java", "android", "browser", "android-activity" ]
1
0
3,039
1
0
2011-05-31T05:37:13.980000
2011-05-31T08:41:09.730000
6,183,427
6,183,544
AJAX Load div ID's children
Lets say i have this: $('a').each(function() { $(this).click(function(e) { e.preventDefault(); var href = $(this).attr('href'); $('#somediv').load(href + ' #foo'); }); }); Now how would I make it load the inner contents of #foo and not the actual div #foo Still not quite sure what I mean? bar bar bar bar bar I want to ...
You can do this fairly easily if you don't mind using $.get and doing the loading parts by hand, something like this: $.get(href, function(html) { $('#somediv').html( $(html).find('#foo').html() ); }); This grabs the full chunk of HTML from href using $.get and then, in the success callback, we find the id="foo" elemen...
AJAX Load div ID's children Lets say i have this: $('a').each(function() { $(this).click(function(e) { e.preventDefault(); var href = $(this).attr('href'); $('#somediv').load(href + ' #foo'); }); }); Now how would I make it load the inner contents of #foo and not the actual div #foo Still not quite sure what I mean? ba...
TITLE: AJAX Load div ID's children QUESTION: Lets say i have this: $('a').each(function() { $(this).click(function(e) { e.preventDefault(); var href = $(this).attr('href'); $('#somediv').load(href + ' #foo'); }); }); Now how would I make it load the inner contents of #foo and not the actual div #foo Still not quite su...
[ "javascript", "jquery", "ajax", "load" ]
2
6
4,650
3
0
2011-05-31T05:37:33.193000
2011-05-31T05:57:15.847000
6,183,429
6,187,288
how to check two or more conditions in xsl template
how to check two or more conditions in xslt here is my xml 102 BKTRUS33XBRD N 32 praveen 42 pubby 77 pravz 77 pubbypravz 99 USA 99 UK 76 shanmu for this above xml we have applying this below xsl template here if any one of tag repeatation is occur xslt were working if suppose another tag were repeatation happen in xml ...
To help you learn by example, I modified your transformation just a little:,,,, O I When applied to this document: 102 BKTRUS33XBRD N 32 praveen 42 pubby 77 pravz 77 pubbypravz 99 USA 99 UK 76 shanmu It produces the following result: O102N,000001,praveen,pravz,USA O102N,000002,praveen,pubbypravz,UK
how to check two or more conditions in xsl template how to check two or more conditions in xslt here is my xml 102 BKTRUS33XBRD N 32 praveen 42 pubby 77 pravz 77 pubbypravz 99 USA 99 UK 76 shanmu for this above xml we have applying this below xsl template here if any one of tag repeatation is occur xslt were working if...
TITLE: how to check two or more conditions in xsl template QUESTION: how to check two or more conditions in xslt here is my xml 102 BKTRUS33XBRD N 32 praveen 42 pubby 77 pravz 77 pubbypravz 99 USA 99 UK 76 shanmu for this above xml we have applying this below xsl template here if any one of tag repeatation is occur xs...
[ "xslt", "xslt-1.0" ]
1
0
7,635
1
0
2011-05-31T05:37:38
2011-05-31T12:02:19.133000
6,183,434
6,183,541
Do I use retain or copy in my singleton?
I read somewhere that with NSString in an object, one has to use copy instead of retain. Can someone explain if this is correct and why? For example I have the following declaration for my singleton: #import @class FaxRecipient; @interface MyManager: NSObject { NSString *subject; NSString *reference; NSString *coverSh...
I think "has to" in the sense of must is a little strong. You can use either copy or retain, but you should generally use copy for your NSString* properties because: You usually don't want a string property to change under your nose; NSMutableString is a subclass of NSString, so it's entirely possible that someone migh...
Do I use retain or copy in my singleton? I read somewhere that with NSString in an object, one has to use copy instead of retain. Can someone explain if this is correct and why? For example I have the following declaration for my singleton: #import @class FaxRecipient; @interface MyManager: NSObject { NSString *subjec...
TITLE: Do I use retain or copy in my singleton? QUESTION: I read somewhere that with NSString in an object, one has to use copy instead of retain. Can someone explain if this is correct and why? For example I have the following declaration for my singleton: #import @class FaxRecipient; @interface MyManager: NSObject ...
[ "iphone", "ios" ]
8
8
572
5
0
2011-05-31T05:38:20.783000
2011-05-31T05:56:36.437000
6,183,442
6,183,542
What's the equivalent of flexigrid's params in jqgrid?
What's the equivalent of flexigrid's params in jqgrid? $('#bsDetail').flexigrid({ @* refactor, avoid parameters in url url: '/Area/Location/Details?id=@(Guid.Empty.ToString())', *@ url: '/Area/Location/Details', params: [ { name: 'id', value: '@Guid.Empty' } ],
If you use default HTTP GET ( mtype:'GET' ) the jqGrid equivalent will be $('#bsDetail').jqGrid({ url: '/Area/Location/Details', postData: { name: 'id', value: '@Guid.Empty' } //... }); Moreover if the URL parameters are no constants you can consider to use postData having functions as the properties (see here );
What's the equivalent of flexigrid's params in jqgrid? What's the equivalent of flexigrid's params in jqgrid? $('#bsDetail').flexigrid({ @* refactor, avoid parameters in url url: '/Area/Location/Details?id=@(Guid.Empty.ToString())', *@ url: '/Area/Location/Details', params: [ { name: 'id', value: '@Guid.Empty' } ],
TITLE: What's the equivalent of flexigrid's params in jqgrid? QUESTION: What's the equivalent of flexigrid's params in jqgrid? $('#bsDetail').flexigrid({ @* refactor, avoid parameters in url url: '/Area/Location/Details?id=@(Guid.Empty.ToString())', *@ url: '/Area/Location/Details', params: [ { name: 'id', value: '@G...
[ "asp.net-mvc", "jqgrid", "flexigrid" ]
0
1
396
1
0
2011-05-31T05:40:27.750000
2011-05-31T05:56:43.980000
6,183,444
6,212,525
Improper validation when installing Oracle Fusion Middleware
I installed Oracle JDeveloper 11g (11.1.1.4.0). I also installed IBM Websphere 7.0.0.15 without any profile as suggested in the documentation. Next I wanted to install Oracle Fusion Middleware 11g. But during installation, I was asked Application Server Location for which I gave C:\Program Files\IBM\SDP\runtimes\base_v...
The issue was that I was using WAS Test Environment. After I tried with standalone WAS, it succeeded but I am not able to configure after install. The changes are not being saved to WAS.
Improper validation when installing Oracle Fusion Middleware I installed Oracle JDeveloper 11g (11.1.1.4.0). I also installed IBM Websphere 7.0.0.15 without any profile as suggested in the documentation. Next I wanted to install Oracle Fusion Middleware 11g. But during installation, I was asked Application Server Locat...
TITLE: Improper validation when installing Oracle Fusion Middleware QUESTION: I installed Oracle JDeveloper 11g (11.1.1.4.0). I also installed IBM Websphere 7.0.0.15 without any profile as suggested in the documentation. Next I wanted to install Oracle Fusion Middleware 11g. But during installation, I was asked Applic...
[ "oracle11g", "websphere", "oracle-fusion-middleware" ]
2
0
1,832
2
0
2011-05-31T05:40:47.553000
2011-06-02T09:12:04.167000
6,183,447
6,183,561
await immediately moves to next statement
I am playing with the new Async CTP bits, and I can't get it work with either server-side or just command-line program (and all the examples are either WPF or Silverlight). For example, some trivial code like: class Program { static void Main() { Program p = new Program(); var s = p.Ten2SevenAsync(); Console.WriteLine(...
The whole point of the await-based code is that it is indeed "execute the next stuff when this is finished" (a callback), and not "block the current thread until this has finished". As such, from Ten2SevenAsync you get back a task, but that task is not yet complete. Writing the task to the console does not mean it wait...
await immediately moves to next statement I am playing with the new Async CTP bits, and I can't get it work with either server-side or just command-line program (and all the examples are either WPF or Silverlight). For example, some trivial code like: class Program { static void Main() { Program p = new Program(); var ...
TITLE: await immediately moves to next statement QUESTION: I am playing with the new Async CTP bits, and I can't get it work with either server-side or just command-line program (and all the examples are either WPF or Silverlight). For example, some trivial code like: class Program { static void Main() { Program p = n...
[ "c#", "asynchronous", "async-await", "async-ctp" ]
5
11
3,254
3
0
2011-05-31T05:41:24.100000
2011-05-31T05:59:32.230000
6,183,455
6,183,607
Matching from last instance of character if present to validate filename with extension in regex
I am trying to limit the user from uploading Long named files and unaccepted file extensions using a regular expression validator in Asp.net 2.0 Webforms. I wanted the filename to be withing 30 characters[restriction due to Db Design] and extensions match png,jpeg,zip,rar,7z.I came up with this regular expression which...
I suggest this: \b\w{3,30}\.(?:pdf|jpe?g|png|7z|zip|rar)$ This matches a filename starting at a word boundary (without the \b it might start the match in the middle of an overlong filename). Only ASCII letters, digits and underscores are allowed in the filename (no accented characters!), dots are also forbidden. Rememb...
Matching from last instance of character if present to validate filename with extension in regex I am trying to limit the user from uploading Long named files and unaccepted file extensions using a regular expression validator in Asp.net 2.0 Webforms. I wanted the filename to be withing 30 characters[restriction due to...
TITLE: Matching from last instance of character if present to validate filename with extension in regex QUESTION: I am trying to limit the user from uploading Long named files and unaccepted file extensions using a regular expression validator in Asp.net 2.0 Webforms. I wanted the filename to be withing 30 characters[...
[ "javascript", "regex", "internet-explorer", "firefox", "google-chrome" ]
0
1
325
1
0
2011-05-31T05:43:17.297000
2011-05-31T06:06:36.363000
6,183,470
6,184,035
how to save xml file in locally in blackberry?
I want to take xml from internet, but everytime taking xml from net makes slow to my application, so i am thinking to take and save in local directory and next time i open app then at back end the xml again copied from internet to my xml how to do that, and is there any other good way to solve this problem?
Please the use the following function to write the file to SD card. private static String APP_DOC_DIR = "file:///SDCard/BlackBerry/documents/MyAPP/"; public static void writeToSD(String fileName, String fileContent){ FileConnection fconn = null; // APP_DOC_DIR is the directory name constant. try { FileConnection fc = ...
how to save xml file in locally in blackberry? I want to take xml from internet, but everytime taking xml from net makes slow to my application, so i am thinking to take and save in local directory and next time i open app then at back end the xml again copied from internet to my xml how to do that, and is there any ot...
TITLE: how to save xml file in locally in blackberry? QUESTION: I want to take xml from internet, but everytime taking xml from net makes slow to my application, so i am thinking to take and save in local directory and next time i open app then at back end the xml again copied from internet to my xml how to do that, a...
[ "xml", "blackberry" ]
0
1
530
1
0
2011-05-31T05:45:06.237000
2011-05-31T07:02:19.757000
6,183,481
6,183,539
How do I use a hexadecimal value to specify the color in a LinearGradient in android
ShapeDrawable.ShaderFactory sf = new ShapeDrawable.ShaderFactory() { @Override public Shader resize(int width, int height) { LinearGradient lg = new LinearGradient(0, 0, 0, border.getHeight(), new int[] { Color.CYAN, Color.WHITE, Color.WHITE }, //substitute the correct colors for these new float[] { 0, 0.45f, 0.55f, 1 ...
new int[] { Color.parseColor("#00FFFF"), Color.WHITE, Color.WHITE },
How do I use a hexadecimal value to specify the color in a LinearGradient in android ShapeDrawable.ShaderFactory sf = new ShapeDrawable.ShaderFactory() { @Override public Shader resize(int width, int height) { LinearGradient lg = new LinearGradient(0, 0, 0, border.getHeight(), new int[] { Color.CYAN, Color.WHITE, Color...
TITLE: How do I use a hexadecimal value to specify the color in a LinearGradient in android QUESTION: ShapeDrawable.ShaderFactory sf = new ShapeDrawable.ShaderFactory() { @Override public Shader resize(int width, int height) { LinearGradient lg = new LinearGradient(0, 0, 0, border.getHeight(), new int[] { Color.CYAN, ...
[ "java", "android", "android-layout" ]
3
3
591
1
0
2011-05-31T05:46:38.783000
2011-05-31T05:56:06.283000
6,183,491
6,184,788
Is this a safe way to convert MySQL tables from latin1 to utf-8?
I need to change all the tables in one of my databases from latin1 to utf-8 (with utf8_bin collation). I have dumped the database, created a test database from it, and run the following without any errors or warnings for each table: ALTER TABLE tablename CONVERT TO CHARSET utf8 COLLATION utf8_bin Is it safe for me to r...
There are 3 different cases to consider: The values are indeed encoded using Latin1 This is the consistent case: declared charset and content encoding match. This was the only case I covered in my initial answer. Use the command you suggested: ALTER TABLE tablename CONVERT TO CHARSET utf8 COLLATE utf8_bin Note that the...
Is this a safe way to convert MySQL tables from latin1 to utf-8? I need to change all the tables in one of my databases from latin1 to utf-8 (with utf8_bin collation). I have dumped the database, created a test database from it, and run the following without any errors or warnings for each table: ALTER TABLE tablename ...
TITLE: Is this a safe way to convert MySQL tables from latin1 to utf-8? QUESTION: I need to change all the tables in one of my databases from latin1 to utf-8 (with utf8_bin collation). I have dumped the database, created a test database from it, and run the following without any errors or warnings for each table: ALTE...
[ "mysql", "character-encoding", "collation" ]
11
11
4,301
3
0
2011-05-31T05:49:09.153000
2011-05-31T08:20:09.953000
6,183,512
6,183,551
In query result, when value is Null show string instead
SELECT User, COUNT(*) as count FROM Tests GROUP by User; This may return row, where User is null but count is some number. How can I modify query so instead of empty(null) row I can see some string?
Normally, I'd suggest coalesce to automatically morph null values to something else, but it appears MsAccess may not have this. You could try nz instead: select nz(user, '< >') as user, count(*) as count from tests group by user instead. You may also find that it's more efficient (this depends on your DBMS of course) t...
In query result, when value is Null show string instead SELECT User, COUNT(*) as count FROM Tests GROUP by User; This may return row, where User is null but count is some number. How can I modify query so instead of empty(null) row I can see some string?
TITLE: In query result, when value is Null show string instead QUESTION: SELECT User, COUNT(*) as count FROM Tests GROUP by User; This may return row, where User is null but count is some number. How can I modify query so instead of empty(null) row I can see some string? ANSWER: Normally, I'd suggest coalesce to auto...
[ "sql", "ms-access" ]
0
4
426
1
0
2011-05-31T05:52:17.017000
2011-05-31T05:58:28.393000
6,183,520
6,183,553
merging two SQL SELECT statements returning values from two different tables
how would i merge the following two sql select statements? //select all rows from our userlogin table where the emails match $res1 = mysql_query("SELECT * FROM userlogin WHERE `email` = '".$email."'"); $num1 = mysql_num_rows($res1); //if the number of matchs is 1 if($num1 == 1) { //the email address supplied is taken s...
Use: //select all rows from our userlogin table where the emails match $query = sprintf("SELECT 1 FROM userlogin WHERE `email` = '%s' UNION ALL SELECT 1 FROM userlogin_fb WHERE `email` = '%s' ", $email, $email); $res1 = mysql_query($query); $num1 = mysql_num_rows($res1); //if the number of matchs is 1 if($num1 >= 1) { ...
merging two SQL SELECT statements returning values from two different tables how would i merge the following two sql select statements? //select all rows from our userlogin table where the emails match $res1 = mysql_query("SELECT * FROM userlogin WHERE `email` = '".$email."'"); $num1 = mysql_num_rows($res1); //if the n...
TITLE: merging two SQL SELECT statements returning values from two different tables QUESTION: how would i merge the following two sql select statements? //select all rows from our userlogin table where the emails match $res1 = mysql_query("SELECT * FROM userlogin WHERE `email` = '".$email."'"); $num1 = mysql_num_rows(...
[ "php", "mysql", "sql" ]
0
3
1,519
2
0
2011-05-31T05:53:21.460000
2011-05-31T05:58:39.930000
6,183,521
6,183,562
Investigating XMLReader object
I had asked a question about how to investigate the contents of XMLWriter object while debugging. I am trying to check the contents of an XmlReader object that is created from a memory stream in a similar way as given in the answer of the linked question. But I am getting UnauthorizedAccessException stating MemoryStrea...
Check out the MSDN Docs for the particular constructor you're using, MemoryStream(Byte[]). When you instantiate it this way, GetBuffer() will throw that exception, since the buffer is not actually visible. You should instead use this constructor, and be sure to set publiclyVisible to true.
Investigating XMLReader object I had asked a question about how to investigate the contents of XMLWriter object while debugging. I am trying to check the contents of an XmlReader object that is created from a memory stream in a similar way as given in the answer of the linked question. But I am getting UnauthorizedAcce...
TITLE: Investigating XMLReader object QUESTION: I had asked a question about how to investigate the contents of XMLWriter object while debugging. I am trying to check the contents of an XmlReader object that is created from a memory stream in a similar way as given in the answer of the linked question. But I am gettin...
[ "c#", "xml", "xmlreader" ]
2
3
348
1
0
2011-05-31T05:53:30.307000
2011-05-31T05:59:50.110000
6,183,526
6,183,626
Javascript error: Slide(function) undefined
What I'm trying to do is get the Slide function to work - its passing the CurrenPage data, but the PanelScroller is not updating. Could I possibly have a conflict with some of the other JS libraries / scripts I'm using? please see http://www.deepwater.nu/simonev
In your function Slide( control, panel ){... } you are setting top as Number but it should be units (px) PanelScroller.style.top = CurrentPageTop + 'px'; To avoid such problems in future i suggest start using jQuery's functions as.css(). After all you've loaded and used it several times already.
Javascript error: Slide(function) undefined What I'm trying to do is get the Slide function to work - its passing the CurrenPage data, but the PanelScroller is not updating. Could I possibly have a conflict with some of the other JS libraries / scripts I'm using? please see http://www.deepwater.nu/simonev
TITLE: Javascript error: Slide(function) undefined QUESTION: What I'm trying to do is get the Slide function to work - its passing the CurrenPage data, but the PanelScroller is not updating. Could I possibly have a conflict with some of the other JS libraries / scripts I'm using? please see http://www.deepwater.nu/sim...
[ "javascript" ]
0
0
139
1
0
2011-05-31T05:53:55.677000
2011-05-31T06:09:14.173000
6,183,531
6,183,760
why are initializers getting errors when upgrading from Rails 2 to Rails 3?
This is in my config/initializer/string.rb: class String include ClearCompany end I have lib/clear_company.rb That is where I have a module ClearCompany.
You need to require that file, as constants aren't autoloaded from lib in Rails 3: require 'clear_company' You could also add lib back to the load paths by putting this in your Application 's class: config.autoload_paths += %W(#{Rails.root}/lib)
why are initializers getting errors when upgrading from Rails 2 to Rails 3? This is in my config/initializer/string.rb: class String include ClearCompany end I have lib/clear_company.rb That is where I have a module ClearCompany.
TITLE: why are initializers getting errors when upgrading from Rails 2 to Rails 3? QUESTION: This is in my config/initializer/string.rb: class String include ClearCompany end I have lib/clear_company.rb That is where I have a module ClearCompany. ANSWER: You need to require that file, as constants aren't autoloaded f...
[ "ruby-on-rails", "upgrade", "initializer" ]
2
2
74
1
0
2011-05-31T05:54:50.577000
2011-05-31T06:26:38.203000
6,183,533
6,184,053
qmake with INCLUDEPATH ignores dependencies
I use qmake to build a project. The project contains several static libs and a executable. The executable links to the static libraries and therefore has the path of the library added to the INCLUDEPATH variable. When I change something in the header files of the executable everything is rebuild as expected. When chang...
You should add the paths you added to INCLUDEPATH to DEPENDPATH as well.
qmake with INCLUDEPATH ignores dependencies I use qmake to build a project. The project contains several static libs and a executable. The executable links to the static libraries and therefore has the path of the library added to the INCLUDEPATH variable. When I change something in the header files of the executable e...
TITLE: qmake with INCLUDEPATH ignores dependencies QUESTION: I use qmake to build a project. The project contains several static libs and a executable. The executable links to the static libraries and therefore has the path of the library added to the INCLUDEPATH variable. When I change something in the header files o...
[ "c++", "makefile", "qmake" ]
7
7
1,609
1
0
2011-05-31T05:55:08.893000
2011-05-31T07:03:24.063000
6,183,534
6,187,829
WordPress TwentyTen menu: how to CSS-select sub-menus in a specific position?
I'm styling the top menu of the WordPress TwentyTen theme. I want all sub-menus of the first menu item to be 200px wide, all submenus of the second menu item to be 250px wide, and all submenus of the third menu item to be 300px wide. For example, the menu has the following structure: ABOUT Mission History People SERVIC...
Assuming that you're using custom menu structure defined under the Appearance/Menus admin interface page, you can add CSS classes to each submenu item from there. Go to the admin page, then choose "Screen Options" at the top. Under there, you'll find a series of tickboxes under "Show advanced menu properties". One of t...
WordPress TwentyTen menu: how to CSS-select sub-menus in a specific position? I'm styling the top menu of the WordPress TwentyTen theme. I want all sub-menus of the first menu item to be 200px wide, all submenus of the second menu item to be 250px wide, and all submenus of the third menu item to be 300px wide. For exam...
TITLE: WordPress TwentyTen menu: how to CSS-select sub-menus in a specific position? QUESTION: I'm styling the top menu of the WordPress TwentyTen theme. I want all sub-menus of the first menu item to be 200px wide, all submenus of the second menu item to be 250px wide, and all submenus of the third menu item to be 30...
[ "css", "wordpress", "menu", "twenty-ten-theme" ]
1
2
2,507
2
0
2011-05-31T05:55:09.127000
2011-05-31T12:50:41.770000
6,183,538
6,183,564
Imported classes not loaded properly
i am trying to create a new flash movie. i am using CS4, for publishing movie -> flash 8 - AS-> 3.0. my issue is if i publish the movie i receive the following complier errors - > ActionScript 2.0 class scripts may only define class or interface constructs. Attribute used outside class. The class or interface 'flash.ne...
Flash Player 8 only supports ActionScript 2. Your document is set to be ActionScript 2. PS that class looks familiar;P
Imported classes not loaded properly i am trying to create a new flash movie. i am using CS4, for publishing movie -> flash 8 - AS-> 3.0. my issue is if i publish the movie i receive the following complier errors - > ActionScript 2.0 class scripts may only define class or interface constructs. Attribute used outside cl...
TITLE: Imported classes not loaded properly QUESTION: i am trying to create a new flash movie. i am using CS4, for publishing movie -> flash 8 - AS-> 3.0. my issue is if i publish the movie i receive the following complier errors - > ActionScript 2.0 class scripts may only define class or interface constructs. Attribu...
[ "flash" ]
0
1
3,541
1
0
2011-05-31T05:56:02.223000
2011-05-31T06:00:05.157000
6,183,550
6,183,598
sliding a page in html
My html page is divided into many div //content1 //content2 My div having id=2 is too below on the page. I want that whenever I click the button the div having id 2 slides up and reaches at the starting of the page.
If you don't want to simply use an anchor or ID reference and want to animate it, just use animate. Here's a fiddle: http://jsfiddle.net/zMGnQ/ #div1, #div2 { height: 400px; background: #00aa00; margin: 20px; padding: 20px; } //content1 //content2 $('#but').click(function(){ $('body').animate({ scrollTop: $('#div2').o...
sliding a page in html My html page is divided into many div //content1 //content2 My div having id=2 is too below on the page. I want that whenever I click the button the div having id 2 slides up and reaches at the starting of the page.
TITLE: sliding a page in html QUESTION: My html page is divided into many div //content1 //content2 My div having id=2 is too below on the page. I want that whenever I click the button the div having id 2 slides up and reaches at the starting of the page. ANSWER: If you don't want to simply use an anchor or ID refere...
[ "javascript", "jquery", "html" ]
1
3
196
2
0
2011-05-31T05:58:23.113000
2011-05-31T06:04:44.593000
6,183,567
6,196,142
Rails_admin throwing NoMethodError on nested class
I have a User model that has_many:jobs. Everything seems to work correctly, except when I go to edit a User record in rails_admin, I get the following error. undefined method rails_admin_default_object_label_method' for # It says the error was raised on line 12 of bundler/gems/rails_admin-239c4f6bba32/app/views/rails_a...
This is probably just a Rails Admin bug. In fact, someone else had a similar error 1 day ago: https://github.com/sferik/rails_admin/issues/443 and there has been a commit to Rails Admin 20 hours ago to fix it: https://github.com/sferik/rails_admin/commit/5d0cc687fe40fb05f306a171b75477a0564ca901 So I would upgrade Rails...
Rails_admin throwing NoMethodError on nested class I have a User model that has_many:jobs. Everything seems to work correctly, except when I go to edit a User record in rails_admin, I get the following error. undefined method rails_admin_default_object_label_method' for # It says the error was raised on line 12 of bund...
TITLE: Rails_admin throwing NoMethodError on nested class QUESTION: I have a User model that has_many:jobs. Everything seems to work correctly, except when I go to edit a User record in rails_admin, I get the following error. undefined method rails_admin_default_object_label_method' for # It says the error was raised ...
[ "ruby-on-rails", "rails-admin" ]
0
0
416
1
0
2011-05-31T06:00:14.720000
2011-06-01T04:04:53.073000