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,216,015
6,216,063
IE CSS issue when hitting the browsers back button
I am having an issue with IE (9 in this case) where I have uploaded a new CSS file for a page and it works just fine when I go to the page. The problem I am having is when I browse to any another page, if I then hit the back button it renders my page using a previous version of the CSS file. I verified this using the F...
you could add a parameter when calling the stylsheet...?version=2...after you.css extension
IE CSS issue when hitting the browsers back button I am having an issue with IE (9 in this case) where I have uploaded a new CSS file for a page and it works just fine when I go to the page. The problem I am having is when I browse to any another page, if I then hit the back button it renders my page using a previous v...
TITLE: IE CSS issue when hitting the browsers back button QUESTION: I am having an issue with IE (9 in this case) where I have uploaded a new CSS file for a page and it works just fine when I go to the page. The problem I am having is when I browse to any another page, if I then hit the back button it renders my page ...
[ "css", "internet-explorer" ]
1
1
1,475
2
0
2011-06-02T14:37:26.730000
2011-06-02T14:42:20.380000
6,216,019
6,216,177
Flex applications on Windows Phone 7
I'm evaluating Flex 4.5 for use as a mobile development platform. The demo version of the IDE supports android and promises to support iPhone development in future. There's no mention of Windows Phone 7. Usually, this is the sort of thing that google excels at but in this case, I've come up empty handed. I've found man...
Flex 4.5 can currently be used on Android and iPhone, however WinPhone7 is kind of out of the loop for now. There has been some demos of it shown, but who knows when Microsoft/Adobe will work together to get Flash out on Internet Explorer mobile or get to having Air on WinPhone7. I know personally that Adobe is aiming ...
Flex applications on Windows Phone 7 I'm evaluating Flex 4.5 for use as a mobile development platform. The demo version of the IDE supports android and promises to support iPhone development in future. There's no mention of Windows Phone 7. Usually, this is the sort of thing that google excels at but in this case, I've...
TITLE: Flex applications on Windows Phone 7 QUESTION: I'm evaluating Flex 4.5 for use as a mobile development platform. The demo version of the IDE supports android and promises to support iPhone development in future. There's no mention of Windows Phone 7. Usually, this is the sort of thing that google excels at but ...
[ "apache-flex", "windows-phone-7", "mobile" ]
2
2
3,062
2
0
2011-06-02T14:37:47.557000
2011-06-02T14:50:57.543000
6,216,024
6,216,492
Java applet: run native code from browser?
Is it still possible to start a 'native' application under windows via a java applet in a browser? IE "Click here to start notepad.exe" on a web page. The most recent reference I could find for this was dated 2002. Im wondering if this model / concept is no longer supported.
Yes, but the applet has to be signed. Signed applets will prompt the user to give them permission. Once given, the applet has the same rights as any application running on the machine, including the ability to launch native apps (or link native libraries, which I've had to do in the past).
Java applet: run native code from browser? Is it still possible to start a 'native' application under windows via a java applet in a browser? IE "Click here to start notepad.exe" on a web page. The most recent reference I could find for this was dated 2002. Im wondering if this model / concept is no longer supported.
TITLE: Java applet: run native code from browser? QUESTION: Is it still possible to start a 'native' application under windows via a java applet in a browser? IE "Click here to start notepad.exe" on a web page. The most recent reference I could find for this was dated 2002. Im wondering if this model / concept is no l...
[ "java", "applet" ]
1
9
7,004
3
0
2011-06-02T14:38:35.373000
2011-06-02T15:14:28.140000
6,216,026
6,216,087
Checking Duplicate Records in Table Where Id is Identity
In my table, ID is primary key field and identity column. I want to check duplicate records. (Certainly duplicate records do not have same ID) And do not have date fields same. How do I check this. Extra Detail: I have 10 columns with 1 ID, 2 Date, and other 3 string, 3 Int, 1 bit. Thansk in Advance.
You can use GROUP BY to group similar records to count them, and then add a HAVING clause to filter out only those that occur more than once: select StringCol1, StringCol2, StringCol3, IntCol1, IntCol2, IntCol3, BitCol1, count(*) as Count from MyTable group by StringCol1, StringCol2, StringCol3, IntCol1, IntCol2, IntCo...
Checking Duplicate Records in Table Where Id is Identity In my table, ID is primary key field and identity column. I want to check duplicate records. (Certainly duplicate records do not have same ID) And do not have date fields same. How do I check this. Extra Detail: I have 10 columns with 1 ID, 2 Date, and other 3 st...
TITLE: Checking Duplicate Records in Table Where Id is Identity QUESTION: In my table, ID is primary key field and identity column. I want to check duplicate records. (Certainly duplicate records do not have same ID) And do not have date fields same. How do I check this. Extra Detail: I have 10 columns with 1 ID, 2 Da...
[ "sql", "sql-server", "duplicates", "identity", "record" ]
2
4
3,411
3
0
2011-06-02T14:38:51.753000
2011-06-02T14:43:46.917000
6,216,031
6,216,334
Subscribe to events in VBA?
Did I understood correctly that you can't subscribe to an event other than using the VBA Editor's control name + event name comboboxes? There is no combobox.change+=eventhandler syntax available as in other languages like C#, is there?
Correct. Event handling is done via naming convention in VB6/VBA. The name can be the name of the control itlsef, or it can be a variable declared WithEvents. By assigning this variable a different reference, you start receiving events from that new object. This can be seen as dynamical subscribing. However, certain en...
Subscribe to events in VBA? Did I understood correctly that you can't subscribe to an event other than using the VBA Editor's control name + event name comboboxes? There is no combobox.change+=eventhandler syntax available as in other languages like C#, is there?
TITLE: Subscribe to events in VBA? QUESTION: Did I understood correctly that you can't subscribe to an event other than using the VBA Editor's control name + event name comboboxes? There is no combobox.change+=eventhandler syntax available as in other languages like C#, is there? ANSWER: Correct. Event handling is do...
[ "events", "vba", "subscribe" ]
3
4
1,186
1
0
2011-06-02T14:39:40.483000
2011-06-02T15:03:52.863000
6,216,049
6,243,650
Cannot browse to node/folder name without extension in Umbraco
I'm using IIS7 and Umbraco 4 to run a clients site but I'm having issues browsing to pages with extensionless URLS. The site is running several languages which are separated by Umbraco Folders. What I want to do is use the primary domain (.com) for all sites and request a specific one using the abbreviated country name...
so, you want to browse with directory url's then, this is very mutch possible. first, open your web.config find the line below, and make sure the value is set to true then, you will need to add a wildcard mapping in IIS the steps you will need to take in IIS7 are explained in this post: [http://learn.iis.net/page.aspx/...
Cannot browse to node/folder name without extension in Umbraco I'm using IIS7 and Umbraco 4 to run a clients site but I'm having issues browsing to pages with extensionless URLS. The site is running several languages which are separated by Umbraco Folders. What I want to do is use the primary domain (.com) for all site...
TITLE: Cannot browse to node/folder name without extension in Umbraco QUESTION: I'm using IIS7 and Umbraco 4 to run a clients site but I'm having issues browsing to pages with extensionless URLS. The site is running several languages which are separated by Umbraco Folders. What I want to do is use the primary domain (...
[ "asp.net", "iis-7", "umbraco" ]
1
2
789
2
0
2011-06-02T14:41:15.443000
2011-06-05T14:55:21.927000
6,216,058
6,216,150
cant create a trigger - sql server 2008
I'm trying the following: CREATE TRIGGER checkgrade ON [Homework4part3].[dbo].[Enrollment] FOR INSERT AS IF (NEW.grade > 20) BEGIN grade = 3 END GO and my table looks like: Enrollment(course#, QYear, SUID, units, Grade) dont know why this error showing: Msg 102, Level 15, State 1, Procedure checkgrade, Line 7 Incorrec...
There are a few problems. You need to use the Inserted meta table which covers the newly updated/inserted rows. You need to perform a proper update as the trigger executes after the update/insert, not in the middle of it. This might be closer to what's required: CREATE TRIGGER checkgrade ON [Homework4part3].[dbo].[Enro...
cant create a trigger - sql server 2008 I'm trying the following: CREATE TRIGGER checkgrade ON [Homework4part3].[dbo].[Enrollment] FOR INSERT AS IF (NEW.grade > 20) BEGIN grade = 3 END GO and my table looks like: Enrollment(course#, QYear, SUID, units, Grade) dont know why this error showing: Msg 102, Level 15, State ...
TITLE: cant create a trigger - sql server 2008 QUESTION: I'm trying the following: CREATE TRIGGER checkgrade ON [Homework4part3].[dbo].[Enrollment] FOR INSERT AS IF (NEW.grade > 20) BEGIN grade = 3 END GO and my table looks like: Enrollment(course#, QYear, SUID, units, Grade) dont know why this error showing: Msg 102...
[ ".net", "sql", "sql-server-2008", "triggers" ]
1
1
2,299
5
0
2011-06-02T14:42:05.470000
2011-06-02T14:49:22.893000
6,216,067
6,216,333
Am i disposing my ODBCConnection
I'm using a helper method like this: private OdbcCommand GetCommand(string sql) { string conString = "blah"; var con = new OdbcConnection(conString); var cmd = new OdbcCommand(sql, con); return cmd; } Then i use it like this: using (var cmd = GetCommand("select * from myTable") { cmd.connection.open(); using(var reader...
For both examples where you wrap your Reader in a using block, you will close the connection with the existing code IF you use the override that accepts a CommandBehavior and set it to 'CloseConnection' using(var reader = cmd.ExecuteReader(CommandBehavior.CloseConnection)){} see http://msdn.microsoft.com/en-us/library/...
Am i disposing my ODBCConnection I'm using a helper method like this: private OdbcCommand GetCommand(string sql) { string conString = "blah"; var con = new OdbcConnection(conString); var cmd = new OdbcCommand(sql, con); return cmd; } Then i use it like this: using (var cmd = GetCommand("select * from myTable") { cmd.co...
TITLE: Am i disposing my ODBCConnection QUESTION: I'm using a helper method like this: private OdbcCommand GetCommand(string sql) { string conString = "blah"; var con = new OdbcConnection(conString); var cmd = new OdbcCommand(sql, con); return cmd; } Then i use it like this: using (var cmd = GetCommand("select * from ...
[ "c#", ".net", "odbc", "using" ]
3
5
2,150
2
0
2011-06-02T14:42:29.373000
2011-06-02T15:03:42.950000
6,216,074
6,216,356
CSS not displaying properly after transferred to IIS 7 in IE 9
When running on dev server through VS 2010 all CSS displays properly. I publish to win server 2008 r2 with IIS 7, and when I open in IE 9 the inline-block doesnt work, the gradients dont work, and the box-shadow doesnt work. It strips out most of the CSS formatting, I load the same page in firefox and it looks the same...
Your page is running with a Document Mode other than "IE 9 Standards". Hit F12 to bring up the Developer Tools to see which it actually is. See here for instructions to work out why this is happening: http://hsivonen.iki.fi/doctype/#ie8modes Otherwise, you can fix it by adding this to the top of your: This will force I...
CSS not displaying properly after transferred to IIS 7 in IE 9 When running on dev server through VS 2010 all CSS displays properly. I publish to win server 2008 r2 with IIS 7, and when I open in IE 9 the inline-block doesnt work, the gradients dont work, and the box-shadow doesnt work. It strips out most of the CSS fo...
TITLE: CSS not displaying properly after transferred to IIS 7 in IE 9 QUESTION: When running on dev server through VS 2010 all CSS displays properly. I publish to win server 2008 r2 with IIS 7, and when I open in IE 9 the inline-block doesnt work, the gradients dont work, and the box-shadow doesnt work. It strips out ...
[ "asp.net", "css", "internet-explorer" ]
10
28
25,853
4
0
2011-06-02T14:43:07.120000
2011-06-02T15:05:05.260000
6,216,075
6,217,792
Factory Design Pattern Extend
I am reading Head First Design Pattern and at chapter of Factory. I am thinking to change one my working code to implement it. First I create IAction and ActionFactory with GetAction, from IAction I create UploadDatabase, CopyFile, UploadSharepoint, etc. This is in DLL and can be call from a exe. This is easy and done....
I'm not completely convinced that a Factory, or more correctly a Factory Method (as you appear to be trying to use it) is the correct choice here. The reason I say that is you seem to have overlooked some things. Typically, a Factory Method makes most sense when you will be performing operations that are doing similar ...
Factory Design Pattern Extend I am reading Head First Design Pattern and at chapter of Factory. I am thinking to change one my working code to implement it. First I create IAction and ActionFactory with GetAction, from IAction I create UploadDatabase, CopyFile, UploadSharepoint, etc. This is in DLL and can be call from...
TITLE: Factory Design Pattern Extend QUESTION: I am reading Head First Design Pattern and at chapter of Factory. I am thinking to change one my working code to implement it. First I create IAction and ActionFactory with GetAction, from IAction I create UploadDatabase, CopyFile, UploadSharepoint, etc. This is in DLL an...
[ "design-patterns", "factory-pattern" ]
1
2
1,104
1
0
2011-06-02T14:43:11.167000
2011-06-02T17:14:24.233000
6,216,078
6,231,077
MongoDB (PHP) - Custom "id", and OrderWith number
First to say that I'm new to MongoDb and document oriented db's in general. After some trouble with embedded documents in mongodb (unable to select only nested document (example single comment in blog post)), I redesigned the db. Now I have two collections, posts and comments (not the real deal, using blog example for ...
Am I doing it right? This is a really difficult question. Does it work? Does it meet your performance needs, are you comfortable maintaining it? MongoDB doesn't have any notion of "normalization" or the "the one true way". You model your data in a way that works for you. What is the best way to generate that kind of co...
MongoDB (PHP) - Custom "id", and OrderWith number First to say that I'm new to MongoDb and document oriented db's in general. After some trouble with embedded documents in mongodb (unable to select only nested document (example single comment in blog post)), I redesigned the db. Now I have two collections, posts and co...
TITLE: MongoDB (PHP) - Custom "id", and OrderWith number QUESTION: First to say that I'm new to MongoDb and document oriented db's in general. After some trouble with embedded documents in mongodb (unable to select only nested document (example single comment in blog post)), I redesigned the db. Now I have two collect...
[ "php", "mongodb" ]
3
3
894
2
0
2011-06-02T14:43:23.157000
2011-06-03T18:20:45.757000
6,216,079
6,225,967
Popup Dialog Not Re-drawing after initial launch
I have a dropdown listbox on my main page with a button on the same page that launches a pop-up dialog box, also having a dropdown list box. I need the selected index of the 1st listbox control to be synched with the pop-up dialog dropdown listbox. I have added code to my Controller that sets the index in the ViewData ...
First time it works because its value is set on server side. once its rendered in the browser there is no server side left. you have to manually change the selected value of your telerik dropdown list on button click event next to your first drop down list (is first DD also telerik dropdown or html one). For client eve...
Popup Dialog Not Re-drawing after initial launch I have a dropdown listbox on my main page with a button on the same page that launches a pop-up dialog box, also having a dropdown list box. I need the selected index of the 1st listbox control to be synched with the pop-up dialog dropdown listbox. I have added code to m...
TITLE: Popup Dialog Not Re-drawing after initial launch QUESTION: I have a dropdown listbox on my main page with a button on the same page that launches a pop-up dialog box, also having a dropdown list box. I need the selected index of the 1st listbox control to be synched with the pop-up dialog dropdown listbox. I ha...
[ "asp.net-mvc", "telerik", "telerik-mvc" ]
0
1
186
1
0
2011-06-02T14:43:23.717000
2011-06-03T10:35:28.337000
6,216,094
6,218,884
Implementing the APNG Render Function
Hey everyone, So, I'm currently trying the implement the APNG Specification, but am having some trouble with the frame rendering. My function is private void UpdateUI() { foreach (PictureBox pb in pics) { APNGBox box = (APNGBox)pb.Tag; APNGLib.APNG png = box.png; if (box.buffer == null) { box.buffer = new Bitmap((int)p...
So, I was able to figure it out in the end, and will post here in case anyone in the future comes across a similar problem. Turns out the issue was largely threefold: One should not change the 'previous buffer' if the frame type is 'PREVIOUS' One should use the previous frame's dispose_op, not the dispose_op of the cur...
Implementing the APNG Render Function Hey everyone, So, I'm currently trying the implement the APNG Specification, but am having some trouble with the frame rendering. My function is private void UpdateUI() { foreach (PictureBox pb in pics) { APNGBox box = (APNGBox)pb.Tag; APNGLib.APNG png = box.png; if (box.buffer == ...
TITLE: Implementing the APNG Render Function QUESTION: Hey everyone, So, I'm currently trying the implement the APNG Specification, but am having some trouble with the frame rendering. My function is private void UpdateUI() { foreach (PictureBox pb in pics) { APNGBox box = (APNGBox)pb.Tag; APNGLib.APNG png = box.png; ...
[ "c#", "winforms", "render", "apng" ]
5
7
3,074
1
0
2011-06-02T14:44:02.767000
2011-06-02T18:43:17.503000
6,216,095
6,218,961
What are the differences between MFCC and BFCC?
I have implemented MFCC algorithm and want to implement BFCC. What are the differences between them and is it enough just to use another function instead of frequency to mel (2595 * Math.log10(1 + frequency / 700) ) and mel to frequency functions (700 * (Math.pow(10, mel / 2595) - 1) ) I follow that code: MFCC PS: Does...
These are just different scales of representing the frequency spacings of the filters. MFCC uses filters whose center frequencies are spaced along the mel scale, while BFCC will use filters with center frequencies spaced along the bark scale. The bark scale would simply be represented as: Bark(f)=13*arctan(0.00076*f)+3...
What are the differences between MFCC and BFCC? I have implemented MFCC algorithm and want to implement BFCC. What are the differences between them and is it enough just to use another function instead of frequency to mel (2595 * Math.log10(1 + frequency / 700) ) and mel to frequency functions (700 * (Math.pow(10, mel ...
TITLE: What are the differences between MFCC and BFCC? QUESTION: I have implemented MFCC algorithm and want to implement BFCC. What are the differences between them and is it enough just to use another function instead of frequency to mel (2595 * Math.log10(1 + frequency / 700) ) and mel to frequency functions (700 * ...
[ "java", "algorithm", "signal-processing", "mfcc" ]
2
5
2,215
2
0
2011-06-02T14:44:04.250000
2011-06-02T18:50:32.127000
6,216,104
6,218,767
How to configure visual studio to ask to commit the code after a successful build?
Since it's the best practice to commit early, commit often I would like to be promoted with a dialog that will ask for a commit message and will commit to my local mercurial repository that I am working on. What's the easiest way to implement such a feature? I would like to avoid writing am add-in if possible. One idea...
First of all, I doubt you really want to do that. Most patterns related to version control dictates that you want to know what the change was about. I build many times during the implementation of a single bug-fix, but your question leads me to think that you would think it was OK to get N commits, most of them bad, in...
How to configure visual studio to ask to commit the code after a successful build? Since it's the best practice to commit early, commit often I would like to be promoted with a dialog that will ask for a commit message and will commit to my local mercurial repository that I am working on. What's the easiest way to impl...
TITLE: How to configure visual studio to ask to commit the code after a successful build? QUESTION: Since it's the best practice to commit early, commit often I would like to be promoted with a dialog that will ask for a commit message and will commit to my local mercurial repository that I am working on. What's the e...
[ "visual-studio", "mercurial", "batch-file" ]
0
2
498
1
0
2011-06-02T14:44:55.340000
2011-06-02T18:33:12.377000
6,216,107
6,216,536
Inventory design approach (inheritance vs generics)
Greetings! I am trying to decide on which is the best approach to implement a following scenario: Vehicle and Part are both "entites" which can be an Item in an Inventory. Vehicle has the usual VIN, Year, Make, Model, Type, etc, etc... while Part has PartNumber, QuantityOnHand, IsPartOfSet, Vendor... When "stocked" in ...
I'd create an abstract base class representing any item that is potentially held in inventory. Something like InventoryItem. It would have the basic properties you mention that everything has in common: RetailPrice, PurchasePrice, PurchaseDate, etc. And it would provide a default implementation (where appropriate) for ...
Inventory design approach (inheritance vs generics) Greetings! I am trying to decide on which is the best approach to implement a following scenario: Vehicle and Part are both "entites" which can be an Item in an Inventory. Vehicle has the usual VIN, Year, Make, Model, Type, etc, etc... while Part has PartNumber, Quant...
TITLE: Inventory design approach (inheritance vs generics) QUESTION: Greetings! I am trying to decide on which is the best approach to implement a following scenario: Vehicle and Part are both "entites" which can be an Item in an Inventory. Vehicle has the usual VIN, Year, Make, Model, Type, etc, etc... while Part has...
[ "c#", "generics", "inheritance", "class-design" ]
0
2
1,308
4
0
2011-06-02T14:45:19.273000
2011-06-02T15:17:42.093000
6,216,113
6,216,182
How to detect that my application is running in VS 2008 with debugger attached?
Previously I was doing a lot of WinForms components and we had something like "InDesigner". I'm wondering if there is something similar like "IsWithDebuggerAttached".
You could investigate System.Diagnostics.Debugger.IsAttached. This will tell you whether or not a debugger is attached to your application. Whether or not it's Visual Studio is another story.
How to detect that my application is running in VS 2008 with debugger attached? Previously I was doing a lot of WinForms components and we had something like "InDesigner". I'm wondering if there is something similar like "IsWithDebuggerAttached".
TITLE: How to detect that my application is running in VS 2008 with debugger attached? QUESTION: Previously I was doing a lot of WinForms components and we had something like "InDesigner". I'm wondering if there is something similar like "IsWithDebuggerAttached". ANSWER: You could investigate System.Diagnostics.Debug...
[ "c#", ".net", "visual-studio-2008", "debugging" ]
0
3
183
2
0
2011-06-02T14:45:36.423000
2011-06-02T14:51:29.867000
6,216,115
6,216,174
Using jQuery in table to display single cell contents of selected row outside of table
This is essentially my table inside of a loop: <%= attachment.Name %> <%= attachment.Description %> Preview <%= attachment.ContentsAsHtml %> From this I get multiple rows with data. I want to have a preview button on the end of the row, the last column, that will 'preview' the contents in a div further down the page. I...
You can assign a class for the anchor. That will make the job easier. For e.g. $('.clickPreviewClass').click(function () { var newContent =$(this).next("div").text(); $('#divAttachmentPreview').html(newContent); }); assuming clickPreviewClass is the name of the class you give your anchor.
Using jQuery in table to display single cell contents of selected row outside of table This is essentially my table inside of a loop: <%= attachment.Name %> <%= attachment.Description %> Preview <%= attachment.ContentsAsHtml %> From this I get multiple rows with data. I want to have a preview button on the end of the r...
TITLE: Using jQuery in table to display single cell contents of selected row outside of table QUESTION: This is essentially my table inside of a loop: <%= attachment.Name %> <%= attachment.Description %> Preview <%= attachment.ContentsAsHtml %> From this I get multiple rows with data. I want to have a preview button o...
[ "javascript", "jquery", "datatable" ]
0
3
1,115
1
0
2011-06-02T14:45:49.853000
2011-06-02T14:50:47.010000
6,216,125
6,216,170
unset form submit button
Email unset( $_POST['vendor_add_submit'] ); is used to prevent more than one time insertion into db on page refresh. I tested with print_r($_POST['vendor_add_submit'] ) before and after the unset and found that the unset() function does not work. How can I achieve the purpose of the unset function, plz?
Unset isn't going to stop the refresh from being able to replay the POSTed data to the script. The unset function eliminated it for the remaining execution of that script, but a refresh is a fresh execution. You could simply re-direct the browser to the entry pageafter doing your insert, that way a subsequent refresh w...
unset form submit button Email unset( $_POST['vendor_add_submit'] ); is used to prevent more than one time insertion into db on page refresh. I tested with print_r($_POST['vendor_add_submit'] ) before and after the unset and found that the unset() function does not work. How can I achieve the purpose of the unset funct...
TITLE: unset form submit button QUESTION: Email unset( $_POST['vendor_add_submit'] ); is used to prevent more than one time insertion into db on page refresh. I tested with print_r($_POST['vendor_add_submit'] ) before and after the unset and found that the unset() function does not work. How can I achieve the purpose ...
[ "php", "html" ]
2
3
17,959
3
0
2011-06-02T14:46:38.340000
2011-06-02T14:50:25.517000
6,216,132
6,216,538
Swing thread safety boilerplate
For the sake of simplicity, imagine an application that downloads a file. There is a simple GUI with one label that displays progress. To avoid EDT violations, like every lawful citizen I download the file in one thread (main), and update GUI in another (EDT). So, here's the relevant chunk of pseudcode: class Downloade...
There is not much you can do to avoid the boilerplate code without introducing a lot of redundant code elsewhere. But you can make it a little bit nicer with a small abstract helper class and some unusual formatting. public abstract static class SwingTask implements Runnable { public void start() { SwingUtilities.invok...
Swing thread safety boilerplate For the sake of simplicity, imagine an application that downloads a file. There is a simple GUI with one label that displays progress. To avoid EDT violations, like every lawful citizen I download the file in one thread (main), and update GUI in another (EDT). So, here's the relevant chu...
TITLE: Swing thread safety boilerplate QUESTION: For the sake of simplicity, imagine an application that downloads a file. There is a simple GUI with one label that displays progress. To avoid EDT violations, like every lawful citizen I download the file in one thread (main), and update GUI in another (EDT). So, here'...
[ "java", "swing", "boilerplate", "edt" ]
2
1
507
5
0
2011-06-02T14:47:33.360000
2011-06-02T15:17:50.440000
6,216,133
6,216,309
Service crashes with exception: Faulting module name: MSVCR100.dll
For some reason service crashes with message in the event viewer saying "Faulting module name: MSVCR100.dll" no any other useful information. It kills the whole process. We can not find what causes this problem and can't catch this exception. We are not referencing this module in our source. Service is running on Windo...
A quick Google search shows this to be a common error for a variety of applications. It also reveals this is a common underlying library. I have a couple of potential suggestions, as a quick search revealed no firm answer that matches your issue exactly. One possibility is this library is unregistered in Windows. This ...
Service crashes with exception: Faulting module name: MSVCR100.dll For some reason service crashes with message in the event viewer saying "Faulting module name: MSVCR100.dll" no any other useful information. It kills the whole process. We can not find what causes this problem and can't catch this exception. We are not...
TITLE: Service crashes with exception: Faulting module name: MSVCR100.dll QUESTION: For some reason service crashes with message in the event viewer saying "Faulting module name: MSVCR100.dll" no any other useful information. It kills the whole process. We can not find what causes this problem and can't catch this exc...
[ "c#", "wcf", "exception", "windows-services" ]
1
0
10,389
2
0
2011-06-02T14:47:51.893000
2011-06-02T15:01:13.997000
6,216,140
6,216,242
See if Dictionary Item is the last one in the dictionary
Given the code.. var dictionary = new Dictionary { { "something", "something-else" }, { "another", "another-something-else" } }; dictionary.ForEach( item => { bool isLast = //...? // do something if this is the last item }); I basically want to see if the item I am working with inside of the ForEach iteration is the ...
Dictionary.Last returns a KeyValuePair, and you are comparing that to just the value of a key. You'd instead need to check: dictionary[item.Key].Equals( dictionary.Last().Value ) Also IAbstract was correct that you'd probably need to use an OrderedDictionary.
See if Dictionary Item is the last one in the dictionary Given the code.. var dictionary = new Dictionary { { "something", "something-else" }, { "another", "another-something-else" } }; dictionary.ForEach( item => { bool isLast = //...? // do something if this is the last item }); I basically want to see if the item ...
TITLE: See if Dictionary Item is the last one in the dictionary QUESTION: Given the code.. var dictionary = new Dictionary { { "something", "something-else" }, { "another", "another-something-else" } }; dictionary.ForEach( item => { bool isLast = //...? // do something if this is the last item }); I basically want t...
[ "c#", "linq", "dictionary" ]
4
15
11,211
8
0
2011-06-02T14:48:20.847000
2011-06-02T14:55:21.207000
6,216,141
6,216,193
What is the best way to cache database query on asp.net-mvc website for performance?
Possible Duplicate: Caching in asp.net-mvc i have an asp.net-mvc site and i am running an expensive database query, where the results rarely change, so i wanted to adding caching, so when other users bring up the same web page it doesn't go out to the db but just grabs from this cache. (and maybe forced a db get on som...
Memcached is a good solution. It basically is a key/value dictionary that runs in memory as a separate process. You can check the cache first, then grab from the database if it has expired.
What is the best way to cache database query on asp.net-mvc website for performance? Possible Duplicate: Caching in asp.net-mvc i have an asp.net-mvc site and i am running an expensive database query, where the results rarely change, so i wanted to adding caching, so when other users bring up the same web page it doesn...
TITLE: What is the best way to cache database query on asp.net-mvc website for performance? QUESTION: Possible Duplicate: Caching in asp.net-mvc i have an asp.net-mvc site and i am running an expensive database query, where the results rarely change, so i wanted to adding caching, so when other users bring up the same...
[ "asp.net-mvc", "caching" ]
0
1
863
1
0
2011-06-02T14:48:34.347000
2011-06-02T14:52:00.133000
6,216,152
6,216,341
Aspnet LinqtoTwitter - PageCycle Issues
I am currently working on the linqtotwitter library. I am using cookies to store the token and key. My problem isnt with the api as much. It is more with ASP net and page life cycle. The problem i have with my webform app is the same with the aspnet webform defaultasp sample same at linqtotwitter site. This is how the ...
You could throw the tokens into Session if you have it enabled, that might solve your issue.
Aspnet LinqtoTwitter - PageCycle Issues I am currently working on the linqtotwitter library. I am using cookies to store the token and key. My problem isnt with the api as much. It is more with ASP net and page life cycle. The problem i have with my webform app is the same with the aspnet webform defaultasp sample same...
TITLE: Aspnet LinqtoTwitter - PageCycle Issues QUESTION: I am currently working on the linqtotwitter library. I am using cookies to store the token and key. My problem isnt with the api as much. It is more with ASP net and page life cycle. The problem i have with my webform app is the same with the aspnet webform defa...
[ "asp.net", "webforms", "twitter" ]
1
0
214
1
0
2011-06-02T14:49:33.847000
2011-06-02T15:04:15.187000
6,216,158
6,216,183
Working on eclipse project in subversion
All, I have a 20 member dev team working on a development project. To provide greater control we have created a workspace with necessary projects and configurations (like project preferences, set-ups etc) in IBM RAD. The idea is to have the pre-configured project in subversion so that when the dev team members checkout...
I think svn ignore will solve your problem. check http://svnbook.red-bean.com/en/1.1/ch07s02.html The svn:ignore property contains a list of file patterns which certain Subversion operations will ignore. Perhaps the most commonly used special property, it works in conjunction with the global-ignores run-time configurat...
Working on eclipse project in subversion All, I have a 20 member dev team working on a development project. To provide greater control we have created a workspace with necessary projects and configurations (like project preferences, set-ups etc) in IBM RAD. The idea is to have the pre-configured project in subversion s...
TITLE: Working on eclipse project in subversion QUESTION: All, I have a 20 member dev team working on a development project. To provide greater control we have created a workspace with necessary projects and configurations (like project preferences, set-ups etc) in IBM RAD. The idea is to have the pre-configured proje...
[ "eclipse", "svn", "process", "ibm-rad" ]
1
2
196
2
0
2011-06-02T14:49:54.737000
2011-06-02T14:51:32.203000
6,216,160
6,216,251
How to unsecure /** URL pattern in spring-security
I'm trying to unsecure the /** pattern, but all my tries are in vain so far. This is what I'm doing: My configuration doesn't contain any more intercept-url definitions. However after accessing any URL I still get redirected to the default entry point... I debugged the spring security source and I can actually see the ...
at least in grails, you could set the security setting to IS_AUTHENTICATED_ANONYMOUSLY. Since the grails spring security plugin is based on spring security, I bet this would work. no need to play with filters or anything.
How to unsecure /** URL pattern in spring-security I'm trying to unsecure the /** pattern, but all my tries are in vain so far. This is what I'm doing: My configuration doesn't contain any more intercept-url definitions. However after accessing any URL I still get redirected to the default entry point... I debugged the...
TITLE: How to unsecure /** URL pattern in spring-security QUESTION: I'm trying to unsecure the /** pattern, but all my tries are in vain so far. This is what I'm doing: My configuration doesn't contain any more intercept-url definitions. However after accessing any URL I still get redirected to the default entry point...
[ "java", "spring", "jboss", "spring-security" ]
5
2
12,904
2
0
2011-06-02T14:50:02.047000
2011-06-02T14:56:27.853000
6,216,165
6,223,160
Debugging Silverlight in Visual Studio 2010
I have an MVC application which uses a silverlight control. Somewhere along the line something is happening in the silverlight cs code that isn't right. I've inserted break points in the CS silverlight code to get a better idea of what's happening, but for some reason I just can't step through the code. I know code is ...
Be sure to set the Silverlight Debugging checkbox on the project properties Web tab
Debugging Silverlight in Visual Studio 2010 I have an MVC application which uses a silverlight control. Somewhere along the line something is happening in the silverlight cs code that isn't right. I've inserted break points in the CS silverlight code to get a better idea of what's happening, but for some reason I just ...
TITLE: Debugging Silverlight in Visual Studio 2010 QUESTION: I have an MVC application which uses a silverlight control. Somewhere along the line something is happening in the silverlight cs code that isn't right. I've inserted break points in the CS silverlight code to get a better idea of what's happening, but for s...
[ "c#", "silverlight", "debugging", "breakpoints" ]
7
17
14,473
5
0
2011-06-02T14:50:12.083000
2011-06-03T05:04:42.720000
6,216,175
6,230,529
Paging or segmentation for virtual memory, which is better?
Most OSes use paging for virtual memory. Why is this? Why not use segmentation? Is it just because of a hardware issue? Is one better than the other in certain cases? Basically, if you had to choose one over the other, which one would you want to use and why? Let's assume it's an x86 for argument's sake.
Note, that Single-Address-Space Operating Systems sometimes use segmentation to isolate processes.
Paging or segmentation for virtual memory, which is better? Most OSes use paging for virtual memory. Why is this? Why not use segmentation? Is it just because of a hardware issue? Is one better than the other in certain cases? Basically, if you had to choose one over the other, which one would you want to use and why? ...
TITLE: Paging or segmentation for virtual memory, which is better? QUESTION: Most OSes use paging for virtual memory. Why is this? Why not use segmentation? Is it just because of a hardware issue? Is one better than the other in certain cases? Basically, if you had to choose one over the other, which one would you wan...
[ "operating-system", "paging", "virtual-memory", "memory-segmentation" ]
6
2
8,490
3
0
2011-06-02T14:50:50.177000
2011-06-03T17:29:05.550000
6,216,204
6,216,359
Calling unix shell script remotely from C#
In my current project, i need to call a Unix shell script from the C# application. I also need to get the response back whether the script has been execute successfully or any error has occurred. The C# program is running on a Windows machine. I need to connect to a Unix machine and execute the script. Can anyone let m...
Will this solve your problem? sharpSsh - A Secure Shell (SSH) library for.NET Update Refer to the developer's site for SharpSSH for more information on how to use the tool. Update 2 change link of developer site to archived link.
Calling unix shell script remotely from C# In my current project, i need to call a Unix shell script from the C# application. I also need to get the response back whether the script has been execute successfully or any error has occurred. The C# program is running on a Windows machine. I need to connect to a Unix machi...
TITLE: Calling unix shell script remotely from C# QUESTION: In my current project, i need to call a Unix shell script from the C# application. I also need to get the response back whether the script has been execute successfully or any error has occurred. The C# program is running on a Windows machine. I need to conne...
[ "c#", "shell", "unix" ]
6
4
10,009
3
0
2011-06-02T14:52:52.893000
2011-06-02T15:05:18.960000
6,216,212
6,216,344
Problem changing icon in Delphi 2007
I've been working with a program someone else has made and I wanted to change the icon. The icon I have is 256x256. I used http://converticon.com/ to create the icon (from a bmp I think). I used the icon in Inno Setup to create an installer and it worked fine So I go to Options -> Application and attempt to load it. Ho...
The "icon" file is actually a collection of images, at different resolution and using different encodings. When I'm creating my icons I'm making sure they don't actually contain the 256x256 PNG-encoded version because development tools built before Windows Vista don't understand that. And that includes your Delphi 2007...
Problem changing icon in Delphi 2007 I've been working with a program someone else has made and I wanted to change the icon. The icon I have is 256x256. I used http://converticon.com/ to create the icon (from a bmp I think). I used the icon in Inno Setup to create an installer and it worked fine So I go to Options -> A...
TITLE: Problem changing icon in Delphi 2007 QUESTION: I've been working with a program someone else has made and I wanted to change the icon. The icon I have is 256x256. I used http://converticon.com/ to create the icon (from a bmp I think). I used the icon in Inno Setup to create an installer and it worked fine So I ...
[ "delphi", "icons" ]
6
5
5,788
3
0
2011-06-02T14:53:17.197000
2011-06-02T15:04:24.043000
6,216,224
6,223,998
Use maven repository as local ivy cache
Is there any possibility to use local Maven repository (~/.m2) as local Ivy cache (~/.ivy)? They have different layouts. Sometimes I use Maven and sometimes I use SBT which uses Ivy underneath, so I have 2 copies of same libs in both Maven and Ivy. I would like to use same dir thus saving disk space and network. Thanks...
You can specify the cache and the layout of the cache by using the Tag. I think you will have to alter the patterns for the artifacts/ivy.xml files. The Tag is described here: http://ant.apache.org/ivy/history/2.0.0/settings/caches.html. It seems that it should work, but I've never tried:).
Use maven repository as local ivy cache Is there any possibility to use local Maven repository (~/.m2) as local Ivy cache (~/.ivy)? They have different layouts. Sometimes I use Maven and sometimes I use SBT which uses Ivy underneath, so I have 2 copies of same libs in both Maven and Ivy. I would like to use same dir th...
TITLE: Use maven repository as local ivy cache QUESTION: Is there any possibility to use local Maven repository (~/.m2) as local Ivy cache (~/.ivy)? They have different layouts. Sometimes I use Maven and sometimes I use SBT which uses Ivy underneath, so I have 2 copies of same libs in both Maven and Ivy. I would like ...
[ "maven-2", "ivy" ]
29
5
8,910
2
0
2011-06-02T14:54:11.600000
2011-06-03T06:59:54.453000
6,216,229
6,216,358
check database row object exist or not for a given primary key?
Hi I access row object through Zend_Db_Table like $id = $_GET['id']; $userTb = new Model_DbTable_Users(); //Here Model_DbTable_Users is subclass of Zend_Db_Table $user = $userTb->find($id)->current(); Now how can I check using $user row object that whether $id is valid or not like what if that 'id' does not exist in da...
If there are no rows in the rowset, current() returns null: $user = $userTb->find($id)->current(); if ($user) { // $user is a valid row } else { // no rows found }
check database row object exist or not for a given primary key? Hi I access row object through Zend_Db_Table like $id = $_GET['id']; $userTb = new Model_DbTable_Users(); //Here Model_DbTable_Users is subclass of Zend_Db_Table $user = $userTb->find($id)->current(); Now how can I check using $user row object that whether...
TITLE: check database row object exist or not for a given primary key? QUESTION: Hi I access row object through Zend_Db_Table like $id = $_GET['id']; $userTb = new Model_DbTable_Users(); //Here Model_DbTable_Users is subclass of Zend_Db_Table $user = $userTb->find($id)->current(); Now how can I check using $user row o...
[ "php", "mysql", "database", "zend-framework", "row" ]
1
2
1,407
1
0
2011-06-02T14:54:22.797000
2011-06-02T15:05:15.370000
6,216,231
6,219,690
ValidationRule binding to windows context
I'm trying to make ValidationRule which depends on some property from (for example) data model. I have TextBox with validator which have to know about the model object "Scheme". I've tryed to add Scheme into Resources but this didn't work. And after I've found some solution relying on dependency properties. According t...
What are you binding to that you are trying to add Validation for. How I usually handle this by having the object I am binding to implement IDataErrorInfo. Then I can put my error handling in that object and have access to anything I need. This would be possible if you are in control of the object you are Binding to.
ValidationRule binding to windows context I'm trying to make ValidationRule which depends on some property from (for example) data model. I have TextBox with validator which have to know about the model object "Scheme". I've tryed to add Scheme into Resources but this didn't work. And after I've found some solution rel...
TITLE: ValidationRule binding to windows context QUESTION: I'm trying to make ValidationRule which depends on some property from (for example) data model. I have TextBox with validator which have to know about the model object "Scheme". I've tryed to add Scheme into Resources but this didn't work. And after I've found...
[ "wpf", "binding" ]
1
0
244
1
0
2011-06-02T14:54:23.297000
2011-06-02T19:58:39.473000
6,216,232
6,216,621
C++ nested lambda bug in VS2010 with lambda parameter capture?
I'm using Visual Studio 2010, which apparently has some buggy behavior on lambdas, and have this nested lambda, where the inner lambda returns a second lambda wrapped as a std::function (cf. "Higher-order Lambda Functions" on MSDN ): int x = 0; auto lambda = [&]( int n ) { return std::function ( [&] // Note capture { x...
It is not a bug, since n goes out of scope after lambdas return statement, thus the capture by reference is invalidated by the time you use it. int x = 0; auto lambda = [&]( int n ) { return std::function ( // n is local to "lambda" and is destroyed after return statement, thus when you call the std::function, the refe...
C++ nested lambda bug in VS2010 with lambda parameter capture? I'm using Visual Studio 2010, which apparently has some buggy behavior on lambdas, and have this nested lambda, where the inner lambda returns a second lambda wrapped as a std::function (cf. "Higher-order Lambda Functions" on MSDN ): int x = 0; auto lambda ...
TITLE: C++ nested lambda bug in VS2010 with lambda parameter capture? QUESTION: I'm using Visual Studio 2010, which apparently has some buggy behavior on lambdas, and have this nested lambda, where the inner lambda returns a second lambda wrapped as a std::function (cf. "Higher-order Lambda Functions" on MSDN ): int x...
[ "c++", "visual-studio-2010", "lambda", "c++11" ]
7
8
1,951
2
0
2011-06-02T14:54:23.953000
2011-06-02T15:24:00.553000
6,216,234
6,216,325
Disable AJAX Caching
I am in a bit of a pickle right now. I am building a web page that will get data from a CGI backend. I have no control over the CGI backend, nor the server (so no mod_headers or mod_expires). Also, because of the parameters to the script, I cannot append a unique value (like '&089u0af0d98) to each request. The requests...
You can send random parameters using POST, while sending the important vars using GET if you need to. If you have problems with IE, I know that sending something with POST makes it to stop caching server responses
Disable AJAX Caching I am in a bit of a pickle right now. I am building a web page that will get data from a CGI backend. I have no control over the CGI backend, nor the server (so no mod_headers or mod_expires). Also, because of the parameters to the script, I cannot append a unique value (like '&089u0af0d98) to each ...
TITLE: Disable AJAX Caching QUESTION: I am in a bit of a pickle right now. I am building a web page that will get data from a CGI backend. I have no control over the CGI backend, nor the server (so no mod_headers or mod_expires). Also, because of the parameters to the script, I cannot append a unique value (like '&089...
[ "ajax" ]
11
13
52,786
5
0
2011-06-02T14:54:30.257000
2011-06-02T15:03:07.413000
6,216,235
6,216,298
Using SQLDF to select specific values from a column
SQLDF newbie here. I have a data frame which has about 15,000 rows and 1 column. The data looks like: cars autocar carsinfo whatisthat donnadrive car telephone... I wanted to use the package sqldf to loop through the column and pick all values which contain "car" anywhere in their value. However, the following code gen...
Using = will only return exact matches. You should probably use the like operator combined with the wildcards % or _. The % wildcard will match multiple characters, while _ matches a single character. Something like the following will find all instances of car, e.g. "cars", "motorcar", etc: sqldf("SELECT Keyword FROM d...
Using SQLDF to select specific values from a column SQLDF newbie here. I have a data frame which has about 15,000 rows and 1 column. The data looks like: cars autocar carsinfo whatisthat donnadrive car telephone... I wanted to use the package sqldf to loop through the column and pick all values which contain "car" anyw...
TITLE: Using SQLDF to select specific values from a column QUESTION: SQLDF newbie here. I have a data frame which has about 15,000 rows and 1 column. The data looks like: cars autocar carsinfo whatisthat donnadrive car telephone... I wanted to use the package sqldf to loop through the column and pick all values which ...
[ "sql", "r" ]
3
7
13,425
4
0
2011-06-02T14:54:34.810000
2011-06-02T15:00:21.757000
6,216,236
6,216,276
PHP/MySQL Many-to-many relationship - the next step here
I'm new to advanced MySQL having only come across many-to-many relationships yesterday. I'm working on a project where users can join multiple projects and projects can accommodate multiple users. My tables are: Users - ID, name, email, password etc Projects - ID, name, URL etc Following advice from this site, I have s...
Projects for a given user: SELECT * FROM Projects p LEFT JOIN users_projects up ON p.projects_id = up.projects_id WHERE up.users_id = [INSERT USERID HERE]
PHP/MySQL Many-to-many relationship - the next step here I'm new to advanced MySQL having only come across many-to-many relationships yesterday. I'm working on a project where users can join multiple projects and projects can accommodate multiple users. My tables are: Users - ID, name, email, password etc Projects - ID...
TITLE: PHP/MySQL Many-to-many relationship - the next step here QUESTION: I'm new to advanced MySQL having only come across many-to-many relationships yesterday. I'm working on a project where users can join multiple projects and projects can accommodate multiple users. My tables are: Users - ID, name, email, password...
[ "php", "mysql", "many-to-many" ]
1
1
433
3
0
2011-06-02T14:54:40.097000
2011-06-02T14:58:43.547000
6,216,239
6,216,379
ASP.NET GridView/ListView Print Functionality
I'm trying to give users an ability to print asp.net gridview/listview report. Could anyone please guide me how it's best achieved? Ability to export to Excel/PDF would be good as well. Thank you in advance.
Set up a print stylesheet that strips out everything you don't want on the page. Have a javascript print button for printing the page. Job done.
ASP.NET GridView/ListView Print Functionality I'm trying to give users an ability to print asp.net gridview/listview report. Could anyone please guide me how it's best achieved? Ability to export to Excel/PDF would be good as well. Thank you in advance.
TITLE: ASP.NET GridView/ListView Print Functionality QUESTION: I'm trying to give users an ability to print asp.net gridview/listview report. Could anyone please guide me how it's best achieved? Ability to export to Excel/PDF would be good as well. Thank you in advance. ANSWER: Set up a print stylesheet that strips o...
[ "asp.net" ]
0
0
654
1
0
2011-06-02T14:55:01.627000
2011-06-02T15:06:47.570000
6,216,246
6,216,363
android internet connection
I am using the following code to see if user have internet connection (WIFI or 3G or Edge). Why does some users get "No internet connection" when they do have it? try{ ConnectivityManager connec = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); State wifi = connec.getNetworkInfo(1).getState(); if ...
My guess would be that connec.getNetworkInfo(0) and connec.getNetworkInfo(1) aren't always valid for the wifi/3g network interfaces. Try checking the 'TypeName' of the interfaces. I use this code... public boolean HaveNetworkConnection() { boolean HaveConnectedWifi = false; boolean HaveConnectedMobile = false; Connect...
android internet connection I am using the following code to see if user have internet connection (WIFI or 3G or Edge). Why does some users get "No internet connection" when they do have it? try{ ConnectivityManager connec = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); State wifi = connec.getNet...
TITLE: android internet connection QUESTION: I am using the following code to see if user have internet connection (WIFI or 3G or Edge). Why does some users get "No internet connection" when they do have it? try{ ConnectivityManager connec = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); State wi...
[ "android", "connection" ]
0
1
1,159
1
0
2011-06-02T14:55:55.840000
2011-06-02T15:05:41.067000
6,216,257
6,224,768
Looking for Convenience Factory To Create GroovyObjectSupport Instances
I want to be able to create instances of GroovyObjectSupport (in Java) that wrap simple pojos (of any class) on the fly. I was hoping to find something that examined the class type of a provided pojo and implemented the GroovyObjectSupport constructs in AOP/ByteCode, but I'm open to any good ideas. Ideally it would loo...
Could you get away with wrapping it in a Proxy? ie: you can do this: import groovy.util.Proxy... String s = new String( "tim" ) Proxy p = new Proxy().wrap( s )... // Then in Groovy, you can do: println p.length() // 3 println p.adaptee.class.name // "java.lang.String" The Proxy class extends GroovyObjectSupport
Looking for Convenience Factory To Create GroovyObjectSupport Instances I want to be able to create instances of GroovyObjectSupport (in Java) that wrap simple pojos (of any class) on the fly. I was hoping to find something that examined the class type of a provided pojo and implemented the GroovyObjectSupport construc...
TITLE: Looking for Convenience Factory To Create GroovyObjectSupport Instances QUESTION: I want to be able to create instances of GroovyObjectSupport (in Java) that wrap simple pojos (of any class) on the fly. I was hoping to find something that examined the class type of a provided pojo and implemented the GroovyObje...
[ "java", "groovy", "metaclass" ]
3
1
310
1
0
2011-06-02T14:56:41.143000
2011-06-03T08:33:46.503000
6,216,261
6,216,348
LinkButton in DataGrid, to trigger Multiple UpdatePanels
I have a datagrid which lists products and their market share - (dgProd). That datagrid is in a DIV to provide scrolling. Clicking on one of the product names shows two more div/datagrid combinations - one with a summary (dgSummary) and one with with the detail records (dgDetail). The postback of the dgProd provides th...
You could do this with jQuery. Create a new ASP Page that contains your product detail and Product Summary In the new ASp Page, Load the Summary Grid into a Div with id="Summary", Load the Detail into a Div with id="Detail" Then, call your new Page with a jQuery.ajax(); call.. You can then load each of the "content" di...
LinkButton in DataGrid, to trigger Multiple UpdatePanels I have a datagrid which lists products and their market share - (dgProd). That datagrid is in a DIV to provide scrolling. Clicking on one of the product names shows two more div/datagrid combinations - one with a summary (dgSummary) and one with with the detail r...
TITLE: LinkButton in DataGrid, to trigger Multiple UpdatePanels QUESTION: I have a datagrid which lists products and their market share - (dgProd). That datagrid is in a DIV to provide scrolling. Clicking on one of the product names shows two more div/datagrid combinations - one with a summary (dgSummary) and one with...
[ "asp.net", "updatepanel", "postback" ]
1
1
522
2
0
2011-06-02T14:57:25.870000
2011-06-02T15:04:44.390000
6,216,262
6,216,691
Query param not behaving as expected
I'm using an:order query param to pass an order argument to my function. Unfortunately, it seems not to have an effect on the output. The request debugging output shows the order argument is parsed correctly: Parameter #2(cf_sql_varchar) = posts.createdAt ASC Yet it still makes no difference to output. If I hard code t...
If I remember correctly, queryparams won't work anywhere except in the where clause. So you're not dealing with a bug, but a limitation.
Query param not behaving as expected I'm using an:order query param to pass an order argument to my function. Unfortunately, it seems not to have an effect on the output. The request debugging output shows the order argument is parsed correctly: Parameter #2(cf_sql_varchar) = posts.createdAt ASC Yet it still makes no d...
TITLE: Query param not behaving as expected QUESTION: I'm using an:order query param to pass an order argument to my function. Unfortunately, it seems not to have an effect on the output. The request debugging output shows the order argument is parsed correctly: Parameter #2(cf_sql_varchar) = posts.createdAt ASC Yet i...
[ "coldfusion", "coldfusion-9", "cfqueryparam" ]
3
3
295
1
0
2011-06-02T14:57:27.743000
2011-06-02T15:29:46.340000
6,216,268
6,216,666
How to get records in tree view from mysql / php
I have to create a tree view from the records of my table below id user_id friend_id property_id 1 123 321 1 2 123 456 1 3 456 909 1 4 909 222 1 I have the user_id i.e 123 and property_id i.e 1 I need to know how can I make a tree with friends with whom I share this property, and afterwards with users with whom my frie...
Ok since there are several steps I'll start out on a high level. If you need help with any of those, ask again! First of all, you'll need the "root" nodes, ie those users who don't appear as children in the friend column. Then, for each of these users, start polling all their children. For this, define a function that ...
How to get records in tree view from mysql / php I have to create a tree view from the records of my table below id user_id friend_id property_id 1 123 321 1 2 123 456 1 3 456 909 1 4 909 222 1 I have the user_id i.e 123 and property_id i.e 1 I need to know how can I make a tree with friends with whom I share this prop...
TITLE: How to get records in tree view from mysql / php QUESTION: I have to create a tree view from the records of my table below id user_id friend_id property_id 1 123 321 1 2 123 456 1 3 456 909 1 4 909 222 1 I have the user_id i.e 123 and property_id i.e 1 I need to know how can I make a tree with friends with whom...
[ "php", "mysql", "treeview", "mysqli" ]
0
1
857
1
0
2011-06-02T14:58:02.203000
2011-06-02T15:27:22.030000
6,216,269
6,216,303
How to make the jquery datepicker default date to mm-yyyy (literally)
I'm using the jquery datepicker. The changeYear and changeMonth options are set to true. This link is exactly how my date picker looks if you click on the date input box. See how they have to select month and year? In my testing group about 20% of the users are forgetting to select the year (it's their birth date...dum...
Edit: Original post deleted. Sorry, misread your Question.. I do not believe what you are trying to do is available through the plugin options..
How to make the jquery datepicker default date to mm-yyyy (literally) I'm using the jquery datepicker. The changeYear and changeMonth options are set to true. This link is exactly how my date picker looks if you click on the date input box. See how they have to select month and year? In my testing group about 20% of th...
TITLE: How to make the jquery datepicker default date to mm-yyyy (literally) QUESTION: I'm using the jquery datepicker. The changeYear and changeMonth options are set to true. This link is exactly how my date picker looks if you click on the date input box. See how they have to select month and year? In my testing gro...
[ "jquery", "usability", "jquery-ui-datepicker" ]
0
1
330
1
0
2011-06-02T14:58:10.317000
2011-06-02T15:00:51.063000
6,216,273
6,216,455
How to filter FileUpload Control?
How to add filter to the fileupload control in asp.net? I want a filter for Oasis File (.000).? Please advice me... thank you very much!
You can use javascript to filter it on server side.. Try this here
How to filter FileUpload Control? How to add filter to the fileupload control in asp.net? I want a filter for Oasis File (.000).? Please advice me... thank you very much!
TITLE: How to filter FileUpload Control? QUESTION: How to add filter to the fileupload control in asp.net? I want a filter for Oasis File (.000).? Please advice me... thank you very much! ANSWER: You can use javascript to filter it on server side.. Try this here
[ ".net", "asp.net", "regex", "file-upload" ]
4
2
6,385
3
0
2011-06-02T14:58:32.483000
2011-06-02T15:11:33.623000
6,216,275
6,216,296
Java for( x : y) execution
I have the following for loop: for(String s: someString.split("\\s+")){ //do something } Does java execute the split() method each time the loop iterates, or does it do it only once and keep a temp array to iterate on?
It only does it once, and uses that array and interates through it. Edit: from Mat This is the reference
Java for( x : y) execution I have the following for loop: for(String s: someString.split("\\s+")){ //do something } Does java execute the split() method each time the loop iterates, or does it do it only once and keep a temp array to iterate on?
TITLE: Java for( x : y) execution QUESTION: I have the following for loop: for(String s: someString.split("\\s+")){ //do something } Does java execute the split() method each time the loop iterates, or does it do it only once and keep a temp array to iterate on? ANSWER: It only does it once, and uses that array and i...
[ "java", "string", "loops", "for-loop" ]
14
19
14,959
4
0
2011-06-02T14:58:40.177000
2011-06-02T15:00:17.897000
6,216,278
6,217,927
Include Python Code In Excel?
I'd like to be able to include python code snippets in Excel (ideally, in a nice format -- all colors/formats should be kept the same). What would be the best way to go about it? EDIT: I just want to store python code in an Excel spreadsheet for an easy overview -- I am not going to run it -- just want it to be nicely ...
I think that gist (from github) is precisely what you are looking for. From the description: Gist is a simple way to share snippets and pastes with others. All gists are git repositories, so they are automatically versioned, forkable and usable as a git repository.
Include Python Code In Excel? I'd like to be able to include python code snippets in Excel (ideally, in a nice format -- all colors/formats should be kept the same). What would be the best way to go about it? EDIT: I just want to store python code in an Excel spreadsheet for an easy overview -- I am not going to run it...
TITLE: Include Python Code In Excel? QUESTION: I'd like to be able to include python code snippets in Excel (ideally, in a nice format -- all colors/formats should be kept the same). What would be the best way to go about it? EDIT: I just want to store python code in an Excel spreadsheet for an easy overview -- I am n...
[ "python", "excel" ]
2
2
515
2
0
2011-06-02T14:58:47.493000
2011-06-02T17:25:15.643000
6,216,281
6,216,476
PHP strip unknown file extension
I understand that using PHP's basename() function you can strip a known file extension from a path like so, basename('path/to/file.php','.php') but what if you didn't know what extension the file had or the length of that extension? How would I accomplish this? Thanks in advance!
pathinfo() was already mentioned here, but I'd like to add that from PHP 5.2 it also has a simple way to access the filename WITHOUT the extension. $filename = pathinfo('path/to/file.php', PATHINFO_FILENAME); The value of $filename will be file.
PHP strip unknown file extension I understand that using PHP's basename() function you can strip a known file extension from a path like so, basename('path/to/file.php','.php') but what if you didn't know what extension the file had or the length of that extension? How would I accomplish this? Thanks in advance!
TITLE: PHP strip unknown file extension QUESTION: I understand that using PHP's basename() function you can strip a known file extension from a path like so, basename('path/to/file.php','.php') but what if you didn't know what extension the file had or the length of that extension? How would I accomplish this? Thanks ...
[ "php", "string", "file-extension" ]
6
9
1,862
5
0
2011-06-02T14:58:53.873000
2011-06-02T15:13:14.833000
6,216,289
6,218,011
facebook c# sdk - The user hasn't authorized the application to perform this action
I am building a console app that will publish streams to a page's wall. Issue: I'm getting "The user hasn't authorized the application to perform this action". I'm using opengraph to get the access token. Am I missing something? Any help is greatly appreciated. Thanks! // constants string apiKey = "XXX"; string secret ...
After visiting the following links, I was able to run the code and have it successfully publish to the page's wall, after which it shows up in the Likers' news feeds. http://www.facebook.com/login.php?api_key= {API_KEY_GOES_HERE}&next= http://www.facebook.com/connect/login_success.html&req_perms=read_stream,publish_str...
facebook c# sdk - The user hasn't authorized the application to perform this action I am building a console app that will publish streams to a page's wall. Issue: I'm getting "The user hasn't authorized the application to perform this action". I'm using opengraph to get the access token. Am I missing something? Any hel...
TITLE: facebook c# sdk - The user hasn't authorized the application to perform this action QUESTION: I am building a console app that will publish streams to a page's wall. Issue: I'm getting "The user hasn't authorized the application to perform this action". I'm using opengraph to get the access token. Am I missing ...
[ "c#", "facebook" ]
0
2
7,406
2
0
2011-06-02T14:59:40.957000
2011-06-02T17:31:40.863000
6,216,293
6,216,534
Access LookUp table
i need to create a lookup table in Access, where all the abbreviations are related to a value, and if the abbreviation (in the main table) is null, then i want to show "Unknown" i got the values working, but i can't seem to get the nulls to show up. my lookup table looks like this: REQUEST REQUEST_TEXT ----------------...
This should be easier if you change tblLookup. REQUEST REQUEST_TEXT ------------------------ A Approve D Disapprove U Unknown Then, in tblMain, change the REQUEST field to Required = True and Default Value = "U". When new records are added, they will have U for REQUEST unless the user changes it to A or D. Then a query...
Access LookUp table i need to create a lookup table in Access, where all the abbreviations are related to a value, and if the abbreviation (in the main table) is null, then i want to show "Unknown" i got the values working, but i can't seem to get the nulls to show up. my lookup table looks like this: REQUEST REQUEST_T...
TITLE: Access LookUp table QUESTION: i need to create a lookup table in Access, where all the abbreviations are related to a value, and if the abbreviation (in the main table) is null, then i want to show "Unknown" i got the values working, but i can't seem to get the nulls to show up. my lookup table looks like this:...
[ "ms-access", "lookup-tables" ]
3
3
737
1
0
2011-06-02T14:59:57.943000
2011-06-02T15:17:38.020000
6,216,299
6,216,473
TFS 2010 Change Log
Is there an automated way to create a change log using TFS 2010 and the version history of the files? I'd like to pull in all the comments that were entered for each changeset either between a label (or a specific date) and the current version, or between two labels (or two specific dates).
Are you asking Is there a tool already that does all of this for me? OR Can I automate this process? If #1, my answer is "I don't know, but I would check CodePlex and the Microsoft TFS downloads on MSDN" for this type of tool. If #2, there are web services you can use to query TFS. They don't have the "give me all chan...
TFS 2010 Change Log Is there an automated way to create a change log using TFS 2010 and the version history of the files? I'd like to pull in all the comments that were entered for each changeset either between a label (or a specific date) and the current version, or between two labels (or two specific dates).
TITLE: TFS 2010 Change Log QUESTION: Is there an automated way to create a change log using TFS 2010 and the version history of the files? I'd like to pull in all the comments that were entered for each changeset either between a label (or a specific date) and the current version, or between two labels (or two specifi...
[ "changelog" ]
2
2
1,239
4
0
2011-06-02T15:00:25.247000
2011-06-02T15:12:45.693000
6,216,310
6,217,775
Microsoft setup bootstrapper has stopped working
I'm getting an error when trying to install sharepoint 2010 on the server (windows server 2008 R2 64bit). The prerequisites installed fine, any ideas what this means?
I was having the same issue. I tried the install on 5 different servers and got the same result so it wasn't a problem on the server - it seems to be a corrupt download file on the MS Volume Licensing site. When I ran the download using the download manager instead of the web browser download, it kept saying the file w...
Microsoft setup bootstrapper has stopped working I'm getting an error when trying to install sharepoint 2010 on the server (windows server 2008 R2 64bit). The prerequisites installed fine, any ideas what this means?
TITLE: Microsoft setup bootstrapper has stopped working QUESTION: I'm getting an error when trying to install sharepoint 2010 on the server (windows server 2008 R2 64bit). The prerequisites installed fine, any ideas what this means? ANSWER: I was having the same issue. I tried the install on 5 different servers and g...
[ "sharepoint-2010", "installation" ]
0
0
5,212
4
0
2011-06-02T15:01:22.410000
2011-06-02T17:12:29.180000
6,216,311
6,216,342
Get comma separated string from Mysql
I'm saving a string from PHP to MySQL like this.. $groupid = "13, 14, 15, 16" $write = mysql_query("INSERT INTO table VALUES ('','$groupid')"); I'm then trying to extract data from the table if $a = "15" $extract = mysql_query("SELECT * FROM table WHERE ustaffid='$ustaffid' AND groupid='$a'"); How can I easily match wh...
You can use the find_in_set function here. SELECT * FROM table WHERE ustaffid='$ustaffid' AND FIND_IN_SET('$a', groupid) > 0
Get comma separated string from Mysql I'm saving a string from PHP to MySQL like this.. $groupid = "13, 14, 15, 16" $write = mysql_query("INSERT INTO table VALUES ('','$groupid')"); I'm then trying to extract data from the table if $a = "15" $extract = mysql_query("SELECT * FROM table WHERE ustaffid='$ustaffid' AND gro...
TITLE: Get comma separated string from Mysql QUESTION: I'm saving a string from PHP to MySQL like this.. $groupid = "13, 14, 15, 16" $write = mysql_query("INSERT INTO table VALUES ('','$groupid')"); I'm then trying to extract data from the table if $a = "15" $extract = mysql_query("SELECT * FROM table WHERE ustaffid='...
[ "php", "mysql", "arrays", "string" ]
0
2
227
5
0
2011-06-02T15:01:23.717000
2011-06-02T15:04:15.197000
6,216,314
6,216,742
MS Access Update with Increment of Prior Record
I have an MS Access 2007 database that I need to create an update for. The table I am trying to update looks like this: CarID WeekOf NumDataPoints NumWksZeroPoints 3AA May-14-2011 23 0 7BB May-14-2011 9 0 3AA May-21-2011 35 0 7BB May-21-2011 0 1 3AA May-28-2011 24 7BB May-28-2011 0 I am processing the latest recordse...
Using your sample data I ran the following UPDATE tblcar AS c INNER JOIN tblcar AS previous ON c.carid = previous.carid SET c.numwkszeropoints = Iif([previous].[NumWksZeroPoints] = 0, 0, [previous].[NumWksZeroPoints] + 1) WHERE c.weekof =#5/28/2011 # AND previous.weekof =#5/21/2011#; The table afterwards looked like th...
MS Access Update with Increment of Prior Record I have an MS Access 2007 database that I need to create an update for. The table I am trying to update looks like this: CarID WeekOf NumDataPoints NumWksZeroPoints 3AA May-14-2011 23 0 7BB May-14-2011 9 0 3AA May-21-2011 35 0 7BB May-21-2011 0 1 3AA May-28-2011 24 7BB M...
TITLE: MS Access Update with Increment of Prior Record QUESTION: I have an MS Access 2007 database that I need to create an update for. The table I am trying to update looks like this: CarID WeekOf NumDataPoints NumWksZeroPoints 3AA May-14-2011 23 0 7BB May-14-2011 9 0 3AA May-21-2011 35 0 7BB May-21-2011 0 1 3AA Ma...
[ "sql", "ms-access", "sql-update", "record" ]
2
1
1,901
2
0
2011-06-02T15:01:41.517000
2011-06-02T15:34:05.073000
6,216,339
6,216,828
MinGW/MSYS shell colors
I'd like for my makefile output to be color-coded. But I can't get the ANSI color codes to work on this terminal. It should be possible though, ls --color gives me colorful output, and my shell prompt is also colored: $ echo $PS1 \[\033]0;$MSYSTEM:\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ I suspect maybe the first...
I solved it. The command to use is echo -e. So, in the makefile: foo.o: foo.c @echo -e "\033[32mCompiling foo.c\033[0m" $(CC) $(CFLAGS) -c -o $@ $< I would imagine this works just fine in bash as well.
MinGW/MSYS shell colors I'd like for my makefile output to be color-coded. But I can't get the ANSI color codes to work on this terminal. It should be possible though, ls --color gives me colorful output, and my shell prompt is also colored: $ echo $PS1 \[\033]0;$MSYSTEM:\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ I...
TITLE: MinGW/MSYS shell colors QUESTION: I'd like for my makefile output to be color-coded. But I can't get the ANSI color codes to work on this terminal. It should be possible though, ls --color gives me colorful output, and my shell prompt is also colored: $ echo $PS1 \[\033]0;$MSYSTEM:\w\007 \033[32m\]\u@\h \[\033[...
[ "shell", "colors", "mingw", "msys" ]
4
7
5,785
1
0
2011-06-02T15:04:06.290000
2011-06-02T15:41:29
6,216,340
6,216,464
Always output raw HTML using MVC3 and Razor
I’ve got a class with a property that looks like this: [AllowHtml] [DataType(DataType.MultilineText)] public string Description { get; set; } I’ve already put in the [AllowHtml] attribute to let me submit HTML to this property via the form that I’ve built, but what I want to do is output the value of the property as th...
Change your Description proerpty to return an HtmlString. Razor does not escape HtmlString values. (In fact, all Html.Raw does is create an HtmlString )
Always output raw HTML using MVC3 and Razor I’ve got a class with a property that looks like this: [AllowHtml] [DataType(DataType.MultilineText)] public string Description { get; set; } I’ve already put in the [AllowHtml] attribute to let me submit HTML to this property via the form that I’ve built, but what I want to ...
TITLE: Always output raw HTML using MVC3 and Razor QUESTION: I’ve got a class with a property that looks like this: [AllowHtml] [DataType(DataType.MultilineText)] public string Description { get; set; } I’ve already put in the [AllowHtml] attribute to let me submit HTML to this property via the form that I’ve built, b...
[ "c#", "asp.net", "asp.net-mvc-3", "razor" ]
17
21
26,773
4
0
2011-06-02T15:04:11.393000
2011-06-02T15:12:10.153000
6,216,346
6,216,434
Get domain the server was reached over?
In general on any non-HTTP server. Would there be a way to detect what domain was used to reach the IP? I know HTTP servers get the domain passed within the request header, but would this be possible with any other server that does not require this information to be received from the client? I'm especially looking for ...
In general, no, which is why the HTTP protocol includes it in the headers. In order to reach your server, first a DNS lookup is performed to resolve your IP, which is then followed by the connection itself. These two steps are separate, and hard to link together. Logging what domain was last requested by a client is tr...
Get domain the server was reached over? In general on any non-HTTP server. Would there be a way to detect what domain was used to reach the IP? I know HTTP servers get the domain passed within the request header, but would this be possible with any other server that does not require this information to be received from...
TITLE: Get domain the server was reached over? QUESTION: In general on any non-HTTP server. Would there be a way to detect what domain was used to reach the IP? I know HTTP servers get the domain passed within the request header, but would this be possible with any other server that does not require this information t...
[ "networking", "dns" ]
1
3
56
3
0
2011-06-02T15:04:28.880000
2011-06-02T15:09:59.937000
6,216,353
6,216,372
Getting the result of jquery .post() function
I need to find out how to access "data" variable outside of the post function. It will return either valid or invalid so I can finish the main function logic. Is this the right way to do it: $('#form_choose_methods').submit(function(){ var voucher_code = $('#voucher_code').val(); var check = $.post(baseURL+"ajax.php", ...
You can access the response in the success callback you use $.post(baseURL+"ajax.php", { tool: "vouchers", action: "check_voucher", voucher_code: voucher_code }, function(data) { // you can access the response in here alert(data); }); Ajax calls are asynchronous, so you will only have access to the result from the call...
Getting the result of jquery .post() function I need to find out how to access "data" variable outside of the post function. It will return either valid or invalid so I can finish the main function logic. Is this the right way to do it: $('#form_choose_methods').submit(function(){ var voucher_code = $('#voucher_code')....
TITLE: Getting the result of jquery .post() function QUESTION: I need to find out how to access "data" variable outside of the post function. It will return either valid or invalid so I can finish the main function logic. Is this the right way to do it: $('#form_choose_methods').submit(function(){ var voucher_code = $...
[ "javascript", "jquery", "ajax" ]
0
5
2,490
2
0
2011-06-02T15:04:55.670000
2011-06-02T15:06:24.480000
6,216,361
6,218,006
Help with a SQL Query
I have a question on a SQL query and im wondering where to start. Thoughts so far include creating a table in memory with a range of dates, and joining on to it to get the sum of hours entered for a particular day. Just to give an idea of the background of this question here is a little information. The database is str...
I look into it using the sample table scheme. Hope it will help you. Never underwent such situation. Glad to learn something new today. Thanks for the Post WraithNath create table #temp ( projectId int, ContractID int, CostRateCode varchar(10), JobSheetDate datetime, Hours Int ) I inserted few records like below Insert...
Help with a SQL Query I have a question on a SQL query and im wondering where to start. Thoughts so far include creating a table in memory with a range of dates, and joining on to it to get the sum of hours entered for a particular day. Just to give an idea of the background of this question here is a little informatio...
TITLE: Help with a SQL Query QUESTION: I have a question on a SQL query and im wondering where to start. Thoughts so far include creating a table in memory with a range of dates, and joining on to it to get the sum of hours entered for a particular day. Just to give an idea of the background of this question here is a...
[ "sql", "sql-server" ]
6
2
184
4
0
2011-06-02T15:05:32.217000
2011-06-02T17:31:35.713000
6,216,366
6,217,715
Simulate text writing using Cocos2d on iOS
I am looking for suggestions on how to simulate the writing of dynamic text using Cocos2d on iOS. The effect should look as though the text is being written by an actual pen in real time. My main concern is the best way to convert the text into a path that I can move the pen along. I really don't want to create my own ...
I think the best way will be store the path as an array of points. It is really simple to write a small program that will load a font characters image and will be responsible for touch. In touch handler just store the touch position in an xml file. And also store the first touch point as an origin of a character. So it...
Simulate text writing using Cocos2d on iOS I am looking for suggestions on how to simulate the writing of dynamic text using Cocos2d on iOS. The effect should look as though the text is being written by an actual pen in real time. My main concern is the best way to convert the text into a path that I can move the pen a...
TITLE: Simulate text writing using Cocos2d on iOS QUESTION: I am looking for suggestions on how to simulate the writing of dynamic text using Cocos2d on iOS. The effect should look as though the text is being written by an actual pen in real time. My main concern is the best way to convert the text into a path that I ...
[ "iphone", "ios", "ipad", "cocos2d-iphone" ]
2
2
530
2
0
2011-06-02T15:05:54.323000
2011-06-02T17:05:15.250000
6,216,367
6,216,495
Copying from one stream to another?
For work, the specification on my project is to use.Net 2.0 so I don't get the handy CopyTo function brought about later on. I need to copy the response stream from an HttpWebResponse to another stream (most likely a MemoryStream, but it could be any subclass of Stream ). My normal tactic has been something along the l...
This is a handy function. And yes, the buffer size matters. Increasing it might give you better performance on large files. public static void WriteTo(Stream sourceStream, Stream targetStream) { byte[] buffer = new byte[0x10000]; int n; while ((n = sourceStream.Read(buffer, 0, buffer.Length))!= 0) targetStream.Write(bu...
Copying from one stream to another? For work, the specification on my project is to use.Net 2.0 so I don't get the handy CopyTo function brought about later on. I need to copy the response stream from an HttpWebResponse to another stream (most likely a MemoryStream, but it could be any subclass of Stream ). My normal t...
TITLE: Copying from one stream to another? QUESTION: For work, the specification on my project is to use.Net 2.0 so I don't get the handy CopyTo function brought about later on. I need to copy the response stream from an HttpWebResponse to another stream (most likely a MemoryStream, but it could be any subclass of Str...
[ "c#", ".net-2.0" ]
8
9
11,068
4
0
2011-06-02T15:06:01.063000
2011-06-02T15:14:58.587000
6,216,371
6,216,531
Null Pointer on Hibernate's createQuery()
I'm struggling to get to the bottom of a null pointer exception that happens when I try to run a HQL query with createQuery(). The code to run the query is pretty simple. Originally I had a named query that I was calling, but just to make things more simple and eliminate any complications I'm doing this (springwildlife...
Since NullPointerException is thrown at the line with createQuery(), the only possible cause is that session is null.
Null Pointer on Hibernate's createQuery() I'm struggling to get to the bottom of a null pointer exception that happens when I try to run a HQL query with createQuery(). The code to run the query is pretty simple. Originally I had a named query that I was calling, but just to make things more simple and eliminate any co...
TITLE: Null Pointer on Hibernate's createQuery() QUESTION: I'm struggling to get to the bottom of a null pointer exception that happens when I try to run a HQL query with createQuery(). The code to run the query is pretty simple. Originally I had a named query that I was calling, but just to make things more simple an...
[ "java", "hibernate" ]
5
4
12,657
2
0
2011-06-02T15:06:23.420000
2011-06-02T15:17:28.420000
6,216,385
6,216,905
Total Collections, rejecting collections of types that do not include all possibilities
Let's say we have the following types: sealed trait T case object Goat extends T case object Monk extends T case object Tiger extends T Now, how do you construct a collection of T such that at least one of each sub- T appears in the collection, this constraint being enforced at compile time? A collection where, contrar...
It looks like the builder pattern with generalized type constraints: http://www.tikalk.com/java/blog/type-safe-builder-scala-using-type-constraints Something like: sealed trait TBoolean sealed trait TTrue extends TBoolean sealed trait TFalse extends TBoolean class SeqBuilder[HasGoat <: TBoolean, HasMonk <: TBoolean, H...
Total Collections, rejecting collections of types that do not include all possibilities Let's say we have the following types: sealed trait T case object Goat extends T case object Monk extends T case object Tiger extends T Now, how do you construct a collection of T such that at least one of each sub- T appears in the...
TITLE: Total Collections, rejecting collections of types that do not include all possibilities QUESTION: Let's say we have the following types: sealed trait T case object Goat extends T case object Monk extends T case object Tiger extends T Now, how do you construct a collection of T such that at least one of each sub...
[ "scala", "haskell", "puzzle", "type-safety", "type-constraints" ]
5
6
309
4
0
2011-06-02T15:07:12.110000
2011-06-02T15:49:14.223000
6,216,390
6,217,258
How to detect if user click directly on cell.imageView and not on the label in tableview cell?
In my tableView cell i have: cell.imageView.image = image; How can I detect the user click directly on that image, and not the cell.textLabel?
Add a UITapGestureRecognizer to the imageView. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath /*... */ if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; cell.imageView.image ...
How to detect if user click directly on cell.imageView and not on the label in tableview cell? In my tableView cell i have: cell.imageView.image = image; How can I detect the user click directly on that image, and not the cell.textLabel?
TITLE: How to detect if user click directly on cell.imageView and not on the label in tableview cell? QUESTION: In my tableView cell i have: cell.imageView.image = image; How can I detect the user click directly on that image, and not the cell.textLabel? ANSWER: Add a UITapGestureRecognizer to the imageView. - (UITab...
[ "iphone", "objective-c", "ios" ]
3
5
2,071
2
0
2011-06-02T15:07:31.987000
2011-06-02T16:20:04.277000
6,216,391
6,216,655
MS Build dual assemblies for x86 and x64 builds and TeamCity
I've recently had a few issues when trying to run SQLLite powered in-memory repository mock (Repository pattern) with Fluent Nhibernate. When I ran the tests against a (TeamCity) build agent on Windows Server 2008 the tests were failing with unable to load System.Data.SQLite exceptions. After some fiddling I remembered...
References can be made conditional in your project file (I'm making up the details of the references below). PathTo/x64/SqlLite.dll" PathTo/Win32/SqlLite.dll"
MS Build dual assemblies for x86 and x64 builds and TeamCity I've recently had a few issues when trying to run SQLLite powered in-memory repository mock (Repository pattern) with Fluent Nhibernate. When I ran the tests against a (TeamCity) build agent on Windows Server 2008 the tests were failing with unable to load Sy...
TITLE: MS Build dual assemblies for x86 and x64 builds and TeamCity QUESTION: I've recently had a few issues when trying to run SQLLite powered in-memory repository mock (Repository pattern) with Fluent Nhibernate. When I ran the tests against a (TeamCity) build agent on Windows Server 2008 the tests were failing with...
[ "msbuild", "x86", "64-bit", "teamcity" ]
0
2
1,267
1
0
2011-06-02T15:07:36.947000
2011-06-02T15:26:29.283000
6,216,400
6,217,165
Rails acts_as_taggable_on Tag Link Filtering
I have a list of 'notes', and each note has some tags via acts_as_taggable_on. It's a great plugin, and the tags are working wonderfully. What would be the best way to filter this list of notes by the tag that is clicked on? Example: <% @notes.each do |note| %> <%= note.content %> <% note.tag_list.each do |tag| %> <%=...
I believe I figured it out. Was just having an off-moment. I can create a named route like: match 'tags/:tag' => 'controller#index',:as => 'tag' And that way I can get the parameter I need.
Rails acts_as_taggable_on Tag Link Filtering I have a list of 'notes', and each note has some tags via acts_as_taggable_on. It's a great plugin, and the tags are working wonderfully. What would be the best way to filter this list of notes by the tag that is clicked on? Example: <% @notes.each do |note| %> <%= note.cont...
TITLE: Rails acts_as_taggable_on Tag Link Filtering QUESTION: I have a list of 'notes', and each note has some tags via acts_as_taggable_on. It's a great plugin, and the tags are working wonderfully. What would be the best way to filter this list of notes by the tag that is clicked on? Example: <% @notes.each do |note...
[ "ruby-on-rails", "tags", "link-to", "acts-as-taggable-on" ]
1
1
326
1
0
2011-06-02T15:07:58.680000
2011-06-02T16:12:02.653000
6,216,401
6,217,832
Files opened in subprocess shell
At the end of the execution of the following script, I receive some errors like these: filename.enc: No such file or directory 140347508795048:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('filename.enc','r') 140347508795048:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file....
it sounds like your subprocess executes, but since it is non-blocking, your os.remove(infile) executes immediately after, deleting the file before the subprocess finishes. you could use subprocess.call() instead, which will wait for the command to finish.... or you could change your code to use wait(): p = subprocess.P...
Files opened in subprocess shell At the end of the execution of the following script, I receive some errors like these: filename.enc: No such file or directory 140347508795048:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('filename.enc','r') 140347508795048:error:20074002:BIO routin...
TITLE: Files opened in subprocess shell QUESTION: At the end of the execution of the following script, I receive some errors like these: filename.enc: No such file or directory 140347508795048:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('filename.enc','r') 140347508795048:error:2...
[ "python", "subprocess" ]
2
3
698
3
0
2011-06-02T15:08:04.310000
2011-06-02T17:17:15.123000
6,216,404
6,216,429
Simple java lib for text templating?
I need to template some email texts. Nothing fancy, just replace something like @name@ with real value. No pictures, no fancy formatting etc. What java lib could you recommend? The simplier the better.
You can give Velocity or Freemarker a shot. I've used both in email templating engines. They provide simple syntax for basic use cases, but you can get pretty complex later on! Of the two, I personally prefer Freemarker because they've done a really good job of providing all sorts of different builtins that make format...
Simple java lib for text templating? I need to template some email texts. Nothing fancy, just replace something like @name@ with real value. No pictures, no fancy formatting etc. What java lib could you recommend? The simplier the better.
TITLE: Simple java lib for text templating? QUESTION: I need to template some email texts. Nothing fancy, just replace something like @name@ with real value. No pictures, no fancy formatting etc. What java lib could you recommend? The simplier the better. ANSWER: You can give Velocity or Freemarker a shot. I've used ...
[ "java", "templates", "text" ]
20
9
26,500
7
0
2011-06-02T15:08:06.370000
2011-06-02T15:09:43.917000
6,216,408
6,217,904
Excel pulling data from certain cells
I have a file that I only want to extract cells B9, B19, B29, etc etc etc in a pattern throughout the entire file. I would preferably like it to be extracted to a different excel file or someway so that I can do stuff with only those cells in another excel worksheet. Potentially, I may have several excel files that I m...
You could use the INDIRECT function. It takes a cell reference as a text string and returns the value in that cell. So instead of using =data!a9 to get the value in sheet "data" in cell a9, you use =indirect("data!a9") You can also use r1c1 notation, like this: =indirect("data!r9c1",false) From there you can use the RO...
Excel pulling data from certain cells I have a file that I only want to extract cells B9, B19, B29, etc etc etc in a pattern throughout the entire file. I would preferably like it to be extracted to a different excel file or someway so that I can do stuff with only those cells in another excel worksheet. Potentially, I...
TITLE: Excel pulling data from certain cells QUESTION: I have a file that I only want to extract cells B9, B19, B29, etc etc etc in a pattern throughout the entire file. I would preferably like it to be extracted to a different excel file or someway so that I can do stuff with only those cells in another excel workshe...
[ "vba", "excel", "if-statement", "excel-2007" ]
0
0
9,310
3
0
2011-06-02T15:08:36.883000
2011-06-02T17:23:29.437000
6,216,409
6,216,961
changing viewport based on device resolution
How to change the meta viewport based on device resolution? we can use media queries to target different resolution screens how can set different viewport? like my demo site works ok in iPad with this meta tag but for iphone4 I need this
//test for iOS retina display $.mobile.media("screen and (-webkit-min-device-pixel-ratio: 2)"); Docs: http://jquerymobile.com/demos/1.0a4.1/#docs/api/mediahelpers.html UPDATE: After looking for a minute I found the jQuery can change the meta tag. Try something like this: // Check for iPhone screen size if($.mobile.medi...
changing viewport based on device resolution How to change the meta viewport based on device resolution? we can use media queries to target different resolution screens how can set different viewport? like my demo site works ok in iPad with this meta tag but for iphone4 I need this
TITLE: changing viewport based on device resolution QUESTION: How to change the meta viewport based on device resolution? we can use media queries to target different resolution screens how can set different viewport? like my demo site works ok in iPad with this meta tag but for iphone4 I need this ANSWER: //test for...
[ "javascript", "jquery-mobile" ]
3
2
9,770
1
0
2011-06-02T15:08:41.030000
2011-06-02T15:55:19.613000
6,216,415
6,217,305
Design Patterns in C++ with Qt 4
I have been looking for tutorials or books about design patterns in qt and so far i have found one book, "Introduction to Design Patterns in C++ with Qt 4".Has anyone read this book?.Also,where can i read about design patterns implemented in qt?.
Introduction to Design Patterns in C++ with Qt 4 uses Qt 4.1 to demonstrate its concepts. So much has changed since Qt 4.1 that I suggest first learning about design patterns, and then learning Qt (separately). Once you understand design patterns, you can browse the Qt source code and be able to recognize the patterns ...
Design Patterns in C++ with Qt 4 I have been looking for tutorials or books about design patterns in qt and so far i have found one book, "Introduction to Design Patterns in C++ with Qt 4".Has anyone read this book?.Also,where can i read about design patterns implemented in qt?.
TITLE: Design Patterns in C++ with Qt 4 QUESTION: I have been looking for tutorials or books about design patterns in qt and so far i have found one book, "Introduction to Design Patterns in C++ with Qt 4".Has anyone read this book?.Also,where can i read about design patterns implemented in qt?. ANSWER: Introduction ...
[ "c++", "qt", "design-patterns" ]
4
5
2,116
2
0
2011-06-02T15:09:04.227000
2011-06-02T16:24:54.323000
6,216,416
6,216,730
Deadlock detection with JVMTI
I wonder whether it is possible to detect deadlocks dynamically in Java by using the JVMTI. There are two events indicating actions on monitors using the synchronized statement: Monitor Contended Enter Sent when a thread is attempting to enter a Java programming language monitor already acquired by another thread. Moni...
You should be able to get this information via JMX. Try ManagementFactory.getThreadMXBean().findMonitorDeadlockedThreads();
Deadlock detection with JVMTI I wonder whether it is possible to detect deadlocks dynamically in Java by using the JVMTI. There are two events indicating actions on monitors using the synchronized statement: Monitor Contended Enter Sent when a thread is attempting to enter a Java programming language monitor already ac...
TITLE: Deadlock detection with JVMTI QUESTION: I wonder whether it is possible to detect deadlocks dynamically in Java by using the JVMTI. There are two events indicating actions on monitors using the synchronized statement: Monitor Contended Enter Sent when a thread is attempting to enter a Java programming language ...
[ "java", "multithreading", "deadlock", "jvmti" ]
0
1
442
1
0
2011-06-02T15:09:06.100000
2011-06-02T15:33:08.087000
6,216,432
6,216,838
Windows PSQL command line: is there a way to allow for passwordless login?
My goal is to be able to fire off a command without having to be prompted for my password. Is there any way to achieve this from the windows command line? In Linux I feel I could send the password to standard in or something, but I am not sure if I could do this for windows. Thanks!
There are two ways: Set environment variable PGPASSWORD e.g. set PGPASSWORD=yoursecretpassword Use password file %APPDATA%\postgresql\pgpass.conf as described in documentation Within password file (my location is C:\Users\Grzesiek\AppData\Roaming\postgresql\pgpass.conf) use specified in doc format. For example to conne...
Windows PSQL command line: is there a way to allow for passwordless login? My goal is to be able to fire off a command without having to be prompted for my password. Is there any way to achieve this from the windows command line? In Linux I feel I could send the password to standard in or something, but I am not sure i...
TITLE: Windows PSQL command line: is there a way to allow for passwordless login? QUESTION: My goal is to be able to fire off a command without having to be prompted for my password. Is there any way to achieve this from the windows command line? In Linux I feel I could send the password to standard in or something, b...
[ "windows", "postgresql" ]
25
30
70,502
9
0
2011-06-02T15:09:57.317000
2011-06-02T15:42:07.643000
6,216,438
6,216,483
Pear: Includes are successful but cannot find functions
EDIT: Solution...email is a function within Validate which is a class so you need to access it using: Validate::email("anemail@email.com"); or $val = new Validate(); $val->email("anemail@email.com"); Thanks red eyes ====================== original question ============================== Hi, I'm using Pear and have inst...
It's possible to post Validate.php? I think Validate.php it's PHP5;) So it's $val = new validate(); $val->email();
Pear: Includes are successful but cannot find functions EDIT: Solution...email is a function within Validate which is a class so you need to access it using: Validate::email("anemail@email.com"); or $val = new Validate(); $val->email("anemail@email.com"); Thanks red eyes ====================== original question =======...
TITLE: Pear: Includes are successful but cannot find functions QUESTION: EDIT: Solution...email is a function within Validate which is a class so you need to access it using: Validate::email("anemail@email.com"); or $val = new Validate(); $val->email("anemail@email.com"); Thanks red eyes ====================== origina...
[ "php", "pear" ]
0
1
142
1
0
2011-06-02T15:10:18.767000
2011-06-02T15:13:46.747000
6,216,444
6,216,558
The contract name 'x.y.IService' could not be found in the list of contracts implemented by the service 'z.t.MyService'
I'm working on a very simple WCF service. At the beginning everything was fine, then I moved the service interface in a separated DLL file. Since that I got this error: The contract name x.y.IService could not be found in the list of contracts implemented by the service z.t.MyService My config file looks like this:... ...
Everything looks fine assuming the z.t.MyService is a typo. This is exactly what we do and everything works for our service. Edit based on comments: Yes, the interface can be a generic, however you will need to define the type before using it in the service. You can do the following public interface IActualService: ISe...
The contract name 'x.y.IService' could not be found in the list of contracts implemented by the service 'z.t.MyService' I'm working on a very simple WCF service. At the beginning everything was fine, then I moved the service interface in a separated DLL file. Since that I got this error: The contract name x.y.IService ...
TITLE: The contract name 'x.y.IService' could not be found in the list of contracts implemented by the service 'z.t.MyService' QUESTION: I'm working on a very simple WCF service. At the beginning everything was fine, then I moved the service interface in a separated DLL file. Since that I got this error: The contract ...
[ "wcf" ]
0
1
4,200
1
0
2011-06-02T15:10:56.523000
2011-06-02T15:19:13.787000
6,216,449
6,216,511
Where can I learn the basics of writing a lexer?
I want to learn how to write a lexer. My university course had an assignment where we had to write a parser (and a lexer to go along with it) but this was given to us with no instruction or feedback (beyond the mark) so I didn't really learn much from it. After searching for this topic, I can only find fairly advanced ...
Basically there are two main approaches to writing a lexer: Creating a hand-written one in which case I recommend this small tutorial. Using some lexer generator tools such as lex. In this case, I recommend reading the tutorials to the particular tool of choice. Also I would like to recommend the Kaleidoscope tutorial ...
Where can I learn the basics of writing a lexer? I want to learn how to write a lexer. My university course had an assignment where we had to write a parser (and a lexer to go along with it) but this was given to us with no instruction or feedback (beyond the mark) so I didn't really learn much from it. After searching...
TITLE: Where can I learn the basics of writing a lexer? QUESTION: I want to learn how to write a lexer. My university course had an assignment where we had to write a parser (and a lexer to go along with it) but this was given to us with no instruction or feedback (beyond the mark) so I didn't really learn much from i...
[ "language-agnostic", "lexer", "compiler-construction" ]
96
87
50,025
2
0
2011-06-02T15:11:08.917000
2011-06-02T15:16:17.303000
6,216,453
6,218,861
Paperclip gem not recognized
I updated to Rails 3.0.8.rc2 recently, and then updated the paperclip gem to 2.3.11 (this fails on 2.3.10 as well). On startup, the paperclip gem seems to be not registering: /Users/jade/code/plantworking/app/models/comment.rb:17: undefined method `has_attached_file' for Comment:Class (NoMethodError) from /Users/jade/....
PaperClip by default only works on ActiveRecord. You might want to try the mongoid version of PaperClip or switch over to Carrierwave.
Paperclip gem not recognized I updated to Rails 3.0.8.rc2 recently, and then updated the paperclip gem to 2.3.11 (this fails on 2.3.10 as well). On startup, the paperclip gem seems to be not registering: /Users/jade/code/plantworking/app/models/comment.rb:17: undefined method `has_attached_file' for Comment:Class (NoMe...
TITLE: Paperclip gem not recognized QUESTION: I updated to Rails 3.0.8.rc2 recently, and then updated the paperclip gem to 2.3.11 (this fails on 2.3.10 as well). On startup, the paperclip gem seems to be not registering: /Users/jade/code/plantworking/app/models/comment.rb:17: undefined method `has_attached_file' for C...
[ "ruby-on-rails", "paperclip" ]
0
0
244
1
0
2011-06-02T15:11:29.163000
2011-06-02T18:41:15.280000
6,216,454
6,216,552
Checking what choices Mathematica makes when you specify "Automatic"
So I'm doing some benchmarking of a method for numerical optimization in Mathematica and I'm getting some inconsistent results when I use the Method->Automatic specification with FindMinimum. What I want to do is check what method it is choosing. I know I can use AbsoluteOptions[] to extract the choices from a some out...
I don't think there is a general way to find what method is used by numerical functions, other than reading the documentation. The documentation on unconstrained optimization is pretty good, though. There it says: With Method -> Automatic, Mathematica uses the "quasi-Newton" method unless the problem is structurally a ...
Checking what choices Mathematica makes when you specify "Automatic" So I'm doing some benchmarking of a method for numerical optimization in Mathematica and I'm getting some inconsistent results when I use the Method->Automatic specification with FindMinimum. What I want to do is check what method it is choosing. I kn...
TITLE: Checking what choices Mathematica makes when you specify "Automatic" QUESTION: So I'm doing some benchmarking of a method for numerical optimization in Mathematica and I'm getting some inconsistent results when I use the Method->Automatic specification with FindMinimum. What I want to do is check what method it...
[ "wolfram-mathematica" ]
5
7
323
1
0
2011-06-02T15:11:29.877000
2011-06-02T15:18:38.957000
6,216,462
6,218,209
I don't need/want a key!
I have some views that I want to use EF 4.1 to query. These are specific optimized views that will not have keys to speak of; there will be no deletions, updates, just good ol'e select. But EF wants a key set on the model. Is there a way to tell EF to move on, there's nothing to worry about? More Details The main purpo...
There is no way. EF demands unique identification of the record - entity key. That doesn't mean that you must expose any additional column. You can mark all your current properties (or any subset) as a key - that is exactly how EDMX does it when you add database view to the model - it goes through columns and marks all...
I don't need/want a key! I have some views that I want to use EF 4.1 to query. These are specific optimized views that will not have keys to speak of; there will be no deletions, updates, just good ol'e select. But EF wants a key set on the model. Is there a way to tell EF to move on, there's nothing to worry about? Mo...
TITLE: I don't need/want a key! QUESTION: I have some views that I want to use EF 4.1 to query. These are specific optimized views that will not have keys to speak of; there will be no deletions, updates, just good ol'e select. But EF wants a key set on the model. Is there a way to tell EF to move on, there's nothing ...
[ "entity-framework", "entity-framework-4.1" ]
4
2
1,028
3
0
2011-06-02T15:12:08.250000
2011-06-02T17:48:12.100000
6,216,467
6,216,550
how to test MFMessageComposeViewController on iPhone simulator?
Is there anyway or I must get a iPhone? Can I inherit form MFMessageComposeViewController to add some function in it?
No, You can't inherit MFMessageComposeViewController, you could present the view controller modally using the presentModalViewController, More
how to test MFMessageComposeViewController on iPhone simulator? Is there anyway or I must get a iPhone? Can I inherit form MFMessageComposeViewController to add some function in it?
TITLE: how to test MFMessageComposeViewController on iPhone simulator? QUESTION: Is there anyway or I must get a iPhone? Can I inherit form MFMessageComposeViewController to add some function in it? ANSWER: No, You can't inherit MFMessageComposeViewController, you could present the view controller modally using the p...
[ "iphone", "sms" ]
0
0
1,044
1
0
2011-06-02T15:12:29.067000
2011-06-02T15:18:32.607000
6,216,471
6,217,035
keylset bug in Tcl 8.4 and 8.5?
Consider the following simple exercise: package require Tclx keylset myArray "v1.5" "ready" puts $myArray The expected output: {v1.5 ready} The actual output: {v1 {{5 ready}}} My questions are This seems to be an error in keylset, I have confirmed this behavior on both 8.4 and 8.5 How do I get around it? I have tried s...
It's not a bug, it's a feature.:) Dot is a hierarchical key separator in keyed list. See the example for explanation: keylset myArray {v1.5} "ready" {v1.6} "empty" puts $myArray;# ==> {v1 {{5 ready} {6 empty}}} puts [keylget myArray v1];# ==> {5 ready} {6 empty} puts [keylget myArray v1.5];# ==> ready puts [keylget my...
keylset bug in Tcl 8.4 and 8.5? Consider the following simple exercise: package require Tclx keylset myArray "v1.5" "ready" puts $myArray The expected output: {v1.5 ready} The actual output: {v1 {{5 ready}}} My questions are This seems to be an error in keylset, I have confirmed this behavior on both 8.4 and 8.5 How do...
TITLE: keylset bug in Tcl 8.4 and 8.5? QUESTION: Consider the following simple exercise: package require Tclx keylset myArray "v1.5" "ready" puts $myArray The expected output: {v1.5 ready} The actual output: {v1 {{5 ready}}} My questions are This seems to be an error in keylset, I have confirmed this behavior on both ...
[ "tcl" ]
2
4
710
2
0
2011-06-02T15:12:40.330000
2011-06-02T16:01:04.290000
6,216,472
6,216,591
How to do a replace for given example in Sql?
I want to replace always the last node in the string- root/node1/node2 If I pass node3 as the parameter it should do a replace like this - root/node1/node3 Can anyone help me do this say the column name was lineage and I have the id. So, the query would be - Update tree set lineage= -- replace(lineage,node3) -- this is...
You could do some string manipulation to find the last occurrence of a /, and then strip everything after that point... and then append your new node parameter to that value Update tree set lineage = LEFT(Lineage, LEN(Lineage) - CHARINDEX('/', REVERSE(Lineage)) + 1) + @NewNode where id=2
How to do a replace for given example in Sql? I want to replace always the last node in the string- root/node1/node2 If I pass node3 as the parameter it should do a replace like this - root/node1/node3 Can anyone help me do this say the column name was lineage and I have the id. So, the query would be - Update tree set...
TITLE: How to do a replace for given example in Sql? QUESTION: I want to replace always the last node in the string- root/node1/node2 If I pass node3 as the parameter it should do a replace like this - root/node1/node3 Can anyone help me do this say the column name was lineage and I have the id. So, the query would be...
[ "sql-server-2005", "t-sql" ]
2
2
849
2
0
2011-06-02T15:12:43.717000
2011-06-02T15:21:35.273000
6,216,478
6,217,705
Rails 3 Nested Form not being created
The models I'm working with look like this: class ComplexAssertion < ActiveRecord::Base has_many:expression_groups has_many:expressions,:through =>:expression_group accepts_nested_attributes_for:expression_groups,:allow_destroy=>true end class ExpressionGroup < ActiveRecord::Base belongs_to:complex_assertion has_many:...
Yes, you have to explicitly instantiate the associated objects. It is not done for you. @complex_assertion.expression_groups.expressions.build Will not work because expression_groups is an array and not an individual expression group. So, after you create the expressions_groups do the following: @complex_assertion.expr...
Rails 3 Nested Form not being created The models I'm working with look like this: class ComplexAssertion < ActiveRecord::Base has_many:expression_groups has_many:expressions,:through =>:expression_group accepts_nested_attributes_for:expression_groups,:allow_destroy=>true end class ExpressionGroup < ActiveRecord::Base ...
TITLE: Rails 3 Nested Form not being created QUESTION: The models I'm working with look like this: class ComplexAssertion < ActiveRecord::Base has_many:expression_groups has_many:expressions,:through =>:expression_group accepts_nested_attributes_for:expression_groups,:allow_destroy=>true end class ExpressionGroup < A...
[ "ruby", "ruby-on-rails-3", "activerecord" ]
0
1
423
1
0
2011-06-02T15:13:19.643000
2011-06-02T17:04:23.923000
6,216,485
6,216,682
How to modify the orientation of a <ul> spanning multiple columns?
I am producing a of alphabetically sorted items, which spans over multiple lines. An example of this can be seen here: http://jsfiddle.net/H4FPw/1/ currently the list is laid out horizontally, as follows: a b c d e f g h i j k l But clients being clients, I have now been asked to change this so that the list is vert...
You can't do it by only changing CSS. Well, you can if you don't care about IE: http://caniuse.com/#search=multiple%20column You have to compromise somewhere: Split the into three s manually. As hinted at by @PeeHaa, use server-side code to change the order that the s are output (but still keep them inside one ). Use J...
How to modify the orientation of a <ul> spanning multiple columns? I am producing a of alphabetically sorted items, which spans over multiple lines. An example of this can be seen here: http://jsfiddle.net/H4FPw/1/ currently the list is laid out horizontally, as follows: a b c d e f g h i j k l But clients being cli...
TITLE: How to modify the orientation of a <ul> spanning multiple columns? QUESTION: I am producing a of alphabetically sorted items, which spans over multiple lines. An example of this can be seen here: http://jsfiddle.net/H4FPw/1/ currently the list is laid out horizontally, as follows: a b c d e f g h i j k l But...
[ "html", "css", "html-lists" ]
4
2
3,174
4
0
2011-06-02T15:13:59.720000
2011-06-02T15:28:38.877000
6,216,486
6,217,247
Exporting data from multiple SQL tables to different flat files using SSIS Script Task
I am trying to create a datagrid and export the contents to a text file using VB.NET and I am doing this inside an SSIS script task in order to automate the process to export a dynamic table to text file. I don't get any error and the files are created but the files are empty. What am I doing wrong here in this code? P...
Here is a possible way of exporting the tables of different structure to flat file using Script Task. This example will export two tables containing different fields and data to a flat file using Script Task. In order to export the data, you can use the DataReader instead of using the DataGrid. There could be other pos...
Exporting data from multiple SQL tables to different flat files using SSIS Script Task I am trying to create a datagrid and export the contents to a text file using VB.NET and I am doing this inside an SSIS script task in order to automate the process to export a dynamic table to text file. I don't get any error and th...
TITLE: Exporting data from multiple SQL tables to different flat files using SSIS Script Task QUESTION: I am trying to create a datagrid and export the contents to a text file using VB.NET and I am doing this inside an SSIS script task in order to automate the process to export a dynamic table to text file. I don't ge...
[ "vb.net", "datagrid", "datagridview", "ssis" ]
4
12
18,439
2
0
2011-06-02T15:14:05.463000
2011-06-02T16:18:49.217000
6,216,487
6,216,719
java: set page range for print dialog
I'm just starting to learn how to print a window in Java/Swing. (edit: just found the Java Printing Guide ) When I do this: protected void doPrint() { PrinterJob job = PrinterJob.getPrinterJob(); job.setPrintable(this); boolean ok = job.printDialog(); if (ok) { try { job.print(); } catch (PrinterException ex) { ex.prin...
For the page range i believe you need to use the PrinterJob's setPageable(Pageable document) method. Looks like it should do the trick. protected void doPrint() { PrinterJob job = PrinterJob.getPrinterJob(); Book book = new Book(); book.append(this, job.defaultPage()); printJob.setPageable(book); boolean ok = job.prin...
java: set page range for print dialog I'm just starting to learn how to print a window in Java/Swing. (edit: just found the Java Printing Guide ) When I do this: protected void doPrint() { PrinterJob job = PrinterJob.getPrinterJob(); job.setPrintable(this); boolean ok = job.printDialog(); if (ok) { try { job.print(); }...
TITLE: java: set page range for print dialog QUESTION: I'm just starting to learn how to print a window in Java/Swing. (edit: just found the Java Printing Guide ) When I do this: protected void doPrint() { PrinterJob job = PrinterJob.getPrinterJob(); job.setPrintable(this); boolean ok = job.printDialog(); if (ok) { tr...
[ "java", "printing", "range", "printdialog" ]
9
4
5,114
2
0
2011-06-02T15:14:09.207000
2011-06-02T15:32:00.287000
6,216,491
6,216,707
Is there a better way of doing class_eval() to extract class variables, in Ruby?
I personally don't have anything against this, apart from the fact that's is long, but what really bothers me is the word eval. I do a lot of stuff in JavaScript and I run from anything resembling eval like it's the devil, I also don't fancy the fact that the parameter is a string (again, probably because it's eval). I...
Use class_variable_get, but only if you must class_variable_get is the better way, other than the fact that it is not "appealing" to you. If you are reaching inside a class and breaking encapsulation, perhaps it is appropriate to have this extra barrier to indicate that you're doing something wrong. Create accessor met...
Is there a better way of doing class_eval() to extract class variables, in Ruby? I personally don't have anything against this, apart from the fact that's is long, but what really bothers me is the word eval. I do a lot of stuff in JavaScript and I run from anything resembling eval like it's the devil, I also don't fan...
TITLE: Is there a better way of doing class_eval() to extract class variables, in Ruby? QUESTION: I personally don't have anything against this, apart from the fact that's is long, but what really bothers me is the word eval. I do a lot of stuff in JavaScript and I run from anything resembling eval like it's the devil...
[ "ruby", "class-variables" ]
2
8
239
1
0
2011-06-02T15:14:22.260000
2011-06-02T15:30:48.087000
6,216,503
6,216,651
Python Prepared Statements. Problems with SELECT IN
I'm having an issue with a prepared statement in Python I can't solve so far. The Query, which should be execute is e.g.: SELECT md5 FROM software WHERE software_id IN (1, 2, 4) So I tried to execute a Query like this: software_id_string = "(2, 3, 4)" cursor.execute("SELECT md5 FROM software WHERE software_id IN %s", s...
You need one placeholder for each item in your parameter list. You can use string operations to get that part done: Create one %s for each parameter, and Join those together with a comma. In the next step you can pass your two arguments to execute() as recommended in the DB-API documentation. software_id_string = (1,2,...
Python Prepared Statements. Problems with SELECT IN I'm having an issue with a prepared statement in Python I can't solve so far. The Query, which should be execute is e.g.: SELECT md5 FROM software WHERE software_id IN (1, 2, 4) So I tried to execute a Query like this: software_id_string = "(2, 3, 4)" cursor.execute("...
TITLE: Python Prepared Statements. Problems with SELECT IN QUESTION: I'm having an issue with a prepared statement in Python I can't solve so far. The Query, which should be execute is e.g.: SELECT md5 FROM software WHERE software_id IN (1, 2, 4) So I tried to execute a Query like this: software_id_string = "(2, 3, 4)...
[ "python", "mysql", "sql", "prepared-statement" ]
6
8
4,001
3
0
2011-06-02T15:15:44.427000
2011-06-02T15:26:07.247000
6,216,504
6,218,511
retrieving information from related tables with Zend Framework and Doctrine 1.2
After working hard in my ZF/Doctrine integration I'm having a problem "translating" my previous Zend_Db work into Doctrine. I used generate-models-db to create the models and I did got to access some properties form the view but only those concerning the table whose model I created like this: $usuarios = new Model_User...
In your controller write a query something like $cu = current_user_id // you'll have to set this your self from a session variable etc $q = Doctrine_Query::create() ->select('p.pais') ->from('Model_Pais p') ->leftJoin('p.Model_UsersHasPais s') ->leftJoin('s.Model_Users u') ->where('u.id =?',$cu); $result = $q->fetchArr...
retrieving information from related tables with Zend Framework and Doctrine 1.2 After working hard in my ZF/Doctrine integration I'm having a problem "translating" my previous Zend_Db work into Doctrine. I used generate-models-db to create the models and I did got to access some properties form the view but only those ...
TITLE: retrieving information from related tables with Zend Framework and Doctrine 1.2 QUESTION: After working hard in my ZF/Doctrine integration I'm having a problem "translating" my previous Zend_Db work into Doctrine. I used generate-models-db to create the models and I did got to access some properties form the vi...
[ "zend-framework", "doctrine" ]
1
1
531
1
0
2011-06-02T15:15:47.033000
2011-06-02T18:13:04.187000
6,216,505
6,216,835
light up the mass storage's led
I have usb mass stroage with led I am trying to light on and off the led using usb packet sniffing tool USBlyzer, I can get the raw data 55 53 42 43 58 66 93 88 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 whose Request info is Bulk or Interrupt Transfer and I/O is out and in the USB properties ...
I don't know anything about pyusb, but my interpretation of the error message is that, contra others' opinions, cfg is not an integer, but that it requires a non-integral index. I say this because the exception is thrown in a __getitem__ function, which could only be cfg 's __getitem__, because that's the only place a ...
light up the mass storage's led I have usb mass stroage with led I am trying to light on and off the led using usb packet sniffing tool USBlyzer, I can get the raw data 55 53 42 43 58 66 93 88 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 whose Request info is Bulk or Interrupt Transfer and I/O i...
TITLE: light up the mass storage's led QUESTION: I have usb mass stroage with led I am trying to light on and off the led using usb packet sniffing tool USBlyzer, I can get the raw data 55 53 42 43 58 66 93 88 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 whose Request info is Bulk or Interrupt ...
[ "python", "io", "usb", "pyusb" ]
1
2
1,549
1
0
2011-06-02T15:15:46.913000
2011-06-02T15:42:01.097000
6,216,516
6,216,692
HTML5 - Select multi required-checkbox
I've writen some code here: http://jsfiddle.net/anhtran/kXsj9/8/ Users have to select at least 1 option on the group. But it makes me must click all of them to submit the form. How to do this issue without javascript? Thanks for any help:)
I think this html5 attribute is only supposed to define which fields are required. You cant put logic in to say "at least one is required". You will need to add custom javascript for this to work (and/or have validation on the server side). hope this helps...
HTML5 - Select multi required-checkbox I've writen some code here: http://jsfiddle.net/anhtran/kXsj9/8/ Users have to select at least 1 option on the group. But it makes me must click all of them to submit the form. How to do this issue without javascript? Thanks for any help:)
TITLE: HTML5 - Select multi required-checkbox QUESTION: I've writen some code here: http://jsfiddle.net/anhtran/kXsj9/8/ Users have to select at least 1 option on the group. But it makes me must click all of them to submit the form. How to do this issue without javascript? Thanks for any help:) ANSWER: I think this h...
[ "html", "mootools", "checkbox", "checkboxlist" ]
4
2
7,587
4
0
2011-06-02T15:16:32.873000
2011-06-02T15:29:49.100000
6,216,517
6,216,638
Split screen in two
I am trying to split my layout into two halves.When I try layout_weight,in splits it into two horizontal halves.How do i split the layout into two vertical halves. android:id="@+id/linearLayout123" android:layout_width="fill_parent" android:layout_height="fill_parent">
Use 'orientation="vertical"' in the enclosing layout, and apply your weights to the children such as:
Split screen in two I am trying to split my layout into two halves.When I try layout_weight,in splits it into two horizontal halves.How do i split the layout into two vertical halves. android:id="@+id/linearLayout123" android:layout_width="fill_parent" android:layout_height="fill_parent">
TITLE: Split screen in two QUESTION: I am trying to split my layout into two halves.When I try layout_weight,in splits it into two horizontal halves.How do i split the layout into two vertical halves. android:id="@+id/linearLayout123" android:layout_width="fill_parent" android:layout_height="fill_parent"> ANSWER: Use...
[ "android" ]
0
5
4,924
1
0
2011-06-02T15:16:35.680000
2011-06-02T15:25:22.427000
6,216,527
6,216,665
Visual Studio C++: Unit test exe project with google test?
Using Visual Studio 2010 C++. I'm experimenting with unit testing and decided to try Google Test (gtest). I have an existing project which compiles to an MFC executable (I'm also interested in how to test a project that compiles to a DLL). My understanding of the convention for unit testing is that you should create a ...
Either put the functionality you want to test into a static library which is linked into both your test project and your MFC project, or put your files in both projects. The first is more complicated, but the second will cause you to compile everything twice....
Visual Studio C++: Unit test exe project with google test? Using Visual Studio 2010 C++. I'm experimenting with unit testing and decided to try Google Test (gtest). I have an existing project which compiles to an MFC executable (I'm also interested in how to test a project that compiles to a DLL). My understanding of t...
TITLE: Visual Studio C++: Unit test exe project with google test? QUESTION: Using Visual Studio 2010 C++. I'm experimenting with unit testing and decided to try Google Test (gtest). I have an existing project which compiles to an MFC executable (I'm also interested in how to test a project that compiles to a DLL). My ...
[ "c++", "visual-studio", "unit-testing", "visual-c++", "googletest" ]
7
6
6,166
3
0
2011-06-02T15:17:09.613000
2011-06-02T15:27:15.447000
6,216,539
6,216,662
How do I add a stylesheet to an iFrame from the parent, using javascript?
my JSFiddle: http://jsfiddle.net/gCRuk/1/ HTML: My replays on SC-Replay.com: Javascript: var ss = document.createElement("link"); ss.type = "text/css"; ss.rel = "stylesheet"; ss.href = "http://www.lprestonsegoiii.com/WordPress/wp-content/themes/arjuna-x/style.css"; var iframe; if(document.frames) iframe = document.fra...
Generally speaking, you can't do that cross-domain due to JavaScript's Same Origin Policy. It's possible if the iframe page, container page and the CSS file are all served from the same domain, which is what is assumed (but unfortunately not mentioned!) in the tutorial on GeekDaily.
How do I add a stylesheet to an iFrame from the parent, using javascript? my JSFiddle: http://jsfiddle.net/gCRuk/1/ HTML: My replays on SC-Replay.com: Javascript: var ss = document.createElement("link"); ss.type = "text/css"; ss.rel = "stylesheet"; ss.href = "http://www.lprestonsegoiii.com/WordPress/wp-content/themes/a...
TITLE: How do I add a stylesheet to an iFrame from the parent, using javascript? QUESTION: my JSFiddle: http://jsfiddle.net/gCRuk/1/ HTML: My replays on SC-Replay.com: Javascript: var ss = document.createElement("link"); ss.type = "text/css"; ss.rel = "stylesheet"; ss.href = "http://www.lprestonsegoiii.com/WordPress/w...
[ "javascript", "html", "css", "iframe" ]
0
4
2,116
1
0
2011-06-02T15:17:51.563000
2011-06-02T15:26:59.690000
6,216,540
6,298,366
Customize .NET framework generated exception messages?
I was wondering if there was a reasonable way to customize messages on exceptions that are thrown by the.NET framework? Below is a chunk of code that I write often, in many different scenarios to achieve the effect of providing reasonable exception messages to my users. public string GetMetadata(string metaDataKey) { /...
Here is a solution that I came up with, but I would like to note that it is more of a patch than anything. It does work, but probably isn't suitable for all applications. I couldn't even think of a good name for it either. public class ContextDictionary: Dictionary { public TValue this[TKey key, string context] { get {...
Customize .NET framework generated exception messages? I was wondering if there was a reasonable way to customize messages on exceptions that are thrown by the.NET framework? Below is a chunk of code that I write often, in many different scenarios to achieve the effect of providing reasonable exception messages to my u...
TITLE: Customize .NET framework generated exception messages? QUESTION: I was wondering if there was a reasonable way to customize messages on exceptions that are thrown by the.NET framework? Below is a chunk of code that I write often, in many different scenarios to achieve the effect of providing reasonable exceptio...
[ "c#", ".net", "exception", "customization" ]
2
0
517
7
0
2011-06-02T15:17:57.470000
2011-06-09T19:46:33.473000
6,216,545
6,216,670
How to insert a titles row into a csv file
I have a.csv file which has data but not the column headers. I can able to create new.csv file with oldcsv file's content. But I need to add column headers in first row and from second row the existing data should appear. Here is the code I have written: Dim ioFile As New System.IO.StreamReader("C:\sample.csv") Dim ioL...
You can set up the Reader and Writer to read and write within the loop and avoid creating a oiLines construct. Dim reader as New StreamReader(inputFileName) Dim writer as New StreamWriter(outputFileName) Dim line as String 'Do you have a definition of what has to be added here? writer.WriteLine(headerLine) While (Not...
How to insert a titles row into a csv file I have a.csv file which has data but not the column headers. I can able to create new.csv file with oldcsv file's content. But I need to add column headers in first row and from second row the existing data should appear. Here is the code I have written: Dim ioFile As New Syst...
TITLE: How to insert a titles row into a csv file QUESTION: I have a.csv file which has data but not the column headers. I can able to create new.csv file with oldcsv file's content. But I need to add column headers in first row and from second row the existing data should appear. Here is the code I have written: Dim ...
[ ".net", "vb.net" ]
1
1
4,118
4
0
2011-06-02T15:18:20.777000
2011-06-02T15:27:29.790000
6,216,547
6,216,705
Android - Dynamically Add Views into View
I have a layout for a view - What I want to do, is in my main activity with a layout like this I want to loop through my data model and inject multiple views consisting of the first layout into the main layout. I know I can do this by building the controls completely within the code, but I was wondering if there was a ...
Use the LayoutInflater to create a view based on your layout template, and then inject it into the view where you need it. LayoutInflater vi = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); View v = vi.inflate(R.layout.your_layout, null); // fill in any details dynamically ...
Android - Dynamically Add Views into View I have a layout for a view - What I want to do, is in my main activity with a layout like this I want to loop through my data model and inject multiple views consisting of the first layout into the main layout. I know I can do this by building the controls completely within the...
TITLE: Android - Dynamically Add Views into View QUESTION: I have a layout for a view - What I want to do, is in my main activity with a layout like this I want to loop through my data model and inject multiple views consisting of the first layout into the main layout. I know I can do this by building the controls com...
[ "android", "dynamic", "view", "android-layout" ]
162
250
297,842
5
0
2011-06-02T15:18:25.107000
2011-06-02T15:30:41.957000
6,216,548
6,216,978
php select statement dependent on variables existing
I am trying to set up a filter system for a small shop I am developing. Basically, I am working the results off a list of variables. the page, products.php if there is no querystring will show all products. However, if there is a variable present I want it to alter the select statement where necessary. however, I am ha...
Try building your WHERE criteria before running the query. String: products.php?sale=&cat_id=1&size=&color=Yellow myfile.php $criteria = "WHERE 1 "; if (isset($_GET['sale']) { $criteria.= "AND tore_products.sale=$_GET['sale'] "; } if (isset($_GET['cat_id']) { $criteria.= "AND store_products.cat=$_GET['cat_id'] "; } if...
php select statement dependent on variables existing I am trying to set up a filter system for a small shop I am developing. Basically, I am working the results off a list of variables. the page, products.php if there is no querystring will show all products. However, if there is a variable present I want it to alter t...
TITLE: php select statement dependent on variables existing QUESTION: I am trying to set up a filter system for a small shop I am developing. Basically, I am working the results off a list of variables. the page, products.php if there is no querystring will show all products. However, if there is a variable present I ...
[ "php", "mysql", "select", "if-statement", "query-string" ]
0
0
266
2
0
2011-06-02T15:18:25.467000
2011-06-02T15:56:39.827000
6,216,551
6,217,333
Bash directory variable error
In a bash script I get to this point read ENE CX CY CZ <<< $(head -n 1 RESULTS_${lach}tal2) echo $ENE SED_ARG="-e 's/-/m/g'" read CX2 <<< $( echo ${CX} | eval sed "$SED_ARG") read CY2 <<< $( echo ${CY} | eval sed "$SED_ARG") read CZ2 <<< $( echo ${CZ} | eval sed "$SED_ARG") DIREC="${CX2}_${CY2}_${CZ2}" echo $DIREC cd "...
Does your RESULTS_${lach}tal2 file have windows-style line endings? Does CZ end with a carriage return? What does this show: echo "$DIREC" | od -c Additionally, there's a lot of unnecessary eval'ing going on. Bash can do replacements in variable substitution: read ENE CX CY CZ <<< $(head -n 1 RESULTS_${lach}tal2 | sed ...
Bash directory variable error In a bash script I get to this point read ENE CX CY CZ <<< $(head -n 1 RESULTS_${lach}tal2) echo $ENE SED_ARG="-e 's/-/m/g'" read CX2 <<< $( echo ${CX} | eval sed "$SED_ARG") read CY2 <<< $( echo ${CY} | eval sed "$SED_ARG") read CZ2 <<< $( echo ${CZ} | eval sed "$SED_ARG") DIREC="${CX2}_$...
TITLE: Bash directory variable error QUESTION: In a bash script I get to this point read ENE CX CY CZ <<< $(head -n 1 RESULTS_${lach}tal2) echo $ENE SED_ARG="-e 's/-/m/g'" read CX2 <<< $( echo ${CX} | eval sed "$SED_ARG") read CY2 <<< $( echo ${CY} | eval sed "$SED_ARG") read CZ2 <<< $( echo ${CZ} | eval sed "$SED_ARG...
[ "bash", "variables" ]
2
1
239
2
0
2011-06-02T15:18:36.337000
2011-06-02T16:28:01.070000
6,216,553
6,216,594
Is there a way to monitor changes to an object?
Instead triggering an event based on user action can you just listen for changes to an object and react then?
Well, depending on the domain you're working with, you can use backbone.js - it has a "model" object that you can extend and connect up to callbacks that get triggered by events automatically when the model is changed - that is, you set a field on the model, and it will automatically fire an event that you can listen t...
Is there a way to monitor changes to an object? Instead triggering an event based on user action can you just listen for changes to an object and react then?
TITLE: Is there a way to monitor changes to an object? QUESTION: Instead triggering an event based on user action can you just listen for changes to an object and react then? ANSWER: Well, depending on the domain you're working with, you can use backbone.js - it has a "model" object that you can extend and connect up...
[ "javascript", "jquery", "json", "node.js" ]
6
7
6,186
3
0
2011-06-02T15:18:48.293000
2011-06-02T15:21:44.610000