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,203,839
6,218,772
Xenu Link Sleuth through a proxy server
I have a client who needs to periodically check an internet site I've developed for them, for broken links. They need to do this from their local company network. They have internet access and can browse the web using Internet Explorer, but Xenu won't connect to any internet sites. I think it's because the company have...
Your client could instead use Screaming Frog SEO Spider http://www.screamingfrog.co.uk/seo-spider/ - it's free for up to 500 pages and provides proxy support.
Xenu Link Sleuth through a proxy server I have a client who needs to periodically check an internet site I've developed for them, for broken links. They need to do this from their local company network. They have internet access and can browse the web using Internet Explorer, but Xenu won't connect to any internet site...
TITLE: Xenu Link Sleuth through a proxy server QUESTION: I have a client who needs to periodically check an internet site I've developed for them, for broken links. They need to do this from their local company network. They have internet access and can browse the web using Internet Explorer, but Xenu won't connect to...
[ "c#", "html", "seo", "xenu" ]
1
0
1,648
1
0
2011-06-01T15:37:46.553000
2011-06-02T18:33:43.677000
6,203,841
6,203,921
Unable to parse JSON using AS3 and Flash
I am attempting to parse some JSON from a URL via Flash/AS3. Here's my code so far: import com.adobe.serialization.json.JSON; import com.adobe.serialization.json.JSONDecoder; var loader:URLLoader = new URLLoader(); var request:URLRequest = new URLRequest(); request.contentType = "application/json"; request.url="http:/...
When I tried the URL in browser it is saying that I need to login which is clearly a HTML, not a JSON. Before trying to parse JSON make sure that you loaded the correct thing. Looks like that you need to authenticate to load the JSON.
Unable to parse JSON using AS3 and Flash I am attempting to parse some JSON from a URL via Flash/AS3. Here's my code so far: import com.adobe.serialization.json.JSON; import com.adobe.serialization.json.JSONDecoder; var loader:URLLoader = new URLLoader(); var request:URLRequest = new URLRequest(); request.contentType ...
TITLE: Unable to parse JSON using AS3 and Flash QUESTION: I am attempting to parse some JSON from a URL via Flash/AS3. Here's my code so far: import com.adobe.serialization.json.JSON; import com.adobe.serialization.json.JSONDecoder; var loader:URLLoader = new URLLoader(); var request:URLRequest = new URLRequest(); re...
[ "flash", "actionscript-3", "flash-cs4" ]
0
1
1,946
1
0
2011-06-01T15:37:54.573000
2011-06-01T15:44:08.240000
6,203,843
6,204,082
Calculating average of 2 digits
How to calculate average of 2 digits with brainfuck? I mean i have two digits for example 2 3 and its average is 2.5 for 2 8 we have 5.0 How can this be done?
Something along the lines of: ++>++++++++< this is input data [<+>-] this adds the numbers <[[->+<][->>+<<]] this does the calculation The approach is to evenly distribute a sum of two numbers. By evenly distribute I mean that the difference between values is at most 1 (since there are no floating point numbers, you ha...
Calculating average of 2 digits How to calculate average of 2 digits with brainfuck? I mean i have two digits for example 2 3 and its average is 2.5 for 2 8 we have 5.0 How can this be done?
TITLE: Calculating average of 2 digits QUESTION: How to calculate average of 2 digits with brainfuck? I mean i have two digits for example 2 3 and its average is 2.5 for 2 8 we have 5.0 How can this be done? ANSWER: Something along the lines of: ++>++++++++< this is input data [<+>-] this adds the numbers <[[->+<][->...
[ "brainfuck" ]
4
1
1,370
2
0
2011-06-01T15:38:00.673000
2011-06-01T15:56:28.040000
6,203,846
6,203,867
jQuery 1.6.1 , IE9 and SCRIPT5009: '$' is undefined
There is SCRIPT5009: '$' is undefined with jQuery 1.6.1 in IE9. Why '$' is undefined in ie9? Thanks in advance
Do you have another script using jQuery before jQuery is referenced?
jQuery 1.6.1 , IE9 and SCRIPT5009: '$' is undefined There is SCRIPT5009: '$' is undefined with jQuery 1.6.1 in IE9. Why '$' is undefined in ie9? Thanks in advance
TITLE: jQuery 1.6.1 , IE9 and SCRIPT5009: '$' is undefined QUESTION: There is SCRIPT5009: '$' is undefined with jQuery 1.6.1 in IE9. Why '$' is undefined in ie9? Thanks in advance ANSWER: Do you have another script using jQuery before jQuery is referenced?
[ "jquery", "internet-explorer-9" ]
4
7
33,880
3
0
2011-06-01T15:38:28.863000
2011-06-01T15:40:19.863000
6,203,852
6,204,831
Adding a file browser button to a MS Access form
I'd like to add a "Browse" button to an MS Access 2007 form that will bring up a standard Windows file browser (as a modal window) and allow the user to select a directory. When the user OKs out of that browser, the path the the selected directory should be written to a text box in the Access form. What's the best way ...
Create a function which uses Application.FileDialog. The FileDialog is modal. This function will return the user's folder selection if they made one, or an empty string if they clicked cancel on the FileDialog. Public Function FolderSelection() As String Dim objFD As Object Dim strOut As String strOut = vbNullString '...
Adding a file browser button to a MS Access form I'd like to add a "Browse" button to an MS Access 2007 form that will bring up a standard Windows file browser (as a modal window) and allow the user to select a directory. When the user OKs out of that browser, the path the the selected directory should be written to a ...
TITLE: Adding a file browser button to a MS Access form QUESTION: I'd like to add a "Browse" button to an MS Access 2007 form that will bring up a standard Windows file browser (as a modal window) and allow the user to select a directory. When the user OKs out of that browser, the path the the selected directory shoul...
[ "forms", "ms-access", "file-browser" ]
10
17
45,269
1
0
2011-06-01T15:39:05.703000
2011-06-01T16:52:01.093000
6,203,856
6,204,320
Show Heading when Div is visible
I'm trying to display one of two headings depending on whether some DOM elements are available / visible on the page. For some reason, it's not working... Here's the live demo so far. I've got the following code: $('h3.list_heading').css('display', 'none'); $('h3#error').css('display', 'none'); if ( $('div.availableNow...
Try changing these lines in your switch $('div.availableNowListing').not(':first').find('div.available_now_entry').fadeOut('fast'); check_heading(); to this instead, shifting the function call as a callback for fadeOut(). $('div.availableNowListing').not(':first').find('div.available_now_entry').fadeOut('fast', check_h...
Show Heading when Div is visible I'm trying to display one of two headings depending on whether some DOM elements are available / visible on the page. For some reason, it's not working... Here's the live demo so far. I've got the following code: $('h3.list_heading').css('display', 'none'); $('h3#error').css('display', ...
TITLE: Show Heading when Div is visible QUESTION: I'm trying to display one of two headings depending on whether some DOM elements are available / visible on the page. For some reason, it's not working... Here's the live demo so far. I've got the following code: $('h3.list_heading').css('display', 'none'); $('h3#error...
[ "javascript", "jquery", "wordpress" ]
1
1
168
3
0
2011-06-01T15:39:24.297000
2011-06-01T16:13:08.413000
6,203,857
6,203,947
How can I set the System Time in Java?
Is it possible to change the System Time in Java? It should run under Windows and Linux. I've tried it with the Runtime Class in but there is a problem with the permissions. This is my code: String cmd="date -s \""+datetime.format(ntp_obj.getDest_Time())+"\""; try { Runtime.getRuntime().exec(cmd); } catch (IOException ...
Java doesn't have an API to do this. Most system commands to do it require admin rights, so Runtime can't help unless you run the whole process as administrator/root or you use runas / sudo. Depending on what you need, you can replace System.currentTimeMillis(). There are two approaches to this: Replace all calls to Sy...
How can I set the System Time in Java? Is it possible to change the System Time in Java? It should run under Windows and Linux. I've tried it with the Runtime Class in but there is a problem with the permissions. This is my code: String cmd="date -s \""+datetime.format(ntp_obj.getDest_Time())+"\""; try { Runtime.getRun...
TITLE: How can I set the System Time in Java? QUESTION: Is it possible to change the System Time in Java? It should run under Windows and Linux. I've tried it with the Runtime Class in but there is a problem with the permissions. This is my code: String cmd="date -s \""+datetime.format(ntp_obj.getDest_Time())+"\""; tr...
[ "java", "systemtime" ]
22
26
88,944
9
0
2011-06-01T15:39:25.670000
2011-06-01T15:46:15.527000
6,203,858
6,203,907
Java Mysql: ClassNotFoundException -> Could not find driver
Possible Duplicate: ClassNotFoundException com.mysql.jdbc.Driver I have included the mysql-connector-java-5.1.16-bin.jar into my Eclipse library, this code is based on tutorials that I have found on the web since I haven't used MySQL in Java before. Unfortunately I dont see where I use the acutual mysql-connector-java-...
Right click your project > Build Path > Add libraries and add the jar file. Also make sure that it is on your runtime path. Right click the main class > run as > run configurations > Classpath
Java Mysql: ClassNotFoundException -> Could not find driver Possible Duplicate: ClassNotFoundException com.mysql.jdbc.Driver I have included the mysql-connector-java-5.1.16-bin.jar into my Eclipse library, this code is based on tutorials that I have found on the web since I haven't used MySQL in Java before. Unfortunat...
TITLE: Java Mysql: ClassNotFoundException -> Could not find driver QUESTION: Possible Duplicate: ClassNotFoundException com.mysql.jdbc.Driver I have included the mysql-connector-java-5.1.16-bin.jar into my Eclipse library, this code is based on tutorials that I have found on the web since I haven't used MySQL in Java ...
[ "java", "eclipse", "jdbc", "classpath" ]
2
3
3,443
3
0
2011-06-01T15:39:29.477000
2011-06-01T15:43:16.553000
6,203,865
6,204,250
how to load UINavigationController from Uiviewcontroller
I want to load my UINavController from my UIViewController. My interface details is here. @interface ContactUs: UIViewController { IBOutlet UIWindow *window; IBOutlet UINavigationController *navController; } @property (nonatomic,retain) IBOutlet UINavigationController *navController; @end and in implementation.. ...
@interface ContactUs: UINavigationViewController { IBOutlet UIWindow *window; IBOutlet UITextView *textView; IBOutlet UIButton *button; } // Add properties to the all outlets // -(IBAction) buttonpressed: (id) sender; And in the implementation - write the code for buttonpressed and you can make use that for whatev...
how to load UINavigationController from Uiviewcontroller I want to load my UINavController from my UIViewController. My interface details is here. @interface ContactUs: UIViewController { IBOutlet UIWindow *window; IBOutlet UINavigationController *navController; } @property (nonatomic,retain) IBOutlet UINavigationC...
TITLE: how to load UINavigationController from Uiviewcontroller QUESTION: I want to load my UINavController from my UIViewController. My interface details is here. @interface ContactUs: UIViewController { IBOutlet UIWindow *window; IBOutlet UINavigationController *navController; } @property (nonatomic,retain) IBOu...
[ "iphone", "uiviewcontroller", "uinavigationcontroller" ]
0
0
685
2
0
2011-06-01T15:40:06.327000
2011-06-01T16:07:28.430000
6,203,870
6,204,086
How to get automatically meta description and keywords in Rails?
I am developing an application with Rails 3, one of requeriments is unique meta descriptions and keywords on each page to improve the SEO. The client needs that this do automatically. How do you do this? Is better do this with Rails, Ruby or directly with Javascript? Thanks.
Do it in Rails, not via javascript. Search Engines will not execute your javascript. What I usually do is write a meta helper that I simply stick in my ApplicationHelper, that looks like this: def meta(field = nil, list = []) field = field.to_s @meta ||= { 'robots' => ['all'], 'copyright' => ['My Copyright'], 'content-...
How to get automatically meta description and keywords in Rails? I am developing an application with Rails 3, one of requeriments is unique meta descriptions and keywords on each page to improve the SEO. The client needs that this do automatically. How do you do this? Is better do this with Rails, Ruby or directly with...
TITLE: How to get automatically meta description and keywords in Rails? QUESTION: I am developing an application with Rails 3, one of requeriments is unique meta descriptions and keywords on each page to improve the SEO. The client needs that this do automatically. How do you do this? Is better do this with Rails, Rub...
[ "javascript", "ruby", "ruby-on-rails-3" ]
1
5
4,908
2
0
2011-06-01T15:40:37.573000
2011-06-01T15:56:52.127000
6,203,893
6,203,950
How to debug the noscript tag
I am making a widget and I wrapped some JavaScript with a noscript tag and now I just get a blank screen and no error messages I can notice. Here is the example: http://www.comehike.com/outdoors/widget.php?hike_id=108&height=600&width=700 If you paste in the url from the view-source of that page, you will get something...
There isn't a lot to debug. Just try the page with JS on and with it off. As usual, validating is helpful. If you have JavaScript turned on, then the element will be ignored and you see nothing. This is expected. If you have JavaScript turned off, then the will be rendered, and the page inside loaded. That page consist...
How to debug the noscript tag I am making a widget and I wrapped some JavaScript with a noscript tag and now I just get a blank screen and no error messages I can notice. Here is the example: http://www.comehike.com/outdoors/widget.php?hike_id=108&height=600&width=700 If you paste in the url from the view-source of tha...
TITLE: How to debug the noscript tag QUESTION: I am making a widget and I wrapped some JavaScript with a noscript tag and now I just get a blank screen and no error messages I can notice. Here is the example: http://www.comehike.com/outdoors/widget.php?hike_id=108&height=600&width=700 If you paste in the url from the ...
[ "javascript", "widget", "noscript" ]
2
3
2,241
3
0
2011-06-01T15:42:29.883000
2011-06-01T15:46:21.033000
6,203,895
6,216,748
Is it possible sccessing a subset of a WCF service operations
I have the following doubt: Consider the following: /* My service is formed by several subservices (subfunctionalities). Here is functionality 1 */ [ServiceContract] public interface IMySubService1 { [OperationContract] int MyOp11(string opnd); [OperationContract] int MyOp12(stirng opnd); } /* My service is formed by ...
OK! Finally I tried it! IT CAN BE DONE!!! Exactly in the same manner as I showed in my question.
Is it possible sccessing a subset of a WCF service operations I have the following doubt: Consider the following: /* My service is formed by several subservices (subfunctionalities). Here is functionality 1 */ [ServiceContract] public interface IMySubService1 { [OperationContract] int MyOp11(string opnd); [OperationCon...
TITLE: Is it possible sccessing a subset of a WCF service operations QUESTION: I have the following doubt: Consider the following: /* My service is formed by several subservices (subfunctionalities). Here is functionality 1 */ [ServiceContract] public interface IMySubService1 { [OperationContract] int MyOp11(string op...
[ "c#", ".net", "service", "wcf" ]
3
2
148
2
0
2011-06-01T15:42:33.517000
2011-06-02T15:34:42.627000
6,203,902
6,206,491
User defined Class Serialization, C++ and msgpack
I am quite new trying msgpack. I need to serialize an object (instance of an user defined class), that contains pointers (internal tree, hashes,etc), and some basic types attributes. Until now I can do what is done in the quick example of msgpack.org wiki, just serialize the class to a msgpack::sbuffer, and then read t...
From the example here: http://wiki.msgpack.org/pages/viewpage.action?pageId=1081387 it looks like sbuf.data() would return the address, and sbuf.size() would return the size, of the data which you would write to the binary file. When you want to load the data from a binary file, read it into a buffer you've allocated a...
User defined Class Serialization, C++ and msgpack I am quite new trying msgpack. I need to serialize an object (instance of an user defined class), that contains pointers (internal tree, hashes,etc), and some basic types attributes. Until now I can do what is done in the quick example of msgpack.org wiki, just serializ...
TITLE: User defined Class Serialization, C++ and msgpack QUESTION: I am quite new trying msgpack. I need to serialize an object (instance of an user defined class), that contains pointers (internal tree, hashes,etc), and some basic types attributes. Until now I can do what is done in the quick example of msgpack.org w...
[ "c++", "serialization", "stream", "msgpack" ]
5
3
3,769
1
0
2011-06-01T15:43:00.477000
2011-06-01T19:18:39.673000
6,203,908
6,211,001
Graceful way to link to item in Sitecore client?
I am looking for the best way to link to an item in the Sitecore client (not the external website). The link will be embedded in a broken links report email. The user should be able to click the link and launch the Sitecore content editor with that Item auto-selected in the tree. I have found Mark Ursino's solution on ...
Here's what I've used before: There's an option in the sitecore web.config to send through raw url's. Set that on using this patch file true Then, I added an additional processor into the loggedin processor after the CleanupUserProfile which reads the querystring parameter(s) and redirects to the appropriate page. This...
Graceful way to link to item in Sitecore client? I am looking for the best way to link to an item in the Sitecore client (not the external website). The link will be embedded in a broken links report email. The user should be able to click the link and launch the Sitecore content editor with that Item auto-selected in ...
TITLE: Graceful way to link to item in Sitecore client? QUESTION: I am looking for the best way to link to an item in the Sitecore client (not the external website). The link will be embedded in a broken links report email. The user should be able to click the link and launch the Sitecore content editor with that Item...
[ "sitecore", "sitecore6" ]
3
2
1,649
3
0
2011-06-01T15:43:27.660000
2011-06-02T05:59:05.247000
6,203,909
6,226,457
In Mongoid, how do I transfer an embedded document to a different parent?
I am using the following code below, but I would prefer not to have to delete/copy. I used to be able to change the parent ID, but that doesn't exist for embedded documents in Mongoid/MongoDB def move(new_parent) if self._parent!= new_parent copy = self.dup self.delete new_parent.items << copy end end
My understanding is the embedded documents are stored as attributes inside your parent documents - they don't have parent_ids, since they are actually part of their parent (hence, 'embedded'). As such, the only way to reparent them would be to clone & delete - as you've done. You could probably cut your method down by ...
In Mongoid, how do I transfer an embedded document to a different parent? I am using the following code below, but I would prefer not to have to delete/copy. I used to be able to change the parent ID, but that doesn't exist for embedded documents in Mongoid/MongoDB def move(new_parent) if self._parent!= new_parent copy...
TITLE: In Mongoid, how do I transfer an embedded document to a different parent? QUESTION: I am using the following code below, but I would prefer not to have to delete/copy. I used to be able to change the parent ID, but that doesn't exist for embedded documents in Mongoid/MongoDB def move(new_parent) if self._parent...
[ "embed", "mongoid" ]
2
2
1,281
1
0
2011-06-01T15:43:30.050000
2011-06-03T11:21:14.460000
6,203,912
6,218,160
Calling _CrtDumpMemoryLeaks() in managed code C#/WPF
I am writing a wrapper class to call _CrtDumpMemoryLeaks() in WPF application. I am loading a C language DLL in the WPF application and would like to see if the there are any memory leaks in the DLL as WPF is acting as a test app for DLL also. class MemLeak { static int _CRTDBG_ALLOC_MEM_DF = 0x01; static int _CRTDBG_L...
Got it working. The link below for reference http://social.msdn.microsoft.com/Forums/en/clr/thread/484de950-f488-452e-a9bf-b8b4cd2d1f75
Calling _CrtDumpMemoryLeaks() in managed code C#/WPF I am writing a wrapper class to call _CrtDumpMemoryLeaks() in WPF application. I am loading a C language DLL in the WPF application and would like to see if the there are any memory leaks in the DLL as WPF is acting as a test app for DLL also. class MemLeak { static ...
TITLE: Calling _CrtDumpMemoryLeaks() in managed code C#/WPF QUESTION: I am writing a wrapper class to call _CrtDumpMemoryLeaks() in WPF application. I am loading a C language DLL in the WPF application and would like to see if the there are any memory leaks in the DLL as WPF is acting as a test app for DLL also. class...
[ "c#", "wpf", "memory-leaks", "managed", "crt" ]
1
0
1,100
1
0
2011-06-01T15:43:39.413000
2011-06-02T17:43:46.807000
6,203,918
6,206,033
How to send a file to a ASMX web service using VB6?
I have a VB6 application that I want to provide my users a feature where they can backup their data file to the cloud. I have a system in place where they can upload a file to the cloud and store it, now I want to make it a little easier by a menu option. File..Backup to Cloud would create a zip archive of the database...
VB6 supports COM components. You should be doing your new development by creating COM components in a.NET language (for instance, VB.NET or C#), and having your VB6 application call them. That way, you get the benefit of using software developed using modern tools, but you get to call them from your obsolete and unsupp...
How to send a file to a ASMX web service using VB6? I have a VB6 application that I want to provide my users a feature where they can backup their data file to the cloud. I have a system in place where they can upload a file to the cloud and store it, now I want to make it a little easier by a menu option. File..Backup...
TITLE: How to send a file to a ASMX web service using VB6? QUESTION: I have a VB6 application that I want to provide my users a feature where they can backup their data file to the cloud. I have a system in place where they can upload a file to the cloud and store it, now I want to make it a little easier by a menu op...
[ "wcf", "file-upload", "vb6", "asmx", "cloud" ]
1
0
1,158
2
0
2011-06-01T15:44:04.200000
2011-06-01T18:36:19.027000
6,203,923
6,203,971
Simple authentication script in PHP not working
Starting out with php, I have written a basic authentication script which prints out a list of database on a mysql server if a userid (supplied by user) exists in the user table of "test" database. The problem is that this script outputs database list even if the userid does not exist in the database. I am not sure wha...
Your script is full of errors. (I hope at least you have magic_quotes on otherwise you are in very big problem. Notice you should avoid anyway magic_quotes and use Prepared Statement) That's happen because of if(!($result_ptr=mysql_query("Select userid from user where Userid='$userid'",$link_id))) die ("Please enter co...
Simple authentication script in PHP not working Starting out with php, I have written a basic authentication script which prints out a list of database on a mysql server if a userid (supplied by user) exists in the user table of "test" database. The problem is that this script outputs database list even if the userid d...
TITLE: Simple authentication script in PHP not working QUESTION: Starting out with php, I have written a basic authentication script which prints out a list of database on a mysql server if a userid (supplied by user) exists in the user table of "test" database. The problem is that this script outputs database list ev...
[ "php" ]
1
3
244
2
0
2011-06-01T15:44:10.080000
2011-06-01T15:48:31.360000
6,203,925
6,204,206
15Bit Color Components, Bit shifting
Okay bit shifting is still a bit weird to me. I've got a 16bit value. The first 15 bits are colors and the last bit is alpha. I have done this with 24 and 32 bit colors no problem as they are nice byte size's to deal with, but I cant seem to get this to work with 15/16 bits. This is what I've done in the past, with 24/...
If I understand correctly: red = (packed >> 0) & 0x1F; green = (packed >> 5) & 0x1F; blue = (packed >> 10) & 0x1F; alpha = (packed >> 15) & 0x01; packed should better be an unsigned and I'm probably off for the order.
15Bit Color Components, Bit shifting Okay bit shifting is still a bit weird to me. I've got a 16bit value. The first 15 bits are colors and the last bit is alpha. I have done this with 24 and 32 bit colors no problem as they are nice byte size's to deal with, but I cant seem to get this to work with 15/16 bits. This is...
TITLE: 15Bit Color Components, Bit shifting QUESTION: Okay bit shifting is still a bit weird to me. I've got a 16bit value. The first 15 bits are colors and the last bit is alpha. I have done this with 24 and 32 bit colors no problem as they are nice byte size's to deal with, but I cant seem to get this to work with 1...
[ "c++", "bit-shift" ]
0
3
620
3
0
2011-06-01T15:44:19.667000
2011-06-01T16:04:09.703000
6,203,926
6,220,880
Is it possible set cookies in Application_error
I'm trying to see if I can set a cookie during the Application_Error() event of the global.asax. When I debug my application, it looks like the code adds the cookie but the next time it loads, the cookie is gone. It's recreating the cookie everytime. I tried it locally (using casini) or a a server. I beginning to think...
Sigh, it turned out that I wasn't checking my cookie properly. I was doing HttpCookie exist = Response.Cookies[keyName]; instead of HttpCookie exist = Request.Cookies[keyName];
Is it possible set cookies in Application_error I'm trying to see if I can set a cookie during the Application_Error() event of the global.asax. When I debug my application, it looks like the code adds the cookie but the next time it loads, the cookie is gone. It's recreating the cookie everytime. I tried it locally (u...
TITLE: Is it possible set cookies in Application_error QUESTION: I'm trying to see if I can set a cookie during the Application_Error() event of the global.asax. When I debug my application, it looks like the code adds the cookie but the next time it loads, the cookie is gone. It's recreating the cookie everytime. I t...
[ "c#", "asp.net", "asp.net-mvc-3", "cookies", "application-error" ]
1
1
728
2
0
2011-06-01T15:44:20.180000
2011-06-02T21:59:59.623000
6,203,931
6,204,009
Is there a way to disable my.cnf vertical setting from a shell script running mysql?
Because the vertical output mode of the mysql command is very nice, I've setup my environment to default the output to vertical layout. I've done this by creating c:\windows\my.cnf that contains [mysql] vertical Regrettably, all my mysql shell scripts also pick up on this setting, wreaking havoc with parsing the output...
there is the -E (or --vertical) switch to get the client act vertical this means you could try: mysql --vertical=false
Is there a way to disable my.cnf vertical setting from a shell script running mysql? Because the vertical output mode of the mysql command is very nice, I've setup my environment to default the output to vertical layout. I've done this by creating c:\windows\my.cnf that contains [mysql] vertical Regrettably, all my mys...
TITLE: Is there a way to disable my.cnf vertical setting from a shell script running mysql? QUESTION: Because the vertical output mode of the mysql command is very nice, I've setup my environment to default the output to vertical layout. I've done this by creating c:\windows\my.cnf that contains [mysql] vertical Regre...
[ "mysql", "shell", "scripting" ]
0
1
254
2
0
2011-06-01T15:44:36.230000
2011-06-01T15:52:13.043000
6,203,932
6,261,905
How to get handle of the current workbook's window?
How to get handle of the main window of the current workbook?
Actually, there is only one window that mimics multi-window behavior; thus, getting Application.Hwnd is enough
How to get handle of the current workbook's window? How to get handle of the main window of the current workbook?
TITLE: How to get handle of the current workbook's window? QUESTION: How to get handle of the main window of the current workbook? ANSWER: Actually, there is only one window that mimics multi-window behavior; thus, getting Application.Hwnd is enough
[ "excel", "vsto" ]
2
3
3,647
3
0
2011-06-01T15:44:38.133000
2011-06-07T07:28:41.873000
6,203,941
6,204,002
Should a RESTful HTTP request that doesn't directly result in data manipulation, but triggers manipulation, have an action of GET, PUT or POST?
Here's a question for you RESTful nerds. Allow me to set the stage. Say I have a remote system called ChickenShack and a local system called BurgerShack, both of which are integrated such that each system maintains a "synchronized" copy of entity data. When a change occurs to entities on ChickenShack, it sends a collec...
I'd opt for a POST because: it does change state in BurgerShack (I don't think it's idempotent, because it triggers the GETs from BurgerShack to ChickenShack) it does not create a new resource at that specific URL (which rules out PUT )
Should a RESTful HTTP request that doesn't directly result in data manipulation, but triggers manipulation, have an action of GET, PUT or POST? Here's a question for you RESTful nerds. Allow me to set the stage. Say I have a remote system called ChickenShack and a local system called BurgerShack, both of which are inte...
TITLE: Should a RESTful HTTP request that doesn't directly result in data manipulation, but triggers manipulation, have an action of GET, PUT or POST? QUESTION: Here's a question for you RESTful nerds. Allow me to set the stage. Say I have a remote system called ChickenShack and a local system called BurgerShack, both...
[ "http", "rest" ]
7
9
251
1
0
2011-06-01T15:45:49.910000
2011-06-01T15:51:28.977000
6,203,943
6,203,967
operator<< stackoverflow
Consider the following code: class TextMessage{ public: TextMessage(){}; TextMessage(std::string _text):text(_text){} std::string text; friend std::ostream & operator<<( std::ostream & os, const TextMessage & m); }; std::ostream & operator<<( std::ostream & os, const TextMessage & m){ return os << "text message: " << m...
I'm guessing that you failed to #include. Thus, when the compiler comes to output a std::string, it can't, and starts looking for implicit conversions- and your implicit constructor to a TextMessage looks like just the bill. But wait- now we're outputting a TextMessage in the TextMessage's output function, and bam.
operator<< stackoverflow Consider the following code: class TextMessage{ public: TextMessage(){}; TextMessage(std::string _text):text(_text){} std::string text; friend std::ostream & operator<<( std::ostream & os, const TextMessage & m); }; std::ostream & operator<<( std::ostream & os, const TextMessage & m){ return os...
TITLE: operator<< stackoverflow QUESTION: Consider the following code: class TextMessage{ public: TextMessage(){}; TextMessage(std::string _text):text(_text){} std::string text; friend std::ostream & operator<<( std::ostream & os, const TextMessage & m); }; std::ostream & operator<<( std::ostream & os, const TextMessa...
[ "c++", "visual-studio-2010" ]
8
15
669
3
0
2011-06-01T15:45:54.427000
2011-06-01T15:48:18.120000
6,203,944
6,204,017
Problem with dynamic load graphics in as3
I make some game, I use I lot of graphics. I make class that have all graphics for example for menu: public class MenuGFX { [Embed(source = '../../assets/graphics/menu/background.png')] public static const backgroundGFX:Class; [Embed(source='../../assets/graphics/menu/startD.png')] public static const startDGFX:Class; ...
The class MenuGFX will not be compiled into your SWF if the class itself is no where referenced / used within your project source code. It should be enough to call new MenuGFX somewhere in your application (may be in your Main class). The compiler has to know that this class will be used somewhere in your application o...
Problem with dynamic load graphics in as3 I make some game, I use I lot of graphics. I make class that have all graphics for example for menu: public class MenuGFX { [Embed(source = '../../assets/graphics/menu/background.png')] public static const backgroundGFX:Class; [Embed(source='../../assets/graphics/menu/startD.pn...
TITLE: Problem with dynamic load graphics in as3 QUESTION: I make some game, I use I lot of graphics. I make class that have all graphics for example for menu: public class MenuGFX { [Embed(source = '../../assets/graphics/menu/background.png')] public static const backgroundGFX:Class; [Embed(source='../../assets/graph...
[ "actionscript-3" ]
6
3
370
1
0
2011-06-01T15:45:55.720000
2011-06-01T15:52:42.693000
6,203,955
6,204,848
ruby/rails - creating an inverted tree from active record find
I have been playing around with this and wanted to get a second opinion. Here is the problem - I want to order these results by who the person reports to (i.e. there boss) --- -!ruby/object:History attributes: id: 1392 job_title: Global Leader reports_to: attributes_cache: {} -!ruby/object:History attributes: id: 1393...
maybe you can achieve same goal using Enumerable#group_by, see docs candidates.group_by(&:reports_to)
ruby/rails - creating an inverted tree from active record find I have been playing around with this and wanted to get a second opinion. Here is the problem - I want to order these results by who the person reports to (i.e. there boss) --- -!ruby/object:History attributes: id: 1392 job_title: Global Leader reports_to: a...
TITLE: ruby/rails - creating an inverted tree from active record find QUESTION: I have been playing around with this and wanted to get a second opinion. Here is the problem - I want to order these results by who the person reports to (i.e. there boss) --- -!ruby/object:History attributes: id: 1392 job_title: Global Le...
[ "ruby-on-rails", "ruby" ]
1
1
139
1
0
2011-06-01T15:46:43.060000
2011-06-01T16:53:15.430000
6,203,961
6,215,973
Problems in configuring OpenWrt for socket programming
I have a code which receives packets from the Ethernet and sends it via wireless network. This works on a wireless box which uses OpenWrt. The code is written below. It gives me the following error at runtime. Based on the printf statements I feel the error is somewhere on this syntax, but I cant figure out whats wrong...
In the main(), replace v2vmessage* buf by v2vmessage buf and in the following while(1), replace the buf by &buf to solve the problem. Since, no memory was allocated to the pointer, hence it gave an error at runtime.
Problems in configuring OpenWrt for socket programming I have a code which receives packets from the Ethernet and sends it via wireless network. This works on a wireless box which uses OpenWrt. The code is written below. It gives me the following error at runtime. Based on the printf statements I feel the error is some...
TITLE: Problems in configuring OpenWrt for socket programming QUESTION: I have a code which receives packets from the Ethernet and sends it via wireless network. This works on a wireless box which uses OpenWrt. The code is written below. It gives me the following error at runtime. Based on the printf statements I feel...
[ "c++", "sockets", "g++", "openwrt" ]
0
1
2,679
3
0
2011-06-01T15:47:56.953000
2011-06-02T14:34:13.550000
6,203,964
6,208,095
need help with excel vlookup
=IF(N101<>"",ROUND(VLOOKUP($N101,$I$30:$U$39,12,FALSE)/(1-(U$96+U$98)),0),0) That is the current VLOOKUP in the spreadsheet that is returning the wrong data. I didnt write it, it was on a spreadsheet before i came to the company. What I want to happen is look up the value in $N101 then i want it to find the row that is...
Try =IF(N101<>"",ROUND(VLOOKUP($N101,$I$30:$U$39,#COL,FALSE)/(1-(U$96+U$98)),0),0) where #COL is the integer that corresponds to the column containing the resulting value from K$30-J$30 (for example).
need help with excel vlookup =IF(N101<>"",ROUND(VLOOKUP($N101,$I$30:$U$39,12,FALSE)/(1-(U$96+U$98)),0),0) That is the current VLOOKUP in the spreadsheet that is returning the wrong data. I didnt write it, it was on a spreadsheet before i came to the company. What I want to happen is look up the value in $N101 then i wa...
TITLE: need help with excel vlookup QUESTION: =IF(N101<>"",ROUND(VLOOKUP($N101,$I$30:$U$39,12,FALSE)/(1-(U$96+U$98)),0),0) That is the current VLOOKUP in the spreadsheet that is returning the wrong data. I didnt write it, it was on a spreadsheet before i came to the company. What I want to happen is look up the value ...
[ "excel", "vlookup" ]
0
1
460
2
0
2011-06-01T15:48:05.387000
2011-06-01T21:43:47.860000
6,203,984
6,204,025
Combining the meta description and Open Graph Protocol description into one tag
Is it possible to combine the meta description and Open Graph Protocol description… …into one when they contain the same content?
Yes, you can combine them. To test it, I made the simple HTML page below, uploaded it to a server, then ran the page through Facebook's URL Linter. It reported no warnings related to the description tag (only about the missing og:image tag) and correctly read the description. Test Note that, if the og:url value is diff...
Combining the meta description and Open Graph Protocol description into one tag Is it possible to combine the meta description and Open Graph Protocol description… …into one when they contain the same content?
TITLE: Combining the meta description and Open Graph Protocol description into one tag QUESTION: Is it possible to combine the meta description and Open Graph Protocol description… …into one when they contain the same content? ANSWER: Yes, you can combine them. To test it, I made the simple HTML page below, uploaded ...
[ "html", "tags", "header", "facebook-graph-api" ]
48
60
17,982
2
0
2011-06-01T14:36:15.530000
2011-06-01T15:53:03.993000
6,203,985
6,204,166
STS / Eclipse JVM max heap lower than free memory on machine
I'm trying to increase my max heap in eclipse / STS. I find that the ceiling seems much lower than my free memory. Windows reports 2G available memory in the Task Manager. It appears that the JVM in Eclipse is only able to allocate around 1.2G of that. In the config below found in the eclipse.ini if I change the -Xmx t...
This is typically the Windows 2Gb/DLL process limit for 32-bit systems. Java usually (and therefore Eclipse) allocates a contiguous block of memory for its heap. Windows only allows a maximum (normally) of 2Gb for a process on a 32-bit system. (There are some tricks to raise that to 3Gb.) The annoying issue is that Win...
STS / Eclipse JVM max heap lower than free memory on machine I'm trying to increase my max heap in eclipse / STS. I find that the ceiling seems much lower than my free memory. Windows reports 2G available memory in the Task Manager. It appears that the JVM in Eclipse is only able to allocate around 1.2G of that. In the...
TITLE: STS / Eclipse JVM max heap lower than free memory on machine QUESTION: I'm trying to increase my max heap in eclipse / STS. I find that the ceiling seems much lower than my free memory. Windows reports 2G available memory in the Task Manager. It appears that the JVM in Eclipse is only able to allocate around 1....
[ "eclipse", "jvm" ]
0
2
1,500
1
0
2011-06-01T15:49:56.473000
2011-06-01T16:01:23.880000
6,203,991
6,204,090
How do I restrict my driver from working for thirdparty applications?
How do I restrict my webcam driver from being used by other applications? I don't want other applications to use it. It should only work with my application. Anyway I can achieve this in C#? The driver is developed by a different company and we're just getting the software done. I understand that its not fair to ask th...
Without rewriting the driver, adding a bunch of checks that could probably be got around by someone who decompiles the code and sees what they are and duplicates them, or by adding DRM at a driver level, which will annoy users and be a maintenance nightmare? You can't. Device drivers expose a device to the system, not ...
How do I restrict my driver from working for thirdparty applications? How do I restrict my webcam driver from being used by other applications? I don't want other applications to use it. It should only work with my application. Anyway I can achieve this in C#? The driver is developed by a different company and we're ju...
TITLE: How do I restrict my driver from working for thirdparty applications? QUESTION: How do I restrict my webcam driver from being used by other applications? I don't want other applications to use it. It should only work with my application. Anyway I can achieve this in C#? The driver is developed by a different co...
[ "c#", "device-driver" ]
0
3
62
1
0
2011-06-01T15:50:38.290000
2011-06-01T15:56:58.710000
6,203,995
6,204,100
Empty class object in Python
I'm teaching a Python class on object-oriented programming and as I'm brushing up on how to explain classes, I saw an empty class definition: class Employee: pass The example then goes on to define a name and other attributes for an object of this class: john = Employee() john.full_name = "john doe" Interesting! I'm wo...
A class is more or less a fancy wrapper for a dict of attributes to objects. When you instantiate a class you can assign to its attributes, and those will be stored in foo.__dict__; likewise, you can look in foo.__dict__ for any attributes you have already written. This means you can do some neat dynamic things like: c...
Empty class object in Python I'm teaching a Python class on object-oriented programming and as I'm brushing up on how to explain classes, I saw an empty class definition: class Employee: pass The example then goes on to define a name and other attributes for an object of this class: john = Employee() john.full_name = "...
TITLE: Empty class object in Python QUESTION: I'm teaching a Python class on object-oriented programming and as I'm brushing up on how to explain classes, I saw an empty class definition: class Employee: pass The example then goes on to define a name and other attributes for an object of this class: john = Employee() ...
[ "python", "oop", "empty-class" ]
64
51
79,968
4
0
2011-06-01T15:50:56.147000
2011-06-01T15:57:29.943000
6,204,003
6,204,329
Kill a Process by Looking up the Port being used by it from a .BAT
In Windows what can look for port 8080 and try to kill the process it is using through a.BAT file?
Here's a command to get you started: FOR /F "tokens=4 delims= " %%P IN ('netstat -a -n -o ^| findstr:8080') DO @ECHO TaskKill.exe /PID %%P When you're confident in your batch file, remove @ECHO. FOR /F "tokens=4 delims= " %%P IN ('netstat -a -n -o ^| findstr:8080') DO TaskKill.exe /PID %%P Note that you might need to c...
Kill a Process by Looking up the Port being used by it from a .BAT In Windows what can look for port 8080 and try to kill the process it is using through a.BAT file?
TITLE: Kill a Process by Looking up the Port being used by it from a .BAT QUESTION: In Windows what can look for port 8080 and try to kill the process it is using through a.BAT file? ANSWER: Here's a command to get you started: FOR /F "tokens=4 delims= " %%P IN ('netstat -a -n -o ^| findstr:8080') DO @ECHO TaskKill.e...
[ "windows", "batch-file", "process", "kill-process" ]
135
153
347,673
13
0
2011-06-01T15:51:30.773000
2011-06-01T16:13:30.967000
6,204,012
6,204,486
Problem using CSS to specify width of form submit button to be same as width of anchor
I have a basic menu that is built up of some div's and anchors. In some instances however, instead of an anchor I need to use a form > (it's a template for mobiles so I can't use javascript here, I have to use a submit button that will submit the form data). My problem I have been struggling with for hours now is to ge...
Firstly, you should be sharing the same CSS class between all elements that are intended to look the same. It means less CSS, and less maintenance. To solve your issue, you need to put the classname on the DIV surrounding the INPUT, and then apply some custom styling to the input to make it fill the DIV. You can emulat...
Problem using CSS to specify width of form submit button to be same as width of anchor I have a basic menu that is built up of some div's and anchors. In some instances however, instead of an anchor I need to use a form > (it's a template for mobiles so I can't use javascript here, I have to use a submit button that wi...
TITLE: Problem using CSS to specify width of form submit button to be same as width of anchor QUESTION: I have a basic menu that is built up of some div's and anchors. In some instances however, instead of an anchor I need to use a form > (it's a template for mobiles so I can't use javascript here, I have to use a sub...
[ "html", "css", "input", "width", "submit" ]
4
6
6,671
2
0
2011-06-01T15:52:19.163000
2011-06-01T16:23:36.837000
6,204,013
6,205,069
CodeIgniter Design Of Model
I have a user model that has properties such as username, password, first name, last name, address...etc What is the best way to have these properties set on the model so I can insert or update into the database? Should I have add, update..ect methods that take a whole list of parameters or just an array. My questions ...
One way is using CodeIgniter's models which I find rather anoying. CodeIgniter will just provide a Db object and you'll probably end up doing queries into the database. I use another way, with CI project I use Propel, which is an ORM (basically what you want to do) and it's relatively easy to integrate, you can get an ...
CodeIgniter Design Of Model I have a user model that has properties such as username, password, first name, last name, address...etc What is the best way to have these properties set on the model so I can insert or update into the database? Should I have add, update..ect methods that take a whole list of parameters or ...
TITLE: CodeIgniter Design Of Model QUESTION: I have a user model that has properties such as username, password, first name, last name, address...etc What is the best way to have these properties set on the model so I can insert or update into the database? Should I have add, update..ect methods that take a whole list...
[ "php", "codeigniter" ]
4
1
645
1
0
2011-06-01T15:52:21.770000
2011-06-01T17:09:31.653000
6,204,018
6,214,411
Limelight Video player (Shuffle functionality)
I figured out there is no functionality of SHUFFLE in you delve player. I am trying to implement such functionality using delve player's javascript api. Some strange reason we are not able to get this functionality because DelvePlayer.doSetMedia function is not working as it should under onMediaComplete event. Although...
I have resolved this issue after consult to limelight network team they suggested to put slight delay on call to doSetMedia() here is code snippet switch (eventName) { case 'onMediaComplete': t=setTimeout("DelvePlayer.doSetMedia('90ab7c3144c94337a8b94cf2c5c56407',true)",500); break; } thanks to Huw Morgan at LimeLig...
Limelight Video player (Shuffle functionality) I figured out there is no functionality of SHUFFLE in you delve player. I am trying to implement such functionality using delve player's javascript api. Some strange reason we are not able to get this functionality because DelvePlayer.doSetMedia function is not working as ...
TITLE: Limelight Video player (Shuffle functionality) QUESTION: I figured out there is no functionality of SHUFFLE in you delve player. I am trying to implement such functionality using delve player's javascript api. Some strange reason we are not able to get this functionality because DelvePlayer.doSetMedia function ...
[ "javascript", "video", "flash" ]
0
3
1,619
2
0
2011-06-01T15:52:46.490000
2011-06-02T12:19:23.700000
6,204,021
6,232,850
Get form name from iframe using AutoIt
I am using AutoIt to automate filling in forms on a website. But I am having a problem getting the form name from a website. I look at the source of the HTML and find form and its name, but I still get a IEStatus_noMatch error. Is there an easier way to get the form name or how to find it out? I might face this same pr...
I got this answer from AutoIt forum here There are two frames and the form is in the second frame so use $o_frame = _IEFrameGetCollection($oIE, 1) to get the second frame (index 1 is the second frame, index 0 would be the first). Then get the form from the frame by using: $o_form = _IEFormGetObjByName($o_frame, "logine...
Get form name from iframe using AutoIt I am using AutoIt to automate filling in forms on a website. But I am having a problem getting the form name from a website. I look at the source of the HTML and find form and its name, but I still get a IEStatus_noMatch error. Is there an easier way to get the form name or how to...
TITLE: Get form name from iframe using AutoIt QUESTION: I am using AutoIt to automate filling in forms on a website. But I am having a problem getting the form name from a website. I look at the source of the HTML and find form and its name, but I still get a IEStatus_noMatch error. Is there an easier way to get the f...
[ "html", "internet-explorer", "autoit" ]
6
7
7,632
2
0
2011-06-01T15:52:50.007000
2011-06-03T21:26:15.533000
6,204,029
6,204,532
Extending BaseHTTPRequestHandler - getting the posted data
I've seen this question, but I want to be able to access the data that's POST'd, external from the handler. Is there a way to do this? Following is the code: import BaseHTTPServer HOST_NAME = '' PORT_NUMBER=8088 postVars = '' class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler): def do_POST(s): s.send_response(20...
This because the postVars is locally affected in the MyHandler instance created by the HTTPServer. If you want to access it, declare postVars as a global variable at the start of do_POST method. def do_POST(s): global postVars s.send_response(200) s.end_headers() varLen = int(s.headers['Content-Length']) postVars = s.r...
Extending BaseHTTPRequestHandler - getting the posted data I've seen this question, but I want to be able to access the data that's POST'd, external from the handler. Is there a way to do this? Following is the code: import BaseHTTPServer HOST_NAME = '' PORT_NUMBER=8088 postVars = '' class MyHandler(BaseHTTPServer.B...
TITLE: Extending BaseHTTPRequestHandler - getting the posted data QUESTION: I've seen this question, but I want to be able to access the data that's POST'd, external from the handler. Is there a way to do this? Following is the code: import BaseHTTPServer HOST_NAME = '' PORT_NUMBER=8088 postVars = '' class MyHandle...
[ "python", "http", "networking", "variables" ]
6
10
12,586
2
0
2011-06-01T15:53:05.287000
2011-06-01T16:27:07.133000
6,204,037
6,204,343
Does all childs must be created on createChildren function on ItemRenderer?
Do I need to create all objects which i will possible use with itemRenderer in createChildren function, even if the current item must not show some of them?
createChildren() is for creating child components which lives along all host component's life-cycle. These children and their count are immutable like label of a button or border of a border container. To create or remove dynamic children it is better to use commitProperies() or updateDisplayList(). The latter is more ...
Does all childs must be created on createChildren function on ItemRenderer? Do I need to create all objects which i will possible use with itemRenderer in createChildren function, even if the current item must not show some of them?
TITLE: Does all childs must be created on createChildren function on ItemRenderer? QUESTION: Do I need to create all objects which i will possible use with itemRenderer in createChildren function, even if the current item must not show some of them? ANSWER: createChildren() is for creating child components which live...
[ "apache-flex", "actionscript-3", "itemrenderer" ]
3
3
712
2
0
2011-06-01T15:54:05.587000
2011-06-01T16:14:29.743000
6,204,039
6,204,106
Debug Rails Active Record Query
Is there a way debug ActiveRecord queries before they are executed rather than after?
You can call.to_sql on the end of the query to output the sql that it generates like so: SomeModel.where(:stuff => 'is here').to_sql
Debug Rails Active Record Query Is there a way debug ActiveRecord queries before they are executed rather than after?
TITLE: Debug Rails Active Record Query QUESTION: Is there a way debug ActiveRecord queries before they are executed rather than after? ANSWER: You can call.to_sql on the end of the query to output the sql that it generates like so: SomeModel.where(:stuff => 'is here').to_sql
[ "ruby-on-rails", "activerecord" ]
2
12
2,159
1
0
2011-06-01T15:54:13.510000
2011-06-01T15:57:49.803000
6,204,040
6,204,062
select background-image of div value with jquery
I'm trying to get the css value of the background-image of some div, but i don't know how. I know that i can have all the style using the method attribute $(document).ready(initialize); var imageAux; function initialize() { $(".imagePanel").click(function () { var aux = $(this); if (imageSelected!= aux) { if (ima...
Use the jQuery.css function imageAux.css('background-image');
select background-image of div value with jquery I'm trying to get the css value of the background-image of some div, but i don't know how. I know that i can have all the style using the method attribute $(document).ready(initialize); var imageAux; function initialize() { $(".imagePanel").click(function () { var au...
TITLE: select background-image of div value with jquery QUESTION: I'm trying to get the css value of the background-image of some div, but i don't know how. I know that i can have all the style using the method attribute $(document).ready(initialize); var imageAux; function initialize() { $(".imagePanel").click(fun...
[ "jquery", "jquery-selectors" ]
0
4
1,818
2
0
2011-06-01T15:54:16.417000
2011-06-01T15:55:16.863000
6,204,045
6,206,825
Asp.Net MVC Binding. Get List<Model> at controller
I've got view: @using (Html.BeginForm("ProcessRoute", "Calculator")) { @Html.TextBox("CityArrival", null, new { @style = "width: 300px;" }) @Html.TextBox("CityDeparture", null, new { @style = "width: 300px;" }) @{ Html.RenderPartial("BusModelList", @Model.BusModels); } } partial view: @model List @foreach (var item in...
You need to look at what you are sending to the browser. In order for the BusModels parameter to be populated, you need to send to the browser something like: Notice that the only thing that changed in the name is the value inside of the square brackets. There are other ways to do this, but they are all variants on thi...
Asp.Net MVC Binding. Get List<Model> at controller I've got view: @using (Html.BeginForm("ProcessRoute", "Calculator")) { @Html.TextBox("CityArrival", null, new { @style = "width: 300px;" }) @Html.TextBox("CityDeparture", null, new { @style = "width: 300px;" }) @{ Html.RenderPartial("BusModelList", @Model.BusModels); ...
TITLE: Asp.Net MVC Binding. Get List<Model> at controller QUESTION: I've got view: @using (Html.BeginForm("ProcessRoute", "Calculator")) { @Html.TextBox("CityArrival", null, new { @style = "width: 300px;" }) @Html.TextBox("CityDeparture", null, new { @style = "width: 300px;" }) @{ Html.RenderPartial("BusModelList", @...
[ "asp.net-mvc", "binding", "partial-views" ]
2
2
5,783
1
0
2011-06-01T15:54:28.510000
2011-06-01T19:51:00.483000
6,204,047
6,243,669
How do you get a gwt label to fill a grid cell?
I have a gwt label and I place it into a gwt grid. I have some events on the label. So I need the label to fill up the entire grid cell... otherwise the mouse over events won't trigger. Currently I am doing a setWidth("100%) and setHeight("100%) on the label. This gets the label to fill horizontally... but I can't get ...
To capture the event on a cell you could use set a clickhandler on the grid and check if the passed cell in the event is the label cell you need to handle. This way you can certainly have an event that is triggered for the whole cell content. The reason the cell is not filled 100% is very likely because the table (by d...
How do you get a gwt label to fill a grid cell? I have a gwt label and I place it into a gwt grid. I have some events on the label. So I need the label to fill up the entire grid cell... otherwise the mouse over events won't trigger. Currently I am doing a setWidth("100%) and setHeight("100%) on the label. This gets th...
TITLE: How do you get a gwt label to fill a grid cell? QUESTION: I have a gwt label and I place it into a gwt grid. I have some events on the label. So I need the label to fill up the entire grid cell... otherwise the mouse over events won't trigger. Currently I am doing a setWidth("100%) and setHeight("100%) on the l...
[ "gwt" ]
1
1
1,047
2
0
2011-06-01T15:54:31.683000
2011-06-05T14:59:16.853000
6,204,058
6,204,335
Retrieve where clauses in CodeIgniter Activerecord
Is there a way to retrieve what the "where" clauses i have added in my query? I use a foreach statement to add the columns I want to add in the where clause for the current query but, since the clause could be empty (no columns added, 0 iterations in the foreach) the query would retrieve all the records in the database...
Not directly: its a bit of a hack, but you can do this: if(! empty($this->db->ar_where)) Try that and see if it works.
Retrieve where clauses in CodeIgniter Activerecord Is there a way to retrieve what the "where" clauses i have added in my query? I use a foreach statement to add the columns I want to add in the where clause for the current query but, since the clause could be empty (no columns added, 0 iterations in the foreach) the q...
TITLE: Retrieve where clauses in CodeIgniter Activerecord QUESTION: Is there a way to retrieve what the "where" clauses i have added in my query? I use a foreach statement to add the columns I want to add in the where clause for the current query but, since the clause could be empty (no columns added, 0 iterations in ...
[ "mysql", "codeigniter", "activerecord" ]
1
2
521
2
0
2011-06-01T15:55:08.440000
2011-06-01T16:13:57.837000
6,204,077
6,206,700
Devise - Confirmable not sending emails
Just to get it out of the way: I do have emails working in my app. I just added:confirmable to my user model. app/models/user.rb devise:database_authenticatable,:registerable,:omniauthable,:recoverable,:rememberable,:trackable,:validatable,:confirmable I do have the confirmable part in the db: db/schema.rb create_table...
Ok, so I didn't realize I had the following in my user model: def send_confirmation_instructions # stops Devise from automatically sending a confirmation email end def confirmation_required? skip_confirmation! end Commenting them out gets the email to be sent. Still trying to figure out how to redirect after sign in i...
Devise - Confirmable not sending emails Just to get it out of the way: I do have emails working in my app. I just added:confirmable to my user model. app/models/user.rb devise:database_authenticatable,:registerable,:omniauthable,:recoverable,:rememberable,:trackable,:validatable,:confirmable I do have the confirmable p...
TITLE: Devise - Confirmable not sending emails QUESTION: Just to get it out of the way: I do have emails working in my app. I just added:confirmable to my user model. app/models/user.rb devise:database_authenticatable,:registerable,:omniauthable,:recoverable,:rememberable,:trackable,:validatable,:confirmable I do have...
[ "ruby-on-rails", "devise" ]
4
2
3,843
1
0
2011-06-01T15:56:03.517000
2011-06-01T19:40:18.350000
6,204,079
6,204,121
"Best" way to generate ~500 smallish images, either in JavaScript or server-side C
This is my very first attempt at generating images on the fly. I want to display around 500 small -- say, 32px X 24px -- 16-color images, each in a table cell. Each image (as I see it now) is a 2D array of colored pixels, each representing a value furnished by C-language CGI. The finished, displayed image is a prmitive...
If you ask me what is the fastest quickest cheapest I have no dubt about it: http://code.google.com/apis/chart/ You can delegate all the dirty job to google' server. And that's not bad at all.
"Best" way to generate ~500 smallish images, either in JavaScript or server-side C This is my very first attempt at generating images on the fly. I want to display around 500 small -- say, 32px X 24px -- 16-color images, each in a table cell. Each image (as I see it now) is a 2D array of colored pixels, each representi...
TITLE: "Best" way to generate ~500 smallish images, either in JavaScript or server-side C QUESTION: This is my very first attempt at generating images on the fly. I want to display around 500 small -- say, 32px X 24px -- 16-color images, each in a table cell. Each image (as I see it now) is a 2D array of colored pixel...
[ "javascript", "c", "image-processing", "cgi" ]
1
4
126
2
0
2011-06-01T15:56:06.060000
2011-06-01T15:58:28.797000
6,204,083
6,204,114
viewDidLoad becomes an infinite loop. HELP
This is probably the easiest/lamest question. So I am trying to initialize an array with values 0 to 3 increments of 0.25 in the viewDidLoad method, and I can see an infinite loop here. NSArray *pickArray3 = [[NSMutableArray alloc] init]; int i = 0; //for(i = 0.25; i<=3; i=i+0.25) while (i<3) { //NSString *myString = [...
Your i is an integer, it will never increment adding 0.25. Use a float or double. **float** i = 0; //for(i = 0.25; i<=3; i=i+0.25) while (i<3) { //NSString *myString = [NSString stringWithFormat:@"**%f**", i]; i=i+0.25; NSLog(@"The Value of i is **%f**", i ); //[pickArray3 addObject:myString]; // Add the string to the ...
viewDidLoad becomes an infinite loop. HELP This is probably the easiest/lamest question. So I am trying to initialize an array with values 0 to 3 increments of 0.25 in the viewDidLoad method, and I can see an infinite loop here. NSArray *pickArray3 = [[NSMutableArray alloc] init]; int i = 0; //for(i = 0.25; i<=3; i=i+0...
TITLE: viewDidLoad becomes an infinite loop. HELP QUESTION: This is probably the easiest/lamest question. So I am trying to initialize an array with values 0 to 3 increments of 0.25 in the viewDidLoad method, and I can see an infinite loop here. NSArray *pickArray3 = [[NSMutableArray alloc] init]; int i = 0; //for(i =...
[ "iphone", "objective-c", "xcode", "loops", "viewdidload" ]
0
3
283
3
0
2011-06-01T15:56:29.663000
2011-06-01T15:58:06.917000
6,204,088
6,204,426
Requesting assist with postgresql query
Hey everyone. Here is my situation... I need to craft a sql query against a postgresql server that will return all records created within the past 5 minutes, rounded down to the lowest minute. So if cron kicks the query off at 12:05:25.000, it needs to query all records created since 12:00:00.000. So I guess I really h...
The syntax is your date_trunc is a bit off: select * from callhistory where created > date_trunc('minute', current_timestamp - interval '5' minute) You could also use now() in place of current_timestamp: select * from callhistory where created > date_trunc('minute', now() - interval '5' minute) And an example: => creat...
Requesting assist with postgresql query Hey everyone. Here is my situation... I need to craft a sql query against a postgresql server that will return all records created within the past 5 minutes, rounded down to the lowest minute. So if cron kicks the query off at 12:05:25.000, it needs to query all records created s...
TITLE: Requesting assist with postgresql query QUESTION: Hey everyone. Here is my situation... I need to craft a sql query against a postgresql server that will return all records created within the past 5 minutes, rounded down to the lowest minute. So if cron kicks the query off at 12:05:25.000, it needs to query all...
[ "postgresql" ]
0
2
141
2
0
2011-06-01T15:56:52.467000
2011-06-01T16:18:58.330000
6,204,091
6,204,222
How to check if the web page is submitted only 3 times?
I have web form in which I have to make sure that 'SUBMIT' button is being clicked no more than 3 times. I have some logic in the form which restricts the user to enter anything after 3 failed attempts. This is my logic, but I know this is not right: protected void btnSubmit_Click(object sender, EventArgs e) { int coun...
Save the variable in the ViewState of the page. Initialize its value on the first load of the page: void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { this.ViewState["Count"] = 0; } } On the Button.Click event increase the value of the count variable: protected void btnSubmit_Click(object sender, Even...
How to check if the web page is submitted only 3 times? I have web form in which I have to make sure that 'SUBMIT' button is being clicked no more than 3 times. I have some logic in the form which restricts the user to enter anything after 3 failed attempts. This is my logic, but I know this is not right: protected voi...
TITLE: How to check if the web page is submitted only 3 times? QUESTION: I have web form in which I have to make sure that 'SUBMIT' button is being clicked no more than 3 times. I have some logic in the form which restricts the user to enter anything after 3 failed attempts. This is my logic, but I know this is not ri...
[ "c#", "asp.net", "webforms" ]
1
1
663
6
0
2011-06-01T15:57:06.207000
2011-06-01T16:05:20.557000
6,204,096
6,211,891
Twitter timeline - How to include retweets?
This loads up a Twitter feed and displays the last tweet. Is there a way to include and retrieve all the retweets in this function? $(document).ready(function() { var url = "http://twitter.com/status/user_timeline/mytwittername.json?count=3&callback=?"; var lastClass = ""; $.getJSON(url, function(data){ $.each(data, fu...
Modify the url variable in your code to be the following: http://api.twitter.com/1/statuses/user_timeline/mytwittername.json?count=3&include_rts=1&callback=? The magic is in the include_rts=1 parameter which will cause retweets by the target user to be included in their timeline. The statuses/user_timeline method does ...
Twitter timeline - How to include retweets? This loads up a Twitter feed and displays the last tweet. Is there a way to include and retrieve all the retweets in this function? $(document).ready(function() { var url = "http://twitter.com/status/user_timeline/mytwittername.json?count=3&callback=?"; var lastClass = ""; $....
TITLE: Twitter timeline - How to include retweets? QUESTION: This loads up a Twitter feed and displays the last tweet. Is there a way to include and retrieve all the retweets in this function? $(document).ready(function() { var url = "http://twitter.com/status/user_timeline/mytwittername.json?count=3&callback=?"; var ...
[ "json", "twitter" ]
4
6
3,389
2
0
2011-06-01T15:57:25.607000
2011-06-02T07:54:15.757000
6,204,097
6,204,344
Codeigniter passing two values on callback (form_validation)
I'm trying to pass two values to a function, so that i can check the username and password for the users. However, i can't get it to work. When i have one value, there is ne problem doing this. But how can i pass more than one value? function($val1, $val2) This is my code http://pastebin.com/JKnTEqLN
If you want to pass two variables to your function, change line 6 $this->form_validation->set_rules('username', 'Username', 'required|alpha|xss_clean|callback__check_login'); to $this->form_validation->set_rules('username', 'Username', 'required|alpha|xss_clean|callback__check_login[$val1,$val2]'); For more than two va...
Codeigniter passing two values on callback (form_validation) I'm trying to pass two values to a function, so that i can check the username and password for the users. However, i can't get it to work. When i have one value, there is ne problem doing this. But how can i pass more than one value? function($val1, $val2) Th...
TITLE: Codeigniter passing two values on callback (form_validation) QUESTION: I'm trying to pass two values to a function, so that i can check the username and password for the users. However, i can't get it to work. When i have one value, there is ne problem doing this. But how can i pass more than one value? functio...
[ "php", "oop", "codeigniter", "frameworks" ]
2
3
2,229
3
0
2011-06-01T15:57:26.237000
2011-06-01T16:14:30.467000
6,204,098
6,204,136
How to compare first N bytes of binary files in Linux
I have two binary files with different sizes. I need to compare first N bytes of these files in Linux. I expect that the result is either "yes" (the same) or "no" (not the same), not byte-to-byte comparing. The N may vary from KBs to GBs. Currently I'm using the following approach: head -c N input1.dat | rdiff signatur...
Try cmp: cmp -n file1 file2 From the man page: exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
How to compare first N bytes of binary files in Linux I have two binary files with different sizes. I need to compare first N bytes of these files in Linux. I expect that the result is either "yes" (the same) or "no" (not the same), not byte-to-byte comparing. The N may vary from KBs to GBs. Currently I'm using the fol...
TITLE: How to compare first N bytes of binary files in Linux QUESTION: I have two binary files with different sizes. I need to compare first N bytes of these files in Linux. I expect that the result is either "yes" (the same) or "no" (not the same), not byte-to-byte comparing. The N may vary from KBs to GBs. Currently...
[ "linux", "diff", "binaryfiles" ]
11
25
7,259
1
0
2011-06-01T15:57:27.213000
2011-06-01T15:59:10.397000
6,204,099
6,204,242
I would like to have a spanish/english link on a master page that will take you to the current page in the other language and not to the 'home' page
I have a Visual Studio C#.NET project. I have two master templates. One for the original website in english. And a second master page for the Spanish version of the website. In both master pages, there's a link that says "English" (or Spanish). This link will take the user to the translation of the website in the other...
Assuming you have an HtmlAnchor in your masterpage, you could replace the language folder in the link with the other language folder in your url. void SetLanguageLinkUrl() { string url = Request.Url.PathAndQuery.ToString().ToLowerInvariant(); if(url.StartsWith("/en/")) languageLink.HRef = url.Replace("/en/", "/es/"); e...
I would like to have a spanish/english link on a master page that will take you to the current page in the other language and not to the 'home' page I have a Visual Studio C#.NET project. I have two master templates. One for the original website in english. And a second master page for the Spanish version of the websit...
TITLE: I would like to have a spanish/english link on a master page that will take you to the current page in the other language and not to the 'home' page QUESTION: I have a Visual Studio C#.NET project. I have two master templates. One for the original website in english. And a second master page for the Spanish ver...
[ "javascript", ".net", "html", "master-pages" ]
0
1
206
1
0
2011-06-01T15:57:29.200000
2011-06-01T16:06:41.830000
6,204,104
6,204,150
overloading/implicit operator for 'as'
class Person { string Name; int Age; } I want to be able to cast a string to Person implicitly like following var mrFoo = "Foo" as Person; I know I can do the following by defining implicit casting Person mrFoo = "Foo"; But I'm specific to use "as" operator
No, you can't do that. The "as" operator never uses user-defined conversions - only reference conversions and unboxing conversions. Basically, the reference in question already has to be the right type. Personally I would strongly advise you to stay away from conversion operators (especially implicit ones) for the vast...
overloading/implicit operator for 'as' class Person { string Name; int Age; } I want to be able to cast a string to Person implicitly like following var mrFoo = "Foo" as Person; I know I can do the following by defining implicit casting Person mrFoo = "Foo"; But I'm specific to use "as" operator
TITLE: overloading/implicit operator for 'as' QUESTION: class Person { string Name; int Age; } I want to be able to cast a string to Person implicitly like following var mrFoo = "Foo" as Person; I know I can do the following by defining implicit casting Person mrFoo = "Foo"; But I'm specific to use "as" operator ANSW...
[ "c#", "operator-overloading" ]
7
21
5,435
3
0
2011-06-01T15:57:41.587000
2011-06-01T15:59:56.513000
6,204,107
6,256,994
Free form Dynamic web.config region
With the release of.NET4 has anyone ever created a dynamic web.config element that will just let you type anything you want into the config and then you can access it all off a dynamic object? The amount of work that goes into creating custom config sections is just over the top for seemingly no reason. This has lead m...
If you just want to access the appSettings section of the configuration file, you can inherit from the DynamicObject class and override the TryGetMember method: public class DynamicSettings: DynamicObject { public DynamicSettings(NameValueCollection settings) { items = settings; } private readonly NameValueCollection ...
Free form Dynamic web.config region With the release of.NET4 has anyone ever created a dynamic web.config element that will just let you type anything you want into the config and then you can access it all off a dynamic object? The amount of work that goes into creating custom config sections is just over the top for ...
TITLE: Free form Dynamic web.config region QUESTION: With the release of.NET4 has anyone ever created a dynamic web.config element that will just let you type anything you want into the config and then you can access it all off a dynamic object? The amount of work that goes into creating custom config sections is just...
[ "c#", "dynamic", ".net-4.0", "web-config" ]
7
3
1,289
1
0
2011-06-01T15:57:50.103000
2011-06-06T19:29:35.403000
6,204,109
6,204,792
Regex get content between two pipes AND return a space where two pipes are next to each other with no spaces
How can I get all content between pipes and return a space where it comes across two pipes next to each other? An example string and desired output is: |test1| test2|test3 || test 4 | Result1: "test1" Result2: "test2" Result3: "test3" Result4: " " Result5: "test4" The closest I've got so far is: /[^\|]+)/ which will g...
In Ruby I'd not bother with a regex: str = '|test1| test2|test3 || test 4 |' str.split('|')[1.. -1].map{ |s| (s.strip.empty?)? ' ': s.strip } #=> ["test1", "test2", "test3", " ", "test 4"]
Regex get content between two pipes AND return a space where two pipes are next to each other with no spaces How can I get all content between pipes and return a space where it comes across two pipes next to each other? An example string and desired output is: |test1| test2|test3 || test 4 | Result1: "test1" Result2: ...
TITLE: Regex get content between two pipes AND return a space where two pipes are next to each other with no spaces QUESTION: How can I get all content between pipes and return a space where it comes across two pipes next to each other? An example string and desired output is: |test1| test2|test3 || test 4 | Result1:...
[ "ruby", "regex" ]
2
0
1,925
5
0
2011-06-01T15:57:54.367000
2011-06-01T16:48:18.847000
6,204,126
6,204,432
Save well-formed XML from PowerShell
I create an XmlDocument like this: $doc = New-Object xml Then, after filling it with nodes, I save it: $doc.Save($fileName) The problem is that it does not add the XML declaration to the beginning of the document, resulting in malformed document. In other words, it only saves a fragment. How can I add a correct XML dec...
You need to use the XmlTextWriter class to format the output. Here is a sample, though you may want to evolve it for any specific needs you have beyond adding the header: $doc = [xml]" Value " $sb = New-Object System.Text.StringBuilder $sw = New-Object System.IO.StringWriter($sb) $writer = New-Object System.Xml.XmlText...
Save well-formed XML from PowerShell I create an XmlDocument like this: $doc = New-Object xml Then, after filling it with nodes, I save it: $doc.Save($fileName) The problem is that it does not add the XML declaration to the beginning of the document, resulting in malformed document. In other words, it only saves a frag...
TITLE: Save well-formed XML from PowerShell QUESTION: I create an XmlDocument like this: $doc = New-Object xml Then, after filling it with nodes, I save it: $doc.Save($fileName) The problem is that it does not add the XML declaration to the beginning of the document, resulting in malformed document. In other words, it...
[ "xml", "powershell" ]
9
11
17,056
2
0
2011-06-01T15:58:37.047000
2011-06-01T16:19:17.943000
6,204,140
6,204,280
How exactly does an iPhone user interface object work?
I set about designing my own class to hold a series of radio buttons. In doing this, I explored how apple created their own classes, but struggled to work out exactly how things such as UILabel or UIButton worked. Looking at UILabel.h, in UIKit.framework, I found a lot of definitions, but no methods per se. I'm quite n...
All user interface elements are subclasses of UIView (which is a subclass of UIResponder). examples include labels, buttons, sliders etc..(all UIViews or just Views). Each UI inherit event handling functionality from UIResponder (touches taps drags etc). and each specific UI element inherits drawing functionality from ...
How exactly does an iPhone user interface object work? I set about designing my own class to hold a series of radio buttons. In doing this, I explored how apple created their own classes, but struggled to work out exactly how things such as UILabel or UIButton worked. Looking at UILabel.h, in UIKit.framework, I found a...
TITLE: How exactly does an iPhone user interface object work? QUESTION: I set about designing my own class to hold a series of radio buttons. In doing this, I explored how apple created their own classes, but struggled to work out exactly how things such as UILabel or UIButton worked. Looking at UILabel.h, in UIKit.fr...
[ "iphone", "objective-c", "user-interface", "uilabel" ]
2
1
151
1
0
2011-06-01T15:59:15.270000
2011-06-01T16:09:55.760000
6,204,141
6,204,600
SwingWorker: when exactly is called done method?
Javadoc of the done() method of SwingWorker: Executed on the Event Dispatch Thread after the doInBackground method is finished. I've clues that it is not true in the case of canceled worker. Done is called in each case (normal termination or cancellation) but when cancelled it is not enqueued to the EDT, as it happens ...
When a thread is cancelled via myWorkerThread.cancel(true/false); the done method is (quite surprisingly) called by the cancel method itself. What you may expect to happen, but actually DOESN'T: - you call cancel (either with mayInterrupt or not) - cancel set up the thread cancellation - the doInBackground exits - the ...
SwingWorker: when exactly is called done method? Javadoc of the done() method of SwingWorker: Executed on the Event Dispatch Thread after the doInBackground method is finished. I've clues that it is not true in the case of canceled worker. Done is called in each case (normal termination or cancellation) but when cancel...
TITLE: SwingWorker: when exactly is called done method? QUESTION: Javadoc of the done() method of SwingWorker: Executed on the Event Dispatch Thread after the doInBackground method is finished. I've clues that it is not true in the case of canceled worker. Done is called in each case (normal termination or cancellatio...
[ "java", "swing", "swingworker", "cancellation" ]
21
22
18,739
6
0
2011-06-01T15:59:26.073000
2011-06-01T16:32:54.963000
6,204,142
6,205,926
How to convert SQLite3 script into script that PostgreSQL can understand?
I have a SQLite3 database. I did a data dump which looks something like this: PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE "admin_tools_menu_bookmark" ( "id" integer NOT NULL PRIMARY KEY, "user_id" integer NOT NULL, "url" varchar(255) NOT NULL, "title" varchar(255) NOT NULL ); INSERT INTO "admin_tools_menu_...
I used a program called Navicat. I exported each table and then imported them into the new database, which was painful and slow. The SQL dump using SQLiteman just didn't bode well when I put the SQL into PG Admin III.
How to convert SQLite3 script into script that PostgreSQL can understand? I have a SQLite3 database. I did a data dump which looks something like this: PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE "admin_tools_menu_bookmark" ( "id" integer NOT NULL PRIMARY KEY, "user_id" integer NOT NULL, "url" varchar(255)...
TITLE: How to convert SQLite3 script into script that PostgreSQL can understand? QUESTION: I have a SQLite3 database. I did a data dump which looks something like this: PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE "admin_tools_menu_bookmark" ( "id" integer NOT NULL PRIMARY KEY, "user_id" integer NOT NULL, ...
[ "sql", "postgresql", "sqlite" ]
4
0
2,104
4
0
2011-06-01T15:59:26.707000
2011-06-01T18:26:03.033000
6,204,143
6,207,634
Storing a user's Facebook access token
I have a database that stores a user's access token (along with some other data). My list of permissions include offline_access when I authorize the user. So will the user's access token (client side) always be the same as that user's access token in the database? Or can the user's access token change when they log out...
No, the access token will not always be the same, even with offline_access. You will need to get a new access token when 1) the user changes their password or 2) deactivates your app. Otherwise, it should remain the same. The users Facebook id will never change though. This can be parsed from the access token or obtain...
Storing a user's Facebook access token I have a database that stores a user's access token (along with some other data). My list of permissions include offline_access when I authorize the user. So will the user's access token (client side) always be the same as that user's access token in the database? Or can the user'...
TITLE: Storing a user's Facebook access token QUESTION: I have a database that stores a user's access token (along with some other data). My list of permissions include offline_access when I authorize the user. So will the user's access token (client side) always be the same as that user's access token in the database...
[ "facebook", "oauth", "access-token" ]
18
22
27,493
4
0
2011-06-01T15:59:38.030000
2011-06-01T21:00:08.277000
6,204,147
6,204,356
Query on Pagination Implementation in a UITableView
I am intending to implement pagination in a tableview. Currently, I am using the following method to retrieve a JSON file from the server NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://allPhotos.com/photos.json"]]; [[NSURLConnection alloc] initWithRequest:request delegate:self]; I wa...
You can add some parameter to your URL. maybe like this NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://allPhotos.com/photos.php?page=1"]]; [[NSURLConnection alloc] initWithRequest:request delegate:self]; evertime that user click more button, you keep increasing page number. Your serv...
Query on Pagination Implementation in a UITableView I am intending to implement pagination in a tableview. Currently, I am using the following method to retrieve a JSON file from the server NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://allPhotos.com/photos.json"]]; [[NSURLConnection...
TITLE: Query on Pagination Implementation in a UITableView QUESTION: I am intending to implement pagination in a tableview. Currently, I am using the following method to retrieve a JSON file from the server NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://allPhotos.com/photos.json"]];...
[ "objective-c", "cocoa-touch", "ios", "uitableview", "pagination" ]
0
1
1,143
1
0
2011-06-01T15:59:50.583000
2011-06-01T16:15:03.577000
6,204,149
6,204,350
EF 4.1 skip dictionary tables for member collection
It's a little bit hard to find an appropriate title for this. I think it's a basic issue, but I can't find the solution. public class Car {... public ICollection Parts { get; set; } } public class Parts {... } The application has a "repository" or "catalog" for parts. When I edit a car entity I can choose from this re...
Add a column to the Parts entity called "ShowInCatalog" and set it to 0 for the ones you don't want to show up in your catalog (thus the catalog will do a query to get everything with that value at 1).
EF 4.1 skip dictionary tables for member collection It's a little bit hard to find an appropriate title for this. I think it's a basic issue, but I can't find the solution. public class Car {... public ICollection Parts { get; set; } } public class Parts {... } The application has a "repository" or "catalog" for parts...
TITLE: EF 4.1 skip dictionary tables for member collection QUESTION: It's a little bit hard to find an appropriate title for this. I think it's a basic issue, but I can't find the solution. public class Car {... public ICollection Parts { get; set; } } public class Parts {... } The application has a "repository" or "...
[ "c#", "ef-code-first", "entity-framework-4.1" ]
1
2
177
1
0
2011-06-01T15:59:54.653000
2011-06-01T16:14:43.143000
6,204,151
6,204,825
Membership ChangePassword (hashed) match current password against old password field
I am implementing a system where the user can Reset their password if they have forgotten it. Once it is reset I want to give them the option of changing the password so that it will be something more memorable to them. The password is hashed and if i enter in the correct old password and new password the password does...
Not that I'm aware of, but the ChangePassword method returns a bool (true if successful, false if not), so why not just throw up your message on a false result?
Membership ChangePassword (hashed) match current password against old password field I am implementing a system where the user can Reset their password if they have forgotten it. Once it is reset I want to give them the option of changing the password so that it will be something more memorable to them. The password is...
TITLE: Membership ChangePassword (hashed) match current password against old password field QUESTION: I am implementing a system where the user can Reset their password if they have forgotten it. Once it is reset I want to give them the option of changing the password so that it will be something more memorable to the...
[ "asp.net", "vb.net", "asp.net-membership", "change-password" ]
0
1
721
1
0
2011-06-01T16:00:01.990000
2011-06-01T16:51:24.383000
6,204,152
6,204,275
Reducing C++ code size
I am working on a dynamic language (that compiles into C++) for microcontrollers, being a CS guy I decided to do it properly first then worry about optimization. Below is how my object system is structured, Base (Interface) | |---- Number (Interface) | | | |-- Int | |-- Float | |---- Char | |---- Sequence (Interface) |...
During the link step, you should have avr-gcc generate a map file so you can look at it and see what is taking up so much space. Be sure to use the -ffunction-sections compilation option and the -Wl,-gc-sections linker option to remove unused functions from the binary. What features of C++ are you using? Some of them (...
Reducing C++ code size I am working on a dynamic language (that compiles into C++) for microcontrollers, being a CS guy I decided to do it properly first then worry about optimization. Below is how my object system is structured, Base (Interface) | |---- Number (Interface) | | | |-- Int | |-- Float | |---- Char | |----...
TITLE: Reducing C++ code size QUESTION: I am working on a dynamic language (that compiles into C++) for microcontrollers, being a CS guy I decided to do it properly first then worry about optimization. Below is how my object system is structured, Base (Interface) | |---- Number (Interface) | | | |-- Int | |-- Float | ...
[ "c++", "optimization" ]
3
9
6,300
2
0
2011-06-01T16:00:18.513000
2011-06-01T16:09:14.783000
6,204,155
6,204,251
HTML Dropdown and Textbox with custom border different widths
I have a dropdown box and a text box. I searched this site but could not find the answer for my problem. I have the following styles applied to each, but the dropdown is significantly shorter than the textbox due to the custom border. border: 1px solid #E05206; border-radius: 5px 5px 5px 5px; font-size: 1.2em; padding:...
Worked it out, is the way padding is added to the dropdown, the padding increases the overall width of the textbox, but does not do the same to the dropdown.
HTML Dropdown and Textbox with custom border different widths I have a dropdown box and a text box. I searched this site but could not find the answer for my problem. I have the following styles applied to each, but the dropdown is significantly shorter than the textbox due to the custom border. border: 1px solid #E052...
TITLE: HTML Dropdown and Textbox with custom border different widths QUESTION: I have a dropdown box and a text box. I searched this site but could not find the answer for my problem. I have the following styles applied to each, but the dropdown is significantly shorter than the textbox due to the custom border. borde...
[ "html", "css" ]
0
0
786
2
0
2011-06-01T16:00:28.383000
2011-06-01T16:07:29.083000
6,204,163
6,204,379
Absolute Positioning Performance
I have a colleague who uses a lot of absolute positioning in his css. I find I can usually achieve the same visual effects by providing a different structure to the html - in fact I tend to shy away from using absolute positioning except when I absolutely need to. Question - are my instincts sound here, other than css ...
Excessive use of absolute positioning is a design problem, but it's not so much because of any a performance issues - I don't know of anything performance-wise which would make me hesitate to use absolute positioning when I needed it. The real problem with absolute positioning everything is that you tend to tie your la...
Absolute Positioning Performance I have a colleague who uses a lot of absolute positioning in his css. I find I can usually achieve the same visual effects by providing a different structure to the html - in fact I tend to shy away from using absolute positioning except when I absolutely need to. Question - are my inst...
TITLE: Absolute Positioning Performance QUESTION: I have a colleague who uses a lot of absolute positioning in his css. I find I can usually achieve the same visual effects by providing a different structure to the html - in fact I tend to shy away from using absolute positioning except when I absolutely need to. Ques...
[ "css" ]
8
8
7,439
6
0
2011-06-01T16:01:14.077000
2011-06-01T16:16:54.263000
6,204,171
6,204,346
Assertion Error in Dialog manipulation
The title is pretty weak, but I will try to explain here. I am working on an MFC Application. When a button is clicked, a new dialog is created, some strings are added to a ComboBox from that second dialog, and then the dialog is showed. The code is depicted below. Combo1 is a CComboBox variable defined in the Class1.h...
You can add the strings to the combo box inside of OnInitDialog(), which gets called automatically during DoModal(): In the header: class CClass1: public CDialog { protected: virtual BOOL OnInitDialog(); } In the cpp file: BOOL CClass1::OnInitDialog() { __super::OnInitDialog(); Combo1.AddString(TEXT("text")); // or jus...
Assertion Error in Dialog manipulation The title is pretty weak, but I will try to explain here. I am working on an MFC Application. When a button is clicked, a new dialog is created, some strings are added to a ComboBox from that second dialog, and then the dialog is showed. The code is depicted below. Combo1 is a CCo...
TITLE: Assertion Error in Dialog manipulation QUESTION: The title is pretty weak, but I will try to explain here. I am working on an MFC Application. When a button is clicked, a new dialog is created, some strings are added to a ComboBox from that second dialog, and then the dialog is showed. The code is depicted belo...
[ "c++", "mfc", "dialog", "modal-dialog" ]
3
4
2,001
4
0
2011-06-01T16:01:43.257000
2011-06-01T16:14:31.627000
6,204,173
6,204,437
Save the wallpaper of an Android device as a picture
I need to write a program that gets the current wallpaper of an android device and save it to the images folder. The problem is that I cannot find any information on how to convert the Drawable to a JPEG/PNG This is my code: android.graphics.drawable.Drawable currentWallpaper = getWallpaper(); How do I convert this Dra...
As previously mentioned here, take a look at http://www.brighthub.com/mobile/google-android/articles/30676.aspx. This discusses basically rendering your Drawable on a Canvas backed by a bitmap. You can then save the Bitmap to file using Bitmap.compress.
Save the wallpaper of an Android device as a picture I need to write a program that gets the current wallpaper of an android device and save it to the images folder. The problem is that I cannot find any information on how to convert the Drawable to a JPEG/PNG This is my code: android.graphics.drawable.Drawable current...
TITLE: Save the wallpaper of an Android device as a picture QUESTION: I need to write a program that gets the current wallpaper of an android device and save it to the images folder. The problem is that I cannot find any information on how to convert the Drawable to a JPEG/PNG This is my code: android.graphics.drawabl...
[ "java", "android", "image" ]
0
1
1,074
2
0
2011-06-01T16:01:44.263000
2011-06-01T16:19:56.633000
6,204,176
6,204,305
Inserted from another table and get both table Id
Sql: CREATE TABLE OldTable ( TaskId INT PRIMARY KEY IDENTITY, TaskName VARCHAR(32) ) CREATE TABLE NewTable ( TaskId INT PRIMARY KEY IDENTITY, TaskName VARCHAR(32) ) INSERT INTO dbo.oldTable VALUES('TaskNo1') INSERT INTO dbo.oldTable VALUES('TaskNo2') INSERT INTO dbo.oldTable VALUES('TaskNo3') INSERT INTO dbo.oldTable...
The simplest solution be: Insert NewTable( TaskName ) Select TaskName From OldTable Insert @MappingTableVar( NewTaskId, OldTaskId ) Select NewTable.TaskId, OldTable.TaskId From NewTable Join OldTable On OldTable.TaskName = NewTable.TaskName There is no way to get the OldTable's TaskId using the Output clause unless yo...
Inserted from another table and get both table Id Sql: CREATE TABLE OldTable ( TaskId INT PRIMARY KEY IDENTITY, TaskName VARCHAR(32) ) CREATE TABLE NewTable ( TaskId INT PRIMARY KEY IDENTITY, TaskName VARCHAR(32) ) INSERT INTO dbo.oldTable VALUES('TaskNo1') INSERT INTO dbo.oldTable VALUES('TaskNo2') INSERT INTO dbo.o...
TITLE: Inserted from another table and get both table Id QUESTION: Sql: CREATE TABLE OldTable ( TaskId INT PRIMARY KEY IDENTITY, TaskName VARCHAR(32) ) CREATE TABLE NewTable ( TaskId INT PRIMARY KEY IDENTITY, TaskName VARCHAR(32) ) INSERT INTO dbo.oldTable VALUES('TaskNo1') INSERT INTO dbo.oldTable VALUES('TaskNo2')...
[ "sql" ]
0
4
62
1
0
2011-06-01T16:01:59.603000
2011-06-01T16:11:54.797000
6,204,177
6,205,164
Function calls in logging configuration file
I had the following logging configuration in code that I now want to set through a configuration file. formatter = logging.Formatter('%s:'%getpass.getuser() + '%(asctime)s:%(levelname)s:%(module)s:%(lineno)d:%(message)s') In the configuration file, I have > [formatter_frmtr] > format=getpass.getuser() + '%(asctime)s:%(...
Use the techniques described in the logging documentation to add additional cobtext to your logging messages.
Function calls in logging configuration file I had the following logging configuration in code that I now want to set through a configuration file. formatter = logging.Formatter('%s:'%getpass.getuser() + '%(asctime)s:%(levelname)s:%(module)s:%(lineno)d:%(message)s') In the configuration file, I have > [formatter_frmtr]...
TITLE: Function calls in logging configuration file QUESTION: I had the following logging configuration in code that I now want to set through a configuration file. formatter = logging.Formatter('%s:'%getpass.getuser() + '%(asctime)s:%(levelname)s:%(module)s:%(lineno)d:%(message)s') In the configuration file, I have >...
[ "python", "logging" ]
0
1
123
1
0
2011-06-01T16:02:08.030000
2011-06-01T17:18:44.563000
6,204,181
6,217,446
Python/matplotlib Show confidence levels in a histogram
here is my problem. I have some data I binned to obtain a "digitalised" pdf, and that's fine. Now, I wanted to find a way to indicate different confidence intervals by coloring the bin groups differently. In particular, starting with the bin containing the highest count I wanted to find and colour, say red, all the hig...
If I understand your question correctly, I think the code below will do what you are suggesting. It seems a little different than the approach you were considering, and I'm not sure it is more efficient. Regardless, it usually helps to see the way someone else would do something. It assumes an already generated pdf (hi...
Python/matplotlib Show confidence levels in a histogram here is my problem. I have some data I binned to obtain a "digitalised" pdf, and that's fine. Now, I wanted to find a way to indicate different confidence intervals by coloring the bin groups differently. In particular, starting with the bin containing the highest...
TITLE: Python/matplotlib Show confidence levels in a histogram QUESTION: here is my problem. I have some data I binned to obtain a "digitalised" pdf, and that's fine. Now, I wanted to find a way to indicate different confidence intervals by coloring the bin groups differently. In particular, starting with the bin cont...
[ "python", "numpy", "histogram", "matplotlib", "confidence-interval" ]
3
6
4,508
1
0
2011-06-01T16:02:19.583000
2011-06-02T16:38:00.773000
6,204,182
6,204,367
How can I get a UITableView tableFooterView to expand to fill the whole parent view?
I have a UIView that I am setting as the property of a UITableView tableFooterView property. In cases where the table view and the footer do not fill the whole parent view, is there a way to determine how much taller I need to make the footer so that it does fill in the remaining space? My ultimate goal here is to get ...
Off the top of my head: since UITableViews are essentially UIScrollViews, try using the contentSize.height value of your table view to see how much it occupies the screen. Then, adjust the tableFooterView frame to fill the difference in height from its superview's frame height. Essentially: CGRect tvFrame = tableView.f...
How can I get a UITableView tableFooterView to expand to fill the whole parent view? I have a UIView that I am setting as the property of a UITableView tableFooterView property. In cases where the table view and the footer do not fill the whole parent view, is there a way to determine how much taller I need to make the...
TITLE: How can I get a UITableView tableFooterView to expand to fill the whole parent view? QUESTION: I have a UIView that I am setting as the property of a UITableView tableFooterView property. In cases where the table view and the footer do not fill the whole parent view, is there a way to determine how much taller ...
[ "iphone", "ios", "uitableview" ]
12
14
8,988
4
0
2011-06-01T16:02:21.350000
2011-06-01T16:15:55.697000
6,204,187
6,204,255
PHP/MySQL - specific pages for specific users
In my current project in PHP and MySQL, I have a database of user and a database of projects. I want to be able to assign projects to users so that they only have access to those that they have joined (by whatever means). Is there a more efficient way of doing this other than having some sort of array within a field of...
Create a table with two foreign keys: one pointing to the primary key of the user table and the other pointing to the primary key of the project table. This is the standard way of implementing so called m:n-relations (a user can have multiple projects and a project consists of multiple users) in relational databases. R...
PHP/MySQL - specific pages for specific users In my current project in PHP and MySQL, I have a database of user and a database of projects. I want to be able to assign projects to users so that they only have access to those that they have joined (by whatever means). Is there a more efficient way of doing this other th...
TITLE: PHP/MySQL - specific pages for specific users QUESTION: In my current project in PHP and MySQL, I have a database of user and a database of projects. I want to be able to assign projects to users so that they only have access to those that they have joined (by whatever means). Is there a more efficient way of d...
[ "php", "mysql" ]
1
4
189
1
0
2011-06-01T16:02:48.580000
2011-06-01T16:07:37.077000
6,204,198
6,204,665
Multiple applications running under single website - Forms authentication signin/signout issues
I have several applications running under a single website in IIS7. There are several pages within the website, but these are all pretty standard HTML pages, with not a lot going on. The main website has its own application pool and each sub application has its own folder and associated application pool. I use forms au...
From comments: i simply check there credentials and then set the FormsAuthentication.SetAuthCookie for the username to true. This is what logs the user out of the other applications. You are effectively clobbering the authentication cookie used by the other applications. You may be able to get around this problem by en...
Multiple applications running under single website - Forms authentication signin/signout issues I have several applications running under a single website in IIS7. There are several pages within the website, but these are all pretty standard HTML pages, with not a lot going on. The main website has its own application ...
TITLE: Multiple applications running under single website - Forms authentication signin/signout issues QUESTION: I have several applications running under a single website in IIS7. There are several pages within the website, but these are all pretty standard HTML pages, with not a lot going on. The main website has it...
[ "asp.net" ]
0
0
2,093
2
0
2011-06-01T16:03:36.637000
2011-06-01T16:38:14.703000
6,204,207
6,204,267
How to re-render a <t:selectManyCheckbox layout="spread">?
I try to re-render a. However, it does not re-render. The Ajax call: The t:selectManyCheckbox:.... The listener is called and new values for the are set, but it does not re-render. Any ideas why? I tried render="myForm:items" and render=":myForm:items" too. It's in the same form.
You need to re-render the spreaded items as well. I'd suggest to re-render the common parent of the and all items. If not present, put them in a. E.g.......... with
How to re-render a <t:selectManyCheckbox layout="spread">? I try to re-render a. However, it does not re-render. The Ajax call: The t:selectManyCheckbox:.... The listener is called and new values for the are set, but it does not re-render. Any ideas why? I tried render="myForm:items" and render=":myForm:items" too. It'...
TITLE: How to re-render a <t:selectManyCheckbox layout="spread">? QUESTION: I try to re-render a. However, it does not re-render. The Ajax call: The t:selectManyCheckbox:.... The listener is called and new values for the are set, but it does not re-render. Any ideas why? I tried render="myForm:items" and render=":myFo...
[ "ajax", "jsf", "jsf-2", "tomahawk" ]
2
2
2,132
1
0
2011-06-01T16:04:10.523000
2011-06-01T16:08:41.210000
6,204,210
6,220,221
How To Draw Component With POJO As Model In UML?
i've build an web application, i have servlet as controler and java classes as the request handdler so if the servlet receive an request from a client, it will call method from the request handler to process the request, and then the request handler will have to call an ejb to do the business logic, and when the ejb ha...
[per question in comment on how to draw class diagram] Class diagrams are probably most often used for showing relationships in a problem domain. The relationships capture rules from the domain (e.g. "Each order consists of one or more orderlines" / "each orderline forms part of exactly one order"). In your case the cl...
How To Draw Component With POJO As Model In UML? i've build an web application, i have servlet as controler and java classes as the request handdler so if the servlet receive an request from a client, it will call method from the request handler to process the request, and then the request handler will have to call an ...
TITLE: How To Draw Component With POJO As Model In UML? QUESTION: i've build an web application, i have servlet as controler and java classes as the request handdler so if the servlet receive an request from a client, it will call method from the request handler to process the request, and then the request handler wil...
[ "servlets", "components", "ejb", "uml", "pojo" ]
1
0
1,779
1
0
2011-06-01T16:04:24.807000
2011-06-02T20:49:17.260000
6,204,211
6,211,320
Can an Outlook macro trigger its built-in import functionality?
I'm trying to automate Outlook to automatically load an iCalendar file (.ics) when it starts. I'm aware of the hooks I need to use to arrange the timing already, I just haven't been able to find quality information about what sort of automation is possible. Since Outlook already has the ability to import iCalendar file...
Depending on what you want, the answer is you cannot do it. If you want to "import" the ics file you cannot do it alone, you would need for example redemption see here Visual Studio Forum Because MS moves their links often here is a quote from there “Outlook has no built-in methods to import an ICS file into a calendar...
Can an Outlook macro trigger its built-in import functionality? I'm trying to automate Outlook to automatically load an iCalendar file (.ics) when it starts. I'm aware of the hooks I need to use to arrange the timing already, I just haven't been able to find quality information about what sort of automation is possible...
TITLE: Can an Outlook macro trigger its built-in import functionality? QUESTION: I'm trying to automate Outlook to automatically load an iCalendar file (.ics) when it starts. I'm aware of the hooks I need to use to arrange the timing already, I just haven't been able to find quality information about what sort of auto...
[ "vba", "parsing", "outlook", "calendar", "icalendar" ]
0
0
993
1
0
2011-06-01T16:04:25.660000
2011-06-02T06:44:25.590000
6,204,217
6,255,029
Trying to put a unique number code in all of my arrays
Say I have 3 arrays of arrays and when I write in any of them my counter goes up by one every insertion I do.How can I show on screen the data I inserted the same order I inserted them with that unique code it was printed when I was inserting them? array ar1=new array[3]; array2 ar2=new array2[3]; array3 ar3=new array3...
I found the problem at last.. I had to add another variable on the base abstract class.Inside the constructor I had to write that the new variable (say s)was (s=+1+count++) and add it with a property(set,get) on my main.It worked fine. Thanks for the time it took you to see this topic and ask some questions to help me.
Trying to put a unique number code in all of my arrays Say I have 3 arrays of arrays and when I write in any of them my counter goes up by one every insertion I do.How can I show on screen the data I inserted the same order I inserted them with that unique code it was printed when I was inserting them? array ar1=new a...
TITLE: Trying to put a unique number code in all of my arrays QUESTION: Say I have 3 arrays of arrays and when I write in any of them my counter goes up by one every insertion I do.How can I show on screen the data I inserted the same order I inserted them with that unique code it was printed when I was inserting the...
[ "arrays", "object", "counter" ]
0
0
70
1
0
2011-06-01T16:04:59.823000
2011-06-06T16:23:25.607000
6,204,219
6,258,570
Java replace in XML-file
I have created my own XML-file on my Android phone, which looks similar to this I have then converted it into a String to replace inside the string using Regular Expression, but I have a problem with the Regular Expression. The Regular Expression I just created looks like this ([\n\r]*)<(.*)issue(.*)1(.*)([\n\r]*)(.*)(...
Use a SAX (or StAX) parser and writer at the same time. As you read one event, detect whether to write the same event type to the writer without modification, or to do some modifications in the state you are currently in - like swapping an element name or attribute value. This will handle an unlimited amount of element...
Java replace in XML-file I have created my own XML-file on my Android phone, which looks similar to this I have then converted it into a String to replace inside the string using Regular Expression, but I have a problem with the Regular Expression. The Regular Expression I just created looks like this ([\n\r]*)<(.*)iss...
TITLE: Java replace in XML-file QUESTION: I have created my own XML-file on my Android phone, which looks similar to this I have then converted it into a String to replace inside the string using Regular Expression, but I have a problem with the Regular Expression. The Regular Expression I just created looks like this...
[ "java", "xml", "regex" ]
0
0
954
2
0
2011-06-01T16:05:08.257000
2011-06-06T22:05:31.297000
6,204,220
6,204,279
Asp.net MVC Selected Index Changed / Ajax.ActionLink
I have a page in Asp.Net MVC using the Razor syntax. In the page I have a DropDownList, and a DIV section that I would like to replace the content in the DIV depending on the selected value of the combobox using the Ajax.ActionLink functionality Is there a way to do this? Thanks Mark
I would rather use a form than a link as it is more adapted to what you are trying to achieve: @using (Ajax.BeginForm( "Change", "Home", new AjaxOptions { UpdateTargetId = "result" } )) { @Html.FropDownListFor(x => x.Foo, Model.Foos, "-- Select a foo --") } And the corresponding controller action: public ActionResult C...
Asp.net MVC Selected Index Changed / Ajax.ActionLink I have a page in Asp.Net MVC using the Razor syntax. In the page I have a DropDownList, and a DIV section that I would like to replace the content in the DIV depending on the selected value of the combobox using the Ajax.ActionLink functionality Is there a way to do ...
TITLE: Asp.net MVC Selected Index Changed / Ajax.ActionLink QUESTION: I have a page in Asp.Net MVC using the Razor syntax. In the page I have a DropDownList, and a DIV section that I would like to replace the content in the DIV depending on the selected value of the combobox using the Ajax.ActionLink functionality Is ...
[ "asp.net", "asp.net-mvc-3", "razor" ]
0
2
3,884
2
0
2011-06-01T16:05:14.747000
2011-06-01T16:09:49.860000
6,204,221
6,213,818
What is the best way to implement google analytics tracking for Actionscript 2?
I am looking for code, examples, library, components for using google analytics event tracking with my Actionscript 2 Flash movies. I can find info about AS3 on the google code site but not AS2. What is the best resource for tutorials and examples about tagging my Flash files to use the asynch google analytics code. I ...
I have added this to my Flash projects and it seems to work so far. I have not left it long enough to check what has come through on google analytics reports yet but I will update this answer with what comes through. import flash.external.ExternalInterface; // function ga_track_pageview(_event:String) { if(ExternalInte...
What is the best way to implement google analytics tracking for Actionscript 2? I am looking for code, examples, library, components for using google analytics event tracking with my Actionscript 2 Flash movies. I can find info about AS3 on the google code site but not AS2. What is the best resource for tutorials and e...
TITLE: What is the best way to implement google analytics tracking for Actionscript 2? QUESTION: I am looking for code, examples, library, components for using google analytics event tracking with my Actionscript 2 Flash movies. I can find info about AS3 on the google code site but not AS2. What is the best resource f...
[ "flash", "google-analytics", "actionscript-2" ]
0
2
1,481
2
0
2011-06-01T16:05:18.007000
2011-06-02T11:18:40.553000
6,204,258
6,204,668
Best approach to call similar methods on c#
I have Business Objects classes that need to know what connection string have to use. I call/create those BO from my code passing the connection String to a connString property of the BO, and can be called/created too from framework controls, and this doesn't allow me set connString property. (I have to call the method...
There are many ways you can do this, one of which you mentioned already - optional arguments. Another way would be to expose a generic ConnectionString property that returns the current connection string, and then do away with the 1 parameter overload. Callers would be required to pass a connection string, and can just...
Best approach to call similar methods on c# I have Business Objects classes that need to know what connection string have to use. I call/create those BO from my code passing the connection String to a connString property of the BO, and can be called/created too from framework controls, and this doesn't allow me set con...
TITLE: Best approach to call similar methods on c# QUESTION: I have Business Objects classes that need to know what connection string have to use. I call/create those BO from my code passing the connection String to a connString property of the BO, and can be called/created too from framework controls, and this doesn'...
[ "c#", "methods" ]
2
1
221
4
0
2011-06-01T16:07:58.620000
2011-06-01T16:38:18.757000
6,204,268
6,204,345
Explain Linq Microsoft Select - Indexed [Example]
I'm running throuth Microsoft's 101 LINQ Samples, and I'm stumped on how this query knows how to assign the correct int value to the correct int field: public void Linq12() { int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; var numsInPlace = numbers.Select((num, index) => new { Num = num, InPlace = (num == index) });...
I'm not really sure what you are asking of but the Select iterates over the list starting at index 0. If the value of the element at the current index is equal to the index it will set the InPlace property in the anonymous object to true. My guess is that the code above prints true for 3, 6 and 7, right? It would also ...
Explain Linq Microsoft Select - Indexed [Example] I'm running throuth Microsoft's 101 LINQ Samples, and I'm stumped on how this query knows how to assign the correct int value to the correct int field: public void Linq12() { int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; var numsInPlace = numbers.Select((num, index...
TITLE: Explain Linq Microsoft Select - Indexed [Example] QUESTION: I'm running throuth Microsoft's 101 LINQ Samples, and I'm stumped on how this query knows how to assign the correct int value to the correct int field: public void Linq12() { int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; var numsInPlace = numbers....
[ "c#", "linq" ]
4
6
4,369
6
0
2011-06-01T16:08:42.470000
2011-06-01T16:14:30.923000
6,204,269
6,204,330
Key code for <> signs for java robot class?
can you tell me the keycodes for Java Robot class. For example, to press Enter we use: a.keyPress(KeyEvent.VK_ENTER); a.keyRelease(KeyEvent.VK_ENTER); I want to press these sysmbols > and < sign. What keyword or code should i use? Thank you.
Assuming you mean java.awt.event.KeyInput, then a quick glance at the documentation suggests that KeyInput.VT_LESS and KeyInput.VT_GREATER would correspond to the < and > keys.
Key code for <> signs for java robot class? can you tell me the keycodes for Java Robot class. For example, to press Enter we use: a.keyPress(KeyEvent.VK_ENTER); a.keyRelease(KeyEvent.VK_ENTER); I want to press these sysmbols > and < sign. What keyword or code should i use? Thank you.
TITLE: Key code for <> signs for java robot class? QUESTION: can you tell me the keycodes for Java Robot class. For example, to press Enter we use: a.keyPress(KeyEvent.VK_ENTER); a.keyRelease(KeyEvent.VK_ENTER); I want to press these sysmbols > and < sign. What keyword or code should i use? Thank you. ANSWER: Assumin...
[ "java", "keycode" ]
0
3
8,257
3
0
2011-06-01T16:08:43.233000
2011-06-01T16:13:31.143000
6,204,272
6,204,586
how to include XNA libraries in C# project?
I am trying to make a C# game. I want to include XNA libraries there (e.g. Microsoft.XNA.Framework.Graphics). But, if I do so, I get an error: The type or namespace XNA doesnot exist in the namespace Microsoft. Can anyone please help?
First of all, check you are using the correct case, the namespace and assembly names are Xna not XNA. If that doesn't work: You should follow the instructions here. These describe how to install (as well as some flavour of Visual Studio 2010) XNA Game Studio and to create a project using the template. Using the templat...
how to include XNA libraries in C# project? I am trying to make a C# game. I want to include XNA libraries there (e.g. Microsoft.XNA.Framework.Graphics). But, if I do so, I get an error: The type or namespace XNA doesnot exist in the namespace Microsoft. Can anyone please help?
TITLE: how to include XNA libraries in C# project? QUESTION: I am trying to make a C# game. I want to include XNA libraries there (e.g. Microsoft.XNA.Framework.Graphics). But, if I do so, I get an error: The type or namespace XNA doesnot exist in the namespace Microsoft. Can anyone please help? ANSWER: First of all, ...
[ "c#", "xna", "libraries" ]
5
4
25,273
5
0
2011-06-01T16:09:01.953000
2011-06-01T16:31:54.760000
6,204,277
6,212,941
Sqlserver 2008 : Restored Failed for Server 'System 16'(Microsoft.Sqlserver.smoextended'
I am getting the following error when i tried to restore the bak file i have TITLE: Microsoft SQL Server Management Studio ------------------------------ Restore failed for Server 'SYSTEM16'. (Microsoft.SqlServer.SmoExtended) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1...
The answer appears to be in your error message. It looks like you may have taken the backup from SQL 2008 R2 and are trying to restore it to SQL 2008 R1. You can't restore backups taken on newer versions of SQL Server to older versions.
Sqlserver 2008 : Restored Failed for Server 'System 16'(Microsoft.Sqlserver.smoextended' I am getting the following error when i tried to restore the bak file i have TITLE: Microsoft SQL Server Management Studio ------------------------------ Restore failed for Server 'SYSTEM16'. (Microsoft.SqlServer.SmoExtended) For...
TITLE: Sqlserver 2008 : Restored Failed for Server 'System 16'(Microsoft.Sqlserver.smoextended' QUESTION: I am getting the following error when i tried to restore the bak file i have TITLE: Microsoft SQL Server Management Studio ------------------------------ Restore failed for Server 'SYSTEM16'. (Microsoft.SqlServer...
[ "sql-server-2008" ]
0
1
5,283
1
0
2011-06-01T16:09:22.450000
2011-06-02T09:53:52.003000
6,204,283
6,204,397
HTTP: How should I respond to "Range: bytes=" when Range is unsupported?
What is the correct response to a GET request with the header field Range: bytes=278528- if Range is not supported? Reading the HTTP header definitions ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html ) i think i should at least set: Accept-Ranges: none, but it clearly states that Clients MAY generate byte-rang...
You may ignore it, as the spec says. To be precise: If you support it, you return a status code of 206 Partial Content and include the proper headers like Content-Range. If you don’t support it, you return a 200 OK as normal. I have not tested this, but the spec seems pretty clear. I have seen this work — using wget or...
HTTP: How should I respond to "Range: bytes=" when Range is unsupported? What is the correct response to a GET request with the header field Range: bytes=278528- if Range is not supported? Reading the HTTP header definitions ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html ) i think i should at least set: Accep...
TITLE: HTTP: How should I respond to "Range: bytes=" when Range is unsupported? QUESTION: What is the correct response to a GET request with the header field Range: bytes=278528- if Range is not supported? Reading the HTTP header definitions ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html ) i think i should a...
[ "http", "download", "http-headers", "webserver", "range" ]
8
10
5,671
4
0
2011-06-01T16:10:12.800000
2011-06-01T16:17:54.447000
6,204,284
6,253,634
How to programmatically push content to Facebook Page wall?
Fact: if I manually add a link to my page's wall, that link will show up in the news feed of any Liker's of my page. Example: user Joe likes http://facebook.com/soccer-page. Sam, who is the admin of soccer-page, posts a link to the wall of soccer-page, Joe sees that link show up in his news feed. Question: using.NET or...
Answer can be found here - facebook c# sdk - The user hasn't authorized the application to perform this action
How to programmatically push content to Facebook Page wall? Fact: if I manually add a link to my page's wall, that link will show up in the news feed of any Liker's of my page. Example: user Joe likes http://facebook.com/soccer-page. Sam, who is the admin of soccer-page, posts a link to the wall of soccer-page, Joe see...
TITLE: How to programmatically push content to Facebook Page wall? QUESTION: Fact: if I manually add a link to my page's wall, that link will show up in the news feed of any Liker's of my page. Example: user Joe likes http://facebook.com/soccer-page. Sam, who is the admin of soccer-page, posts a link to the wall of so...
[ "facebook", "facebook-c#-sdk" ]
1
1
5,058
2
0
2011-06-01T16:10:17.023000
2011-06-06T14:36:27.820000
6,204,286
6,213,141
Any way to get VS to recognise ReSharper razor errors and fail compilation
Is there any way to do this? The razor support in ReSharper 6 is excellent, and it would be nice for the compiler to recognise razor view errors as compile time errors.
Currently, there is no way treat ReSharper errors as compile errors. But you can enable Solution Wide Analysis and will be informed if there are any errors in solution from ReSharper. Also, you can enable own Microsoft analysis of views during build time - look at this article http://haacked.com/archive/2011/05/09/comp...
Any way to get VS to recognise ReSharper razor errors and fail compilation Is there any way to do this? The razor support in ReSharper 6 is excellent, and it would be nice for the compiler to recognise razor view errors as compile time errors.
TITLE: Any way to get VS to recognise ReSharper razor errors and fail compilation QUESTION: Is there any way to do this? The razor support in ReSharper 6 is excellent, and it would be nice for the compiler to recognise razor view errors as compile time errors. ANSWER: Currently, there is no way treat ReSharper errors...
[ "asp.net-mvc-3", "razor", "resharper" ]
2
4
414
1
0
2011-06-01T16:10:29.053000
2011-06-02T10:12:21.123000
6,204,293
6,205,535
How do you install the source for Java 6 libraries in Eclipse?
What's the best way to install the source code for the java libraries in Eclipse 3.6. I have attempted to follow the accepted answer here ( How Do You Install the source for the java libraries in Eclipse? ), but that didn't work. I have java ee sdk 6 installed. Also, where can I find the source code? There isn't a src....
You must have a src.zip in the JDK install folder. Reinstall JDK if necessary. There's by the way no means of a JAR. Go to Java SE download page and press the leftmost one of the four big buttons to get the JDK. By the way, if you have the JDK installed already and run Eclipse 3.6 for the first time, it should automati...
How do you install the source for Java 6 libraries in Eclipse? What's the best way to install the source code for the java libraries in Eclipse 3.6. I have attempted to follow the accepted answer here ( How Do You Install the source for the java libraries in Eclipse? ), but that didn't work. I have java ee sdk 6 instal...
TITLE: How do you install the source for Java 6 libraries in Eclipse? QUESTION: What's the best way to install the source code for the java libraries in Eclipse 3.6. I have attempted to follow the accepted answer here ( How Do You Install the source for the java libraries in Eclipse? ), but that didn't work. I have ja...
[ "java", "eclipse" ]
1
1
1,017
1
0
2011-06-01T16:11:14.453000
2011-06-01T17:51:49.210000
6,204,298
6,204,399
IList<T> and List<T> Conversions with Interfaces
I generally understand interfaces, inheritance and polymorphism, but one thing has me puzzled. In this example, Cat implements IAnimal and of course List implements IList: IList cats = new List (); but it generates a compilation error (Cannot implicitly convert type...). It also won't work if I use an asbtract supercla...
There is a logical explanation, and this exact question is asked pretty much every day on StackOverflow. Suppose this was legal: IList cats = new List (); What stops this from being legal? cats.Add(new Giraffe()); Nothing. "cats" is a list of animals, and a giraffe is an animal, and therefore you can add a giraffe to a...
IList<T> and List<T> Conversions with Interfaces I generally understand interfaces, inheritance and polymorphism, but one thing has me puzzled. In this example, Cat implements IAnimal and of course List implements IList: IList cats = new List (); but it generates a compilation error (Cannot implicitly convert type...)....
TITLE: IList<T> and List<T> Conversions with Interfaces QUESTION: I generally understand interfaces, inheritance and polymorphism, but one thing has me puzzled. In this example, Cat implements IAnimal and of course List implements IList: IList cats = new List (); but it generates a compilation error (Cannot implicitly...
[ "c#", "generics", "interface", "polymorphism" ]
6
20
1,621
6
0
2011-06-01T16:11:27.560000
2011-06-01T16:17:55.030000
6,204,299
6,204,502
Do apps built for old android versions run on android 3.1
For testing purposes I need to buy an android device. Can I get a tablet device with android 3.1 honeycomb and use this to test apps developed on older android versions? Are new android versions backward compatible with older apps?
Not entirely. In many cases yes, but there are exceptions: There have been some api changes, and more importantly, there are a lot of apps out there which did things that weren't entirely proper, but worked on the devices they were developed for. Some older apps were written to use input devices not present on recent p...
Do apps built for old android versions run on android 3.1 For testing purposes I need to buy an android device. Can I get a tablet device with android 3.1 honeycomb and use this to test apps developed on older android versions? Are new android versions backward compatible with older apps?
TITLE: Do apps built for old android versions run on android 3.1 QUESTION: For testing purposes I need to buy an android device. Can I get a tablet device with android 3.1 honeycomb and use this to test apps developed on older android versions? Are new android versions backward compatible with older apps? ANSWER: Not...
[ "android", "compatibility", "android-3.0-honeycomb" ]
0
1
1,535
3
0
2011-06-01T16:11:27.520000
2011-06-01T16:24:49.553000
6,204,302
6,204,349
Memory Leaks in Objective-C / Arrays
I'm looking at someone's code and I know the general rule is if you have alloc/init, you need to release that memory. He uses a lot of NSMutableArrays, alloc/inits them, but does not release them. Can I simply send the autorelease message to the array that gets created if I do not see any other release/autorelease mess...
You need to either -release or -autorelease anything you -retain, +alloc, -copy, +allocWithZone: or -copyWithZone:. (And, if you retain something twice you also need to release it twice.) When an NSMutableArray (or NSArray, NSSet, or NSDictionary and mutable subclasses) object is dealloc'd (retain count reaches zero), ...
Memory Leaks in Objective-C / Arrays I'm looking at someone's code and I know the general rule is if you have alloc/init, you need to release that memory. He uses a lot of NSMutableArrays, alloc/inits them, but does not release them. Can I simply send the autorelease message to the array that gets created if I do not s...
TITLE: Memory Leaks in Objective-C / Arrays QUESTION: I'm looking at someone's code and I know the general rule is if you have alloc/init, you need to release that memory. He uses a lot of NSMutableArrays, alloc/inits them, but does not release them. Can I simply send the autorelease message to the array that gets cre...
[ "iphone", "objective-c", "memory-management", "memory-leaks" ]
1
4
345
3
0
2011-06-01T16:11:33.860000
2011-06-01T16:14:40.990000
6,204,306
6,205,854
Know the Block ID in CUDA from a given 2D offset
i've trying to calculate the blockIdx.x and blockIdx.y from a given offset in CUDA but i'm totally mind-blocked. The idea is read data from shared memory when possible and from global memory in other case. In example, if I've a 1D array of 64 elements and I configure a kernel with 16x1 threads (4 blocks in total) each ...
In practice, I really can't think of a good reason why this is ever necessary, but you can compute the result like this, for an arbitrary index value idx (assuming column ordered indexing): int pitch = blockDim.x * gridDim.x; int tidy = idx / pitch; // div(idx,pitch) int tidx = idx - (pitch * tidy); // mod(idx,pitch) i...
Know the Block ID in CUDA from a given 2D offset i've trying to calculate the blockIdx.x and blockIdx.y from a given offset in CUDA but i'm totally mind-blocked. The idea is read data from shared memory when possible and from global memory in other case. In example, if I've a 1D array of 64 elements and I configure a k...
TITLE: Know the Block ID in CUDA from a given 2D offset QUESTION: i've trying to calculate the blockIdx.x and blockIdx.y from a given offset in CUDA but i'm totally mind-blocked. The idea is read data from shared memory when possible and from global memory in other case. In example, if I've a 1D array of 64 elements a...
[ "arrays", "cuda", "2d", "offset" ]
1
1
10,627
3
0
2011-06-01T16:11:54.903000
2011-06-01T18:20:23.720000
6,204,307
6,246,367
SqlException (0x80131904): Invalid column name for mvc3 SaveChanges() after schema change
I've built an MVC3 application using the Entity Framework database first approach. I was able to round trip all objects, then needed to make a schema change. After changing the database schema and updating the.edmx, SaveChanges() fails for objects that map to a db table with column changes. Specifically: Originally I h...
Turned out to be a problem in the db schema, not the EF model. My DBA missed a trigger that was still pointing to the old column.
SqlException (0x80131904): Invalid column name for mvc3 SaveChanges() after schema change I've built an MVC3 application using the Entity Framework database first approach. I was able to round trip all objects, then needed to make a schema change. After changing the database schema and updating the.edmx, SaveChanges() ...
TITLE: SqlException (0x80131904): Invalid column name for mvc3 SaveChanges() after schema change QUESTION: I've built an MVC3 application using the Entity Framework database first approach. I was able to round trip all objects, then needed to make a schema change. After changing the database schema and updating the.ed...
[ "sql", "asp.net-mvc-3", "schema" ]
0
0
1,434
1
0
2011-06-01T16:11:55.187000
2011-06-05T22:35:25.377000
6,204,311
6,213,304
What Defines Cipher Grades?
I've been searching for what exactly defines different encryption "cipher grades" - such as those used in SSL and TLS, but haven't been able to find a specific resource that draws the line between them. What defines LOW, MEDIUM, and STRONG cipher grades?
There are many factors that contribute to the security level (grade is rarely used for this term) of ciphersuites. Many algorithms are involved, e.g. different algorithms for key exchange (RSA or Diffie-Hellman), other algorithms for the confidentiality part (AES, RC4 etc) and even more for message authentication. Ther...
What Defines Cipher Grades? I've been searching for what exactly defines different encryption "cipher grades" - such as those used in SSL and TLS, but haven't been able to find a specific resource that draws the line between them. What defines LOW, MEDIUM, and STRONG cipher grades?
TITLE: What Defines Cipher Grades? QUESTION: I've been searching for what exactly defines different encryption "cipher grades" - such as those used in SSL and TLS, but haven't been able to find a specific resource that draws the line between them. What defines LOW, MEDIUM, and STRONG cipher grades? ANSWER: There are ...
[ "ssl", "encryption" ]
5
4
2,002
3
0
2011-06-01T16:12:21.083000
2011-06-02T10:28:20.483000
6,204,318
6,204,653
Using the dbm module in Python 3
I'm learning about database files and the dbm module in Python 3.1.3, and am having trouble using some of the methods from the anydbm module in Python 2. The keys method works fine, import dbm db = dbm.open('dbm', 'c') db['modest'] = 'mouse' db['dream'] = 'theater' for key in db.keys(): print(key) yields: b'modest' b...
I think this depends which implementation it chooses to use. On my system, dbm in Python 3 chooses to use ndbm, which is equivalent to the dbm module in Python 2. When I use that module explicitly, I see the same limitations. It appears anydbm in Python 2 chooses dumbdbm, which is slower, but does support the full dict...
Using the dbm module in Python 3 I'm learning about database files and the dbm module in Python 3.1.3, and am having trouble using some of the methods from the anydbm module in Python 2. The keys method works fine, import dbm db = dbm.open('dbm', 'c') db['modest'] = 'mouse' db['dream'] = 'theater' for key in db.keys(...
TITLE: Using the dbm module in Python 3 QUESTION: I'm learning about database files and the dbm module in Python 3.1.3, and am having trouble using some of the methods from the anydbm module in Python 2. The keys method works fine, import dbm db = dbm.open('dbm', 'c') db['modest'] = 'mouse' db['dream'] = 'theater' f...
[ "python", "database", "python-3.x", "dbm" ]
3
2
9,931
2
0
2011-06-01T16:13:00.363000
2011-06-01T16:37:27.183000
6,204,321
6,204,414
Fastest way to implement a list search in MySQL
Which is the best (fastest) way to implement a list search in MySQL? My particular case is this: I have a list of rules (e.g. {1, 3, 11, 5, 6, 9, 1232, 4}). It could be implemented in PHP or MySql. I have a table in DB that lists applied rules (e.g. {1, 3, 6}) [table "applied"] I have to choose between the list of rule...
To get the first rule which is not applied you can use SELECT r.* FROM rules r LEFT JOIN applied a ON (a.rule_id = r.id) WHERE a.rule_id IS NULL ORDER BY r.id LIMIT 1 Then you perform the action associated with the rule, and insert a new record into applied table.
Fastest way to implement a list search in MySQL Which is the best (fastest) way to implement a list search in MySQL? My particular case is this: I have a list of rules (e.g. {1, 3, 11, 5, 6, 9, 1232, 4}). It could be implemented in PHP or MySql. I have a table in DB that lists applied rules (e.g. {1, 3, 6}) [table "app...
TITLE: Fastest way to implement a list search in MySQL QUESTION: Which is the best (fastest) way to implement a list search in MySQL? My particular case is this: I have a list of rules (e.g. {1, 3, 11, 5, 6, 9, 1232, 4}). It could be implemented in PHP or MySql. I have a table in DB that lists applied rules (e.g. {1, ...
[ "php", "mysql", "algorithm" ]
1
0
148
1
0
2011-06-01T16:13:12.107000
2011-06-01T16:18:28.240000
6,204,326
6,204,363
Calling generic method using reflection in .NET
I have a question. Is it possible to call generic method using reflection in.NET? I tried the following code var service = new ServiceClass(); Type serviceType = service.GetType(); MethodInfo method = serviceType.GetMethod("Method1", new Type[]{}); method.MakeGenericMethod(typeof(SomeClass)); var result = method.Invoke...
You're not using the result of MakeGenericMethod - which doesn't change the method you call it on; it returns another object representing the constructed method. You should have something like: method = method.MakeGenericMethod(typeof(SomeClass)); var result = method.Invoke(service, null); (or use a different variable,...
Calling generic method using reflection in .NET I have a question. Is it possible to call generic method using reflection in.NET? I tried the following code var service = new ServiceClass(); Type serviceType = service.GetType(); MethodInfo method = serviceType.GetMethod("Method1", new Type[]{}); method.MakeGenericMetho...
TITLE: Calling generic method using reflection in .NET QUESTION: I have a question. Is it possible to call generic method using reflection in.NET? I tried the following code var service = new ServiceClass(); Type serviceType = service.GetType(); MethodInfo method = serviceType.GetMethod("Method1", new Type[]{}); metho...
[ ".net", "generics", "reflection" ]
63
144
37,494
2
0
2011-06-01T16:13:27.273000
2011-06-01T16:15:44.173000