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,265,977
6,266,007
Saving an Assembly as a byte array suitable for Assembly.Load
I notice that Assembly.LoadFrom has the following overload public static Assembly Load( byte[] rawAssembly ) How do I save an assembly as a byte array in order to create it like this? Context: I want to write a test harness that will ensure backward compatability of a service. I want to load canned versions of the clie...
If you have old versions as files (just as they were normally built) that's all you need. You can read those into a byte array (e.g. with File.ReadAllBytes ) if you need to. It sounds like you just need to keep the old binaries in source control.
Saving an Assembly as a byte array suitable for Assembly.Load I notice that Assembly.LoadFrom has the following overload public static Assembly Load( byte[] rawAssembly ) How do I save an assembly as a byte array in order to create it like this? Context: I want to write a test harness that will ensure backward compatab...
TITLE: Saving an Assembly as a byte array suitable for Assembly.Load QUESTION: I notice that Assembly.LoadFrom has the following overload public static Assembly Load( byte[] rawAssembly ) How do I save an assembly as a byte array in order to create it like this? Context: I want to write a test harness that will ensure...
[ "c#", ".net", "reflection", "assemblies" ]
3
5
2,146
2
0
2011-06-07T13:33:52.607000
2011-06-07T13:35:57.253000
6,266,002
6,266,060
Python/MySQL: Query executes but nothing happens?
I'm executing a simple query with Python but nothing seems to happen when it executes, just as if it skipped the execution. Here's the code: def somefunction(search_query): from django.db import connection, transaction search_query = search_query.strip() cursor = connection.cursor() rows = cursor.execute("INSERT INTO ...
Perhaps you have to commit your changes: cursor.execute('COMMIT')
Python/MySQL: Query executes but nothing happens? I'm executing a simple query with Python but nothing seems to happen when it executes, just as if it skipped the execution. Here's the code: def somefunction(search_query): from django.db import connection, transaction search_query = search_query.strip() cursor = conne...
TITLE: Python/MySQL: Query executes but nothing happens? QUESTION: I'm executing a simple query with Python but nothing seems to happen when it executes, just as if it skipped the execution. Here's the code: def somefunction(search_query): from django.db import connection, transaction search_query = search_query.stri...
[ "python", "mysql", "django" ]
2
7
1,788
1
0
2011-06-07T13:35:24.473000
2011-06-07T13:39:09.103000
6,266,011
6,266,086
How do I get a JLabel to accurately predict how wide it should be?
I have a situation where a user enters a String and my code makes a Jlabel for it and attempts to center it on a full screen JFrame/Pane. My problem is, to be able to accurately center it, I need to know its dimensions. I need a way to figure out how long (wide) the JLabel should be so that it accomodates the length of...
I believe the actual width comes from getPreferredSize().getWidth() if you don't set it beforehand. Try outputting the preferred size without setting it to null. With MigLayout when centering components, I normally use pref! to make the component as small as possible for all sizes and avoid wrapping, and then center it...
How do I get a JLabel to accurately predict how wide it should be? I have a situation where a user enters a String and my code makes a Jlabel for it and attempts to center it on a full screen JFrame/Pane. My problem is, to be able to accurately center it, I need to know its dimensions. I need a way to figure out how lo...
TITLE: How do I get a JLabel to accurately predict how wide it should be? QUESTION: I have a situation where a user enters a String and my code makes a Jlabel for it and attempts to center it on a full screen JFrame/Pane. My problem is, to be able to accurately center it, I need to know its dimensions. I need a way to...
[ "java", "swing", "components", "awt", "jlabel" ]
4
8
9,228
4
0
2011-06-07T13:36:04.317000
2011-06-07T13:40:16.687000
6,266,015
6,268,425
WCF Data Service and Entity Framework proxy objects
I have a question regarding WCF DataService and Entity Framework 4.1 (code-first). So I have a DataService on web server: [ServiceBehavior(IncludeExceptionDetailInFaults = true)] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class CrmDataService: DataService { ...
If you want to use the same objects, then you do not need to add the service into the client application. Just add the assembly containing the types into the referenced assembly, and in the client app, create the DataServiceContext with the service uri. You will have to do something like this: context.CreateQuery(entit...
WCF Data Service and Entity Framework proxy objects I have a question regarding WCF DataService and Entity Framework 4.1 (code-first). So I have a DataService on web server: [ServiceBehavior(IncludeExceptionDetailInFaults = true)] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.A...
TITLE: WCF Data Service and Entity Framework proxy objects QUESTION: I have a question regarding WCF DataService and Entity Framework 4.1 (code-first). So I have a DataService on web server: [ServiceBehavior(IncludeExceptionDetailInFaults = true)] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibility...
[ "wcf", "entity-framework-4.1", "wcf-data-services", "ef4-code-only" ]
0
3
1,015
1
0
2011-06-07T13:36:14.673000
2011-06-07T16:21:54.223000
6,266,022
6,266,034
How should I extract a collection of distinct values from a List<T> of custom objects?
I've got a List of objects - let's say they're Orders. Order OrderID Date SalesmanId... I want to extract a Distinct list of SalesmanId s from this list. What is the best way to do this? I don't suppose its looping through manually... is it? UPDATE Thanks for your responses. I've thought of an extra requirement (outlin...
If you only need to get the SalesmanIds, it's easy: var salesmanIds = orders.Select(x => x.SalesmanId).Distinct(); Call ToList() if you need it as a List. You need a using directive for System.Linq. EDIT: Okay, to get both the name and ID, you can use: var salesmanIds = orders.Select(x => new { x.SalesmanId, x.UserName...
How should I extract a collection of distinct values from a List<T> of custom objects? I've got a List of objects - let's say they're Orders. Order OrderID Date SalesmanId... I want to extract a Distinct list of SalesmanId s from this list. What is the best way to do this? I don't suppose its looping through manually.....
TITLE: How should I extract a collection of distinct values from a List<T> of custom objects? QUESTION: I've got a List of objects - let's say they're Orders. Order OrderID Date SalesmanId... I want to extract a Distinct list of SalesmanId s from this list. What is the best way to do this? I don't suppose its looping ...
[ "c#", "asp.net", "linq", "list", "lambda" ]
4
13
13,452
2
0
2011-06-07T13:36:43.363000
2011-06-07T13:37:36.413000
6,266,023
6,266,079
how to retrieve the encoding of a csv file in c#.net?
I need to get the encoding type of a csv file and how can i do this in c#.net.. My code to avoid Byte Order Mapping(BMO) added during UTF8 encoding is as follows: public static void SaveAsUTF8WithoutByteOrderMark(string fileName, Encoding encoding) { if (fileName == null) throw new ArgumentNullException("fileName"); i...
There's an example of a simple class that will detect the encoding here (which doesn't just check for BOM ).
how to retrieve the encoding of a csv file in c#.net? I need to get the encoding type of a csv file and how can i do this in c#.net.. My code to avoid Byte Order Mapping(BMO) added during UTF8 encoding is as follows: public static void SaveAsUTF8WithoutByteOrderMark(string fileName, Encoding encoding) { if (fileName ==...
TITLE: how to retrieve the encoding of a csv file in c#.net? QUESTION: I need to get the encoding type of a csv file and how can i do this in c#.net.. My code to avoid Byte Order Mapping(BMO) added during UTF8 encoding is as follows: public static void SaveAsUTF8WithoutByteOrderMark(string fileName, Encoding encoding)...
[ "c#", "encoding", "csv", "format" ]
2
2
4,350
2
0
2011-06-07T13:36:49.203000
2011-06-07T13:39:54.737000
6,266,031
6,266,075
How to throw a compiler error if more than one member has the same Attribute
Simple question, how do you force the C# compiler to throw a compilation error. Update: Perhaps it's better to use an Assert.Fail() instead? I have a custom-attribute that should only be applied to ONE member of a class. Inside of my other class' static method it looks for that one member and I want it to fail (not thr...
You can use a diagnostic directive: #error Oops. This is an error. or for just a warning: #warning This is just a warning. You'd normally want to put these in conditional blocks, I'd expect... EDIT: Okay, now you've updated your question, you simply can't do this at compile-time. Your suggestion of using Assert.Fail pu...
How to throw a compiler error if more than one member has the same Attribute Simple question, how do you force the C# compiler to throw a compilation error. Update: Perhaps it's better to use an Assert.Fail() instead? I have a custom-attribute that should only be applied to ONE member of a class. Inside of my other cla...
TITLE: How to throw a compiler error if more than one member has the same Attribute QUESTION: Simple question, how do you force the C# compiler to throw a compilation error. Update: Perhaps it's better to use an Assert.Fail() instead? I have a custom-attribute that should only be applied to ONE member of a class. Insi...
[ "c#", ".net", ".net-4.0", "attributes", "compiler-errors" ]
15
34
15,743
4
0
2011-06-07T13:37:24.657000
2011-06-07T13:39:31.967000
6,266,054
6,269,201
Remove referrer information while redirecting page in asp.net application
For example, i have an application which redirects to www.google.com. Response.redirect will send the redirect information to the external address which i dont want. However internally, i want to access the referrer information. Is there any way to remove that information. Will redirecting from javascript using window....
I believe the referrer will get removed if you launch the URL in a new window. In JavaScript that would leverage the window.open(...) function.
Remove referrer information while redirecting page in asp.net application For example, i have an application which redirects to www.google.com. Response.redirect will send the redirect information to the external address which i dont want. However internally, i want to access the referrer information. Is there any way ...
TITLE: Remove referrer information while redirecting page in asp.net application QUESTION: For example, i have an application which redirects to www.google.com. Response.redirect will send the redirect information to the external address which i dont want. However internally, i want to access the referrer information....
[ "c#", "asp.net", "referrer" ]
3
0
1,737
1
0
2011-06-07T13:38:59.727000
2011-06-07T17:27:37.873000
6,266,081
6,266,100
C++ deleting inherited class
Let's say there is a class Object and then another class Cat that inherits Object. Next, there is a list of Object * (pointers). Then, I create a new Cat and put it into the list. After some time I want to delete all Cats and call delete on each member of the list. Does it call destructor of Cat?
Yes if you marked the destructor of object as virtual. class Object { public: virtual ~Object(){} //make the base class destructor virtual }; class cat: public Object { public: virtual ~cat(){} // now this gets called when a pointer to Object that is a cat is destroyed }
C++ deleting inherited class Let's say there is a class Object and then another class Cat that inherits Object. Next, there is a list of Object * (pointers). Then, I create a new Cat and put it into the list. After some time I want to delete all Cats and call delete on each member of the list. Does it call destructor o...
TITLE: C++ deleting inherited class QUESTION: Let's say there is a class Object and then another class Cat that inherits Object. Next, there is a list of Object * (pointers). Then, I create a new Cat and put it into the list. After some time I want to delete all Cats and call delete on each member of the list. Does it...
[ "c++", "inheritance", "destructor" ]
7
21
6,290
4
0
2011-06-07T13:40:03.630000
2011-06-07T13:41:08.110000
6,266,094
6,268,609
Include remote web page into Servlet response
I need to have servlet exposed to the Internet that includes into its response remote web page with images! which hosted only in Intranet, there for in not accessible for outer clients. Is it possible to implement and how? Thanks
Using HttpURLConnection you write a redirect servlet which redirects the requests to remote server. Create a HttpURLConnection to the remote pages, get the inputstream from the HttpURLConnection and write it to the client outputstream.
Include remote web page into Servlet response I need to have servlet exposed to the Internet that includes into its response remote web page with images! which hosted only in Intranet, there for in not accessible for outer clients. Is it possible to implement and how? Thanks
TITLE: Include remote web page into Servlet response QUESTION: I need to have servlet exposed to the Internet that includes into its response remote web page with images! which hosted only in Intranet, there for in not accessible for outer clients. Is it possible to implement and how? Thanks ANSWER: Using HttpURLConn...
[ "servlets", "include" ]
1
1
200
1
0
2011-06-07T13:40:44.947000
2011-06-07T16:38:53.677000
6,268,203
6,273,911
OLAP Error while Processing
I am new to OLAP, and figured out how to make a cube and process it. However, when i play with it too much, i eventually come up against this error: Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_v_MYEntities, Column: uniqueId, Value: 2548. Errors in the OLAP storage engine: The record...
Basically, Table: dbo_v_MYEntities, Column: uniqueId, Value: 2548 Means that your table/view "dbo.v_MYEntities" has a column "uniqueid", which contains a value "2548" which is not in a table which is related to dbo.v_MYEntities in the dimension usage tab in BIDS. This usually happens when dbo.v_MYEntities is a fact tab...
OLAP Error while Processing I am new to OLAP, and figured out how to make a cube and process it. However, when i play with it too much, i eventually come up against this error: Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_v_MYEntities, Column: uniqueId, Value: 2548. Errors in the OLA...
TITLE: OLAP Error while Processing QUESTION: I am new to OLAP, and figured out how to make a cube and process it. However, when i play with it too much, i eventually come up against this error: Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_v_MYEntities, Column: uniqueId, Value: 2548....
[ "sql-server", "sql-server-2008", "ssas", "olap", "cube" ]
2
2
3,258
1
0
2011-06-07T16:04:37.863000
2011-06-08T03:31:12.147000
6,268,205
6,270,657
Why doesn't SSIS recognize line feed {LF} row delimiter while importing UTF-8 flat file?
I am trying to import data from a utf-8 encoded flat file into SQL Server 2008 using SSIS. This is what the end of the row data looks like in Notepad++: I have a couple more images showing what the file connection manager looks like: You can see that the data shows correctly in the file connection manager preview. When...
Cause: SSIS fails to read the file and displays the below warning due to the column delimiter Ç ( "c" with cedilla ) and not due to the line delimiter {LF} ( Line Feed ). [Read flat file [1]] Warning: The end of the data file was reached while reading header rows. Make sure the header row delimiter and the number of he...
Why doesn't SSIS recognize line feed {LF} row delimiter while importing UTF-8 flat file? I am trying to import data from a utf-8 encoded flat file into SQL Server 2008 using SSIS. This is what the end of the row data looks like in Notepad++: I have a couple more images showing what the file connection manager looks lik...
TITLE: Why doesn't SSIS recognize line feed {LF} row delimiter while importing UTF-8 flat file? QUESTION: I am trying to import data from a utf-8 encoded flat file into SQL Server 2008 using SSIS. This is what the end of the row data looks like in Notepad++: I have a couple more images showing what the file connection...
[ "sql-server", "sql-server-2008", "utf-8", "ssis", "flat-file" ]
29
64
47,224
3
0
2011-06-07T16:04:40.967000
2011-06-07T19:38:07.910000
6,268,214
6,268,372
How to auto login to windows account?
I am researching ways to auto login to a windows server, so applications can be restarted on reboot if the server crashes. Do windows services load before or after a user logs in? Can a windows service be used to login to an account? If not, is there any way to use some sort of login script to facilitate automatically ...
Services run regardless of whether a user logs on. If you need an application to run all the time, have you considered converting it to a service? Auto-logon is a security risk.
How to auto login to windows account? I am researching ways to auto login to a windows server, so applications can be restarted on reboot if the server crashes. Do windows services load before or after a user logs in? Can a windows service be used to login to an account? If not, is there any way to use some sort of log...
TITLE: How to auto login to windows account? QUESTION: I am researching ways to auto login to a windows server, so applications can be restarted on reboot if the server crashes. Do windows services load before or after a user logs in? Can a windows service be used to login to an account? If not, is there any way to us...
[ "windows", "windows-services", "windows-server-2008" ]
1
1
15,354
6
0
2011-06-07T16:05:14.307000
2011-06-07T16:17:08.143000
6,268,220
6,268,666
getting gridview's row's data
I have a gridview which generate a link based on certain condition inside the Grid from code behind. What I want to achieve is when I click on that link, I want to catch all the information from the row that the link is in. So for example, if row 1, 2, and 4 has links in cell 5, When I click row 1's link, I want to get...
What you want to do is more like this: $("a.SendEmail").click(function(e) { var row = $(this).parents("tr:first"); var name= row.children("td:eq(1)").text();.. }); Bubble up to the row and then find the children. HTH.
getting gridview's row's data I have a gridview which generate a link based on certain condition inside the Grid from code behind. What I want to achieve is when I click on that link, I want to catch all the information from the row that the link is in. So for example, if row 1, 2, and 4 has links in cell 5, When I cli...
TITLE: getting gridview's row's data QUESTION: I have a gridview which generate a link based on certain condition inside the Grid from code behind. What I want to achieve is when I click on that link, I want to catch all the information from the row that the link is in. So for example, if row 1, 2, and 4 has links in ...
[ "jquery", "asp.net", "vb.net" ]
2
2
5,352
1
0
2011-06-07T16:05:49.940000
2011-06-07T16:43:50.373000
6,268,222
6,268,392
Subversion Branching Question with Multiple Branches
We have the following structure in our Subversion repo: Here is a quick summary: We started from the trunk and created branch 1. We then created branch 2 from branch 1. We then created 2 more branches off of branch 2. So currently we have 4 branches nested off of the trunk. What I would like to do is reintegrate branch...
No it won't cause "some sort of tree conflict." It is perfectly ok to do this, but I cannot comment on whether this is the way to go for you without knowing your exact scenario
Subversion Branching Question with Multiple Branches We have the following structure in our Subversion repo: Here is a quick summary: We started from the trunk and created branch 1. We then created branch 2 from branch 1. We then created 2 more branches off of branch 2. So currently we have 4 branches nested off of the...
TITLE: Subversion Branching Question with Multiple Branches QUESTION: We have the following structure in our Subversion repo: Here is a quick summary: We started from the trunk and created branch 1. We then created branch 2 from branch 1. We then created 2 more branches off of branch 2. So currently we have 4 branches...
[ "svn", "version-control", "branching-and-merging" ]
1
2
153
1
0
2011-06-07T16:05:55.227000
2011-06-07T16:18:57.687000
6,268,226
6,268,277
Calculating Weekly Rotating Schedule
Ok, I am not sure how to approach this... I am using an open source CMS (Umbraco) and want to create a macro that rotates content every three weeks. So basically I have three documents and I want to show document 1, 2 or 3 each week (total three week rotation) based on a given start date... Any suggestions? I suck at w...
This works, although you may want to adjust it if you always want the weeks to start on a given day (e.g. Sunday). DateTime startDate = new DateTime(2011, 1, 1).Date; DateTime now = DateTime.Now.Date; int days = (int)now.Subtract(startDate).TotalDays; int weeks = days / 7; Console.WriteLine((weeks % 3) + 1);
Calculating Weekly Rotating Schedule Ok, I am not sure how to approach this... I am using an open source CMS (Umbraco) and want to create a macro that rotates content every three weeks. So basically I have three documents and I want to show document 1, 2 or 3 each week (total three week rotation) based on a given start...
TITLE: Calculating Weekly Rotating Schedule QUESTION: Ok, I am not sure how to approach this... I am using an open source CMS (Umbraco) and want to create a macro that rotates content every three weeks. So basically I have three documents and I want to show document 1, 2 or 3 each week (total three week rotation) base...
[ "c#", ".net", "asp.net" ]
1
0
810
2
0
2011-06-07T16:06:17.967000
2011-06-07T16:10:17.630000
6,268,228
6,268,289
Why is my constructor with non const reference as argument allowed to be called with temporary objects?
I have a sample code below. #include template class XYZ { private: T & ref; public: XYZ(T & arg):ref(arg) { } }; class temp { int x; public: temp():x(34) { } }; template void fun(T & arg) { } int main() { XYZ abc(temp()); fun(temp()); //This is a compilation error in gcc while the above code is perfectly valid. } In th...
XYZ abc(temp()); It compiles, because it is NOT a variable declaration. I'm sure you think its a variable declaration when the fact is that its a function declaration. The name of the function is abc; the function returns an object of type XYZ and takes a single (unnamed) argument which in turn is a function returning ...
Why is my constructor with non const reference as argument allowed to be called with temporary objects? I have a sample code below. #include template class XYZ { private: T & ref; public: XYZ(T & arg):ref(arg) { } }; class temp { int x; public: temp():x(34) { } }; template void fun(T & arg) { } int main() { XYZ abc(tem...
TITLE: Why is my constructor with non const reference as argument allowed to be called with temporary objects? QUESTION: I have a sample code below. #include template class XYZ { private: T & ref; public: XYZ(T & arg):ref(arg) { } }; class temp { int x; public: temp():x(34) { } }; template void fun(T & arg) { } int ma...
[ "c++", "most-vexing-parse" ]
7
12
621
2
0
2011-06-07T16:06:31.360000
2011-06-07T16:11:27.147000
6,268,229
6,269,148
Program Freezes on MessageBox()
Here's the problem: The main GUI thread is performing a SendMessage to another GUI thread (yes, there are multiple GUI threads, and unfortunately this cannot change). When that second GUI thread receives the SendMessage, it may decide to display a message box. Some of the time, that MessageBox will 'freeze' the entire ...
It must be that blocking one of the GUI threads causes the problem. Try this: Replace the::SendMesage with::PostMessage followed by a::MsgWaitForMultipleObjects loop. You will need to pass an event handle that signals when the message box is closed. It will probably solve the problem. Just be careful which messages you...
Program Freezes on MessageBox() Here's the problem: The main GUI thread is performing a SendMessage to another GUI thread (yes, there are multiple GUI threads, and unfortunately this cannot change). When that second GUI thread receives the SendMessage, it may decide to display a message box. Some of the time, that Mess...
TITLE: Program Freezes on MessageBox() QUESTION: Here's the problem: The main GUI thread is performing a SendMessage to another GUI thread (yes, there are multiple GUI threads, and unfortunately this cannot change). When that second GUI thread receives the SendMessage, it may decide to display a message box. Some of t...
[ "windows", "visual-studio", "winapi", "visual-c++", "mfc" ]
0
1
3,192
1
0
2011-06-07T16:06:31.460000
2011-06-07T17:23:43.593000
6,268,243
6,268,345
How do I access the source of an ActionEvent when the ActionListener is located in a different class?
I can't get my head round this one. I've tried to adhere to the MVC pattern for the first time and now have difficulties accessing the source of an ActionEvent because the ActionListener is located in a different class. But let the code do the talking... In the "view": // ControlForms.java... private JPanel createSear...
Why do you need the name of the variable? Why can't you do the event handling like this public class ComboListener implements ActionListener { public void actionPerformed(ActionEvent e) { JComboBox source = (JComboBox)e.getSource(); //do processing here } } I'd think that if you need to do processing according the var...
How do I access the source of an ActionEvent when the ActionListener is located in a different class? I can't get my head round this one. I've tried to adhere to the MVC pattern for the first time and now have difficulties accessing the source of an ActionEvent because the ActionListener is located in a different class...
TITLE: How do I access the source of an ActionEvent when the ActionListener is located in a different class? QUESTION: I can't get my head round this one. I've tried to adhere to the MVC pattern for the first time and now have difficulties accessing the source of an ActionEvent because the ActionListener is located in...
[ "java", "model-view-controller", "events", "actionlistener" ]
1
3
1,669
2
0
2011-06-07T16:07:34.493000
2011-06-07T16:15:33.043000
6,268,245
6,276,754
accessing restlet from programming languages different than java
if im using restlet as an API, can I access it from client PCs using programming langages other than java? and do I need language binding? or how could this be done? I don't have experience in this so can you please provide good explanation? Thanks in advance
REST architectures are independent from any language. This means that they can be produce and consume by any language / technology and the sent data format can be specified using the Content-Type header. Moreover the possible expected data format for responses can be "configured" using content negociation (headers Acce...
accessing restlet from programming languages different than java if im using restlet as an API, can I access it from client PCs using programming langages other than java? and do I need language binding? or how could this be done? I don't have experience in this so can you please provide good explanation? Thanks in adv...
TITLE: accessing restlet from programming languages different than java QUESTION: if im using restlet as an API, can I access it from client PCs using programming langages other than java? and do I need language binding? or how could this be done? I don't have experience in this so can you please provide good explanat...
[ "java", "programming-languages", "binding", "restlet" ]
0
0
81
2
0
2011-06-07T16:07:40.203000
2011-06-08T09:34:31.170000
6,268,250
6,268,309
beginInvoke, GUI and thread
I have application with two thread. One of them (T1) is main GUI form, another (T2) is function working in loop. When T2 gets some information must call function with GUI form. I'm not sure that I do it right. T2 call function FUNCTION, which update something in GUI form. public void f() { // controler.doSomething(); }...
You can do this in a single method by calling invoking yourself: public void Function() { if (this.InvokeRequired) { this.BeginInvoke(new Action(this.Function)); return; } // controller.DoSomething(); } Edit in response to comments: If you need to pass additional arguments, you can do it by using a lambda expression a...
beginInvoke, GUI and thread I have application with two thread. One of them (T1) is main GUI form, another (T2) is function working in loop. When T2 gets some information must call function with GUI form. I'm not sure that I do it right. T2 call function FUNCTION, which update something in GUI form. public void f() { /...
TITLE: beginInvoke, GUI and thread QUESTION: I have application with two thread. One of them (T1) is main GUI form, another (T2) is function working in loop. When T2 gets some information must call function with GUI form. I'm not sure that I do it right. T2 call function FUNCTION, which update something in GUI form. p...
[ "c#", "begininvoke" ]
6
16
14,943
2
0
2011-06-07T16:08:09.717000
2011-06-07T16:13:09.517000
6,268,257
6,268,980
Apache2 rewrite with query string escaped twice
Using this rule in a virtual host configuration file leads to double escaping of the query parameters: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} For example: http://example.com?f=hello%20world Leads to https://example.com?f=hello%2520world Note the "%25" escaping the ...
Try to add the [NE] (noescape) tag at the end of the rewrite rule: RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [NE] This happens because & and? and some others are escaped by default in the rewrite process.
Apache2 rewrite with query string escaped twice Using this rule in a virtual host configuration file leads to double escaping of the query parameters: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} For example: http://example.com?f=hello%20world Leads to https://example.co...
TITLE: Apache2 rewrite with query string escaped twice QUESTION: Using this rule in a virtual host configuration file leads to double escaping of the query parameters: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} For example: http://example.com?f=hello%20world Leads to ...
[ "apache", "mod-rewrite", "query-string" ]
9
17
2,808
1
0
2011-06-07T16:08:39.643000
2011-06-07T17:07:43.810000
6,268,266
6,268,568
Scaling bitmaps while drawing - Performance
I read a couple of times now that scaling images while drawing should be avoided, because it costs alot of performance. Now does that mean that when I have an image view and i set it to a fixed size (anything other than wrap_content) and set scale type to something like "scaleXY" the image gets scaled while its beeing ...
If you are using software rendering (call Canvas-based rendering prior to 3.0; cases where the hardware renderer isn't used as of 3.0 because you haven't requested it or the device doesn't support it), then scaling a bitmap at draw time will be significantly slower, perhaps in the realm of an order of magnitude. Basica...
Scaling bitmaps while drawing - Performance I read a couple of times now that scaling images while drawing should be avoided, because it costs alot of performance. Now does that mean that when I have an image view and i set it to a fixed size (anything other than wrap_content) and set scale type to something like "scal...
TITLE: Scaling bitmaps while drawing - Performance QUESTION: I read a couple of times now that scaling images while drawing should be avoided, because it costs alot of performance. Now does that mean that when I have an image view and i set it to a fixed size (anything other than wrap_content) and set scale type to so...
[ "android", "android-layout" ]
1
0
470
1
0
2011-06-07T16:09:07.177000
2011-06-07T16:35:26.680000
6,268,269
6,268,313
cannot compile app with libyahoo2
folks, i got an issue which really pain for me i got few line and while compile these code it shows some error while it compiling $ gcc `pkg-config --cflags glib-2.0` main.c -lssl output /tmp/ccQ7vAnA.o: In function `yahoo_ping_timeout_callback': main.c:(.text+0x4ca): undefined reference to `yahoo_keepalive' /tmp/ccQ7v...
Try adding -lyahoo2 in your gcc line. Edit: It seems that you should implement ext_* functions by yourself. From libyahoo2 - README: "yahoo2_callbacks.h contains prototypes for functions that you must implement. All these functions must be implemented by your code." Edit2: Try to add a call to your register_callbacks()...
cannot compile app with libyahoo2 folks, i got an issue which really pain for me i got few line and while compile these code it shows some error while it compiling $ gcc `pkg-config --cflags glib-2.0` main.c -lssl output /tmp/ccQ7vAnA.o: In function `yahoo_ping_timeout_callback': main.c:(.text+0x4ca): undefined referen...
TITLE: cannot compile app with libyahoo2 QUESTION: folks, i got an issue which really pain for me i got few line and while compile these code it shows some error while it compiling $ gcc `pkg-config --cflags glib-2.0` main.c -lssl output /tmp/ccQ7vAnA.o: In function `yahoo_ping_timeout_callback': main.c:(.text+0x4ca):...
[ "c", "compilation", "yahoo-api" ]
0
1
152
1
0
2011-06-07T16:09:36.607000
2011-06-07T16:13:30.637000
6,268,275
6,269,132
Why apply is so important for lisp evaluator?
I have read chapter 4 of SICP, and just found that the first section lists the most important functions for implementing a evaluator, eval and apply, I understand that eval is very important, but why apply is so important? For some language, there is totally no apply such as in Javascript. Edit: Sorry about that I am w...
The eval/apply thing in SICP (and elsewhere) is separating two major parts of an evaluator. The first part, the one that eval is doing, is dealing with the syntactic translation of code to its meaning -- but it's doing almost nothing except dispatching over the expression type. As you can see in the book, there are var...
Why apply is so important for lisp evaluator? I have read chapter 4 of SICP, and just found that the first section lists the most important functions for implementing a evaluator, eval and apply, I understand that eval is very important, but why apply is so important? For some language, there is totally no apply such a...
TITLE: Why apply is so important for lisp evaluator? QUESTION: I have read chapter 4 of SICP, and just found that the first section lists the most important functions for implementing a evaluator, eval and apply, I understand that eval is very important, but why apply is so important? For some language, there is total...
[ "lisp", "sicp" ]
7
8
2,144
4
0
2011-06-07T16:10:09.390000
2011-06-07T17:22:18.200000
6,268,278
6,278,113
Modifying global variables in Python unittest framework
I am working on a series of unit tests in Python, some of which depend on the value of a configuration variable. These variables are stored in a global Python config file and are used in other modules. I would like to write unit tests for different values of the configuration variables but have not yet found a way to d...
Use unittest.mock.patch as in @Flimm's answer, if that's available to you. Original Answer Don't do this: from my_module import my_function_with_global_var But this: import my_module And then you can inject MY_CONFIG_VARIABLE into the imported my_module, without changing the system under test like so: class TestSomethi...
Modifying global variables in Python unittest framework I am working on a series of unit tests in Python, some of which depend on the value of a configuration variable. These variables are stored in a global Python config file and are used in other modules. I would like to write unit tests for different values of the c...
TITLE: Modifying global variables in Python unittest framework QUESTION: I am working on a series of unit tests in Python, some of which depend on the value of a configuration variable. These variables are stored in a global Python config file and are used in other modules. I would like to write unit tests for differe...
[ "python", "unit-testing", "global-variables" ]
56
62
62,215
3
0
2011-06-07T16:10:18.657000
2011-06-08T11:37:17.073000
6,268,281
6,268,635
Accessing custom property of hostComponent when skinning - Flex 4.5, SDK 4.5
Using SDK 4.1 I was able to access custom properties of a custom button component from a custom skin. The project I'm currently working requires SDK 4.5 and I'm unable to to access the properties. Here's an example: Custom Button Component Custom Button Skin [HostComponent("components.ButtonIcon")]... The code hint sho...
Just replace that SparkButtonSkin with a regular Skin and you'll be just fine: [HostComponent("components.ButtonIcon")]
Accessing custom property of hostComponent when skinning - Flex 4.5, SDK 4.5 Using SDK 4.1 I was able to access custom properties of a custom button component from a custom skin. The project I'm currently working requires SDK 4.5 and I'm unable to to access the properties. Here's an example: Custom Button Component Cus...
TITLE: Accessing custom property of hostComponent when skinning - Flex 4.5, SDK 4.5 QUESTION: Using SDK 4.1 I was able to access custom properties of a custom button component from a custom skin. The project I'm currently working requires SDK 4.5 and I'm unable to to access the properties. Here's an example: Custom Bu...
[ "actionscript-3", "properties", "skinning" ]
5
8
4,695
2
0
2011-06-07T16:10:38.877000
2011-06-07T16:41:25.703000
6,268,291
6,268,327
shell script with "while" loop and numeric test does not work
can someone help me spot the problem here? #!/bin/sh find. -name '*ABC*' > replace_temp.file num_of_lines=`cat replace_temp.file | wc -l` i=0 while $i<$num_of_lines do tc=`expr $i + 1` line=`tail -$tc replace_temp.file |head -1` line1=$line sed -e 's/\(.*\)ABC/\1DEF/' $line #mv -f $line1 $line done #rm -f replace_temp...
while $i<$num_of_lines should be something like while [ $i -lt $num_of_lines ] or if you insist while (($i < $num_of_lines))
shell script with "while" loop and numeric test does not work can someone help me spot the problem here? #!/bin/sh find. -name '*ABC*' > replace_temp.file num_of_lines=`cat replace_temp.file | wc -l` i=0 while $i<$num_of_lines do tc=`expr $i + 1` line=`tail -$tc replace_temp.file |head -1` line1=$line sed -e 's/\(.*\)...
TITLE: shell script with "while" loop and numeric test does not work QUESTION: can someone help me spot the problem here? #!/bin/sh find. -name '*ABC*' > replace_temp.file num_of_lines=`cat replace_temp.file | wc -l` i=0 while $i<$num_of_lines do tc=`expr $i + 1` line=`tail -$tc replace_temp.file |head -1` line1=$lin...
[ "linux", "shell", "unix", "scripting" ]
0
4
1,588
3
0
2011-06-07T16:11:28.543000
2011-06-07T16:14:15.457000
6,268,312
6,271,705
The bing map control for wp7 has two properties called Pitch and Heading, but setting those two properties does not seem to work
The bing map control for wp7 has two properties called Pitch and Heading, but setting those two properties does not seem to work. I expect them to rotate the map. Am I missing anything? Is there anything specific that needs to be done to make those two properties work?
That properties aren't avilable now on WP7. This is propertis for 3D Bing Map Control (rather desktop), not supported by WP7 yet. Better use transform on container with map (i.e. Canvas, but I can't check now...)
The bing map control for wp7 has two properties called Pitch and Heading, but setting those two properties does not seem to work The bing map control for wp7 has two properties called Pitch and Heading, but setting those two properties does not seem to work. I expect them to rotate the map. Am I missing anything? Is th...
TITLE: The bing map control for wp7 has two properties called Pitch and Heading, but setting those two properties does not seem to work QUESTION: The bing map control for wp7 has two properties called Pitch and Heading, but setting those two properties does not seem to work. I expect them to rotate the map. Am I missi...
[ "windows-phone-7", "bing-maps", "bing", "pitch", "heading" ]
1
0
466
1
0
2011-06-07T16:13:20.420000
2011-06-07T21:10:08.303000
6,268,335
6,269,386
How can I use an Alternate DB connection in Kohana 3.1
If a run the following bit of code from a Kohana 3.1 controller $query = DB::select("select * from foo"); $results = $query->execute(); foreach($results as $result) { var_dump($result); } Kohana will attempt to connect to the database using information from the array returned by application/config/database.php. Specifi...
You can pass a database group as an argument of execute Check out the source code: Line 201 of classes/kohana/database/query.php and Database::instance() $this->execute('group'); You could also write a query starting with $query = Database::instance('group')
How can I use an Alternate DB connection in Kohana 3.1 If a run the following bit of code from a Kohana 3.1 controller $query = DB::select("select * from foo"); $results = $query->execute(); foreach($results as $result) { var_dump($result); } Kohana will attempt to connect to the database using information from the arr...
TITLE: How can I use an Alternate DB connection in Kohana 3.1 QUESTION: If a run the following bit of code from a Kohana 3.1 controller $query = DB::select("select * from foo"); $results = $query->execute(); foreach($results as $result) { var_dump($result); } Kohana will attempt to connect to the database using inform...
[ "php", "kohana", "kohana-3", "kohana-db" ]
3
6
2,299
1
0
2011-06-07T16:14:52.677000
2011-06-07T17:40:39.537000
6,268,339
6,268,447
How does UIGestureRecognizer work?
How does UIGestureRecognizer work internally? Is it possible to emulate it in iOS < 3.2?
If you want a detailed explanation on how they work, it is worth watching this video from last year's WWDC.
How does UIGestureRecognizer work? How does UIGestureRecognizer work internally? Is it possible to emulate it in iOS < 3.2?
TITLE: How does UIGestureRecognizer work? QUESTION: How does UIGestureRecognizer work internally? Is it possible to emulate it in iOS < 3.2? ANSWER: If you want a detailed explanation on how they work, it is worth watching this video from last year's WWDC.
[ "cocoa-touch", "uigesturerecognizer" ]
0
1
495
2
0
2011-06-07T16:15:04.473000
2011-06-07T16:23:20.610000
6,268,340
6,276,193
JavaScript: How to read browser's cache of POST data?
Effort I've read this question, but I still think there has to be a way to do this client side. Case I'm submitting a form that has a few inputs. When the form is submitted, the primary key of those inputs is shown on a results page along w/ other data and a different form. The effect I'm trying to do is if the input-p...
AFAIK, Javascript does not have access to the POST body. Can't think of an API call for that! If you are using php/.net/ruby, you can encode the POST body as JSON that your JS can use when it's reloaded, can't you?
JavaScript: How to read browser's cache of POST data? Effort I've read this question, but I still think there has to be a way to do this client side. Case I'm submitting a form that has a few inputs. When the form is submitted, the primary key of those inputs is shown on a results page along w/ other data and a differe...
TITLE: JavaScript: How to read browser's cache of POST data? QUESTION: Effort I've read this question, but I still think there has to be a way to do this client side. Case I'm submitting a form that has a few inputs. When the form is submitted, the primary key of those inputs is shown on a results page along w/ other ...
[ "javascript", "caching", "post", "reload" ]
1
1
1,849
1
0
2011-06-07T16:15:07.173000
2011-06-08T08:36:11.763000
6,268,341
6,268,753
How do I periodically rebuild a reporting table that is very frequently accessed?
It takes about 5-10 minutes to refresh a prepared reporting table. We want to refresh this table constantly (maybe once every 15 minutes or continuously). We query this reporting table very frequently (many times per minute) and I can't keep it down for any length of time. It is okay if the data is 15 minutes old. I ca...
Use synonyms?. On creation this points to tableA. CREATE SYNONYM ReportingTable FOR dbo.tableA; 15 minutes later you create tableB and redefine the synonym DROP SYNONYM ReportingTable; CREATE SYNONYM ReportingTable FOR dbo.tableB; The synonym is merely a pointer to the actual table: this way the handling of the actual ...
How do I periodically rebuild a reporting table that is very frequently accessed? It takes about 5-10 minutes to refresh a prepared reporting table. We want to refresh this table constantly (maybe once every 15 minutes or continuously). We query this reporting table very frequently (many times per minute) and I can't k...
TITLE: How do I periodically rebuild a reporting table that is very frequently accessed? QUESTION: It takes about 5-10 minutes to refresh a prepared reporting table. We want to refresh this table constantly (maybe once every 15 minutes or continuously). We query this reporting table very frequently (many times per min...
[ "sql-server", "t-sql", "reporting", "denormalization" ]
10
14
1,813
4
0
2011-06-07T16:15:08.297000
2011-06-07T16:50:01.477000
6,268,347
6,268,833
Dotted border doesn't appear right at either ends
Something which has been frustrating me is the CSS border:dotted; rule. I have been using this below: border-bottom:#1C9AD5 dotted 2px; If you take a look at my example, and look at the blue dotted line it goes a bit weird at either end (it looks as though there's two dots really close together). I know I can easily ge...
Posting my earlier comment as a solution based on Jason's comment: "Looks like it is only on certain zoom levels for Chrome. I don't know how to zoom on a mac, but on Windows, you hold CTRL and roll your mouse wheel."
Dotted border doesn't appear right at either ends Something which has been frustrating me is the CSS border:dotted; rule. I have been using this below: border-bottom:#1C9AD5 dotted 2px; If you take a look at my example, and look at the blue dotted line it goes a bit weird at either end (it looks as though there's two d...
TITLE: Dotted border doesn't appear right at either ends QUESTION: Something which has been frustrating me is the CSS border:dotted; rule. I have been using this below: border-bottom:#1C9AD5 dotted 2px; If you take a look at my example, and look at the blue dotted line it goes a bit weird at either end (it looks as th...
[ "css" ]
0
2
1,186
1
0
2011-06-07T16:15:49.780000
2011-06-07T16:55:41.883000
6,268,355
6,268,489
Faking a VbScript Array with JavaScript
I'm using and testing a VbScript API using JavaScript. One part of the VbScript API has a construct, that I must assume is an array, that you can read and write from. I do not have the source code for the VbScript API, nor do I even have access to the system in which it runs for the time being. In my JavaScript test co...
How about this? myObj.setValue("xyz", 1); Really it makes no sense trying to simulate the syntax of another language.
Faking a VbScript Array with JavaScript I'm using and testing a VbScript API using JavaScript. One part of the VbScript API has a construct, that I must assume is an array, that you can read and write from. I do not have the source code for the VbScript API, nor do I even have access to the system in which it runs for ...
TITLE: Faking a VbScript Array with JavaScript QUESTION: I'm using and testing a VbScript API using JavaScript. One part of the VbScript API has a construct, that I must assume is an array, that you can read and write from. I do not have the source code for the VbScript API, nor do I even have access to the system in ...
[ "javascript", "vbscript" ]
2
0
336
2
0
2011-06-07T16:16:10.980000
2011-06-07T16:27:00.413000
6,268,363
6,268,443
Understanding the Soundcloud cocoa wrapper api
I'm somewhat familiar with Cocoa, Objective-C and iPhone Development using Xcode. I'm starting to incorporate this cocoa-wrapper in my iPhone project, but it's a steep learning curve for me. What topics should I be reading on (or buying books for) to understand how to use this wrapper in an efficient manner? Here are s...
What about this? SoundCloud API or the Discussion Group for more direct help.
Understanding the Soundcloud cocoa wrapper api I'm somewhat familiar with Cocoa, Objective-C and iPhone Development using Xcode. I'm starting to incorporate this cocoa-wrapper in my iPhone project, but it's a steep learning curve for me. What topics should I be reading on (or buying books for) to understand how to use ...
TITLE: Understanding the Soundcloud cocoa wrapper api QUESTION: I'm somewhat familiar with Cocoa, Objective-C and iPhone Development using Xcode. I'm starting to incorporate this cocoa-wrapper in my iPhone project, but it's a steep learning curve for me. What topics should I be reading on (or buying books for) to unde...
[ "iphone", "objective-c", "cocoa", "json", "soundcloud" ]
0
1
327
1
0
2011-06-07T16:16:51.167000
2011-06-07T16:22:39.603000
6,268,382
6,268,464
Sum One Column Across Only One Row?
I would like to SUM up one column, but based on different transaction types, and have those sums appear in one row only. My SQL (SQL Server 2000) looks like this: SELECT c.customername, CASE WHEN t.transactiontypekey IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19) THEN SUM(t.tranamount) ELSE 0 END as 'Tot-Exp', CA...
Sum the CASE expression itself; SUM(CASE WHEN t.transactiontypekey IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19) THEN t.tranamount ELSE 0 END) as 'Tot-Exp', And remove t.transactiontypekey from the the GROUP BY.
Sum One Column Across Only One Row? I would like to SUM up one column, but based on different transaction types, and have those sums appear in one row only. My SQL (SQL Server 2000) looks like this: SELECT c.customername, CASE WHEN t.transactiontypekey IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19) THEN SUM(t.tra...
TITLE: Sum One Column Across Only One Row? QUESTION: I would like to SUM up one column, but based on different transaction types, and have those sums appear in one row only. My SQL (SQL Server 2000) looks like this: SELECT c.customername, CASE WHEN t.transactiontypekey IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,...
[ "sql", "t-sql", "sql-server-2000" ]
1
4
552
1
0
2011-06-07T16:17:38.380000
2011-06-07T16:25:11.977000
6,268,384
6,268,442
Java - Comparing classes?
How can i compare 2 classes? The following if statement never passes although class is type of MyClass: public void(Class class) { if (class == MyClass.class){ } }
if (clazz.equals(MyClass.class)) { } BTW, class is a reserved word.
Java - Comparing classes? How can i compare 2 classes? The following if statement never passes although class is type of MyClass: public void(Class class) { if (class == MyClass.class){ } }
TITLE: Java - Comparing classes? QUESTION: How can i compare 2 classes? The following if statement never passes although class is type of MyClass: public void(Class class) { if (class == MyClass.class){ } } ANSWER: if (clazz.equals(MyClass.class)) { } BTW, class is a reserved word.
[ "java", "android", "class", "comparison" ]
13
36
18,710
4
0
2011-06-07T16:18:02.403000
2011-06-07T16:22:29.837000
6,268,395
6,268,481
android server side architecture
I'm writing my first client/server android app, and need an advice regarding server architecture. My app is not a browser based app, but a stand alone client. On server side i use hibernate/JPA and would like to transfer objects to client side. What should I use: Implement MVC- meaning writing servlets that will handle...
HTTP is definitly your choice since many carrier will block other protocols, since application servers/containers will take care of handling the multiple connexions and since it will also be a base if you decide to have a browser-based version some day... REST + JSON based webservices are well suited for android, given...
android server side architecture I'm writing my first client/server android app, and need an advice regarding server architecture. My app is not a browser based app, but a stand alone client. On server side i use hibernate/JPA and would like to transfer objects to client side. What should I use: Implement MVC- meaning ...
TITLE: android server side architecture QUESTION: I'm writing my first client/server android app, and need an advice regarding server architecture. My app is not a browser based app, but a stand alone client. On server side i use hibernate/JPA and would like to transfer objects to client side. What should I use: Imple...
[ "java", "android" ]
2
2
1,968
3
0
2011-06-07T16:19:21.213000
2011-06-07T16:26:19.243000
6,268,403
6,268,592
Problem with jCarousel initialization
I used to have a jCarousel of image that worked perfectly fine in the header of my Wordpress pages. Now after adding some code to change the header of the pages based on the category page that is being displayed, it is not working correctly. It seems that is not getting initialized and wrapping the list of images in th...
You have an issue with single and double quotes in your jCarousel Includes... You have this... You need to have this...
Problem with jCarousel initialization I used to have a jCarousel of image that worked perfectly fine in the header of my Wordpress pages. Now after adding some code to change the header of the pages based on the category page that is being displayed, it is not working correctly. It seems that is not getting initialized...
TITLE: Problem with jCarousel initialization QUESTION: I used to have a jCarousel of image that worked perfectly fine in the header of my Wordpress pages. Now after adding some code to change the header of the pages based on the category page that is being displayed, it is not working correctly. It seems that is not g...
[ "jquery", "wordpress", "initialization", "jcarousel" ]
0
1
1,586
2
0
2011-06-07T16:19:39.873000
2011-06-07T16:37:25.280000
6,268,410
6,268,438
CSS3 transition/animation for div added/removed/style changed?
Is there a way to have CSS3 transitions/animations for a div that's just been added to/removed from the window or just has its style assigned? One scenario would be a tab control where the content has transitions when a tab header is clicked; this is normally done by assigning a different CSS style to the div that cont...
CSS can't be triggered like that. You'll have to use JavaScript to either add a class to that element and let CSS animate it (I doubt it will work), or animate it directly with JavaScript. I'd choose the latter.
CSS3 transition/animation for div added/removed/style changed? Is there a way to have CSS3 transitions/animations for a div that's just been added to/removed from the window or just has its style assigned? One scenario would be a tab control where the content has transitions when a tab header is clicked; this is normal...
TITLE: CSS3 transition/animation for div added/removed/style changed? QUESTION: Is there a way to have CSS3 transitions/animations for a div that's just been added to/removed from the window or just has its style assigned? One scenario would be a tab control where the content has transitions when a tab header is click...
[ "html", "css", "transition" ]
0
1
2,430
3
0
2011-06-07T16:20:09.170000
2011-06-07T16:22:22.660000
6,268,412
6,268,503
AS3 Flash Compile - Exclude Functions from Compile
There is probably no way for this but does anyone know a method of excluding certain functions from a build by use of a meta tag and or compiler option? I want to expose some functions for testing but not have them bloat the application on production. I could create separate testing classes and test for a complier dire...
You have to look at conditional compilation for example look to this blog post http://www.pixelate.de/blog/debug-and-release-builds-with-as3-conditional-compilation
AS3 Flash Compile - Exclude Functions from Compile There is probably no way for this but does anyone know a method of excluding certain functions from a build by use of a meta tag and or compiler option? I want to expose some functions for testing but not have them bloat the application on production. I could create se...
TITLE: AS3 Flash Compile - Exclude Functions from Compile QUESTION: There is probably no way for this but does anyone know a method of excluding certain functions from a build by use of a meta tag and or compiler option? I want to expose some functions for testing but not have them bloat the application on production....
[ "apache-flex", "actionscript-3", "flash-builder" ]
2
5
698
2
0
2011-06-07T16:20:29.523000
2011-06-07T16:28:11.430000
6,268,413
6,268,456
How to make an "ambiguous symbol" unique with VS 2008
I have some trouble with #define statements in my C++ code, however I'm not familiar how to handle this in VC++: >filetaint.cpp 1>.\filetaint.cpp(272): error C2872: 'UINT32': ambiguous symbol 1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\basetsd.h(82): unsigned int WIND::UINT32' 1> or '..\..\inclu...
I want it to use the latter. Then qualify your usage with the namespace name: LEVEL_BASE::UINT32. Alternatively, remove the using directives from your code and qualify all of the names that you use from the libraries. It's a good idea to avoid using directives in most cases: they are far more trouble than they are wort...
How to make an "ambiguous symbol" unique with VS 2008 I have some trouble with #define statements in my C++ code, however I'm not familiar how to handle this in VC++: >filetaint.cpp 1>.\filetaint.cpp(272): error C2872: 'UINT32': ambiguous symbol 1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\basets...
TITLE: How to make an "ambiguous symbol" unique with VS 2008 QUESTION: I have some trouble with #define statements in my C++ code, however I'm not familiar how to handle this in VC++: >filetaint.cpp 1>.\filetaint.cpp(272): error C2872: 'UINT32': ambiguous symbol 1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6....
[ "c++", "namespaces" ]
0
5
2,127
3
0
2011-06-07T16:20:34.017000
2011-06-07T16:24:22.340000
6,268,428
6,268,505
Flip card effect for non-webkit browsers
So I have been looking for the flip card effect. There are a number of nice examples that work well with webkit browsers. For example: http://www.ilovecolors.com.ar/wp-content/uploads/css-card-flip-webkit/click.html But I have found none that works with Internet Explorer/Firefox as well. Do you guys perhaps have an exa...
This seems to fit the bill... http://lab.smashup.it/flip/ Quote: Flip is compatible with: Firefox, Chrome/Chromium, Opera, Safari and even IE (6,7,8) Here is another one... http://dev.jonraasch.com/quickflip/examples/ http://jonraasch.com/blog/quickflip-2-jquery-plugin There is no "flip" in this one, but perhaps you'll...
Flip card effect for non-webkit browsers So I have been looking for the flip card effect. There are a number of nice examples that work well with webkit browsers. For example: http://www.ilovecolors.com.ar/wp-content/uploads/css-card-flip-webkit/click.html But I have found none that works with Internet Explorer/Firefox...
TITLE: Flip card effect for non-webkit browsers QUESTION: So I have been looking for the flip card effect. There are a number of nice examples that work well with webkit browsers. For example: http://www.ilovecolors.com.ar/wp-content/uploads/css-card-flip-webkit/click.html But I have found none that works with Interne...
[ "javascript", "jquery", "html", "css" ]
21
23
47,517
5
0
2011-06-07T16:22:06.507000
2011-06-07T16:28:21.457000
6,268,435
6,278,004
Java RMI, making an object serializeable AND remote
You might be thinking why would you want to have an object both Remote AND serializeable. Well let me give you some context. I'm building an air traffic control system (school project), it's distributed so that each control zone runs on it's own server and communicates with other control zones. Each control zone keeps ...
If a remote object isn't exported at the time it is sent as a remote method parameter or result, it is serialized instead of being passed as a remote reference, provided that it implements Serializable as well as Remote. It is then exported at the receiver. UnicastRemoteObject does this for example, and therefore so do...
Java RMI, making an object serializeable AND remote You might be thinking why would you want to have an object both Remote AND serializeable. Well let me give you some context. I'm building an air traffic control system (school project), it's distributed so that each control zone runs on it's own server and communicate...
TITLE: Java RMI, making an object serializeable AND remote QUESTION: You might be thinking why would you want to have an object both Remote AND serializeable. Well let me give you some context. I'm building an air traffic control system (school project), it's distributed so that each control zone runs on it's own serv...
[ "java", "serialization", "rmi" ]
2
3
5,277
4
0
2011-06-07T16:22:18.487000
2011-06-08T11:26:41.593000
6,268,436
6,268,662
Subversion Subclipse does not work with Apache Commons
I just installed subclipse in Eclipse to checkout: http://svn.apache.org/viewvc/commons/proper/validator/trunk/ But this fails with the following error message: Repository has been moved svn: Repository moved permanently to '/viewvc/commons/proper/validator/trunk/'; please relocate I do not understand this error. As th...
You should not use a ViewVC web view as your SVN URL in Eclipse. It is a human readable view, not an SVN-readable view. From the Commons Validator Source Repository page, the current Commons Validator SVN URL is: svn:http://svn.apache.org/repos/asf/commons/proper/validator/trunk/ (You can access the true SVN in a web b...
Subversion Subclipse does not work with Apache Commons I just installed subclipse in Eclipse to checkout: http://svn.apache.org/viewvc/commons/proper/validator/trunk/ But this fails with the following error message: Repository has been moved svn: Repository moved permanently to '/viewvc/commons/proper/validator/trunk/'...
TITLE: Subversion Subclipse does not work with Apache Commons QUESTION: I just installed subclipse in Eclipse to checkout: http://svn.apache.org/viewvc/commons/proper/validator/trunk/ But this fails with the following error message: Repository has been moved svn: Repository moved permanently to '/viewvc/commons/proper...
[ "eclipse", "svn", "subclipse" ]
0
3
752
1
0
2011-06-07T16:22:19.933000
2011-06-07T16:43:38.757000
6,268,441
6,268,482
Website needs force refresh after deploy
After deploying a new version of a website the browser loads everything from its cache from the old webpage until a force refresh is done. Images are old, cookies are old, and some AJAX parts are not working. How should I proceed to serve the users with the latest version of the page after deploy? The webpage is an ASP...
You can append a variable to the end of each of your resources that changes with each deploy. For example you can name your stylesheets: styles.css?id=1 with the id changing each time. This will force the browser to download the new version as it cannot find it in its cache.
Website needs force refresh after deploy After deploying a new version of a website the browser loads everything from its cache from the old webpage until a force refresh is done. Images are old, cookies are old, and some AJAX parts are not working. How should I proceed to serve the users with the latest version of the...
TITLE: Website needs force refresh after deploy QUESTION: After deploying a new version of a website the browser loads everything from its cache from the old webpage until a force refresh is done. Images are old, cookies are old, and some AJAX parts are not working. How should I proceed to serve the users with the lat...
[ "asp.net", "caching", "deployment", "iis-7" ]
40
43
52,639
3
0
2011-06-07T16:22:26.683000
2011-06-07T16:26:23.677000
6,268,452
6,268,596
How to design a Master-Detail Sharepoint 2010 application?
I am in the process of migrating an Access application to Sharepoint 2010 (Enterprise). I would like to use as much Sharepoint "out of the box" funcationality as possible, but I am not opposed to creating some Web Parts. I am struggling with the design of the "master" table in this application. The application is used ...
Have you looked at these ideas: http://paulgalvinsoldblog.wordpress.com/2007/12/24/implementing-master-detail-relationships-using-custom-lists/ http://blogs.msdn.com/b/alexma/archive/2006/04/10/610934.aspx In my opinion you should be storing the data in list rather than SQL server. If you decide to use SQL server, look...
How to design a Master-Detail Sharepoint 2010 application? I am in the process of migrating an Access application to Sharepoint 2010 (Enterprise). I would like to use as much Sharepoint "out of the box" funcationality as possible, but I am not opposed to creating some Web Parts. I am struggling with the design of the "...
TITLE: How to design a Master-Detail Sharepoint 2010 application? QUESTION: I am in the process of migrating an Access application to Sharepoint 2010 (Enterprise). I would like to use as much Sharepoint "out of the box" funcationality as possible, but I am not opposed to creating some Web Parts. I am struggling with t...
[ "asp.net", "sql-server", "sharepoint-2010" ]
0
1
6,390
1
0
2011-06-07T16:24:03.210000
2011-06-07T16:38:05.700000
6,268,470
6,268,707
Need next and previous buttons to work outside of slideshow div
I am using the SlidesJS plugin to create a slideshow on my home page. I am looking to put the previous and next buttons outside of the slideshow div so I can left and right align the buttons to the sides of the browser window. Like this: Here is the script: $(function(){ // Initialize Slides $('#slides').slides({ prelo...
I don't know that slide plugin, but I'm using JQuery Tools Scrollable for that and there it is no problem to place them elsewhere and they are used nearly the same way.
Need next and previous buttons to work outside of slideshow div I am using the SlidesJS plugin to create a slideshow on my home page. I am looking to put the previous and next buttons outside of the slideshow div so I can left and right align the buttons to the sides of the browser window. Like this: Here is the script...
TITLE: Need next and previous buttons to work outside of slideshow div QUESTION: I am using the SlidesJS plugin to create a slideshow on my home page. I am looking to put the previous and next buttons outside of the slideshow div so I can left and right align the buttons to the sides of the browser window. Like this: ...
[ "javascript", "jquery", "plugins", "slidesjs" ]
0
1
660
1
0
2011-06-07T16:25:33.723000
2011-06-07T16:46:32.667000
6,268,502
6,268,544
How to set up git and maven to work together?
I'm new to both of these tools, and I'm also very new to Linux system administration, so I apologize ahead of time for what may seem like a total n00b question. Basically, I'm starting a whole new project from scratch. Yaaay! Exciting! However, I'm a little lost on how to set up the project. I've installed both git and...
Q1: Yes, git will work well with any build systems. Usually your VCS is well abstracted with any modern build system. Ensure that you set up your.gitignore file so that you are not tracking any artifacts from builds. Q2: The best practice is to have an integration branch to build from. While developing, use topic or fe...
How to set up git and maven to work together? I'm new to both of these tools, and I'm also very new to Linux system administration, so I apologize ahead of time for what may seem like a total n00b question. Basically, I'm starting a whole new project from scratch. Yaaay! Exciting! However, I'm a little lost on how to s...
TITLE: How to set up git and maven to work together? QUESTION: I'm new to both of these tools, and I'm also very new to Linux system administration, so I apologize ahead of time for what may seem like a total n00b question. Basically, I'm starting a whole new project from scratch. Yaaay! Exciting! However, I'm a littl...
[ "linux", "git", "maven", "version-control", "build" ]
2
2
1,394
1
0
2011-06-07T16:28:08.390000
2011-06-07T16:33:22.423000
6,268,510
6,268,570
question about try-catch
I have a problem understanding how the try{} catch(Exception e){...} works! Let's say I have the following: try { while(true) { coord = (Coordinate)is.readObject();//reading data from an input stream } } catch(Exception e) { try{ is.close(); socket.close(); } catch(Exception e1) { e1.printStackTrace(); } } Section 2 tr...
I think you want to use finally after your first catch [ catch (Exception e) ] to close your streams: try { // Do foo with is and db } catch (Exception e) { // Do bar for exception handling } finally { try { is.close(); db.close(); } catch (Exception e2) { // gah! } }
question about try-catch I have a problem understanding how the try{} catch(Exception e){...} works! Let's say I have the following: try { while(true) { coord = (Coordinate)is.readObject();//reading data from an input stream } } catch(Exception e) { try{ is.close(); socket.close(); } catch(Exception e1) { e1.printStack...
TITLE: question about try-catch QUESTION: I have a problem understanding how the try{} catch(Exception e){...} works! Let's say I have the following: try { while(true) { coord = (Coordinate)is.readObject();//reading data from an input stream } } catch(Exception e) { try{ is.close(); socket.close(); } catch(Exception e...
[ "java", "android", "exception", "try-catch" ]
0
3
273
4
0
2011-06-07T16:28:58.947000
2011-06-07T16:35:38.147000
6,268,512
6,268,641
reverse() throws AttributeError on call
I'm trying to reverse a named url called blog-home but no matter what I try it always throws an AttributeError with the description 'NoneType' object has no attribute 'rindex'. I've tried reverse("blog-home"), reverse("blogengine:blog-home") and even reverse("admin:index") and reverse(resolve("/admin/")) just to test i...
Don't do that: url(r'^yadda/$', None) If you specify an URL in the conf, it must be bound to something. If you don't want to bind it, don't specify it.
reverse() throws AttributeError on call I'm trying to reverse a named url called blog-home but no matter what I try it always throws an AttributeError with the description 'NoneType' object has no attribute 'rindex'. I've tried reverse("blog-home"), reverse("blogengine:blog-home") and even reverse("admin:index") and re...
TITLE: reverse() throws AttributeError on call QUESTION: I'm trying to reverse a named url called blog-home but no matter what I try it always throws an AttributeError with the description 'NoneType' object has no attribute 'rindex'. I've tried reverse("blog-home"), reverse("blogengine:blog-home") and even reverse("ad...
[ "python", "django" ]
2
4
1,391
1
0
2011-06-07T16:29:14.503000
2011-06-07T16:41:55.103000
6,268,513
6,268,563
the code is not getting compiled inTC. a dialog box with comment "Invalid breakpoint,, clear all break point " appears
#include #include #include void main() { int wh=1,i,j; int sale[5][3]; clrscr(); for(i=1;i<=5;i++) { for(j=1;j<=3;j++) { sale[i][j]=0; } } printf("%d",wh); getch(); }
Certainly you should ditch Turbo C, if that is what you are using - get Code::Blocks from http://forums.codeblocks.org. Your error is: for(i=1;i<=5;i++) { for(j=1;j<=3;j++) { should be: for(i=0;i<5;i++) { for(j=0;j<3;j++) { Arrays in C are indexed starting from zero. So an array: int a[5]; has 5 elements: a[0], a[1], a...
the code is not getting compiled inTC. a dialog box with comment "Invalid breakpoint,, clear all break point " appears #include #include #include void main() { int wh=1,i,j; int sale[5][3]; clrscr(); for(i=1;i<=5;i++) { for(j=1;j<=3;j++) { sale[i][j]=0; } } printf("%d",wh); getch(); }
TITLE: the code is not getting compiled inTC. a dialog box with comment "Invalid breakpoint,, clear all break point " appears QUESTION: #include #include #include void main() { int wh=1,i,j; int sale[5][3]; clrscr(); for(i=1;i<=5;i++) { for(j=1;j<=3;j++) { sale[i][j]=0; } } printf("%d",wh); getch(); } ANSWER: Certai...
[ "c" ]
0
2
141
3
0
2011-06-07T16:29:16.143000
2011-06-07T16:34:55.710000
6,268,517
6,269,010
C# Building Fluent API for method invocations
What do I have to do to say that InvokeMethod can invoke a method and when using special options like Repeat it shall exexute after the Repeat. My problem for now is that the method will already exexute before it knows that it has to be called 100 times. class Program { static void Main() { const bool shouldRun = true;...
There are a lot of ways to skin this cat, but I think one source of this difficulty is in the fact that you actually invoke the method within the InvokeMethod() method (go figure!). Typically, we use fluent APIs to turn syntax that is evaluated from the inside-out into something that can be expressed in a left-to-right...
C# Building Fluent API for method invocations What do I have to do to say that InvokeMethod can invoke a method and when using special options like Repeat it shall exexute after the Repeat. My problem for now is that the method will already exexute before it knows that it has to be called 100 times. class Program { sta...
TITLE: C# Building Fluent API for method invocations QUESTION: What do I have to do to say that InvokeMethod can invoke a method and when using special options like Repeat it shall exexute after the Repeat. My problem for now is that the method will already exexute before it knows that it has to be called 100 times. c...
[ "c#", "fluent-interface" ]
7
2
1,495
5
0
2011-06-07T16:29:59.630000
2011-06-07T17:11:35.143000
6,268,518
6,268,680
uninitialized constant Rake::DSL in Ruby Gem
I have been working on updating my gem (whm_xml at https://github.com/ivanoats/whm_xml_api_ruby ) to make it work with ruby 1.9.2, latest rubygems, latest bundler, latest rdoc, latest rake. It works fine in 1.8.7 but has the "uninitialized constant Rake::DSL" error only in 1.9.2. I thought that rake 0.9.2 fixed that bu...
This SO Question might help you out. The suggestion there is to add require 'rake/dsl_definition' above require 'rake' in your Rakefile.
uninitialized constant Rake::DSL in Ruby Gem I have been working on updating my gem (whm_xml at https://github.com/ivanoats/whm_xml_api_ruby ) to make it work with ruby 1.9.2, latest rubygems, latest bundler, latest rdoc, latest rake. It works fine in 1.8.7 but has the "uninitialized constant Rake::DSL" error only in 1...
TITLE: uninitialized constant Rake::DSL in Ruby Gem QUESTION: I have been working on updating my gem (whm_xml at https://github.com/ivanoats/whm_xml_api_ruby ) to make it work with ruby 1.9.2, latest rubygems, latest bundler, latest rdoc, latest rake. It works fine in 1.8.7 but has the "uninitialized constant Rake::DS...
[ "ruby", "rake", "rubygems" ]
33
55
20,881
4
0
2011-06-07T16:30:02.573000
2011-06-07T16:45:15.987000
6,268,522
6,268,576
HTTP_REFERER blank, need alternative
I have a simple signup form that needs to track number of hits from one specific external referer. This is a simple task with PHP's: $_SERVER['HTTP_REFERER'] however, it is blank. After doing some research i tried to use some javascript: document.referrer Still blank.:( I really dont need anything elaborate, but am try...
In short: If the user don't want it, you will never know, where he comes from. However, a more "reliable" solution may be to add the referrer to the link from the origin site to yours. Something like Visit example.com This requires, that external sites cannot just link to your site, but always needs to add their person...
HTTP_REFERER blank, need alternative I have a simple signup form that needs to track number of hits from one specific external referer. This is a simple task with PHP's: $_SERVER['HTTP_REFERER'] however, it is blank. After doing some research i tried to use some javascript: document.referrer Still blank.:( I really don...
TITLE: HTTP_REFERER blank, need alternative QUESTION: I have a simple signup form that needs to track number of hits from one specific external referer. This is a simple task with PHP's: $_SERVER['HTTP_REFERER'] however, it is blank. After doing some research i tried to use some javascript: document.referrer Still bla...
[ "php", "javascript", "http-referer" ]
6
11
7,385
2
0
2011-06-07T16:30:30.770000
2011-06-07T16:36:00.987000
6,268,524
6,269,173
Alternative to use ExternalDataEventArgs on WF4
I'm upgrading a StateMachine WorkFlow from 3.0 to 4.0, I also review the guidance that WF Team shipped last year, but I never heard about changes on some classes that inherits from ExternalDataEventArgs, I have to remain using the System.WorkFlow.Activities namespace for it? Thanks
Anything using ExternalDataEventArgs and the like was a thin wrapper around WF3 queues. The WF3 queue API is replaced with the WF4 bookmarks. So create a bookmark in your activities and resume it with a single piece of data that is send into the activity when it resumes.
Alternative to use ExternalDataEventArgs on WF4 I'm upgrading a StateMachine WorkFlow from 3.0 to 4.0, I also review the guidance that WF Team shipped last year, but I never heard about changes on some classes that inherits from ExternalDataEventArgs, I have to remain using the System.WorkFlow.Activities namespace for ...
TITLE: Alternative to use ExternalDataEventArgs on WF4 QUESTION: I'm upgrading a StateMachine WorkFlow from 3.0 to 4.0, I also review the guidance that WF Team shipped last year, but I never heard about changes on some classes that inherits from ExternalDataEventArgs, I have to remain using the System.WorkFlow.Activit...
[ "workflow-foundation-4" ]
0
1
303
1
0
2011-06-07T16:30:59.717000
2011-06-07T17:25:24.543000
6,268,527
6,268,876
Flash: Runtime Shared Libraries - Memory Benefit?
Suppose that I have two applications running on the same page. I have the Libraries compiled into the SWF file: Suppose MemoryFootPrint(App A) = App A SWF + Libraries MemoryFootPrint(App B) = App B SWF + Libraries So: MemoryFootPrint(total) = MemoryFootPrint(App A) + MemoryFootPrint(App B) I am wondering if using RSL w...
The adobe page does not speak about RSIs and the memory footprint other than saying: When you want to use a dynamically-linked library, you instruct the compiler to exclude that library's contents from the application SWF file when you compile the application. You must provide link-checking at compile time even though ...
Flash: Runtime Shared Libraries - Memory Benefit? Suppose that I have two applications running on the same page. I have the Libraries compiled into the SWF file: Suppose MemoryFootPrint(App A) = App A SWF + Libraries MemoryFootPrint(App B) = App B SWF + Libraries So: MemoryFootPrint(total) = MemoryFootPrint(App A) + Me...
TITLE: Flash: Runtime Shared Libraries - Memory Benefit? QUESTION: Suppose that I have two applications running on the same page. I have the Libraries compiled into the SWF file: Suppose MemoryFootPrint(App A) = App A SWF + Libraries MemoryFootPrint(App B) = App B SWF + Libraries So: MemoryFootPrint(total) = MemoryFoo...
[ "flash", "rsl" ]
2
2
162
1
0
2011-06-07T16:31:14.953000
2011-06-07T16:58:43.410000
6,268,536
6,271,749
Can't make distribution provisioning profile
Does anyone know what causes this? I get this each time I try to make a Distribution provisioning profile, and on both my Apple Developer Accounts. Can anybody tell me what I do wrong or is this a error caused by Apple. We are unable to process your request. Please go back to the previous page, or quit your browser and...
Same issue here. I've called Apple Developer Support in Canada and their rep is now researching the issue and should update me within the hour. I'll post what he says here. UPDATE Turns out, Apple is experiencing unusually high server loads due to yesterday's keynote rekindling interest in iOS development. Try again ou...
Can't make distribution provisioning profile Does anyone know what causes this? I get this each time I try to make a Distribution provisioning profile, and on both my Apple Developer Accounts. Can anybody tell me what I do wrong or is this a error caused by Apple. We are unable to process your request. Please go back t...
TITLE: Can't make distribution provisioning profile QUESTION: Does anyone know what causes this? I get this each time I try to make a Distribution provisioning profile, and on both my Apple Developer Accounts. Can anybody tell me what I do wrong or is this a error caused by Apple. We are unable to process your request...
[ "iphone" ]
4
2
890
1
0
2011-06-07T16:32:20.323000
2011-06-07T21:14:23.853000
6,268,555
6,268,581
Using different generic types on a method's argument and return type
I am working on a generic utility method that takes a generic argument and returns a generic type--I hope that makes sense!--but I want the return type to be a different type from the argument. Here's what I'm thinking this should look like if I mock it up in pseudo code: public static IEnumerable DoSomethingAwesome (T...
// You need this to constrain T in your method and call ToRType() public interface IConvertableToTReturn { object ToRType(int someInt); } public static IEnumerable DoSomethingAwesome (T thing) where T: IConvertableToTReturn { Enumerable.Range(0, 5).Select(xx => thing.ToRType(xx)); }
Using different generic types on a method's argument and return type I am working on a generic utility method that takes a generic argument and returns a generic type--I hope that makes sense!--but I want the return type to be a different type from the argument. Here's what I'm thinking this should look like if I mock ...
TITLE: Using different generic types on a method's argument and return type QUESTION: I am working on a generic utility method that takes a generic argument and returns a generic type--I hope that makes sense!--but I want the return type to be a different type from the argument. Here's what I'm thinking this should lo...
[ "c#", "generics" ]
4
12
10,543
5
0
2011-06-07T16:34:22.033000
2011-06-07T16:36:26.070000
6,268,557
6,269,170
Update DUnit on Delphi 2010
Does anyone know how to update dUnit which comes with Delphi 2010 to the latest svn source code?
Steps Goto http://sourceforge.net/projects/dunit/ Download the zip file (currently version 9.3.0) Unpack to a folder of your choice Use Components|Install packages to remove the current DUnit package bpl. Compile and install (optional) the new version. Compilation is needed only if you want to install the design time w...
Update DUnit on Delphi 2010 Does anyone know how to update dUnit which comes with Delphi 2010 to the latest svn source code?
TITLE: Update DUnit on Delphi 2010 QUESTION: Does anyone know how to update dUnit which comes with Delphi 2010 to the latest svn source code? ANSWER: Steps Goto http://sourceforge.net/projects/dunit/ Download the zip file (currently version 9.3.0) Unpack to a folder of your choice Use Components|Install packages to r...
[ "delphi", "svn", "dunit" ]
9
9
828
2
0
2011-06-07T16:34:22.407000
2011-06-07T17:25:01.580000
6,268,561
6,268,689
Validating Excel using XML and moving to SQL Server destination
Is there a built in function (as opposed to a UDF) or can someone provide sample code to split a String to two columns when a character is encountered? Sample: 1234:abcd split the above string into 1234 and abcd into two columns
Title/tag mismatch? For Excel, if A1 contains the value: make B1 =LEFT(A1,IF(ISERROR(FIND(":",A1)),LEN(A1),FIND(":",A1)-1)) make C1 =RIGHT(A1,IF(ISERROR(FIND(":",A1)),0,LEN(A1)-FIND(":",A1))) Or for T-SQL + a string variable; DECLARE @F VARCHAR(64) = '1234:ABCD' IF @F LIKE '%:%' SELECT SUBSTRING(@F, 1, CHARINDEX(':', ...
Validating Excel using XML and moving to SQL Server destination Is there a built in function (as opposed to a UDF) or can someone provide sample code to split a String to two columns when a character is encountered? Sample: 1234:abcd split the above string into 1234 and abcd into two columns
TITLE: Validating Excel using XML and moving to SQL Server destination QUESTION: Is there a built in function (as opposed to a UDF) or can someone provide sample code to split a String to two columns when a character is encountered? Sample: 1234:abcd split the above string into 1234 and abcd into two columns ANSWER: ...
[ "t-sql" ]
2
0
104
2
0
2011-06-07T16:34:47.077000
2011-06-07T16:45:59.213000
6,268,586
6,268,617
Replace value in array doesn't work
I'm going crazy, spent a couple of hours trying different methods in replace values in arrays, but I can't get it to work. foreach($potentialMatches as $potentialKey) { $searchKeywordQuery = "SELECT keyword, id FROM picture WHERE id='$potentialKey'"; $searchKeywords = mysql_query($searchKeywordQuery) or die(mysql_error...
In that second foreach you need to call it by reference: foreach($pictureKeywordArray as $key => &$picValue) { //^-- `&` makes it by reference foreach($picValue['keywords'] as $key => $picIdValue) { if ($picIdValue == $searchIdKey) { echo $picValue['match']; $picValue['match']++; //now updates what you want it to updat...
Replace value in array doesn't work I'm going crazy, spent a couple of hours trying different methods in replace values in arrays, but I can't get it to work. foreach($potentialMatches as $potentialKey) { $searchKeywordQuery = "SELECT keyword, id FROM picture WHERE id='$potentialKey'"; $searchKeywords = mysql_query($se...
TITLE: Replace value in array doesn't work QUESTION: I'm going crazy, spent a couple of hours trying different methods in replace values in arrays, but I can't get it to work. foreach($potentialMatches as $potentialKey) { $searchKeywordQuery = "SELECT keyword, id FROM picture WHERE id='$potentialKey'"; $searchKeywords...
[ "php", "arrays", "replace", "foreach" ]
1
1
194
3
0
2011-06-07T16:37:16.913000
2011-06-07T16:39:47.740000
6,268,589
6,269,092
Unable to set the UILabel of a view Controller from a different view Controller
I am trying to set the text label of a second view controller from the current view controller using the following code: NSString *loadingString = [NSString stringWithFormat:@"Loading data from Instahotness....."]; self.loadingPage = [[LoadingPageViewController alloc]init]; self.loadingPage.loadingTextLabel.text = load...
use initWithNibName to initialize LoadingPageViewController.
Unable to set the UILabel of a view Controller from a different view Controller I am trying to set the text label of a second view controller from the current view controller using the following code: NSString *loadingString = [NSString stringWithFormat:@"Loading data from Instahotness....."]; self.loadingPage = [[Load...
TITLE: Unable to set the UILabel of a view Controller from a different view Controller QUESTION: I am trying to set the text label of a second view controller from the current view controller using the following code: NSString *loadingString = [NSString stringWithFormat:@"Loading data from Instahotness....."]; self.lo...
[ "objective-c", "cocoa-touch", "ios", "uilabel" ]
1
2
297
1
0
2011-06-07T16:37:21.533000
2011-06-07T17:19:12.743000
6,268,591
6,268,799
Store base64 encoded string as file
I have a web service that returns a base64 encoded string of a PDF file. I want to save this file to the SD Card. but when i try do this, adobe reader tells me that the file is corrupt. obviously i am not saving it properly. byte[] pdfAsBytes = Base64.decode(resultsRequestSOAP.toString(), 0); File filePath = new File(...
Perhaps you can flush the FileOutputStream before you close it. os.write(pdfAsBytes); os.flush(); os.close();
Store base64 encoded string as file I have a web service that returns a base64 encoded string of a PDF file. I want to save this file to the SD Card. but when i try do this, adobe reader tells me that the file is corrupt. obviously i am not saving it properly. byte[] pdfAsBytes = Base64.decode(resultsRequestSOAP.toStri...
TITLE: Store base64 encoded string as file QUESTION: I have a web service that returns a base64 encoded string of a PDF file. I want to save this file to the SD Card. but when i try do this, adobe reader tells me that the file is corrupt. obviously i am not saving it properly. byte[] pdfAsBytes = Base64.decode(results...
[ "android", "pdf", "base64", "ksoap" ]
5
12
12,894
1
0
2011-06-07T16:37:23.417000
2011-06-07T16:53:34.943000
6,268,593
6,268,846
batch file runs every .REG file in a directory
I have a batch file that creates a main folder and moves files & subfolders into it. I need the batch file to run every.REG file in the main folder. I have my main folder set as a variable (it does not end in an ending slash): %folder% I'm trying something like this, but this is only my second day writing batch scripts...
Your folder probably contains spaces in it, so you need to quote the %%i in the regedit part.
batch file runs every .REG file in a directory I have a batch file that creates a main folder and moves files & subfolders into it. I need the batch file to run every.REG file in the main folder. I have my main folder set as a variable (it does not end in an ending slash): %folder% I'm trying something like this, but t...
TITLE: batch file runs every .REG file in a directory QUESTION: I have a batch file that creates a main folder and moves files & subfolders into it. I need the batch file to run every.REG file in the main folder. I have my main folder set as a variable (it does not end in an ending slash): %folder% I'm trying somethin...
[ "batch-file", "registry" ]
3
3
2,362
3
0
2011-06-07T16:37:29.157000
2011-06-07T16:56:24.533000
6,268,610
6,268,630
Is there a built-in way to check if an IP address is already occupied?
My software changes the IP of a computer, but I am coming into conflicts with other devices. Is there a built-in way to check if an IP address is already occupied/taken before setting it? Thanks
If your network doesn't use DHCP and IP addresses really do need to be manually assigned, you could try using the System.Net.NetworkInformation.Ping class to see if a host on the network responds.
Is there a built-in way to check if an IP address is already occupied? My software changes the IP of a computer, but I am coming into conflicts with other devices. Is there a built-in way to check if an IP address is already occupied/taken before setting it? Thanks
TITLE: Is there a built-in way to check if an IP address is already occupied? QUESTION: My software changes the IP of a computer, but I am coming into conflicts with other devices. Is there a built-in way to check if an IP address is already occupied/taken before setting it? Thanks ANSWER: If your network doesn't use...
[ "c#", "ip" ]
2
4
2,070
2
0
2011-06-07T16:38:57.180000
2011-06-07T16:40:53.490000
6,268,611
6,268,648
Remove \n using regular expression in javascript
I have a javascript string contains html table like this: FY Profit Margin Asset Turnover RoA Leverage Ratio RoE Cash Conversion Cash RoE RoC 2002 5.1% 1.42 7.2% 127% 9.2% 163% 14.9% 16.9% How could I using regular expression to remove all the '\n' in the table? Otherwise it is too long. I tried using ele = ele.replace...
Try this: ele = ele.replace(/\s+<\/TD>/g,' ') /m on the regex means match multi-line which helps matching on multiple \n's in a string. UPDATE dropped the /m modifier changed \s* to \s+ introduced a whitespace character in the replacement string as browsers will render a whitespace character after your text in the TD, ...
Remove \n using regular expression in javascript I have a javascript string contains html table like this: FY Profit Margin Asset Turnover RoA Leverage Ratio RoE Cash Conversion Cash RoE RoC 2002 5.1% 1.42 7.2% 127% 9.2% 163% 14.9% 16.9% How could I using regular expression to remove all the '\n' in the table? Otherwis...
TITLE: Remove \n using regular expression in javascript QUESTION: I have a javascript string contains html table like this: FY Profit Margin Asset Turnover RoA Leverage Ratio RoE Cash Conversion Cash RoE RoC 2002 5.1% 1.42 7.2% 127% 9.2% 163% 14.9% 16.9% How could I using regular expression to remove all the '\n' in t...
[ "javascript", "regex" ]
0
2
2,864
4
0
2011-06-07T16:38:57.810000
2011-06-07T16:42:25.823000
6,268,613
6,268,781
redirecting to other methods when calling non-existing methods
If I call $object->showSomething() and the showSomething method doesn't exist I get a fata error. That's OK. But I have a show() method that takes a argument. Can I somehow tell PHP to call show('Something'); when it encounters $object->showSomething()?
Try something like this: showStuff(); $test->showMoreStuff(' and me too'); $test->showEvenMoreStuff(); $test->thisDoesNothing(); Output: StuffMoreStuff and me tooEvenMoreStuff
redirecting to other methods when calling non-existing methods If I call $object->showSomething() and the showSomething method doesn't exist I get a fata error. That's OK. But I have a show() method that takes a argument. Can I somehow tell PHP to call show('Something'); when it encounters $object->showSomething()?
TITLE: redirecting to other methods when calling non-existing methods QUESTION: If I call $object->showSomething() and the showSomething method doesn't exist I get a fata error. That's OK. But I have a show() method that takes a argument. Can I somehow tell PHP to call show('Something'); when it encounters $object->sh...
[ "php", "class", "methods" ]
3
8
1,939
3
0
2011-06-07T16:39:20.343000
2011-06-07T16:52:22.120000
6,268,627
6,269,345
LazyInitializationException in spite of OpenSessionInViewFilter
I seem to be randomly getting the following LazyInitializationException in a Spring/MVC 3.0/Hibernate 3.5 application in spite of seeing the filter in the stack trace itself. Any idea on what I should look into? 07 Jun 2011 13:48:47,152 [ERROR] (http-3443-2) org.hibernate.LazyInitializationException: could not initiali...
Two most common causes I know of for lazy load exceptions with the filter on are either trying to access something after an exception has invalidated the Hibernate Session, or trying to access a field on something that was actually sitting around on the Web session and isn't attached. public interface EntityService { ...
LazyInitializationException in spite of OpenSessionInViewFilter I seem to be randomly getting the following LazyInitializationException in a Spring/MVC 3.0/Hibernate 3.5 application in spite of seeing the filter in the stack trace itself. Any idea on what I should look into? 07 Jun 2011 13:48:47,152 [ERROR] (http-3443-...
TITLE: LazyInitializationException in spite of OpenSessionInViewFilter QUESTION: I seem to be randomly getting the following LazyInitializationException in a Spring/MVC 3.0/Hibernate 3.5 application in spite of seeing the filter in the stack trace itself. Any idea on what I should look into? 07 Jun 2011 13:48:47,152 [...
[ "java", "hibernate", "spring", "open-session-in-view" ]
3
6
5,782
2
0
2011-06-07T16:40:45.900000
2011-06-07T17:37:16.150000
6,268,628
6,268,674
Git + a large data set?
We're often working on a project where we've been handed a large data set (say, a handful of files that are 1GB each), and are writing code to analyze it. All of the analysis code is in Git, so everybody can check changes in and out of our central repository. But what to do with the data sets that the code is working w...
use submodules to isolate your giant files from your source code. More on that here: http://git-scm.com/book/en/v2/Git-Tools-Submodules The examples talk about libraries, but this works for large bloated things like data samples for testing, images, movies, etc. You should be able to fly while developing, only pausing ...
Git + a large data set? We're often working on a project where we've been handed a large data set (say, a handful of files that are 1GB each), and are writing code to analyze it. All of the analysis code is in Git, so everybody can check changes in and out of our central repository. But what to do with the data sets th...
TITLE: Git + a large data set? QUESTION: We're often working on a project where we've been handed a large data set (say, a handful of files that are 1GB each), and are writing code to analyze it. All of the analysis code is in Git, so everybody can check changes in and out of our central repository. But what to do wit...
[ "git", "version-control", "dataset" ]
22
16
5,555
5
0
2011-06-07T16:40:45.960000
2011-06-07T16:44:38.210000
6,268,632
6,268,780
More efficient or more modern? Reading in & Sorting A Text File With Java
I've been trying to upgrade my Java skills to use more of Java 5 & Java 6. I've been playing around with some programming exercises. I was asked to read in a paragraph from a text file and output a sorted (descending) list of words and output the count of each word. My code is below. My questions are: Is my file input ...
There are more idiomatic ways of reading in all the words in a file in Java. BreakIterator is a better way of reading in words from an input. Use List instead of Array in almost all cases. Array isn't technically part of the Collection API and isn't as easy to replace implementations as List, Set and Map are. You shoul...
More efficient or more modern? Reading in & Sorting A Text File With Java I've been trying to upgrade my Java skills to use more of Java 5 & Java 6. I've been playing around with some programming exercises. I was asked to read in a paragraph from a text file and output a sorted (descending) list of words and output the...
TITLE: More efficient or more modern? Reading in & Sorting A Text File With Java QUESTION: I've been trying to upgrade my Java skills to use more of Java 5 & Java 6. I've been playing around with some programming exercises. I was asked to read in a paragraph from a text file and output a sorted (descending) list of wo...
[ "java", "file", "sorting", "text", "collections" ]
8
4
1,584
5
0
2011-06-07T16:40:59.497000
2011-06-07T16:52:21.337000
6,268,633
6,269,185
Postgres partitioning order by performance
I'm using a partitioned postgres table following the documentation using rules, using a partitioning scheme based on date ranges (my date column is an epoch integer) The problem is that a simple query to select the row with the maximum value of the sharded column is not using indices: First, some settings to coerce pos...
Postgresql 9.1 knows how to optimize this out of the box. In 9.0 or earlier, you need to decompose the query manually, by unioning each of the subqueries individually with their own order by/limit statement.
Postgres partitioning order by performance I'm using a partitioned postgres table following the documentation using rules, using a partitioning scheme based on date ranges (my date column is an epoch integer) The problem is that a simple query to select the row with the maximum value of the sharded column is not using ...
TITLE: Postgres partitioning order by performance QUESTION: I'm using a partitioned postgres table following the documentation using rules, using a partitioning scheme based on date ranges (my date column is an epoch integer) The problem is that a simple query to select the row with the maximum value of the sharded co...
[ "postgresql", "optimization", "partitioning" ]
1
4
1,577
1
0
2011-06-07T16:41:15.697000
2011-06-07T17:26:35.743000
6,268,649
6,268,821
Is there a way to empty access database and erase all data on it completely as if the database never used before?
I have Microsoft Access database (.mdb) that contains too much data. When i delete the data in it by code or by deleting records, the data is completely deleted. However the database size remains the same (i.e. not decreased) and AutoNumber Fields start from last number saved before deleting records. I ask if there is ...
You want to compact and repair the database. It'll vary depending on the version of MS-Access you are using, but in 2010 you can find it on the Database Tools ribbon. Basically, when you delete record from MS-Access (much like a file on a hard drive), it doesn't truly delete it right away. It just marks the record as d...
Is there a way to empty access database and erase all data on it completely as if the database never used before? I have Microsoft Access database (.mdb) that contains too much data. When i delete the data in it by code or by deleting records, the data is completely deleted. However the database size remains the same (...
TITLE: Is there a way to empty access database and erase all data on it completely as if the database never used before? QUESTION: I have Microsoft Access database (.mdb) that contains too much data. When i delete the data in it by code or by deleting records, the data is completely deleted. However the database size ...
[ ".net", "database-design", "ms-access", "ms-access-2010" ]
1
2
6,398
2
0
2011-06-07T16:42:30.880000
2011-06-07T16:55:00.853000
6,268,660
6,269,264
mapping different addresses with nhibernate
I've been using nhibernate for a few months now and I am starting to be confident with it but there are still lots of things that I need to explore. Till now I've mapped addresses as components. Here's an example: Now, I would like to extend this model and separate the addresses in a different table so that one Lead ca...
Since you've mapped addresses as components, you're probably treating them as value types. If you want to keep them as value types, then you probably need to create an intermediate entity between your lead and your address value (could be called LeadAddress) which contains the Enum designating the type of address, and ...
mapping different addresses with nhibernate I've been using nhibernate for a few months now and I am starting to be confident with it but there are still lots of things that I need to explore. Till now I've mapped addresses as components. Here's an example: Now, I would like to extend this model and separate the addres...
TITLE: mapping different addresses with nhibernate QUESTION: I've been using nhibernate for a few months now and I am starting to be confident with it but there are still lots of things that I need to explore. Till now I've mapped addresses as components. Here's an example: Now, I would like to extend this model and s...
[ "c#", "nhibernate", "nhibernate-mapping" ]
0
1
181
1
0
2011-06-07T16:43:27.780000
2011-06-07T17:31:34.467000
6,268,665
6,268,752
jquery ajax issue
this is likely to endup being an easy fix so I'll apologize in advance for wasting your time. I have the following code: $.ajax({ url: "/room/" + $nodeid + "/rss.xml", dataType: "xml", success: function($xml){ $($xml).find('node').each( function(){ alert( $(this).attr('name') ); } ); }, failure: function(){ alert('Aja...
You've found the node element. This doesn't a name attribute. You need to find the child elements of node instead: $($xml).find('node > *').each(
jquery ajax issue this is likely to endup being an easy fix so I'll apologize in advance for wasting your time. I have the following code: $.ajax({ url: "/room/" + $nodeid + "/rss.xml", dataType: "xml", success: function($xml){ $($xml).find('node').each( function(){ alert( $(this).attr('name') ); } ); }, failure: func...
TITLE: jquery ajax issue QUESTION: this is likely to endup being an easy fix so I'll apologize in advance for wasting your time. I have the following code: $.ajax({ url: "/room/" + $nodeid + "/rss.xml", dataType: "xml", success: function($xml){ $($xml).find('node').each( function(){ alert( $(this).attr('name') ); } )...
[ "jquery" ]
1
5
74
4
0
2011-06-07T16:43:50.013000
2011-06-07T16:49:56.580000
6,268,667
6,268,767
Why div 100% width doesn't work as expected
I'm learning CSS and finding that it's not always so intuitive (welcome to webdev, I guess).:) In an attempt to make a simple, static progress bar, I use the HTML file below: Sample Cell Text Here! and I get this: which is good, except for the fact that the width of the second column is fixed. But if I go ahead and cha...
By placing your text div inside (as a child of) your colored div, you're telling HTML that you want the text to appear inside the colored div. So a width of 100% on the inner div means whatever the width of its parent div is, which you have set to 20%. EDIT: added code * EDIT: updated code * Sample Cell Text Here! Text...
Why div 100% width doesn't work as expected I'm learning CSS and finding that it's not always so intuitive (welcome to webdev, I guess).:) In an attempt to make a simple, static progress bar, I use the HTML file below: Sample Cell Text Here! and I get this: which is good, except for the fact that the width of the secon...
TITLE: Why div 100% width doesn't work as expected QUESTION: I'm learning CSS and finding that it's not always so intuitive (welcome to webdev, I guess).:) In an attempt to make a simple, static progress bar, I use the HTML file below: Sample Cell Text Here! and I get this: which is good, except for the fact that the ...
[ "html", "css", "html-table" ]
3
3
21,646
4
0
2011-06-07T16:43:54.403000
2011-06-07T16:51:36.870000
6,268,672
6,268,736
php session every 24 hours to be cleaned
I want one session variable to be cleaned every 24 hours.I don't want to kill or unset all the sessions just one session to be unset every 24 hours a day.
When the session is 1st created on the client just give it a date: if(!isset($_SESSION['date']) $_SESSION['date'] = date('m_d_y'); Then whenever the page changes check that date: if($_SESSION['date'] == date('m_d_y')){ //still today } else { //destroy session } Or you could do it with timestamp and check based on the n...
php session every 24 hours to be cleaned I want one session variable to be cleaned every 24 hours.I don't want to kill or unset all the sessions just one session to be unset every 24 hours a day.
TITLE: php session every 24 hours to be cleaned QUESTION: I want one session variable to be cleaned every 24 hours.I don't want to kill or unset all the sessions just one session to be unset every 24 hours a day. ANSWER: When the session is 1st created on the client just give it a date: if(!isset($_SESSION['date']) $...
[ "php" ]
0
2
3,736
4
0
2011-06-07T16:44:23.683000
2011-06-07T16:48:57.470000
6,268,675
6,268,841
How to show the default beautiful popup message in ubuntu using python?
http://tinypic.com/r/5dv7kj/7 How can i show the message like in the picture(top right)? I'm new to linux and now tring to use pygtk to make a client application to show/popup some random hint/mems. Using traditional winodw is OK,but this one is much more friendly to me.I have tried scanning through the pygtk guide but...
It's an Ubuntu specific thing called NotifyOSD. There are examples of programming for it here.
How to show the default beautiful popup message in ubuntu using python? http://tinypic.com/r/5dv7kj/7 How can i show the message like in the picture(top right)? I'm new to linux and now tring to use pygtk to make a client application to show/popup some random hint/mems. Using traditional winodw is OK,but this one is mu...
TITLE: How to show the default beautiful popup message in ubuntu using python? QUESTION: http://tinypic.com/r/5dv7kj/7 How can i show the message like in the picture(top right)? I'm new to linux and now tring to use pygtk to make a client application to show/popup some random hint/mems. Using traditional winodw is OK,...
[ "python", "user-interface", "ubuntu", "popup", "gnome" ]
5
10
4,036
3
0
2011-06-07T16:44:52.973000
2011-06-07T16:56:18.277000
6,268,676
6,268,897
Swiftmailer and Symfony2
Having some problems implementing swiftmailer with the new symfony2 beta4, below is my code $mailer = $this->container->get('mailer'); $name = ucwords(str_replace('.',' ', $user->getScreenName())); $email = 'me@me.com'; //$user->getEmail(); $message = $mailer::newInstance() ->setSubject('New Password') ->setFrom('Neoke...
$mailer is an instance of the Swift_Mailer class (which is the class used for sending messages), but for creating a message, you need the Swift_Message class. $message = Swift_Message::newInstance() http://swiftmailer.org/docs/message-quickref
Swiftmailer and Symfony2 Having some problems implementing swiftmailer with the new symfony2 beta4, below is my code $mailer = $this->container->get('mailer'); $name = ucwords(str_replace('.',' ', $user->getScreenName())); $email = 'me@me.com'; //$user->getEmail(); $message = $mailer::newInstance() ->setSubject('New Pa...
TITLE: Swiftmailer and Symfony2 QUESTION: Having some problems implementing swiftmailer with the new symfony2 beta4, below is my code $mailer = $this->container->get('mailer'); $name = ucwords(str_replace('.',' ', $user->getScreenName())); $email = 'me@me.com'; //$user->getEmail(); $message = $mailer::newInstance() ->...
[ "php", "symfony", "swiftmailer" ]
5
9
5,728
1
0
2011-06-07T16:44:56.400000
2011-06-07T17:00:16.047000
6,268,679
6,268,840
How to get the key of a key/value JavaScript object
If I have a JS object like: var foo = { 'bar': 'baz' } If I know that foo has that basic key/value structure, but don't know the name of the key, How can I get it? for... in? $.each()?
If you want to get all keys, ECMAScript 5 introduced Object.keys. This is only supported by newer browsers but the MDC documentation provides an alternative implementation (which also uses for...in btw): if(!Object.keys) Object.keys = function(o){ if (o!== Object(o)) throw new TypeError('Object.keys called on non-objec...
How to get the key of a key/value JavaScript object If I have a JS object like: var foo = { 'bar': 'baz' } If I know that foo has that basic key/value structure, but don't know the name of the key, How can I get it? for... in? $.each()?
TITLE: How to get the key of a key/value JavaScript object QUESTION: If I have a JS object like: var foo = { 'bar': 'baz' } If I know that foo has that basic key/value structure, but don't know the name of the key, How can I get it? for... in? $.each()? ANSWER: If you want to get all keys, ECMAScript 5 introduced Obj...
[ "javascript", "jquery" ]
253
98
821,957
21
0
2011-06-07T16:45:10.030000
2011-06-07T16:56:09.730000
6,268,683
6,268,928
Groovy: Is there a constructor called after the copy of parameters?
I have this code in Groovy: class Person { def age Person () { println age // null } } def p = new Person ([age: '29']) println p.age // 29 I need to read age value in constructor, but it isn't setted yet. How can I do this? Note: I don't want to use a init() method and call manually every time, like class Person { de...
You can write a constructor like this: class Person { def age Person(Map map) { for (entry in map) { this."${entry.key}" = entry.value } println age } } If you're using groovy 1.8, take a look at the @TupleConstructor annotation, which will automatically build a constructor like the one above, as well as a list based ...
Groovy: Is there a constructor called after the copy of parameters? I have this code in Groovy: class Person { def age Person () { println age // null } } def p = new Person ([age: '29']) println p.age // 29 I need to read age value in constructor, but it isn't setted yet. How can I do this? Note: I don't want to use ...
TITLE: Groovy: Is there a constructor called after the copy of parameters? QUESTION: I have this code in Groovy: class Person { def age Person () { println age // null } } def p = new Person ([age: '29']) println p.age // 29 I need to read age value in constructor, but it isn't setted yet. How can I do this? Note: I ...
[ "groovy", "constructor" ]
4
7
655
1
0
2011-06-07T16:45:36.473000
2011-06-07T17:02:54.810000
6,268,688
6,269,101
Selecting minimum date in data set
I have a data set that i am attempting to select the first record with a station id of 2. InspectionNbr Station DateTimeStamp 825065 1 2010-11-16 04:38:49.000 825065 2 2010-11-16 12:38:31.000 825065 2 2010-12-06 01:35:14.000 825065 2 2011-01-24 08:11:04.000 In this case i want to select the second line of the results. ...
As far as I can figure out, an aggregate can't be used in an update statement because the aggregate and the update affect two different row sets. Think about a normal SELECT with an aggregate: SELECT MIN(CreatedDate) FROM StationInspection WHERE Station = 2 The aggregate works on all rows in the row set. The row set is...
Selecting minimum date in data set I have a data set that i am attempting to select the first record with a station id of 2. InspectionNbr Station DateTimeStamp 825065 1 2010-11-16 04:38:49.000 825065 2 2010-11-16 12:38:31.000 825065 2 2010-12-06 01:35:14.000 825065 2 2011-01-24 08:11:04.000 In this case i want to sele...
TITLE: Selecting minimum date in data set QUESTION: I have a data set that i am attempting to select the first record with a station id of 2. InspectionNbr Station DateTimeStamp 825065 1 2010-11-16 04:38:49.000 825065 2 2010-11-16 12:38:31.000 825065 2 2010-12-06 01:35:14.000 825065 2 2011-01-24 08:11:04.000 In this c...
[ "sql", "sql-server" ]
1
3
6,618
5
0
2011-06-07T16:45:57.733000
2011-06-07T17:19:50.917000
6,268,690
6,268,732
Representing search failure with a non-nullable type
I have a method that searches a list of objects based on some of the fields of the object. If a matching object is found, I return it, but I want to be able to represent a no-match situation. Normally I'd return null but I'm working with a non-nullable class I cannot change.
There are several options. Use a Nullable, or return a bool and use an out parameter to get the actual result, e.g.: MyType? FindObject() { } Or: bool FindObject(out MyType result) { }
Representing search failure with a non-nullable type I have a method that searches a list of objects based on some of the fields of the object. If a matching object is found, I return it, but I want to be able to represent a no-match situation. Normally I'd return null but I'm working with a non-nullable class I cannot...
TITLE: Representing search failure with a non-nullable type QUESTION: I have a method that searches a list of objects based on some of the fields of the object. If a matching object is found, I return it, but I want to be able to represent a no-match situation. Normally I'd return null but I'm working with a non-nulla...
[ "c#", "non-nullable" ]
0
4
56
3
0
2011-06-07T16:45:59.750000
2011-06-07T16:48:34.113000
6,268,708
6,270,959
Entity Framework and Stored PRocedures, how to remove Nullable paremeters
Well I've been using Model-First with DbSet code generation. And now I what I want to do is to add some stored procedures. But Code I get look like like: public virtual ObjectResult > CountPostsInThread(Nullable threadID, ObjectParameter postCount) { var threadIDParameter = threadID.HasValue? new ObjectParameter("threa...
Nothing is wrong with the template or stored procedure. SP's parameters accept NULL value so because of that EF makes them nullable. The ternary operator is used because if you pass null EF must somehow pass the type of null parameter to correctly setup SqlParameter used internally.
Entity Framework and Stored PRocedures, how to remove Nullable paremeters Well I've been using Model-First with DbSet code generation. And now I what I want to do is to add some stored procedures. But Code I get look like like: public virtual ObjectResult > CountPostsInThread(Nullable threadID, ObjectParameter postCoun...
TITLE: Entity Framework and Stored PRocedures, how to remove Nullable paremeters QUESTION: Well I've been using Model-First with DbSet code generation. And now I what I want to do is to add some stored procedures. But Code I get look like like: public virtual ObjectResult > CountPostsInThread(Nullable threadID, Object...
[ "sql-server", "stored-procedures", "entity-framework-4", "entity-framework-4.1" ]
0
2
472
1
0
2011-06-07T16:46:35.973000
2011-06-07T20:04:24.190000
6,268,711
6,268,830
Spinning up a new Thread - do I need to care about garbage collection
I'm having a bit of a brain-freeze so I thought I'd throw this out there to the collective genius of SO... I have an event that is raised (this will be on the thread of the "raiser") and I consume it. However, once I am handling this event, I need to fire off another thread to perform the workload that the event signif...
There's no particular reason that you need to keep track of the Thread variable. The GC won't kill the thread when t goes out of scope. I don't know how long "a long time" is, but you might be better off using something like ThreadPool.QueueUserWorkItem. That is: private void MyEventHandler(object sender, EventArgs e) ...
Spinning up a new Thread - do I need to care about garbage collection I'm having a bit of a brain-freeze so I thought I'd throw this out there to the collective genius of SO... I have an event that is raised (this will be on the thread of the "raiser") and I consume it. However, once I am handling this event, I need to...
TITLE: Spinning up a new Thread - do I need to care about garbage collection QUESTION: I'm having a bit of a brain-freeze so I thought I'd throw this out there to the collective genius of SO... I have an event that is raised (this will be on the thread of the "raiser") and I consume it. However, once I am handling thi...
[ "c#", ".net", "multithreading", "garbage-collection" ]
8
8
2,791
3
0
2011-06-07T16:46:58.970000
2011-06-07T16:55:30.893000
6,268,713
6,268,770
How can I scp a file and run an ssh command asking for password only once?
Here's the context of the question: In order for me to be able to print documents at work, I have to copy the file over to a different computer and then print from that computer. (Don't ask. It's complicated and there is not another viable solution.) Both of the computers are Linux and I work in bash. The way I current...
ssh user@host 'cat - > /tmp/file.ext; do_something_with /tmp/file.ext;rm /tmp/file.ext' < file.ext Another option would be to just leave an ssh tunnel open: In ~/.ssh/config: Host * ControlMaster auto ControlPath ~/.ssh/sockets/ssh-socket-%r-%h-%p. $ ssh -f -N -l user host (socket is now open) Subsequent ssh/scp reques...
How can I scp a file and run an ssh command asking for password only once? Here's the context of the question: In order for me to be able to print documents at work, I have to copy the file over to a different computer and then print from that computer. (Don't ask. It's complicated and there is not another viable solut...
TITLE: How can I scp a file and run an ssh command asking for password only once? QUESTION: Here's the context of the question: In order for me to be able to print documents at work, I have to copy the file over to a different computer and then print from that computer. (Don't ask. It's complicated and there is not an...
[ "linux", "bash", "ssh", "scp" ]
11
13
8,702
2
0
2011-06-07T16:47:11.543000
2011-06-07T16:51:44.487000
6,268,716
6,268,952
setuid(0) and system fails
I have a program running in C. This needs to execute an "iptables" command using system. I tried setuid(0); system("iptables.... "); setuid and system do not coexist. from the system man page Do not use system() from a program with set-user-ID or set-group-ID privileges, because strange values for some environment vari...
Something like this might help. It's untested but should work. char * const argv[] = {"/sbin/iptables", "-L", NULL}; pid = fork(); switch (pid) { case -1: /* handle error */ case 0: execv("/sbin/iptables", argv); /* handle error if you get here */ break; default: waitpid(pid, &status, 0); /* check waitpid return code ...
setuid(0) and system fails I have a program running in C. This needs to execute an "iptables" command using system. I tried setuid(0); system("iptables.... "); setuid and system do not coexist. from the system man page Do not use system() from a program with set-user-ID or set-group-ID privileges, because strange value...
TITLE: setuid(0) and system fails QUESTION: I have a program running in C. This needs to execute an "iptables" command using system. I tried setuid(0); system("iptables.... "); setuid and system do not coexist. from the system man page Do not use system() from a program with set-user-ID or set-group-ID privileges, bec...
[ "c", "linux", "root", "setuid" ]
2
1
1,766
3
0
2011-06-07T16:47:16.667000
2011-06-07T17:05:10.203000
6,268,718
6,268,823
How do you encode Hebrew characters to a database without getting "????"
When I insert Hebrew words to the database, I get????? marks after i click "show Table" in Server Explorer. Is there a way to Encode the hebrew letters before they go in? sqlCommand.Parameters.Add("@HebrewLettersEncoded", SqlDbType.VarChar, 50); sqlCommand.Parameters["@HebrewLettersEncoded"].Value = HebrewLettersTextBo...
You'll need to make sure the field you are trying to put the characters into is an NVarChar (not varchar). Then change the code above to....: sqlCommand.Parameters.Add("@HebrewLettersEncoded", SqlDbType.NVarChar, 50);
How do you encode Hebrew characters to a database without getting "????" When I insert Hebrew words to the database, I get????? marks after i click "show Table" in Server Explorer. Is there a way to Encode the hebrew letters before they go in? sqlCommand.Parameters.Add("@HebrewLettersEncoded", SqlDbType.VarChar, 50); s...
TITLE: How do you encode Hebrew characters to a database without getting "????" QUESTION: When I insert Hebrew words to the database, I get????? marks after i click "show Table" in Server Explorer. Is there a way to Encode the hebrew letters before they go in? sqlCommand.Parameters.Add("@HebrewLettersEncoded", SqlDbTy...
[ "asp.net", "sql", "database" ]
1
2
1,066
2
0
2011-06-07T16:47:45.487000
2011-06-07T16:55:08.777000
6,268,722
6,273,180
custom field in rails form
In my /app/views/institution/_form.html.erb I have <%= f.textfield:auto_complete_list %> Which gets its data from /app/models/institution.rb def auto_complete_list return self.county.city.name + ' '+ self.county.name end But I don't want this to be submitted when the button is pressed. My current solution is to delete ...
While I agree with daekrist's answer, you can easily keep this out of params[:institution] by using the lower level form helper methods that: <%= form_for @institution do |f| %>... <%= text_field_tag 'auto_complete_list', @institution.auto_complete_list %>... <% end %> So now when the form is submitted, it will be in p...
custom field in rails form In my /app/views/institution/_form.html.erb I have <%= f.textfield:auto_complete_list %> Which gets its data from /app/models/institution.rb def auto_complete_list return self.county.city.name + ' '+ self.county.name end But I don't want this to be submitted when the button is pressed. My cur...
TITLE: custom field in rails form QUESTION: In my /app/views/institution/_form.html.erb I have <%= f.textfield:auto_complete_list %> Which gets its data from /app/models/institution.rb def auto_complete_list return self.county.city.name + ' '+ self.county.name end But I don't want this to be submitted when the button ...
[ "ruby-on-rails", "ruby-on-rails-3" ]
1
3
3,967
3
0
2011-06-07T16:48:05.317000
2011-06-08T00:56:17.150000
6,268,748
6,269,044
Strange files : *.dll.a * .la What are they? ( VLC windows build ) How to use them on Windows if possible?
I wanted to write small streaming software using VLC compoents on windows. So i look for: lib and headers file for VLC on windows. Instead of compiling it, to make it faster i looked for ready builds for windows. And i found on: http://nightlies.videolan.org/build/win32/last/ I download it (debug): Find include file di...
The.la files are libtool convenience libraries, they're useless and only cause trouble (in this case). The.a files are (import) libraries for GCC/MinGW, just like.lib for MSVC. VLC can only be built with GCC, because MSVC lacks the proper C99 support. So all debug info will be generated by and for a GNU toolchain (GCC/...
Strange files : *.dll.a * .la What are they? ( VLC windows build ) How to use them on Windows if possible? I wanted to write small streaming software using VLC compoents on windows. So i look for: lib and headers file for VLC on windows. Instead of compiling it, to make it faster i looked for ready builds for windows. ...
TITLE: Strange files : *.dll.a * .la What are they? ( VLC windows build ) How to use them on Windows if possible? QUESTION: I wanted to write small streaming software using VLC compoents on windows. So i look for: lib and headers file for VLC on windows. Instead of compiling it, to make it faster i looked for ready bu...
[ "linux", "cygwin", "mingw", "vlc", "libvlc" ]
2
3
3,900
1
0
2011-06-07T16:49:37.033000
2011-06-07T17:14:40.343000
6,268,755
6,268,792
is_null in PHP still returns null?
All, I have the following code: public function addElements() { $newArray = array(); for ($index = 0; $index < count($this->listOfElements); $index++) { $temp = $this->listOfElements[$index]; if (!is_null($temp) &&!is_null($temp->getPlayerOb())) { echo "Player Name is: ".$temp->getPlayerOb()->getName(); array_push($new...
$temp is clearly a non-object value that isn't null. I don't know what listOfElements is, but perhaps accessing a non-existing key gives false rather than null. You might check with is_object instead: if (is_object($temp) &&!is_null($temp->getPlayerOb())) It would be better, however, to check positively. Check with ins...
is_null in PHP still returns null? All, I have the following code: public function addElements() { $newArray = array(); for ($index = 0; $index < count($this->listOfElements); $index++) { $temp = $this->listOfElements[$index]; if (!is_null($temp) &&!is_null($temp->getPlayerOb())) { echo "Player Name is: ".$temp->getPla...
TITLE: is_null in PHP still returns null? QUESTION: All, I have the following code: public function addElements() { $newArray = array(); for ($index = 0; $index < count($this->listOfElements); $index++) { $temp = $this->listOfElements[$index]; if (!is_null($temp) &&!is_null($temp->getPlayerOb())) { echo "Player Name i...
[ "php" ]
1
6
160
1
0
2011-06-07T16:50:12.307000
2011-06-07T16:52:59.700000
6,268,768
6,268,843
C gotchas and mistakes for C++ programmers
If you are C programmer or C++ programmer that knows C well, can you tell me what are the most common mistakes/pattern/style that you noticed from C++ programmers? For example, do you noticed a difference between a C program written by a C programmer vs C program written by C++ programmer? If you can provide a list spe...
One thing that I see happen quite frequently is properly freeing allocated memory. Especially associated with structures containing dynamically allocated memory. With C++, destructors are automatically called and if properly written they take care of the associated objects clean up. With C you have to remember to eithe...
C gotchas and mistakes for C++ programmers If you are C programmer or C++ programmer that knows C well, can you tell me what are the most common mistakes/pattern/style that you noticed from C++ programmers? For example, do you noticed a difference between a C program written by a C programmer vs C program written by C+...
TITLE: C gotchas and mistakes for C++ programmers QUESTION: If you are C programmer or C++ programmer that knows C well, can you tell me what are the most common mistakes/pattern/style that you noticed from C++ programmers? For example, do you noticed a difference between a C program written by a C programmer vs C pro...
[ "c++", "c", "coding-style", "paradigms" ]
3
3
830
4
0
2011-06-07T16:51:39.183000
2011-06-07T16:56:19.183000
6,268,772
6,268,854
MySQL query runs twice
I have an php file in which I include the PHP Simple HTML DOM Parser: include("simple_html_dom.php"); This inclusion makes my mysql_query($query) execute twice on my page - if I remove the inclusion, the mysql_query runs fine - I also tried to put the inclusion after the query - same problem! mysql_query("INSERT INTO t...
Add a call to debug_print_backtrace() before mysql_query(). That will allow you to track the includes trail.
MySQL query runs twice I have an php file in which I include the PHP Simple HTML DOM Parser: include("simple_html_dom.php"); This inclusion makes my mysql_query($query) execute twice on my page - if I remove the inclusion, the mysql_query runs fine - I also tried to put the inclusion after the query - same problem! mys...
TITLE: MySQL query runs twice QUESTION: I have an php file in which I include the PHP Simple HTML DOM Parser: include("simple_html_dom.php"); This inclusion makes my mysql_query($query) execute twice on my page - if I remove the inclusion, the mysql_query runs fine - I also tried to put the inclusion after the query -...
[ "php", "mysql", "html" ]
3
4
3,278
1
0
2011-06-07T16:51:45.970000
2011-06-07T16:57:25.300000
6,268,777
6,268,919
How do you pass the string "*.*" to ruby as a command line parameter?
code: #test_argv.rb puts "length: #{ARGV.length} " ARGV.each do |a| puts "Argument: #{a}" end If I supply the string "*.*" (with or without quotes) when I call the above, I get the following output: C:\test>test_argv *.* length: 5 Argument: afile.TXT Argument: bfile.TXT Argument: cfile.TXT Argument: dfile.TXT Argument:...
You may need to put this into literal quotes: test_argv "*.*" The quotes should avoid having the command-line arguments get expanded on you prematurely.
How do you pass the string "*.*" to ruby as a command line parameter? code: #test_argv.rb puts "length: #{ARGV.length} " ARGV.each do |a| puts "Argument: #{a}" end If I supply the string "*.*" (with or without quotes) when I call the above, I get the following output: C:\test>test_argv *.* length: 5 Argument: afile.TXT...
TITLE: How do you pass the string "*.*" to ruby as a command line parameter? QUESTION: code: #test_argv.rb puts "length: #{ARGV.length} " ARGV.each do |a| puts "Argument: #{a}" end If I supply the string "*.*" (with or without quotes) when I call the above, I get the following output: C:\test>test_argv *.* length: 5 A...
[ "ruby", "argv" ]
8
6
1,378
1
0
2011-06-07T16:52:08.060000
2011-06-07T17:02:19.133000
6,268,778
6,268,812
looking for an explanation of .NET DataTable events and handling
I'm having trouble wrapping my head around.NET DataTable events, handling, actions, etc. I have attempted to understand from the MSDN library, but I find I haven't got an understanding of how it all works together. I also haven't been able to find any other source (by googling) that explains the ins and outs of it. For...
It looks like you're getting confused between the events themselves and the EventArgs parameters that get passed to your actual event handler. When you register to handle an event, there are a couple of things you have to know. I'll use your ColumnChanged event as an example. The first is that the Event you're register...
looking for an explanation of .NET DataTable events and handling I'm having trouble wrapping my head around.NET DataTable events, handling, actions, etc. I have attempted to understand from the MSDN library, but I find I haven't got an understanding of how it all works together. I also haven't been able to find any oth...
TITLE: looking for an explanation of .NET DataTable events and handling QUESTION: I'm having trouble wrapping my head around.NET DataTable events, handling, actions, etc. I have attempted to understand from the MSDN library, but I find I haven't got an understanding of how it all works together. I also haven't been ab...
[ ".net", "c++", "events", "datatable" ]
0
1
131
1
0
2011-06-07T16:52:11.807000
2011-06-07T16:54:30.230000
6,268,782
6,269,187
test for node membership in pydot graph
pydot has a huge number of bound methods for getting and setting every little thing in a dot graph, reading and writing, you-name-it, but I can't seem to find a simple membership test. >>> d = pydot.Dot() >>> n = pydot.Node('foobar') >>> d.add_node(n) >>> n in d.get_nodes() False is just one of many things that didn't...
Looking through the source code, http://code.google.com/p/pydot/source/browse/trunk/pydot.py, it seems that node names are unique values, used as the keys to locate the nodes within a graph's node dictionary (though, interestingly, rather than return an error for an existing node, it simply adds the attributes of the n...
test for node membership in pydot graph pydot has a huge number of bound methods for getting and setting every little thing in a dot graph, reading and writing, you-name-it, but I can't seem to find a simple membership test. >>> d = pydot.Dot() >>> n = pydot.Node('foobar') >>> d.add_node(n) >>> n in d.get_nodes() Fals...
TITLE: test for node membership in pydot graph QUESTION: pydot has a huge number of bound methods for getting and setting every little thing in a dot graph, reading and writing, you-name-it, but I can't seem to find a simple membership test. >>> d = pydot.Dot() >>> n = pydot.Node('foobar') >>> d.add_node(n) >>> n in ...
[ "python", "graphviz", "dot", "pydot" ]
2
2
2,781
1
0
2011-06-07T16:52:22.070000
2011-06-07T17:26:40.460000
6,268,789
6,268,880
Reading milliVolts in Android for pH Tester
I'm looking in to making a pH tester for my Android phone. I've found a pH electrode that will send a milliVolt signal which I can then use to convert into a pH reading (59.2 mV per pH unit @ 25° C). The question I'm having is would it be possible to connect the electrode to the headphone jack and directly read the mil...
This should be asked in the electrical engineering site. But the best way is to use a Bluetooth-to-serial converter, ($5 off ebay) and a PIC microcontroller with USART and A/D converter, ($1), you could program the PIC quite easily in C with the 'MPLAB' IDE and 'HI-TECH' C compiler. The tools you'll need are a PIC prog...
Reading milliVolts in Android for pH Tester I'm looking in to making a pH tester for my Android phone. I've found a pH electrode that will send a milliVolt signal which I can then use to convert into a pH reading (59.2 mV per pH unit @ 25° C). The question I'm having is would it be possible to connect the electrode to ...
TITLE: Reading milliVolts in Android for pH Tester QUESTION: I'm looking in to making a pH tester for my Android phone. I've found a pH electrode that will send a milliVolt signal which I can then use to convert into a pH reading (59.2 mV per pH unit @ 25° C). The question I'm having is would it be possible to connect...
[ "android", "hardware-interface" ]
4
1
1,725
3
0
2011-06-07T16:52:47.157000
2011-06-07T16:58:49.320000
6,268,802
6,268,917
Nested JSON GET functions
I am looking for a way to have a.getJSON, call another function which in return conducts another.getJSON call. I'm iteratively calling a JSON method on my Controller and want to finish this iterative cycle if a certain condition is met. If this condition is met (can only be checked from within the JSON method), I want ...
I suspect that you have a scope problem with your poller variable. It is probably only defined in your $(window).load function and nowhere else. So when the browser attempts to execute the clearInterval, an exception is thrown and the script is aborted. You can verify this by surrounding the code in your $.getJSON func...
Nested JSON GET functions I am looking for a way to have a.getJSON, call another function which in return conducts another.getJSON call. I'm iteratively calling a JSON method on my Controller and want to finish this iterative cycle if a certain condition is met. If this condition is met (can only be checked from within...
TITLE: Nested JSON GET functions QUESTION: I am looking for a way to have a.getJSON, call another function which in return conducts another.getJSON call. I'm iteratively calling a JSON method on my Controller and want to finish this iterative cycle if a certain condition is met. If this condition is met (can only be c...
[ "json", "jquery", "nested" ]
0
1
348
2
0
2011-06-07T16:53:43.593000
2011-06-07T17:02:09.510000
6,268,855
6,269,154
Permissions in Windows 7 java unrecognizable in batch
I wrote a program to make a graphical Timeline and it works through some VBA and Java through the shell, but after transfering it over to Windows 7 from Vista I cannot seem to find a place to save the files so that the java program can access them. Please Help me. Where can I save the files such that I can have the jav...
If you're targetting Windows Vista/7, you can build an EXE from a JAR file that has a certain manifest in it that makes the EXE require admin rights. This way, file I/O will always execute with the correct userrrights!
Permissions in Windows 7 java unrecognizable in batch I wrote a program to make a graphical Timeline and it works through some VBA and Java through the shell, but after transfering it over to Windows 7 from Vista I cannot seem to find a place to save the files so that the java program can access them. Please Help me. W...
TITLE: Permissions in Windows 7 java unrecognizable in batch QUESTION: I wrote a program to make a graphical Timeline and it works through some VBA and Java through the shell, but after transfering it over to Windows 7 from Vista I cannot seem to find a place to save the files so that the java program can access them....
[ "java", "vba", "windows-7", "batch-file", "excel" ]
0
1
239
1
0
2011-06-07T16:57:27
2011-06-07T17:24:16.823000