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,179,182
6,179,214
Python: How to count the number of objects created?
I'm new to Python. My question is, what is the best way to count the number of python objects for keeping track of number of objects exist at any given time? I thought of using a static variable. I have read several Q & A on static variables of Python, but I could not figure out how I could achieve object counting usin...
Use self.__class__.iMenuNumber or baseMENUS.iMenuNumber instead of self.iMenuNumber to set the var on the class instead of the instance. Additionally, Hungarian Notation is not pythonic (actually, it sucks in all languages) - you might want to stop using it. See http://www.python.org/dev/peps/pep-0008/ for some code st...
Python: How to count the number of objects created? I'm new to Python. My question is, what is the best way to count the number of python objects for keeping track of number of objects exist at any given time? I thought of using a static variable. I have read several Q & A on static variables of Python, but I could not...
TITLE: Python: How to count the number of objects created? QUESTION: I'm new to Python. My question is, what is the best way to count the number of python objects for keeping track of number of objects exist at any given time? I thought of using a static variable. I have read several Q & A on static variables of Pytho...
[ "python", "object", "static", "count" ]
5
17
22,438
5
0
2011-05-30T17:32:51.990000
2011-05-30T17:37:14.267000
6,179,185
6,181,110
How to divide the controller?
My View-Controller public class MainForm implements java.util.Observer{ @Override public void update(Observable o, Object arg) { System.err.println("update View...."); this.textField_15.setText(String.valueOf(model.getThermalConductivity())); /* ***** */ } } In the model I use methods setChanged(); notifyObservers(); ...
You might enjoy trying this example. For simplicity, the model extends Observable, but several other approaches are mentioned with links to examples.
How to divide the controller? My View-Controller public class MainForm implements java.util.Observer{ @Override public void update(Observable o, Object arg) { System.err.println("update View...."); this.textField_15.setText(String.valueOf(model.getThermalConductivity())); /* ***** */ } } In the model I use methods set...
TITLE: How to divide the controller? QUESTION: My View-Controller public class MainForm implements java.util.Observer{ @Override public void update(Observable o, Object arg) { System.err.println("update View...."); this.textField_15.setText(String.valueOf(model.getThermalConductivity())); /* ***** */ } } In the model...
[ "java", "model-view-controller", "swing", "controller" ]
2
2
295
1
0
2011-05-30T17:33:04.220000
2011-05-30T22:04:45.810000
6,179,186
6,179,241
getting cpu number of a given thread in C#
In C#, is there any method to get the cpu id (or core number) of the core that is executing a thread? I have a quad core processor and I wanted to know that on spanning some threads, which cores do they get alloted? I found out that System.Environment.ProcessorCount gives the total number of cpus present, but is there ...
I do not know of a native.NET function that can provide this. But if you are prepared to use P/Invoke and are running on Windows 2003, Vista or later then you can call GetCurrentProcessorNumber. Of course this will only give you the CPU (core) that is executing the thread at that particular time slice and the next time...
getting cpu number of a given thread in C# In C#, is there any method to get the cpu id (or core number) of the core that is executing a thread? I have a quad core processor and I wanted to know that on spanning some threads, which cores do they get alloted? I found out that System.Environment.ProcessorCount gives the ...
TITLE: getting cpu number of a given thread in C# QUESTION: In C#, is there any method to get the cpu id (or core number) of the core that is executing a thread? I have a quad core processor and I wanted to know that on spanning some threads, which cores do they get alloted? I found out that System.Environment.Process...
[ "c#", "multithreading" ]
4
5
1,349
1
0
2011-05-30T17:33:06.200000
2011-05-30T17:40:15.757000
6,179,192
6,179,233
How to get all the occurrence character on the prefix of string in java in a simple way?
I have a string like this: '0010' How can I get the first two zero on that sample string. The rules here is that, I have a variable which hold a character. Then I need to look on the string, if the first character of the string is same with the variable value. I need to keep it and then if the second string matches aga...
Your code is already very simple. The English description isn't much shorter, so don't worry. With a little bit of rewriting you get: public static String prefixOf(String s, char prefix) { for (int i = 0; i < s.length(); i++) { if (s.charAt(i)!= prefix) { return s.substring(0, i); } } return s; } This definition is onl...
How to get all the occurrence character on the prefix of string in java in a simple way? I have a string like this: '0010' How can I get the first two zero on that sample string. The rules here is that, I have a variable which hold a character. Then I need to look on the string, if the first character of the string is ...
TITLE: How to get all the occurrence character on the prefix of string in java in a simple way? QUESTION: I have a string like this: '0010' How can I get the first two zero on that sample string. The rules here is that, I have a variable which hold a character. Then I need to look on the string, if the first character...
[ "java", "string", "prefix" ]
1
2
2,406
5
0
2011-05-30T17:34:27.590000
2011-05-30T17:39:23.487000
6,179,197
6,179,225
Search/replace array of characters pointed to by a character pointer in c++
Here's my function call: removeTags(*buf, bufSize); which calls: void removeTags(char* dataBlock, unsigned long size) { char* start = dataBlock; char* end = dataBlock + size; while(start < end) { //How do I replace the characters "\abc" with just nothing, ''. } I want to replace any instances of the characters \abc wi...
Once you find an instance of \abc simply move all the characters after the \abc backwards four places (four because \abc is four chars long) (possibly using memmove ). For instance: one two \abc three <----^ copy everything from the 't' down backwards over the \abc Note that after you do that, your end pointer will be ...
Search/replace array of characters pointed to by a character pointer in c++ Here's my function call: removeTags(*buf, bufSize); which calls: void removeTags(char* dataBlock, unsigned long size) { char* start = dataBlock; char* end = dataBlock + size; while(start < end) { //How do I replace the characters "\abc" with j...
TITLE: Search/replace array of characters pointed to by a character pointer in c++ QUESTION: Here's my function call: removeTags(*buf, bufSize); which calls: void removeTags(char* dataBlock, unsigned long size) { char* start = dataBlock; char* end = dataBlock + size; while(start < end) { //How do I replace the charac...
[ "c++", "visual-c++", "pointers" ]
0
2
530
2
0
2011-05-30T17:35:01.913000
2011-05-30T17:38:31.397000
6,179,206
6,179,226
Transparent PNG Reacting to Sites Image Sliders and Content
I just stumbled across this guys site: http://mantia.me/ He has an awesome logo that reacts to the content the site is currently showing, if you wait on his homepage the logo changes with the slide show of images. I was wondering if anyone knows how to replicate the effect. I'm guessing it's a transparent png with a ro...
It's really simple what he has. Like you mention it's a transparent PNG that matches the given background ( in this case white ) and places it on top of it with z-index. The rest is just jQuery with fadeIn and fadeOut images. You can view the png on top of the image transitions. So basically you just need a div with po...
Transparent PNG Reacting to Sites Image Sliders and Content I just stumbled across this guys site: http://mantia.me/ He has an awesome logo that reacts to the content the site is currently showing, if you wait on his homepage the logo changes with the slide show of images. I was wondering if anyone knows how to replica...
TITLE: Transparent PNG Reacting to Sites Image Sliders and Content QUESTION: I just stumbled across this guys site: http://mantia.me/ He has an awesome logo that reacts to the content the site is currently showing, if you wait on his homepage the logo changes with the slide show of images. I was wondering if anyone kn...
[ "javascript", "css", "slideshow", "transparent", "graphical-logo" ]
3
6
923
2
0
2011-05-30T17:35:53.547000
2011-05-30T17:38:39.973000
6,179,248
6,179,283
reRender a panelGroup or region depending on what is selected on selectOneRadio
It's basically this Question: JSF 2.0 How to display a different h:panelGroup each time an item is selected from a selectOneMenu But i'm using selectOneRadio and I don't have the f:ajax that the answers says it fixes. Any idea of what I could do to reRender my panelGroups? I've tried with a4j:support but no success. It...
You need make a group outside the a4j:region with no tag rendered. It seems to conflict with the tag reRender of what is trying to reRender it.
reRender a panelGroup or region depending on what is selected on selectOneRadio It's basically this Question: JSF 2.0 How to display a different h:panelGroup each time an item is selected from a selectOneMenu But i'm using selectOneRadio and I don't have the f:ajax that the answers says it fixes. Any idea of what I cou...
TITLE: reRender a panelGroup or region depending on what is selected on selectOneRadio QUESTION: It's basically this Question: JSF 2.0 How to display a different h:panelGroup each time an item is selected from a selectOneMenu But i'm using selectOneRadio and I don't have the f:ajax that the answers says it fixes. Any ...
[ "java", "jsf", "ajax4jsf" ]
0
2
3,229
1
0
2011-05-30T17:41:02.063000
2011-05-30T17:45:03.383000
6,179,251
6,179,320
High precision in C#
I need some library to work with high precision double in C#. I've searched and found some useful libraries like GMP, MPFR and C++ wrapper for MPFR, but none of them has interface for C#. Could you please help me?:) Sorry for my bad english (:
Check this list: http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic. I've used W3b.Sine and I recommend it.
High precision in C# I need some library to work with high precision double in C#. I've searched and found some useful libraries like GMP, MPFR and C++ wrapper for MPFR, but none of them has interface for C#. Could you please help me?:) Sorry for my bad english (:
TITLE: High precision in C# QUESTION: I need some library to work with high precision double in C#. I've searched and found some useful libraries like GMP, MPFR and C++ wrapper for MPFR, but none of them has interface for C#. Could you please help me?:) Sorry for my bad english (: ANSWER: Check this list: http://en.w...
[ "c#", "precision" ]
2
2
3,034
2
0
2011-05-30T17:41:14.250000
2011-05-30T17:49:44.813000
6,179,258
6,179,287
How to check if font exist in iOS4 at runtime
I wish to check at runtime whether a font exists on the device (iphone/ipad)? Is there a way to do that?
You can use this code to get a list of all fonts available: // List all fonts on iPhone NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; NSArray *fontNames; NSInteger indFamily, indFont; for (indFamily=0; indFamily<[familyNames count]; ++indFamily) { NSLog(@"Family name: %@", [familyNames ob...
How to check if font exist in iOS4 at runtime I wish to check at runtime whether a font exists on the device (iphone/ipad)? Is there a way to do that?
TITLE: How to check if font exist in iOS4 at runtime QUESTION: I wish to check at runtime whether a font exists on the device (iphone/ipad)? Is there a way to do that? ANSWER: You can use this code to get a list of all fonts available: // List all fonts on iPhone NSArray *familyNames = [[NSArray alloc] initWithArray:...
[ "iphone", "fonts", "ios4", "ipa" ]
7
3
1,038
2
0
2011-05-30T17:41:57.243000
2011-05-30T17:45:27.427000
6,179,262
6,188,635
Estimating area required by a VHDL implementation
I've got a few VHDL files, which I can compile with ghdl on Debian. The same files have been adapted by some for an ASIC implementation. There's one "large area" implementation and one "compact" implementation for an algorithm. I'd like to write some more implementations, but to evaluate them I'd need to be able to com...
I'd like to do the evaluation without installing any proprietary compilers or obtaining any hardware. Inspection will give you a rough idea but with all the optimisations that occur during synthesis you may find this level of accuracy too far removed from the end result. I would suggest that you re-examine your reasons...
Estimating area required by a VHDL implementation I've got a few VHDL files, which I can compile with ghdl on Debian. The same files have been adapted by some for an ASIC implementation. There's one "large area" implementation and one "compact" implementation for an algorithm. I'd like to write some more implementation...
TITLE: Estimating area required by a VHDL implementation QUESTION: I've got a few VHDL files, which I can compile with ghdl on Debian. The same files have been adapted by some for an ASIC implementation. There's one "large area" implementation and one "compact" implementation for an algorithm. I'd like to write some m...
[ "vhdl", "verilog", "hdl" ]
2
3
882
2
0
2011-05-30T17:42:21.433000
2011-05-31T13:52:44.600000
6,179,264
6,179,374
WP: the_content doesn't display properly
post_content;?> But result is not what I expected: Post's content Maybe someone has any ideas how to solve it? I tried post_content);?> But the result is the same.
Nested paragraph tags don't work properly because the closing is optional, you should use a div, or other container instead of your outside
WP: the_content doesn't display properly post_content;?> But result is not what I expected: Post's content Maybe someone has any ideas how to solve it? I tried post_content);?> But the result is the same.
TITLE: WP: the_content doesn't display properly QUESTION: post_content;?> But result is not what I expected: Post's content Maybe someone has any ideas how to solve it? I tried post_content);?> But the result is the same. ANSWER: Nested paragraph tags don't work properly because the closing is optional, you should us...
[ "html", "wordpress" ]
0
1
554
2
0
2011-05-30T17:42:31.013000
2011-05-30T17:56:47.733000
6,179,265
6,179,310
Class design to contain data from an XML file
I'm a student working on a lab that parses a pseudo XML file(basically coded our own parser) for data, stores the retrieved elements and data values, and displays (next lab will be adding "add,change,delete" functionality) I was thinking about holding this read in information in some sort of multidimensional List due t...
Why not just use a List >? Or maybe a Dictionary >, assuming your parent nodes have unique identifiers?
Class design to contain data from an XML file I'm a student working on a lab that parses a pseudo XML file(basically coded our own parser) for data, stores the retrieved elements and data values, and displays (next lab will be adding "add,change,delete" functionality) I was thinking about holding this read in informati...
TITLE: Class design to contain data from an XML file QUESTION: I'm a student working on a lab that parses a pseudo XML file(basically coded our own parser) for data, stores the retrieved elements and data values, and displays (next lab will be adding "add,change,delete" functionality) I was thinking about holding this...
[ "c#", "arrays" ]
1
2
142
4
0
2011-05-30T17:42:36.760000
2011-05-30T17:48:19.657000
6,179,270
6,179,313
How to toggle (jQuery) with an anchor
I have a small problem with jQuery. The situation: I have a piece of jQuery code, where I toggle results. JS Code: //Set default open/close settings $('.acc_container').hide(); //Hide/close all containers //$('.acc_trigger:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open t...
You should give your div s IDs according to the anchors, e.g. Item1 Inner Text in toggle 1 You can get the document fragment from the location object: document.location.hash Then it is simply (assuming the other containers are all hidden): $(document.location.hash).slideDown().prev().addClass('active');
How to toggle (jQuery) with an anchor I have a small problem with jQuery. The situation: I have a piece of jQuery code, where I toggle results. JS Code: //Set default open/close settings $('.acc_container').hide(); //Hide/close all containers //$('.acc_trigger:first').addClass('active').next().show(); //Add "active" cl...
TITLE: How to toggle (jQuery) with an anchor QUESTION: I have a small problem with jQuery. The situation: I have a piece of jQuery code, where I toggle results. JS Code: //Set default open/close settings $('.acc_container').hide(); //Hide/close all containers //$('.acc_trigger:first').addClass('active').next().show();...
[ "javascript", "jquery", "toggle", "jquery-events" ]
1
4
6,650
4
0
2011-05-30T17:43:08.833000
2011-05-30T17:48:34.460000
6,179,281
6,179,401
Calling java with wildcards in classpath fails
I have some jars in the current directory, all needing to be in the class path, so I want to use the wildcards convention for classpath. The command line is: java.exe -classpath * org.python.util.jython args However I get this error Exception in thread "main" java.lang.NoClassDefFoundError: G:/repo/builds/jars/edu_mine...
I found it, under Windows quotes around the wildcarded classpath are required. But not required if you specify jars explicitly, explaining why the second command works. Weird.
Calling java with wildcards in classpath fails I have some jars in the current directory, all needing to be in the class path, so I want to use the wildcards convention for classpath. The command line is: java.exe -classpath * org.python.util.jython args However I get this error Exception in thread "main" java.lang.NoC...
TITLE: Calling java with wildcards in classpath fails QUESTION: I have some jars in the current directory, all needing to be in the class path, so I want to use the wildcards convention for classpath. The command line is: java.exe -classpath * org.python.util.jython args However I get this error Exception in thread "m...
[ "java", "classpath" ]
9
5
4,449
1
0
2011-05-30T17:44:52.403000
2011-05-30T17:59:56.237000
6,179,285
6,184,225
Variable number of arguments in PL/SQL stored procedure
Can a procedure PL/SQL take a variable number of arguments? In my case, the procedure is called by the submit button of a form, and the form has variable number of inputs.
You don't mention it, but are you using mod_plsql? If so, you should read about flexible parameter passing. In short, prefix your procedure name with an exclamation mark in your browser and define your procedure with a name_array and value_array.
Variable number of arguments in PL/SQL stored procedure Can a procedure PL/SQL take a variable number of arguments? In my case, the procedure is called by the submit button of a form, and the form has variable number of inputs.
TITLE: Variable number of arguments in PL/SQL stored procedure QUESTION: Can a procedure PL/SQL take a variable number of arguments? In my case, the procedure is called by the submit button of a form, and the form has variable number of inputs. ANSWER: You don't mention it, but are you using mod_plsql? If so, you sho...
[ "stored-procedures", "plsql", "arguments" ]
10
9
21,481
2
0
2011-05-30T17:45:07.877000
2011-05-31T07:21:55.413000
6,179,290
6,179,694
SQL Server Equivalent to Oracle 'table of integer'
Is there a SQL Server equivalent to the Oracle concept of a 'table of integer'? If so, what is the best way to represent this object in C#? Oracle seems to provide the following: OracleParameter parameter = new OracleParameter(data.parameterName, data.databaseDataType); parameter.CollectionType = OracleCollectionType.P...
I think that what you may be looking for is a SQL Server table-valued parameter, which would map to SqlDbtype.Structured for a SqlParameter. The relevant DbType would be Object.
SQL Server Equivalent to Oracle 'table of integer' Is there a SQL Server equivalent to the Oracle concept of a 'table of integer'? If so, what is the best way to represent this object in C#? Oracle seems to provide the following: OracleParameter parameter = new OracleParameter(data.parameterName, data.databaseDataType)...
TITLE: SQL Server Equivalent to Oracle 'table of integer' QUESTION: Is there a SQL Server equivalent to the Oracle concept of a 'table of integer'? If so, what is the best way to represent this object in C#? Oracle seems to provide the following: OracleParameter parameter = new OracleParameter(data.parameterName, data...
[ "c#", ".net", "sql-server", "oracle" ]
4
3
498
1
0
2011-05-30T17:45:42.323000
2011-05-30T18:40:40.677000
6,179,295
6,179,580
Should I unify two similar kernels with an 'if' statement, risking performance loss?
I have 2 very similar kernel functions, in the sense that the code is nearly the same, but with a slight difference. Currently I have 2 options: Write 2 different methods (but very similar ones) Write a single kernel and put the code blocks that differ in an if/else statement How much will an if statement affect my alg...
You have a third alternative, which is to use C++ templating and make the variable which is used in the if/switch statement a template parameter. Instantiate each version of the kernel you need, and then you have multiple kernels doing different things with no branch divergence or conditional evaluation to worry about,...
Should I unify two similar kernels with an 'if' statement, risking performance loss? I have 2 very similar kernel functions, in the sense that the code is nearly the same, but with a slight difference. Currently I have 2 options: Write 2 different methods (but very similar ones) Write a single kernel and put the code b...
TITLE: Should I unify two similar kernels with an 'if' statement, risking performance loss? QUESTION: I have 2 very similar kernel functions, in the sense that the code is nearly the same, but with a slight difference. Currently I have 2 options: Write 2 different methods (but very similar ones) Write a single kernel ...
[ "c++", "c", "optimization", "cuda", "gpgpu" ]
36
103
10,553
2
0
2011-05-30T17:45:59.663000
2011-05-30T18:26:48.500000
6,179,305
6,242,634
Doxygen end of line comments on declarations in Python
In C/C++, you can force doxygen to recognize that a comment applies to the text preceding it on a line. Any of these: int my_variable; /*!< This is my variable */ int my_variable; /**< This is my variable */ int my_variable; //!< This is my variable int my_variable; ///< This is my variable adds the string to the docum...
No, at the moment this is not supported. The parser for Python was provided by a couple of students. While they did a good job overall, they did not implement all the features that are available for C/C++. Two most notable features that are missing are: support for documenting stuff after the definition https://bugzill...
Doxygen end of line comments on declarations in Python In C/C++, you can force doxygen to recognize that a comment applies to the text preceding it on a line. Any of these: int my_variable; /*!< This is my variable */ int my_variable; /**< This is my variable */ int my_variable; //!< This is my variable int my_variable...
TITLE: Doxygen end of line comments on declarations in Python QUESTION: In C/C++, you can force doxygen to recognize that a comment applies to the text preceding it on a line. Any of these: int my_variable; /*!< This is my variable */ int my_variable; /**< This is my variable */ int my_variable; //!< This is my variab...
[ "python", "doxygen" ]
3
8
1,735
1
0
2011-05-30T17:47:32.233000
2011-06-05T11:33:04.953000
6,179,307
6,179,814
Listen to phone state change in appWidget
My goal is to have an "airplane mode" widget on home screen so that user can toggle on/off airplane mode; the widget displays the current state of the airplane mode (on, off or in transition). In order to do this, I register to listen to phone state change on "onUpdate" callback in my appwidget provider: mTelephonyMana...
I register to listen to phone state change on "onUpdate" callback in my appwidget provider That will never be reliable, and will leak memory before it fails. An AppWidgetProvider, like any manifest-registered BroadcastReceiver, is supposed to live for a few milliseconds, long enough for onReceive() to be processed. And...
Listen to phone state change in appWidget My goal is to have an "airplane mode" widget on home screen so that user can toggle on/off airplane mode; the widget displays the current state of the airplane mode (on, off or in transition). In order to do this, I register to listen to phone state change on "onUpdate" callbac...
TITLE: Listen to phone state change in appWidget QUESTION: My goal is to have an "airplane mode" widget on home screen so that user can toggle on/off airplane mode; the widget displays the current state of the airplane mode (on, off or in transition). In order to do this, I register to listen to phone state change on ...
[ "android", "listener", "android-appwidget" ]
0
1
2,073
1
0
2011-05-30T17:47:56.793000
2011-05-30T18:55:34.810000
6,179,314
6,179,354
Casting pointers and the ternary ?: operator. Have I reinvented the wheel?
The last line of this code fails to compile with castingAndTernary.cpp:15: error: conditional expression between distinct pointer types ‘D1*’ and ‘D2*’ lacks a cast A really smart compiler could have no difficulty because both can be safely casted to B* (the base class). I'm reluctant to use static_cast and dynamic_cas...
A really smart compiler could have no difficulty because both can be safely casted to B* Irrelevant. The standard mandates this behaviour. A really smart compiler behaves as observed. The use of your custom cast is actually fine (and your reluctance for using an explicit cast is well-placed). However, I’d use a differe...
Casting pointers and the ternary ?: operator. Have I reinvented the wheel? The last line of this code fails to compile with castingAndTernary.cpp:15: error: conditional expression between distinct pointer types ‘D1*’ and ‘D2*’ lacks a cast A really smart compiler could have no difficulty because both can be safely cast...
TITLE: Casting pointers and the ternary ?: operator. Have I reinvented the wheel? QUESTION: The last line of this code fails to compile with castingAndTernary.cpp:15: error: conditional expression between distinct pointer types ‘D1*’ and ‘D2*’ lacks a cast A really smart compiler could have no difficulty because both ...
[ "c++", "casting", "ternary-operator" ]
13
10
5,566
4
0
2011-05-30T17:48:42.393000
2011-05-30T17:53:58.753000
6,179,315
6,180,316
Setting up autocompletion for Scala in JMonkey Engine
I would like to use Scala and JMonkey Engine to create a small game. It should be nothing more than a test wether the engine is fun to use. I'm new to JMonkey and therefore don't know the usual method calls. Something like autocompletion would be nice but currently even the standard Scala autocompletion doesn's work. I...
Do you have really the latest version of the Scala Plugin? It seems to work (at least for me). Just in case (it is a little bit hard to find): For Scala 2.8: http://plugins.netbeans.org/plugin/36598/nbscala-2-8-x For Scala 2.9: http://plugins.netbeans.org/plugin/38999/nbscala-2-9-x-0-9 BTW, there is a Scala 3D Engine (...
Setting up autocompletion for Scala in JMonkey Engine I would like to use Scala and JMonkey Engine to create a small game. It should be nothing more than a test wether the engine is fun to use. I'm new to JMonkey and therefore don't know the usual method calls. Something like autocompletion would be nice but currently ...
TITLE: Setting up autocompletion for Scala in JMonkey Engine QUESTION: I would like to use Scala and JMonkey Engine to create a small game. It should be nothing more than a test wether the engine is fun to use. I'm new to JMonkey and therefore don't know the usual method calls. Something like autocompletion would be n...
[ "scala", "opengl", "netbeans", "autocomplete", "jmonkeyengine" ]
2
1
487
1
0
2011-05-30T17:48:50.647000
2011-05-30T19:59:52.293000
6,179,316
6,179,747
How to get the count of all file IO system calls in Windows
How do I get the number of all file IO calls produced within the Windows-based OS (to get it working at least on XP) for all processes? Something similar to the Process Monitor, but programmatically accessible from C# (can be via C++ or C) I don't need to know the details, just the count of all calls per second, once t...
The term you're looking for is "Realtime ETW consumer" - this isn't going to work on XP though. On XP, you can get this data, but not real-time, only after recording it then decoding the log.
How to get the count of all file IO system calls in Windows How do I get the number of all file IO calls produced within the Windows-based OS (to get it working at least on XP) for all processes? Something similar to the Process Monitor, but programmatically accessible from C# (can be via C++ or C) I don't need to know...
TITLE: How to get the count of all file IO system calls in Windows QUESTION: How do I get the number of all file IO calls produced within the Windows-based OS (to get it working at least on XP) for all processes? Something similar to the Process Monitor, but programmatically accessible from C# (can be via C++ or C) I ...
[ "c#", "windows", "file-io", "system-calls", "sysinternals" ]
0
1
454
1
0
2011-05-30T17:48:55.787000
2011-05-30T18:47:41.443000
6,179,321
6,179,348
how to stop setInterval auto-refresh when page/tab is inactive?
i have a javascript to parse twitter feeds and show them in a block in my page every 30 seconds, the code is something like this: var auto_refresh = setInterval( function () { //get twitter feeds }); }, 30000); now in case the user minimized his browser or switched to another tab (page is not active) i want to disable ...
Here is the answer: Is there a way to detect if a browser window is not currently active?
how to stop setInterval auto-refresh when page/tab is inactive? i have a javascript to parse twitter feeds and show them in a block in my page every 30 seconds, the code is something like this: var auto_refresh = setInterval( function () { //get twitter feeds }); }, 30000); now in case the user minimized his browser or...
TITLE: how to stop setInterval auto-refresh when page/tab is inactive? QUESTION: i have a javascript to parse twitter feeds and show them in a block in my page every 30 seconds, the code is something like this: var auto_refresh = setInterval( function () { //get twitter feeds }); }, 30000); now in case the user minimi...
[ "javascript", "jquery", "setinterval" ]
3
3
10,825
3
0
2011-05-30T17:49:44.577000
2011-05-30T17:52:48.803000
6,179,325
6,179,640
Codeigniter checkbox array
My checkboxes look like this /> /> /> I am using array in the names so that I can populate a text field (via jquery) with the values of the checkboxes I select. I am using a script found on stackoverflow. function calculate() { var fruit = $.map($('input:checkbox:checked'), function(e, i) { return e.value; }); $('#fr...
Try without using the square brackets [], so just 'fruits'. The [] are just to say to the browser "post these values as an array, not a single value, because they're a group", but in PHP you would just approach it as any other value, viz. $_POST['fruits']. Hope that helps, All the best, NwN
Codeigniter checkbox array My checkboxes look like this /> /> /> I am using array in the names so that I can populate a text field (via jquery) with the values of the checkboxes I select. I am using a script found on stackoverflow. function calculate() { var fruit = $.map($('input:checkbox:checked'), function(e, i) { ...
TITLE: Codeigniter checkbox array QUESTION: My checkboxes look like this /> /> /> I am using array in the names so that I can populate a text field (via jquery) with the values of the checkboxes I select. I am using a script found on stackoverflow. function calculate() { var fruit = $.map($('input:checkbox:checked'),...
[ "php", "jquery", "forms", "codeigniter" ]
0
2
11,202
1
0
2011-05-30T17:50:02.970000
2011-05-30T18:33:47.080000
6,179,327
6,179,369
What exactly is happening in this piece of code?
I attempted to recreate a piece of code which is basically a minimalist Tomagatchi like thing. However when it is fed, and listened to, it's "mood" value does not change. It remains "mad". Any help would be greatly appreciated! {#Create name, hunger, boredom attributes. Hunger and Boredom are numberical attributes cla...
In _getMood, there should be elifs. if unhappiness < 5: mood = "happy" elif 5 <= unhappiness <= 10: mood = "okay" elif 11 <= unhappiness <= 15: mood = "frustrated" else: mood = "mad" Without them, it was actually only checking if unhappiness was between 11 and 15, and if not, setting the mood to mad. So unhappines from...
What exactly is happening in this piece of code? I attempted to recreate a piece of code which is basically a minimalist Tomagatchi like thing. However when it is fed, and listened to, it's "mood" value does not change. It remains "mad". Any help would be greatly appreciated! {#Create name, hunger, boredom attributes. ...
TITLE: What exactly is happening in this piece of code? QUESTION: I attempted to recreate a piece of code which is basically a minimalist Tomagatchi like thing. However when it is fed, and listened to, it's "mood" value does not change. It remains "mad". Any help would be greatly appreciated! {#Create name, hunger, bo...
[ "python", "debugging" ]
0
7
171
2
0
2011-05-30T17:50:11.317000
2011-05-30T17:56:09.030000
6,179,333
6,179,492
Running a program from the source tree
Should it generally be possible to run a program from the source directory (src) after having invoked./configure and make (but not make install )? I'm trying to fix a bug in an application and it seems unnecessary to run make install after each code change. Unfortunately I can't run the application in the source direct...
It all depends on the application and what components or files it expects to be visible and where. But assuming no required configuration or dependencies, then yes, you can run the program in-place. To add a directory to your lib search path, add to the environment variable LD_LIBRARY_PATH. Like so: LD_LIBRARY_PATH="$L...
Running a program from the source tree Should it generally be possible to run a program from the source directory (src) after having invoked./configure and make (but not make install )? I'm trying to fix a bug in an application and it seems unnecessary to run make install after each code change. Unfortunately I can't r...
TITLE: Running a program from the source tree QUESTION: Should it generally be possible to run a program from the source directory (src) after having invoked./configure and make (but not make install )? I'm trying to fix a bug in an application and it seems unnecessary to run make install after each code change. Unfor...
[ "linux", "makefile" ]
1
2
86
1
0
2011-05-30T17:50:43.377000
2011-05-30T18:13:28.147000
6,179,334
6,180,540
WCF Web API Host Project Type
I am used to creating traditional WCF services and hosting them in IIS. I do this by creating a WCF Service Application within Visual Studio. For my next project I want to leverage the functionality found in the new WCF Web API. However I am not sure what type of project I need to create to host the service. Nearly all...
For what I gathered from the samples, you can create the WCF as you have been creating, that is, a WCF Service Application in the WEB folder of Visual Studio.
WCF Web API Host Project Type I am used to creating traditional WCF services and hosting them in IIS. I do this by creating a WCF Service Application within Visual Studio. For my next project I want to leverage the functionality found in the new WCF Web API. However I am not sure what type of project I need to create t...
TITLE: WCF Web API Host Project Type QUESTION: I am used to creating traditional WCF services and hosting them in IIS. I do this by creating a WCF Service Application within Visual Studio. For my next project I want to leverage the functionality found in the new WCF Web API. However I am not sure what type of project ...
[ "visual-studio", "wcf", "wcf-web-api" ]
1
1
431
1
0
2011-05-30T17:50:47.143000
2011-05-30T20:31:50.613000
6,179,336
6,183,118
Random CGPoint x value not working
I have 22 images... 11 are (rightwall1, rightwall2, rightwall3, etc) the other 11 are (leftwall1, leftwall2, leftwall3, etc) I am placing each one ontop of the other by setting their y value to the previous walls y value plus the height of the wall (all walls are the same height). This works fine! Now, I was trying to ...
Turns out you can't get a negative integer value using arc4random (Makes sense because arc4random uses modulus.... integer...?? haha) So I use a float... can't say: (-1)*(arc4random().... You have to say: float num1; num1 = -1; (num1)*(arc4random().... Weird... Same goes for subtracting... you have to add a negative 1 ...
Random CGPoint x value not working I have 22 images... 11 are (rightwall1, rightwall2, rightwall3, etc) the other 11 are (leftwall1, leftwall2, leftwall3, etc) I am placing each one ontop of the other by setting their y value to the previous walls y value plus the height of the wall (all walls are the same height). Thi...
TITLE: Random CGPoint x value not working QUESTION: I have 22 images... 11 are (rightwall1, rightwall2, rightwall3, etc) the other 11 are (leftwall1, leftwall2, leftwall3, etc) I am placing each one ontop of the other by setting their y value to the previous walls y value plus the height of the wall (all walls are the...
[ "iphone", "cgpoint", "arc4random" ]
0
0
461
1
0
2011-05-30T17:51:01.777000
2011-05-31T04:49:39.127000
6,179,341
6,179,712
check for time duration during loop
I am using MBProgressHUD to display a progress indicator. The delegate that is called when the indicator is shown is: - (void)myTask { while (self.show_progress == NO){ } } basically when it goes out of the loop it dismisses the indicator. Now the issue is that I would like do something more in this method. I would li...
If I understand correctly, your code just waits until the property show_progress becomes NO. I don't know why your code does this, it seems a little inelegant. If you want to keep it this way, at least use a condition lock to prevent the 100% CPU usage: Prepare the condition lock like this: NSConditionLock *progressLoc...
check for time duration during loop I am using MBProgressHUD to display a progress indicator. The delegate that is called when the indicator is shown is: - (void)myTask { while (self.show_progress == NO){ } } basically when it goes out of the loop it dismisses the indicator. Now the issue is that I would like do somet...
TITLE: check for time duration during loop QUESTION: I am using MBProgressHUD to display a progress indicator. The delegate that is called when the indicator is shown is: - (void)myTask { while (self.show_progress == NO){ } } basically when it goes out of the loop it dismisses the indicator. Now the issue is that I w...
[ "iphone", "objective-c" ]
0
0
191
3
0
2011-05-30T17:51:44.620000
2011-05-30T18:42:45.243000
6,179,346
6,179,982
ms-access EXISTS query to remove rows
i need to remove data from a table. here is what the data looks like (the first two columns): alex hub liza fds harry ok lena yyy liza ok i need a query that will remove all rows on the following condition: if the second column contains "ok" then remove all the rows that contain that name. so the resulting data set wou...
DELETE FROM Table1 AS t1 WHERE Exists ( SELECT t2.column1 FROM Table1 AS t2 WHERE t2.column2 = "ok" And t2.column1 = t1.column1);
ms-access EXISTS query to remove rows i need to remove data from a table. here is what the data looks like (the first two columns): alex hub liza fds harry ok lena yyy liza ok i need a query that will remove all rows on the following condition: if the second column contains "ok" then remove all the rows that contain th...
TITLE: ms-access EXISTS query to remove rows QUESTION: i need to remove data from a table. here is what the data looks like (the first two columns): alex hub liza fds harry ok lena yyy liza ok i need a query that will remove all rows on the following condition: if the second column contains "ok" then remove all the ro...
[ "sql", "ms-access" ]
1
3
3,649
2
0
2011-05-30T17:52:35.343000
2011-05-30T19:18:17.423000
6,179,347
6,179,591
UIButton Long Press Event
I want to emulate a long a press button, how can I do this? I think a timer is needed. I see UILongPressGestureRecognizer but how can I utilize this type?
You can start off by creating and attaching the UILongPressGestureRecognizer instance to the button. UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)]; [self.button addGestureRecognizer:longPress]; [longPress release]; And then implement th...
UIButton Long Press Event I want to emulate a long a press button, how can I do this? I think a timer is needed. I see UILongPressGestureRecognizer but how can I utilize this type?
TITLE: UIButton Long Press Event QUESTION: I want to emulate a long a press button, how can I do this? I think a timer is needed. I see UILongPressGestureRecognizer but how can I utilize this type? ANSWER: You can start off by creating and attaching the UILongPressGestureRecognizer instance to the button. UILongPress...
[ "ios", "objective-c", "uibutton", "long-press" ]
89
161
75,977
9
0
2011-05-30T17:52:40.450000
2011-05-30T18:27:38.813000
6,179,352
6,179,385
In App Email View doesn't close - iPhone OS 4
I am having difficulties adding the ability for a user to send a support email to myself (the maker of said app). I have gotten it work almost perfectly however the view doesn't close when you click cancel, or when you click send. Thanks for the help! Here is the code: MFMailComposeViewController *mail = [[[MFMailCompo...
You're setting self to be the MFMailComposeViewController's delegate. In mailComposeController:didFinishWithResult:error: be sure to call [self dismissModalViewControllerAnimated:YES]; like so: - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(...
In App Email View doesn't close - iPhone OS 4 I am having difficulties adding the ability for a user to send a support email to myself (the maker of said app). I have gotten it work almost perfectly however the view doesn't close when you click cancel, or when you click send. Thanks for the help! Here is the code: MFMa...
TITLE: In App Email View doesn't close - iPhone OS 4 QUESTION: I am having difficulties adding the ability for a user to send a support email to myself (the maker of said app). I have gotten it work almost perfectly however the view doesn't close when you click cancel, or when you click send. Thanks for the help! Here...
[ "iphone", "mfmailcomposeviewcontroller" ]
1
3
232
2
0
2011-05-30T17:53:29.590000
2011-05-30T17:57:31.887000
6,179,376
6,179,407
Can we resize a QR-Code?
Does anyone know if we can resize a QR-Code easily by using a proper vector program OR, is the size information contained on that code, hence, we will not be able to resize without changing the code? Thanks in advance.
You can resize as much as you want. The information is encoded in the pattern of the data, not in the size of the dots themselves. As long as a scanner can resolve properly between light/dark, the QR code should be readable at any size.
Can we resize a QR-Code? Does anyone know if we can resize a QR-Code easily by using a proper vector program OR, is the size information contained on that code, hence, we will not be able to resize without changing the code? Thanks in advance.
TITLE: Can we resize a QR-Code? QUESTION: Does anyone know if we can resize a QR-Code easily by using a proper vector program OR, is the size information contained on that code, hence, we will not be able to resize without changing the code? Thanks in advance. ANSWER: You can resize as much as you want. The informati...
[ "resize", "qr-code" ]
7
17
26,324
5
0
2011-05-30T17:56:58.857000
2011-05-30T18:00:30.183000
6,179,378
6,180,510
How can I set a many-to-many EntityCollection in Entity Framework efficiently?
When Entity Framework generates an ObjectContext for a two database tables (let's say Table1 and Table2) connected with a many-to-many relationship table, it doesn't create an object for the xref table, opting instead for collection properties on either end of the relationship. So on Table1 you have EntityCollection Ta...
No EF will not defer any query execution. There is nothing like insert from select. Linq-to-entities is just query language and responsibility of query is to execute. It is strictly separated from persistence functionality offered by EF itself. If you want to create relations between existing item from table1 and exiti...
How can I set a many-to-many EntityCollection in Entity Framework efficiently? When Entity Framework generates an ObjectContext for a two database tables (let's say Table1 and Table2) connected with a many-to-many relationship table, it doesn't create an object for the xref table, opting instead for collection properti...
TITLE: How can I set a many-to-many EntityCollection in Entity Framework efficiently? QUESTION: When Entity Framework generates an ObjectContext for a two database tables (let's say Table1 and Table2) connected with a many-to-many relationship table, it doesn't create an object for the xref table, opting instead for c...
[ "entity-framework-4", "linq-to-entities", "many-to-many", "entitycollection", "addrange" ]
2
2
729
1
0
2011-05-30T17:57:04.950000
2011-05-30T20:27:47.363000
6,179,382
6,179,567
Get directory name from path in Smarty only
I cannot assign my own PHP function. (I just have access to the TPL file). So far I got {$smarty.server.PHP_SELF}, which returns something like /foo/bar.xin. With built in functions, I'd like to get /foo/.
As I noted, {php} tags are deprecated, but you can do the following: {php} $php_self = $_SERVER['PHP_SELF']; $path = substr($php_self, 0, strrpos($php_self, '/')); // assign a variable to Smarty $this->assign('path',$path); {/php} Path: {$path} I haven't been able to test this, since I don't have a parser at my disposa...
Get directory name from path in Smarty only I cannot assign my own PHP function. (I just have access to the TPL file). So far I got {$smarty.server.PHP_SELF}, which returns something like /foo/bar.xin. With built in functions, I'd like to get /foo/.
TITLE: Get directory name from path in Smarty only QUESTION: I cannot assign my own PHP function. (I just have access to the TPL file). So far I got {$smarty.server.PHP_SELF}, which returns something like /foo/bar.xin. With built in functions, I'd like to get /foo/. ANSWER: As I noted, {php} tags are deprecated, but ...
[ "php", "directory", "smarty" ]
0
1
1,880
3
0
2011-05-30T17:57:18.060000
2011-05-30T18:25:07.800000
6,179,383
6,179,470
Ad Hoc Distribution Devices - per app or per developer?
Apple says I can register up to 100 devices to distribute an application. Is it 100 per app or 100 per developer?
This is per development account. Apple allows you to register up to 100 device in your development portal as test devices. When distributing Ad Hoc apps, you use an Ad Hoc provisioning profile, which contains, among other things, a list of devices on which it can be installed. This list comes from your list of 100 devi...
Ad Hoc Distribution Devices - per app or per developer? Apple says I can register up to 100 devices to distribute an application. Is it 100 per app or 100 per developer?
TITLE: Ad Hoc Distribution Devices - per app or per developer? QUESTION: Apple says I can register up to 100 devices to distribute an application. Is it 100 per app or 100 per developer? ANSWER: This is per development account. Apple allows you to register up to 100 device in your development portal as test devices. ...
[ "ios", "ad-hoc-distribution" ]
0
1
617
1
0
2011-05-30T17:57:22.650000
2011-05-30T18:10:11.283000
6,179,384
6,179,428
EditText in onDraw()
I am aware of how to add EditText but not in the onDraw() function. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(new GaugeAnimation((this),10)); EditText...
When you construct your GaugeAnimation view, make sure it calls setId(R.id.input) for the EditText view you want to use for input. Then your first method will work. You should be aware that you should not make updates to UI elements from a view's onDraw method like you tried.
EditText in onDraw() I am aware of how to add EditText but not in the onDraw() function. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(new GaugeAnimation((...
TITLE: EditText in onDraw() QUESTION: I am aware of how to add EditText but not in the onDraw() function. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(ne...
[ "android", "android-edittext", "ondraw" ]
2
0
1,094
2
0
2011-05-30T17:57:30.960000
2011-05-30T18:04:22.060000
6,179,392
6,179,529
AudioTrack in streaming mode MODE_STREAMING
I need to stream PCM data generated at runtime. So I have a thread with a loop public void run() { while(...) { mAudioTrack.write(getPCM(),...); } } Unfortunately this doesn't work. It seems it doesn't depend on AudioTrack buffer size. I want it to be very small to simulate sort of low latency behaviour (150 ms) so the...
Here is short example that works for me: public class Internal extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } public void onPlayClicked(View v) { start(); } public void onStopClicked(View v) { stop(); } boolean m_...
AudioTrack in streaming mode MODE_STREAMING I need to stream PCM data generated at runtime. So I have a thread with a loop public void run() { while(...) { mAudioTrack.write(getPCM(),...); } } Unfortunately this doesn't work. It seems it doesn't depend on AudioTrack buffer size. I want it to be very small to simulate s...
TITLE: AudioTrack in streaming mode MODE_STREAMING QUESTION: I need to stream PCM data generated at runtime. So I have a thread with a loop public void run() { while(...) { mAudioTrack.write(getPCM(),...); } } Unfortunately this doesn't work. It seems it doesn't depend on AudioTrack buffer size. I want it to be very s...
[ "java", "android", "audio" ]
10
16
17,608
1
0
2011-05-30T17:58:34.850000
2011-05-30T18:18:57.017000
6,179,397
6,179,464
facebook connect api static url
Is there a way to use the facebook connect api in a static way? When we use the facebook php sdk the link or button to login to facebook is something like https://www.facebook.com/dialog/oauth.................. what I want is to eliminate the include of the php sdk on every page, because it will cause some extra proces...
just load the sdk and do something like: echo ' Connect to Facebook '; that url will always be valid for a logged out user
facebook connect api static url Is there a way to use the facebook connect api in a static way? When we use the facebook php sdk the link or button to login to facebook is something like https://www.facebook.com/dialog/oauth.................. what I want is to eliminate the include of the php sdk on every page, because...
TITLE: facebook connect api static url QUESTION: Is there a way to use the facebook connect api in a static way? When we use the facebook php sdk the link or button to login to facebook is something like https://www.facebook.com/dialog/oauth.................. what I want is to eliminate the include of the php sdk on e...
[ "php", "facebook", "facebook-php-sdk" ]
3
0
986
3
0
2011-05-30T17:59:39.400000
2011-05-30T18:08:47.540000
6,179,425
6,179,473
How to put a <a> link inside a <span> that is in a <a>?
Here my code text link my link here destroy everything I use Poshy here script $('.link').each(function() { var tooltip = $(".hidden-tooltip-data",this).html(); $(this).attr("title",""); $(this).poshytip({ content: function(updateCallback) { return tooltip; } }); });
Nested links are illegal. This case is explicitly mentioned in the HTML 4.01 Specification.
How to put a <a> link inside a <span> that is in a <a>? Here my code text link my link here destroy everything I use Poshy here script $('.link').each(function() { var tooltip = $(".hidden-tooltip-data",this).html(); $(this).attr("title",""); $(this).poshytip({ content: function(updateCallback) { return tooltip; } }); ...
TITLE: How to put a <a> link inside a <span> that is in a <a>? QUESTION: Here my code text link my link here destroy everything I use Poshy here script $('.link').each(function() { var tooltip = $(".hidden-tooltip-data",this).html(); $(this).attr("title",""); $(this).poshytip({ content: function(updateCallback) { retu...
[ "jquery", "hyperlink", "href", "html" ]
1
4
9,414
4
0
2011-05-30T18:03:28.987000
2011-05-30T18:10:34.327000
6,179,427
6,179,509
Objective-C get a class property from string
I've heard a number of similar questions for other languages, but I'm looking for a specific scenario. My app has a Core Data model called "Record", which has a number of columns/properties like "date, column1 and column2". To keep the programming clean so I can adapt my app to multiple scenarios, input fields are mapp...
The Key Value Coding mechanism allows you to interact with a class's properties using string representations of the property names. So, for example, if your Record class has a property called column1, you can access that property as follows: NSString* dataToGet = @"column1"; id value = [myRecord valueForKey:dataToGet];...
Objective-C get a class property from string I've heard a number of similar questions for other languages, but I'm looking for a specific scenario. My app has a Core Data model called "Record", which has a number of columns/properties like "date, column1 and column2". To keep the programming clean so I can adapt my app...
TITLE: Objective-C get a class property from string QUESTION: I've heard a number of similar questions for other languages, but I'm looking for a specific scenario. My app has a Core Data model called "Record", which has a number of columns/properties like "date, column1 and column2". To keep the programming clean so ...
[ "ios", "objective-c", "class", "properties" ]
30
83
18,432
1
0
2011-05-30T18:04:21.353000
2011-05-30T18:16:26.163000
6,179,429
6,230,845
Debain package won't build as it's claiming it can't find any of the modules
I'm building an application with "Quickly" a tool provided by Ubuntu, however the generated app won't build. I get this output while running "quickly package --verbose": ERROR: Python module one_click_installer_lib not found ERROR: Python module PleasewaitdialogDialog not found ERROR: Python module one_click_installerc...
I ignored it and checking the source, seems to have worked.... strange:G
Debain package won't build as it's claiming it can't find any of the modules I'm building an application with "Quickly" a tool provided by Ubuntu, however the generated app won't build. I get this output while running "quickly package --verbose": ERROR: Python module one_click_installer_lib not found ERROR: Python modu...
TITLE: Debain package won't build as it's claiming it can't find any of the modules QUESTION: I'm building an application with "Quickly" a tool provided by Ubuntu, however the generated app won't build. I get this output while running "quickly package --verbose": ERROR: Python module one_click_installer_lib not found ...
[ "ubuntu", "debian", "packaging" ]
0
0
144
1
0
2011-05-30T18:04:36.497000
2011-06-03T17:58:07.197000
6,179,446
6,181,880
Debugging Dll's in Delphi in BPG
I am debugging a bpg with multiple dll's. Can someone tell me why my breakpoints, that DO work, eventually stop working? The only way to get them back is to do a build all in my project group file (BPG file in Delphi 6)? I have looked at several other posts, but have not had much luck getting an answer to this specific...
In Delphi 6, such a failure to find debug information (all the blue lines are gone from your sources) that is solved by a complete rebuild is usually a symptom that you have to examine your project (.dpr) settings. For each project (dll or exe) make sure a different unique compiler output folder (DCU output folder) is ...
Debugging Dll's in Delphi in BPG I am debugging a bpg with multiple dll's. Can someone tell me why my breakpoints, that DO work, eventually stop working? The only way to get them back is to do a build all in my project group file (BPG file in Delphi 6)? I have looked at several other posts, but have not had much luck g...
TITLE: Debugging Dll's in Delphi in BPG QUESTION: I am debugging a bpg with multiple dll's. Can someone tell me why my breakpoints, that DO work, eventually stop working? The only way to get them back is to do a build all in my project group file (BPG file in Delphi 6)? I have looked at several other posts, but have n...
[ "delphi", "debugging", "dll" ]
0
1
530
1
0
2011-05-30T18:06:25.923000
2011-05-31T00:38:49.273000
6,179,449
6,180,017
(Android) Threaded httpClient task, without blocking UI?
I've made an application that Fetches a Webpage from the internet, based on user input, wich worked. The fetching goes in different steps: post with String from edittext as parameter, after some parsing this returns an Array of names wich are displayed in an AlertDialog. When the user picks one, it makes another post w...
For each of your HTTP accesses, you can create a separate AsyncTask subclass, then instantiate each one of them in turn, and execute them. On the web there are many examples on how to use AsyncTask to access HTTP, e.g. here or here (just google for something like this ). The main idea to grasp there, is to do all the n...
(Android) Threaded httpClient task, without blocking UI? I've made an application that Fetches a Webpage from the internet, based on user input, wich worked. The fetching goes in different steps: post with String from edittext as parameter, after some parsing this returns an Array of names wich are displayed in an Aler...
TITLE: (Android) Threaded httpClient task, without blocking UI? QUESTION: I've made an application that Fetches a Webpage from the internet, based on user input, wich worked. The fetching goes in different steps: post with String from edittext as parameter, after some parsing this returns an Array of names wich are di...
[ "android", "multithreading", "httpclient", "android-asynctask", "fetch" ]
1
2
2,100
2
0
2011-05-30T18:06:40.910000
2011-05-30T19:23:00.090000
6,179,450
6,179,728
Is there a way to recover the common name of a client certificate from java code in a 2 way ssl connection?
We have a weblogic server configured to require a client certificate on stablishing a ssl connection with client for a web service solution. The ssl handshake works perfectly as we have already configured all that is required. Now, after the connection we do receive a soap request where the client id is one of the fiel...
The client's certificate can be read from the incoming Servlet request using the HttpServletRequest.getAttribute(String) method invocation. The attribute with name javax.servlet.request.X509Certificate is populated by the servlet container when it creates an instance of the Request object for processing by the servlet/...
Is there a way to recover the common name of a client certificate from java code in a 2 way ssl connection? We have a weblogic server configured to require a client certificate on stablishing a ssl connection with client for a web service solution. The ssl handshake works perfectly as we have already configured all tha...
TITLE: Is there a way to recover the common name of a client certificate from java code in a 2 way ssl connection? QUESTION: We have a weblogic server configured to require a client certificate on stablishing a ssl connection with client for a web service solution. The ssl handshake works perfectly as we have already ...
[ "java", "soap", "ssl", "weblogic" ]
1
6
3,434
1
0
2011-05-30T18:06:43.280000
2011-05-30T18:45:00.987000
6,179,454
6,179,478
Assumptions in Mathematica's NullSpace Command for Symbolic Matrices
When executing Mathematica's NullSpace command on a symbolic matrix, Mathematica makes some assumptions about the variables and I would like to know what they are. For example, In[1]:= NullSpace[{{a, b}, {c, d}}] Out[1]= {} but the unstated assumption is that a d!= b c. How can I determine what assumptions the NullSpa...
The underlying assumptions, so to speak, are enforced by internal uses of PossibleZeroQ. If that function cannot deem an expression to be zero then it will be regarded as nonzero, hence eligible for use as a pivot in row reduction (which is generally what is used for symbolic NullSpace). ---edit--- The question was rai...
Assumptions in Mathematica's NullSpace Command for Symbolic Matrices When executing Mathematica's NullSpace command on a symbolic matrix, Mathematica makes some assumptions about the variables and I would like to know what they are. For example, In[1]:= NullSpace[{{a, b}, {c, d}}] Out[1]= {} but the unstated assumptio...
TITLE: Assumptions in Mathematica's NullSpace Command for Symbolic Matrices QUESTION: When executing Mathematica's NullSpace command on a symbolic matrix, Mathematica makes some assumptions about the variables and I would like to know what they are. For example, In[1]:= NullSpace[{{a, b}, {c, d}}] Out[1]= {} but the ...
[ "math", "matrix", "wolfram-mathematica", "linear-algebra" ]
8
13
1,122
2
0
2011-05-30T18:07:19.683000
2011-05-30T18:11:14.340000
6,179,459
6,179,665
Incrementing `static int` causes SIGSEGV SEGV_ACCERR
I'm debugging a crash reported as: Exception Type: SIGSEGV Exception Codes: SEGV_ACCERR The crash is happening on the line that does numberOfFails++. The app uses ASIHTTP. I personally much prefer using NSURLConnection. I'd never automatically repeat a request for NSURLConnection if it failed because I've never seen it...
The problem likely has nothing to do with your static variable. Does requestFailed: execute on the main thread, or in a background thread? If it's on a background thread, you'll need to use performSelectorOnMainThread:withObject:. If it's on the main thread, you may need to take a pass through the runloop before execut...
Incrementing `static int` causes SIGSEGV SEGV_ACCERR I'm debugging a crash reported as: Exception Type: SIGSEGV Exception Codes: SEGV_ACCERR The crash is happening on the line that does numberOfFails++. The app uses ASIHTTP. I personally much prefer using NSURLConnection. I'd never automatically repeat a request for NS...
TITLE: Incrementing `static int` causes SIGSEGV SEGV_ACCERR QUESTION: I'm debugging a crash reported as: Exception Type: SIGSEGV Exception Codes: SEGV_ACCERR The crash is happening on the line that does numberOfFails++. The app uses ASIHTTP. I personally much prefer using NSURLConnection. I'd never automatically repea...
[ "iphone", "objective-c", "ios", "crash", "segmentation-fault" ]
1
3
2,944
1
0
2011-05-30T18:08:01.297000
2011-05-30T18:37:28.830000
6,179,469
6,179,634
Erlang: Can this be done without lists:reverse?
I am a beginner learning Erlang. After reading about list comprehensions and recursion in Erlang, I wanted to try to implement my own map function, which turned out like this: % Map: Map all elements in a list by a function map(List,Fun) -> map(List,Fun,[]). map([],_,Acc) -> lists:reverse(Acc); map([H|T],Fun,Acc) -> ma...
In oder to understand why accumulating and reversing is quite fast you have to understand how lists are build in Erlang. Erlangs lists like those in Lisp are build out of cons cells (look at the picture in the link). In a singly linked list like the Erlang lists it is very cheap to prepend a element (or a short list). ...
Erlang: Can this be done without lists:reverse? I am a beginner learning Erlang. After reading about list comprehensions and recursion in Erlang, I wanted to try to implement my own map function, which turned out like this: % Map: Map all elements in a list by a function map(List,Fun) -> map(List,Fun,[]). map([],_,Acc)...
TITLE: Erlang: Can this be done without lists:reverse? QUESTION: I am a beginner learning Erlang. After reading about list comprehensions and recursion in Erlang, I wanted to try to implement my own map function, which turned out like this: % Map: Map all elements in a list by a function map(List,Fun) -> map(List,Fun,...
[ "erlang", "tail-recursion" ]
7
21
4,310
2
0
2011-05-30T18:09:45.900000
2011-05-30T18:32:53.347000
6,179,471
6,179,779
Work_dim in NDRange
I can not understand what work_dim is for in clEnqueueNDRangeKernel()? So, what is the difference between work_dim=1 and work_dim=2? And why work items are grouped into work groups? A work item or a work group is a thread running on the device (or neither)? Thanks ahead!
work_dim is the number of dimensions for the clEnqueueNDRangeKernel() execution. If you specify work_dim = 1, then the global and local work sizes are unidimensional. Thus, inside the kernels you can only access info in the first dimension, e.g. get_global_id(0), etc. If you specify work_dim = 2 or 3, then you must als...
Work_dim in NDRange I can not understand what work_dim is for in clEnqueueNDRangeKernel()? So, what is the difference between work_dim=1 and work_dim=2? And why work items are grouped into work groups? A work item or a work group is a thread running on the device (or neither)? Thanks ahead!
TITLE: Work_dim in NDRange QUESTION: I can not understand what work_dim is for in clEnqueueNDRangeKernel()? So, what is the difference between work_dim=1 and work_dim=2? And why work items are grouped into work groups? A work item or a work group is a thread running on the device (or neither)? Thanks ahead! ANSWER: w...
[ "opencl" ]
7
18
6,084
1
0
2011-05-30T18:10:13.550000
2011-05-30T18:50:48.923000
6,179,474
6,179,530
Why I need to set the margin of a div to a negative value when its siblings take positive value to position themselves to the top?
I set the margin of div#hdesign to margin:0px 250px to put it to the top..To set div#hTestimonial to the Top, it takes negative values like margin:-200px 300px; Why is this the case when both are sibllings of the same parent? Slicing RamblingSoul A Free CSS Template From RamblingSoul Great Design Guaranteed Client Test...
Element #hdesign gets aligned to the top because of {position: absolute; top: 0;}. It doesn't really need the margin-top: 0 (given in shorthand). Element #hTestimonial on the other hand is a statically positioned element, and so in the normal rendering flow. Thus any content rendered before it (that's not positioned fi...
Why I need to set the margin of a div to a negative value when its siblings take positive value to position themselves to the top? I set the margin of div#hdesign to margin:0px 250px to put it to the top..To set div#hTestimonial to the Top, it takes negative values like margin:-200px 300px; Why is this the case when bo...
TITLE: Why I need to set the margin of a div to a negative value when its siblings take positive value to position themselves to the top? QUESTION: I set the margin of div#hdesign to margin:0px 250px to put it to the top..To set div#hTestimonial to the Top, it takes negative values like margin:-200px 300px; Why is thi...
[ "html", "css" ]
1
4
122
1
0
2011-05-30T18:10:42.530000
2011-05-30T18:19:00.857000
6,179,481
6,231,725
AudioStreamBasicDescription for mp3
I have an Audio Queue working to record PCM, but I cannot get it to work for mp3. When I change the mFormatID to kAudioFormatMPEGLayer3, my callback function is never fired. I am using the example from the documentation.
The mp3 encoder is not bundled in iOS as far as I know as it's a patented algorithm. You can only decode (playback) mp3 audio. Consider using ffmpeg or some other encoder on the server side to transform the audio to mp3. Or get LAME (mp3 encoder) as listed in this answer.
AudioStreamBasicDescription for mp3 I have an Audio Queue working to record PCM, but I cannot get it to work for mp3. When I change the mFormatID to kAudioFormatMPEGLayer3, my callback function is never fired. I am using the example from the documentation.
TITLE: AudioStreamBasicDescription for mp3 QUESTION: I have an Audio Queue working to record PCM, but I cannot get it to work for mp3. When I change the mFormatID to kAudioFormatMPEGLayer3, my callback function is never fired. I am using the example from the documentation. ANSWER: The mp3 encoder is not bundled in iO...
[ "iphone", "core-audio", "audioqueue" ]
2
4
2,045
2
0
2011-05-30T18:11:27.197000
2011-06-03T19:27:39.710000
6,179,486
6,179,497
Linked-Lists Bubble Sort
I am wondering how to implement a bubble sort on a singly-linked list. Let's say for example that we have list that consists of following nodes: struct node { int value; struct node* next; } I believe that there are 2 ways to acomplish this: 1)to directly exchange `values` in memory 2)to change `nexts`, to point to a d...
Your values are very small, so I expect exchanging them to be more efficient than changing the pointer structure. As always, you will have to measure the actual performance in your use case to be sure.
Linked-Lists Bubble Sort I am wondering how to implement a bubble sort on a singly-linked list. Let's say for example that we have list that consists of following nodes: struct node { int value; struct node* next; } I believe that there are 2 ways to acomplish this: 1)to directly exchange `values` in memory 2)to change...
TITLE: Linked-Lists Bubble Sort QUESTION: I am wondering how to implement a bubble sort on a singly-linked list. Let's say for example that we have list that consists of following nodes: struct node { int value; struct node* next; } I believe that there are 2 ways to acomplish this: 1)to directly exchange `values` in ...
[ "c", "list", "sorting" ]
0
3
855
2
0
2011-05-30T18:12:12.873000
2011-05-30T18:14:25.793000
6,179,499
6,179,517
How to send the 'ctrl+end' key to <textarea> element so the cursor lands after last character
(send: that is to emulate typing these keys as user would normally do it) I know this metod element.value = element.value, but I think it might be slow for textareas that have huge amount of data in them, like wikis etc.
Check this SO question: Javascript: Move caret to last character
How to send the 'ctrl+end' key to <textarea> element so the cursor lands after last character (send: that is to emulate typing these keys as user would normally do it) I know this metod element.value = element.value, but I think it might be slow for textareas that have huge amount of data in them, like wikis etc.
TITLE: How to send the 'ctrl+end' key to <textarea> element so the cursor lands after last character QUESTION: (send: that is to emulate typing these keys as user would normally do it) I know this metod element.value = element.value, but I think it might be slow for textareas that have huge amount of data in them, lik...
[ "javascript" ]
0
2
865
1
0
2011-05-30T18:14:57.443000
2011-05-30T18:16:57.047000
6,179,504
6,179,852
The way to calculate Bitmap size?
I'm trying to find the size of my image but not to load into memory. I use the flowing code BitmapFactory.Options o = new BitmapFactory.Options(); o.inJustDecodeBounds = true; BitmapFactory.decodeResource(a.getResources(), R.drawable.icon, o); int width1 = o.outWidt; int height1 = o.outHeight; Now, I make some comparis...
I'm almost certain this is because referencing that image from resources with decode the image comes pre scaled for density. Checkout #1 here on the docs: http://developer.android.com/guide/practices/screens_support.html#DensityConsiderations
The way to calculate Bitmap size? I'm trying to find the size of my image but not to load into memory. I use the flowing code BitmapFactory.Options o = new BitmapFactory.Options(); o.inJustDecodeBounds = true; BitmapFactory.decodeResource(a.getResources(), R.drawable.icon, o); int width1 = o.outWidt; int height1 = o.ou...
TITLE: The way to calculate Bitmap size? QUESTION: I'm trying to find the size of my image but not to load into memory. I use the flowing code BitmapFactory.Options o = new BitmapFactory.Options(); o.inJustDecodeBounds = true; BitmapFactory.decodeResource(a.getResources(), R.drawable.icon, o); int width1 = o.outWidt; ...
[ "android" ]
2
1
1,186
2
0
2011-05-30T18:15:28.647000
2011-05-30T19:01:12.720000
6,179,514
6,184,350
mouse events on bounding box of svg path
I am interested in mouseover, mouseout, click events on boundingbox of a svg path. E.g., given this code: the circle changes fill color when you mouse in and out of it, whereas I would like it to change color if you mouse in and out of its bounding box. I already tried below, and it doesn't work: I am not interested in...
You could also use pointer-events="boundingBox" (see SVG Tiny 1.2 ) on the path element to get the mouse events detected on the boundingbox instead of on the path itself. The boundingBox keyword is supported in Opera, but so far not in the other browsers AFAIK. To make it work everywhere the most common solution is to ...
mouse events on bounding box of svg path I am interested in mouseover, mouseout, click events on boundingbox of a svg path. E.g., given this code: the circle changes fill color when you mouse in and out of it, whereas I would like it to change color if you mouse in and out of its bounding box. I already tried below, an...
TITLE: mouse events on bounding box of svg path QUESTION: I am interested in mouseover, mouseout, click events on boundingbox of a svg path. E.g., given this code: the circle changes fill color when you mouse in and out of it, whereas I would like it to change color if you mouse in and out of its bounding box. I alrea...
[ "svg" ]
6
9
5,316
2
0
2011-05-30T18:16:49.067000
2011-05-31T07:36:02.410000
6,179,534
6,179,670
Add a button to hide keyboard
On a UITextView to hide the keyboard, there is the method:... textfield.returnKeyType = UIReturnKeyDone; textfield.delegate = self;.... -(BOOL)textFieldShouldReturn:(UITextField *)textField { [textField resignFirstResponder]; return YES; } but if I want to leave the button "done" to the "return" and add a button to h...
You can assign a toolbar with a button that dismisses the keyboard as the text field's inputAccessoryView. A quick example would be, UIBarButtonItem *barButton = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:textField action:@selector(resignFirstResponder)] autorelease]; UIToolb...
Add a button to hide keyboard On a UITextView to hide the keyboard, there is the method:... textfield.returnKeyType = UIReturnKeyDone; textfield.delegate = self;.... -(BOOL)textFieldShouldReturn:(UITextField *)textField { [textField resignFirstResponder]; return YES; } but if I want to leave the button "done" to the ...
TITLE: Add a button to hide keyboard QUESTION: On a UITextView to hide the keyboard, there is the method:... textfield.returnKeyType = UIReturnKeyDone; textfield.delegate = self;.... -(BOOL)textFieldShouldReturn:(UITextField *)textField { [textField resignFirstResponder]; return YES; } but if I want to leave the but...
[ "ios", "cocoa-touch", "keyboard", "uitextview" ]
17
38
29,723
3
0
2011-05-30T18:20:11.220000
2011-05-30T18:38:00.357000
6,179,537
6,179,750
Python wait x secs for a key and continue execution if not pressed
I'm looking for a code snippet/sample which performs the following: Display a message like "Press any key to configure or wait X seconds to continue" Wait, for example, 5 seconds and continue execution, or enter a configure() subroutine if a key is pressed.
If you're on Unix/Linux then the select module will help you. import sys from select import select print "Press any key to configure or wait 5 seconds..." timeout = 5 rlist, wlist, xlist = select([sys.stdin], [], [], timeout) if rlist: print "Config selected..." else: print "Timed out..." If you're on Windows, then l...
Python wait x secs for a key and continue execution if not pressed I'm looking for a code snippet/sample which performs the following: Display a message like "Press any key to configure or wait X seconds to continue" Wait, for example, 5 seconds and continue execution, or enter a configure() subroutine if a key is pres...
TITLE: Python wait x secs for a key and continue execution if not pressed QUESTION: I'm looking for a code snippet/sample which performs the following: Display a message like "Press any key to configure or wait X seconds to continue" Wait, for example, 5 seconds and continue execution, or enter a configure() subroutin...
[ "python", "wait" ]
13
25
18,160
5
0
2011-05-30T18:20:25.537000
2011-05-30T18:47:51.390000
6,179,540
6,179,601
jQuery class selector performance (confused)
So is $('table.selectable td.capable input:text') preferable to $('table.selectable td input:text')? In other words, does specifying a class speed up or slow down the selection (assuming it isn't absolutely required in this scenario)?
I did not check the Sizzle implementation, but in the best case, td would map to something like getElementsByTagName() and.capable to something like getElementsByClassName(), if available. So both would be comparable in terms of speed. However, there is no getElementsByTagNameAndClassName() method as far as I know, so ...
jQuery class selector performance (confused) So is $('table.selectable td.capable input:text') preferable to $('table.selectable td input:text')? In other words, does specifying a class speed up or slow down the selection (assuming it isn't absolutely required in this scenario)?
TITLE: jQuery class selector performance (confused) QUESTION: So is $('table.selectable td.capable input:text') preferable to $('table.selectable td input:text')? In other words, does specifying a class speed up or slow down the selection (assuming it isn't absolutely required in this scenario)? ANSWER: I did not che...
[ "jquery", "performance", "jquery-selectors" ]
10
3
570
3
0
2011-05-30T18:20:57.763000
2011-05-30T18:28:44.773000
6,179,543
6,181,974
IIS7.5 on Windows Server 2008 R2 (VPS) - Error 400 on POST Request
I have a new VPS server running 2008 R2 and IIS 7.5. Some client software (not browser) communicates with a server application (ASP.NET) via HTTP GET and POST requests. On IIS7.5 the HTTP POST requests are rejected with the error: "HTTP Error 400 - Request is badly formed" The same application works with no issues on I...
The problem is your Accept-Encoding: header. The last two Content-Codings are not valid: application/octet-stream application/x-www-form-urlencoded According to IANA's permissiable Content-Coding values you can only use: compress deflate exi gzip indentity pack200-gzip Hypertext Transfer Protocol (HTTP) Parameters - IA...
IIS7.5 on Windows Server 2008 R2 (VPS) - Error 400 on POST Request I have a new VPS server running 2008 R2 and IIS 7.5. Some client software (not browser) communicates with a server application (ASP.NET) via HTTP GET and POST requests. On IIS7.5 the HTTP POST requests are rejected with the error: "HTTP Error 400 - Requ...
TITLE: IIS7.5 on Windows Server 2008 R2 (VPS) - Error 400 on POST Request QUESTION: I have a new VPS server running 2008 R2 and IIS 7.5. Some client software (not browser) communicates with a server application (ASP.NET) via HTTP GET and POST requests. On IIS7.5 the HTTP POST requests are rejected with the error: "HTT...
[ "asp.net", "iis", "iis-7", "iis-7.5" ]
2
1
2,498
1
0
2011-05-30T18:21:16.843000
2011-05-31T01:02:01.013000
6,179,549
6,179,651
Single Chars of an ID to String
Following code-snippet: unsigned char * get_id(unsigned char *buffer) { unsigned int i; for(i=0; i<8;i++) buffer[i] = read_byte(); // Returns uint8_t return buffer; } At the end i have a 64-bit ID. I would like to call get_id() and to print the return value(ID) with printf. How do I do that? My solution is: unsigned ...
Just print it as a 64-bit integer. You won't even need to byteswap anything. #include #include #include union { uint8_t buf[8]; uint64_t val; } buffer; uint8_t *ptr = get_id(buffer.buf); assert(ptr && "should get id"); printf("ID = %"PRIx64"\n", buffer.val);
Single Chars of an ID to String Following code-snippet: unsigned char * get_id(unsigned char *buffer) { unsigned int i; for(i=0; i<8;i++) buffer[i] = read_byte(); // Returns uint8_t return buffer; } At the end i have a 64-bit ID. I would like to call get_id() and to print the return value(ID) with printf. How do I do...
TITLE: Single Chars of an ID to String QUESTION: Following code-snippet: unsigned char * get_id(unsigned char *buffer) { unsigned int i; for(i=0; i<8;i++) buffer[i] = read_byte(); // Returns uint8_t return buffer; } At the end i have a 64-bit ID. I would like to call get_id() and to print the return value(ID) with p...
[ "c" ]
0
1
84
1
0
2011-05-30T18:22:08.877000
2011-05-30T18:35:59.463000
6,179,557
6,179,615
PrimeFaces 2, how to use ajax with a h:selectOneBooleanCheckbox?
I have a JSF / PrimeFaces 2.x UI with a check box (h:selectOneBooleanCheckbox) whose value affects other widgets. Something like: [X] checkbox1 [____|V] combobox1 [X] checkbox2 When checkbox1 is false, the selected value for combobox1 must be null, and checkbox2 must also be false. I'd like to use ajax to set the value...
Nest with a listener method in checkbox1 which does the desired job and renders the combobox1 and checkbox1. Something like: with public void listener() { if (!checkbox1) { combobox1 = null; checkbox2 = false; } } PrimeFaces itself has a which offers simlilar functionality. It only uses update attribute whereas JSF sta...
PrimeFaces 2, how to use ajax with a h:selectOneBooleanCheckbox? I have a JSF / PrimeFaces 2.x UI with a check box (h:selectOneBooleanCheckbox) whose value affects other widgets. Something like: [X] checkbox1 [____|V] combobox1 [X] checkbox2 When checkbox1 is false, the selected value for combobox1 must be null, and ch...
TITLE: PrimeFaces 2, how to use ajax with a h:selectOneBooleanCheckbox? QUESTION: I have a JSF / PrimeFaces 2.x UI with a check box (h:selectOneBooleanCheckbox) whose value affects other widgets. Something like: [X] checkbox1 [____|V] combobox1 [X] checkbox2 When checkbox1 is false, the selected value for combobox1 mu...
[ "ajax", "jsf", "primefaces" ]
2
2
2,937
1
0
2011-05-30T18:23:26.150000
2011-05-30T18:30:37.053000
6,179,559
6,179,582
Loading a local image in Documents folder into html which was loaded remotely
I have an application that is loading html from a remote server in a UIWebView. I have built functionality that allows the iphone camera to be launched when the user clicks a button in the html document and the photo taken is saved to the Documents directory for the application. The URL for the locally saved file is th...
This is a restriction of JavaScript and there are two workarounds I can think of right off the bat: Get the Base64 representation of that image and load that (best, fastest) Upload the image to a server This page has a number of Objective-C implementations of Base64: http://www.cocoadev.com/index.pl?BaseSixtyFour
Loading a local image in Documents folder into html which was loaded remotely I have an application that is loading html from a remote server in a UIWebView. I have built functionality that allows the iphone camera to be launched when the user clicks a button in the html document and the photo taken is saved to the Doc...
TITLE: Loading a local image in Documents folder into html which was loaded remotely QUESTION: I have an application that is loading html from a remote server in a UIWebView. I have built functionality that allows the iphone camera to be launched when the user clicks a button in the html document and the photo taken i...
[ "iphone", "objective-c", "xamarin.ios" ]
0
1
352
1
0
2011-05-30T18:23:51.417000
2011-05-30T18:27:13.223000
6,179,560
6,179,595
How to do 2 equal statements upon certain conditions?
I need to use different modules based on what value the $what variable holds. There are 2 variables; me and others. If $what = me i want them to see me.php an if $what = others i want them to see others.php. I don't know how to update the snippet that will also take $what = other scenario under consideration. How to do...
You need elseif statement. $what = "me"; if ( $q === $what ) { require("me.php"); } elseif ($what === "others") { require("all.php"); } else { // optional "catch all condition" die("Should not be here"); }
How to do 2 equal statements upon certain conditions? I need to use different modules based on what value the $what variable holds. There are 2 variables; me and others. If $what = me i want them to see me.php an if $what = others i want them to see others.php. I don't know how to update the snippet that will also take...
TITLE: How to do 2 equal statements upon certain conditions? QUESTION: I need to use different modules based on what value the $what variable holds. There are 2 variables; me and others. If $what = me i want them to see me.php an if $what = others i want them to see others.php. I don't know how to update the snippet t...
[ "php", "equals" ]
1
2
59
6
0
2011-05-30T18:23:54.117000
2011-05-30T18:27:55.143000
6,179,562
6,179,647
adding my program to right-click menu
with right click menu, I mean this: I dont really know what its called, but i hope its right click menu. When I google for queries like title of this question, i get nothing. some tutorials that shows how can i add an.exe to that list etc. but I'm looking for some tutorial that will teach me how to handle that data, wh...
You would add some keys to the registry to have your program in that list. You can find more about it here: http://www.howtogeek.com/howto/windows-vista/add-open-with-notepad-to-the-context-menu-for-all-files/ In the example they use Notepad.exe %1 that will basicly do the same as calling Notepad.exe c:\myFile.txt from...
adding my program to right-click menu with right click menu, I mean this: I dont really know what its called, but i hope its right click menu. When I google for queries like title of this question, i get nothing. some tutorials that shows how can i add an.exe to that list etc. but I'm looking for some tutorial that wil...
TITLE: adding my program to right-click menu QUESTION: with right click menu, I mean this: I dont really know what its called, but i hope its right click menu. When I google for queries like title of this question, i get nothing. some tutorials that shows how can i add an.exe to that list etc. but I'm looking for some...
[ "c#", "windows", "contextmenu", "right-click" ]
12
12
11,551
2
0
2011-05-30T18:24:32.373000
2011-05-30T18:35:22.380000
6,179,563
6,180,209
jBCrypt serious issue with checkpw (return true when it shouldn't?)
EDIT: Ok so I've somewhat found an answer here BCrypt says long, similar passwords are equivalent - problem with me, the gem, or the field of cryptography? New question though, how can someone recommend using bCrypt for hashing if you have to limit the user's password length in a world where we are trying to educate th...
Ok, so wording the question gave me enough to actually figure out what I was looking for (hurray for rubber ducking ). The field of cryptography is safe for now! BCrypt implementation XOR using P_orig which is 18 4 bytes integer until it gets to the end, which limits your encryption "key" to 72 bytes. Eveyrything after...
jBCrypt serious issue with checkpw (return true when it shouldn't?) EDIT: Ok so I've somewhat found an answer here BCrypt says long, similar passwords are equivalent - problem with me, the gem, or the field of cryptography? New question though, how can someone recommend using bCrypt for hashing if you have to limit the...
TITLE: jBCrypt serious issue with checkpw (return true when it shouldn't?) QUESTION: EDIT: Ok so I've somewhat found an answer here BCrypt says long, similar passwords are equivalent - problem with me, the gem, or the field of cryptography? New question though, how can someone recommend using bCrypt for hashing if you...
[ "security", "encryption", "passwords", "salt", "blowfish" ]
6
5
2,662
2
0
2011-05-30T18:24:32.743000
2011-05-30T19:44:39.010000
6,179,565
6,179,928
insert jquery js variable in Url.Route
This works fine, but consists hardcode in "url" section: This doesn't consist hadrcode, but it is not clear how to pass variable "a". Using variable is not necessary. How can I pass variable? Maybe I use incorrect helper, or overload?
You could ofcourse just do url: "@Url.RouteUrl(new {controller = "Item", action = "Getstatus"})?price=" + a,
insert jquery js variable in Url.Route This works fine, but consists hardcode in "url" section: This doesn't consist hadrcode, but it is not clear how to pass variable "a". Using variable is not necessary. How can I pass variable? Maybe I use incorrect helper, or overload?
TITLE: insert jquery js variable in Url.Route QUESTION: This works fine, but consists hardcode in "url" section: This doesn't consist hadrcode, but it is not clear how to pass variable "a". Using variable is not necessary. How can I pass variable? Maybe I use incorrect helper, or overload? ANSWER: You could ofcourse ...
[ "jquery", "asp.net-mvc", "asp.net-mvc-3" ]
0
2
1,880
1
0
2011-05-30T18:24:51.580000
2011-05-30T19:11:02.630000
6,179,569
6,183,727
Add facebook comments inside a 'lightbox'
I am building a website to showcase some photos. The photos are viewed using a lightbox like effect. I want to add facebook comments inside the 'lightbox' but the comments doesn't load. $(function() { $('.pics').click(function(){...... $(".comments").html("
I think you should try rendering the comments first but keep them invisible. Something like: Assume the hidden class makes the div invisible. Now with JavaScript code you should be able to do this: $(".pics").click(function(){ $("#comments").show(); }); I have not tested this yet and there's an off-chance Facebook won'...
Add facebook comments inside a 'lightbox' I am building a website to showcase some photos. The photos are viewed using a lightbox like effect. I want to add facebook comments inside the 'lightbox' but the comments doesn't load. $(function() { $('.pics').click(function(){...... $(".comments").html("
TITLE: Add facebook comments inside a 'lightbox' QUESTION: I am building a website to showcase some photos. The photos are viewed using a lightbox like effect. I want to add facebook comments inside the 'lightbox' but the comments doesn't load. $(function() { $('.pics').click(function(){...... $(".comments").html(" ...
[ "javascript", "jquery", "facebook", "comments" ]
1
1
3,248
2
0
2011-05-30T18:25:28.810000
2011-05-31T06:23:21.433000
6,179,570
6,179,738
Executing code in if-statement (Bash)
New question: I can't do this (Error: line 2: [: ==: unary operator expected ): if [ $(echo "") == "" ] then echo "Success!" fi But this works fine: tmp=$(echo "") if [ "$tmp" == "" ] then echo "Success!" fi Why? Original question: Is it possible to get the result of a command inside an if-statement? I want to do somet...
The short answer is yes -- You can evaluate a command inside an if condition. The only thing I would change in your first example is the quoting: if [ "$(echo foo)" == "foo" ] then echo "Success"'!' fi Note the funny quote for the '!'. This disables the special behavior of! inside an interactive bash session, that migh...
Executing code in if-statement (Bash) New question: I can't do this (Error: line 2: [: ==: unary operator expected ): if [ $(echo "") == "" ] then echo "Success!" fi But this works fine: tmp=$(echo "") if [ "$tmp" == "" ] then echo "Success!" fi Why? Original question: Is it possible to get the result of a command insi...
TITLE: Executing code in if-statement (Bash) QUESTION: New question: I can't do this (Error: line 2: [: ==: unary operator expected ): if [ $(echo "") == "" ] then echo "Success!" fi But this works fine: tmp=$(echo "") if [ "$tmp" == "" ] then echo "Success!" fi Why? Original question: Is it possible to get the result...
[ "bash", "if-statement" ]
5
6
7,047
1
0
2011-05-30T18:26:00.683000
2011-05-30T18:46:09.907000
6,179,598
6,181,480
Play! - unique model field
How can I make my model class fields unique? Eg. if login is already taken, I'd like to display proper message for the user. I have to write my own validation check and use it, or JPA @UniqueConstraint can be used?
I have done it this way: @Entity public class User extends Model { @Basic(optional=false) @Column(unique=true) public String name; public User(String name) { this.name = name; create(); } /** used in registration to find name clash */ public static User findByName(String name) { return find("name", name).first(); } ...
Play! - unique model field How can I make my model class fields unique? Eg. if login is already taken, I'd like to display proper message for the user. I have to write my own validation check and use it, or JPA @UniqueConstraint can be used?
TITLE: Play! - unique model field QUESTION: How can I make my model class fields unique? Eg. if login is already taken, I'd like to display proper message for the user. I have to write my own validation check and use it, or JPA @UniqueConstraint can be used? ANSWER: I have done it this way: @Entity public class User ...
[ "java", "validation", "playframework" ]
2
5
1,259
3
0
2011-05-30T18:28:19.620000
2011-05-30T23:05:42.943000
6,179,612
6,179,663
Submitting form values to controller
This should be something really simple but I just can't get it. I'm learning codeigniter and I have a form with following code Name I have a controller called form_reader.php in my controllers folder. I get a 404 Not Found error. What am I doing wrong?
Send your values to a function in your controller in your controller, make a function called "save_userinput": input->post(); // or just the username: $username = $this->input->post("username"); // then do whatever you want with it:) } }?> Hope that helps. Make sure to check out the CI documentation, it's really good...
Submitting form values to controller This should be something really simple but I just can't get it. I'm learning codeigniter and I have a form with following code Name I have a controller called form_reader.php in my controllers folder. I get a 404 Not Found error. What am I doing wrong?
TITLE: Submitting form values to controller QUESTION: This should be something really simple but I just can't get it. I'm learning codeigniter and I have a form with following code Name I have a controller called form_reader.php in my controllers folder. I get a 404 Not Found error. What am I doing wrong? ANSWER: Sen...
[ "codeigniter" ]
9
36
80,965
2
0
2011-05-30T18:30:31.757000
2011-05-30T18:37:17.397000
6,179,617
6,179,672
Set Python terminal encoding on Windows
I happened to fail to set character encoding in Python terminal on Windows. According to official guide, it's a piece of cake: # -*- coding: utf-8 -*- Ok, now testing: print 'Русский' Produces piece of mojibake. What am doing wrong? P.S. IDE is Visual Studio 2010, if it matters
Update: See J.F. Sebastian's answer for a better explanation and a better solution. # -*- coding: utf-8 -*- sets the source file's encoding, not the output encoding. You have to encode the string just before printing it with the exact same encoding that your terminal is using. In your case, I'm guessing that your code ...
Set Python terminal encoding on Windows I happened to fail to set character encoding in Python terminal on Windows. According to official guide, it's a piece of cake: # -*- coding: utf-8 -*- Ok, now testing: print 'Русский' Produces piece of mojibake. What am doing wrong? P.S. IDE is Visual Studio 2010, if it matters
TITLE: Set Python terminal encoding on Windows QUESTION: I happened to fail to set character encoding in Python terminal on Windows. According to official guide, it's a piece of cake: # -*- coding: utf-8 -*- Ok, now testing: print 'Русский' Produces piece of mojibake. What am doing wrong? P.S. IDE is Visual Studio 201...
[ "python", "windows", "character-encoding" ]
2
2
9,470
4
0
2011-05-30T18:30:44.613000
2011-05-30T18:38:04.550000
6,179,620
6,179,721
Select 4 items with jquery
I've been reading about the Jquery UI selectable plugin, my question is: Can I limit it to select only up to 4 items in a list? Or maybe it would be easier to code it without using the selectable plugin? Thanks! EDIT: Thanks for your answers, however I see that I didn't explain it very well: The user can select (ctrl +...
JSFIDDLE DEMO Look at the demo! And here is how to achieve it: $('ul.list li').click(function() { $(this).toggleClass('selected'); if ($('.selected').length > 4) { $(this).toggleClass('selected'); alert('You have already selected 4 items!\nYou can undo a selection.'); } }); P.S. Doing so you can toggle the already sel...
Select 4 items with jquery I've been reading about the Jquery UI selectable plugin, my question is: Can I limit it to select only up to 4 items in a list? Or maybe it would be easier to code it without using the selectable plugin? Thanks! EDIT: Thanks for your answers, however I see that I didn't explain it very well: ...
TITLE: Select 4 items with jquery QUESTION: I've been reading about the Jquery UI selectable plugin, my question is: Can I limit it to select only up to 4 items in a list? Or maybe it would be easier to code it without using the selectable plugin? Thanks! EDIT: Thanks for your answers, however I see that I didn't expl...
[ "jquery", "jquery-ui", "jquery-plugins" ]
1
3
843
4
0
2011-05-30T18:31:24.510000
2011-05-30T18:43:52.777000
6,179,621
6,180,058
Eclipse - Dynamic Web Project not picking up changes in jsp or
I am using Run As -> Run on server, to run my web project on the local tomcat instance. Problem is, when I make changes on JSP's and other project component, sometimes Eclipse picks this changes up, sometimes is does not. It seems kind of random...
This could be due to various reasons, and cannot give a solid answer to it without knowing the exact cause. But, there are few things that could lead to this. Check your Build Automatically setting (Project -> Build Automatically). This has to be enabled to publish your changes. Under Server definition, check the Publi...
Eclipse - Dynamic Web Project not picking up changes in jsp or I am using Run As -> Run on server, to run my web project on the local tomcat instance. Problem is, when I make changes on JSP's and other project component, sometimes Eclipse picks this changes up, sometimes is does not. It seems kind of random...
TITLE: Eclipse - Dynamic Web Project not picking up changes in jsp or QUESTION: I am using Run As -> Run on server, to run my web project on the local tomcat instance. Problem is, when I make changes on JSP's and other project component, sometimes Eclipse picks this changes up, sometimes is does not. It seems kind of ...
[ "eclipse", "jsp" ]
2
8
9,038
3
0
2011-05-30T18:31:30.080000
2011-05-30T19:29:10.230000
6,179,623
6,179,713
Efficient MySQL search
I have use InnoDB tables and I need to make a search inside... Let say I have row 1. asda 2. asdda 3. xyz I want to search for asda... It would be smth like SELECT * FROM table WHERE myC LIKE 'asda'... What I want to do is to show 'asda' and 'asdda' becouse it is almost familiar... Is there any efficient way to do this...
A very basic version would be to use the SOUNDEX() function in MySQL: SELECT * FROM table WHERE SOUNDEX(myC) = SOUNDEX('asda'); or you can look into trying for Levenshtein Distance, which would be a bit more foolproof but is computationally much more expensive.
Efficient MySQL search I have use InnoDB tables and I need to make a search inside... Let say I have row 1. asda 2. asdda 3. xyz I want to search for asda... It would be smth like SELECT * FROM table WHERE myC LIKE 'asda'... What I want to do is to show 'asda' and 'asdda' becouse it is almost familiar... Is there any e...
TITLE: Efficient MySQL search QUESTION: I have use InnoDB tables and I need to make a search inside... Let say I have row 1. asda 2. asdda 3. xyz I want to search for asda... It would be smth like SELECT * FROM table WHERE myC LIKE 'asda'... What I want to do is to show 'asda' and 'asdda' becouse it is almost familiar...
[ "mysql", "search", "innodb" ]
0
1
298
1
0
2011-05-30T18:31:42.917000
2011-05-30T18:43:06.170000
6,179,630
6,179,863
tkinter canvas item configure
I'm trying to make a dice object, and I want to be able to control the pip colors. I created the pips with a black fill, and I tried to change one to red using self.canvas.itemconfigure(self.pip1, fill='red') but it seems to have no effect. There is no error so I'm wondering why the change doesn't show up. Minimum work...
First rule of debugging: examine your data. If you put a print statement or stop the debugger just before the call to itemconfigure you will see that self.pip1 has a value of None. So the first thing you should ask yourself is, "why is it None?" The reason it is None is that you create it in a method but neglect to ret...
tkinter canvas item configure I'm trying to make a dice object, and I want to be able to control the pip colors. I created the pips with a black fill, and I tried to change one to red using self.canvas.itemconfigure(self.pip1, fill='red') but it seems to have no effect. There is no error so I'm wondering why the change...
TITLE: tkinter canvas item configure QUESTION: I'm trying to make a dice object, and I want to be able to control the pip colors. I created the pips with a black fill, and I tried to change one to red using self.canvas.itemconfigure(self.pip1, fill='red') but it seems to have no effect. There is no error so I'm wonder...
[ "python", "tkinter", "tkinter-canvas" ]
1
1
9,016
1
0
2011-05-30T18:32:22.310000
2011-05-30T19:03:31.077000
6,179,635
6,179,656
What is a good data structure for storing and searching 2d spatial coordinates in Java
I am currently writing a plugin for a game where one feature includes the ability to set areas defined by 2 two dimensional coordinates ( The upper left and lower right areas of a rectangle). These regions are then to be stored, and will have various other data associated with each region. As the player is moving about...
A good datastructure for determining collision in a part of space is the quad-tree datastructure. The quad-tree recursively divides a space according to the number of elements in a given area. Thus it can do a search if coordinates are inside a region in logarithmic time. EDIT: I have found an implementation here but n...
What is a good data structure for storing and searching 2d spatial coordinates in Java I am currently writing a plugin for a game where one feature includes the ability to set areas defined by 2 two dimensional coordinates ( The upper left and lower right areas of a rectangle). These regions are then to be stored, and ...
TITLE: What is a good data structure for storing and searching 2d spatial coordinates in Java QUESTION: I am currently writing a plugin for a game where one feature includes the ability to set areas defined by 2 two dimensional coordinates ( The upper left and lower right areas of a rectangle). These regions are then ...
[ "java", "spatial-query" ]
13
11
10,289
3
0
2011-05-30T18:33:08.317000
2011-05-30T18:36:52.320000
6,179,636
6,179,744
NHibernate: how to sort a collection by a property of a referenced entity
I would like to to sort CampaignRetailers by Retailer.Name. However Retailer is a referenced entity on CampaignRetailers. I've tried order-by="Retailer.Name". Is this kind of sorting possible?
This is not possible. Use client-side adhoc sorting instead. For example: sortedCampaignRetailers = campaign.CampaignRetailers.OrderBy(x => x.Retailer.Name);
NHibernate: how to sort a collection by a property of a referenced entity I would like to to sort CampaignRetailers by Retailer.Name. However Retailer is a referenced entity on CampaignRetailers. I've tried order-by="Retailer.Name". Is this kind of sorting possible?
TITLE: NHibernate: how to sort a collection by a property of a referenced entity QUESTION: I would like to to sort CampaignRetailers by Retailer.Name. However Retailer is a referenced entity on CampaignRetailers. I've tried order-by="Retailer.Name". Is this kind of sorting possible? ANSWER: This is not possible. Use ...
[ "nhibernate" ]
1
2
1,584
3
0
2011-05-30T18:33:19.920000
2011-05-30T18:46:51.887000
6,179,638
6,179,784
Java: Casting to Generic with Interface Pointers
In the following sample code two classes EventA and EventB both implement the interface Historical. Java can automatically cast an EventA or EventB to Historical when one of these objects is passed as a parameter, as in the examineEvent method below. However, Java is no longer able to cast when a generic is introduced ...
Because List is not List. Imagine: List list =...; List h = (List ) list; h.add(new EventB()); //type-safety of list is compromised for (EventA evt: list) { // ClassCastException - there's an EventB in the lsit... } List means "a list of a one specific subtype of Historical", and you cannot add anything to it, because ...
Java: Casting to Generic with Interface Pointers In the following sample code two classes EventA and EventB both implement the interface Historical. Java can automatically cast an EventA or EventB to Historical when one of these objects is passed as a parameter, as in the examineEvent method below. However, Java is no ...
TITLE: Java: Casting to Generic with Interface Pointers QUESTION: In the following sample code two classes EventA and EventB both implement the interface Historical. Java can automatically cast an EventA or EventB to Historical when one of these objects is passed as a parameter, as in the examineEvent method below. Ho...
[ "java", "generics", "casting" ]
2
7
3,733
3
0
2011-05-30T18:33:25.173000
2011-05-30T18:51:23.803000
6,179,642
6,179,699
Java / Android regex question
I would like to create a regex in Java / Android which truncates a string after, or actually at, the third comma. Is this possible? Any suggestions to get me started on this?
Take a look at Pattern class. Alternatives: String#split your string or use a StringTokenizer.
Java / Android regex question I would like to create a regex in Java / Android which truncates a string after, or actually at, the third comma. Is this possible? Any suggestions to get me started on this?
TITLE: Java / Android regex question QUESTION: I would like to create a regex in Java / Android which truncates a string after, or actually at, the third comma. Is this possible? Any suggestions to get me started on this? ANSWER: Take a look at Pattern class. Alternatives: String#split your string or use a StringToke...
[ "java", "regex" ]
1
3
280
4
0
2011-05-30T18:34:18.393000
2011-05-30T18:41:04.003000
6,179,645
6,182,467
php json_encode
I have a symfony app that uses the json_encode and json_decode to keep a record of some prices. The problem is that json_decode works OK in one file (I can decode the string stored in my PSQL database), but when I call it from other file json_decode returns null, I've check the file encodings (all are utf-8) the tables...
Ok people, first thank you all for the help. I got the solution and It was all thanks to Zend Json library. Symfony uses escaping strategies to prevent XSS attacks, SQL Injection attacks, etc. So what happened here in my case, when I called json_encode and json_decode it was inside the object that Doctrine generates to...
php json_encode I have a symfony app that uses the json_encode and json_decode to keep a record of some prices. The problem is that json_decode works OK in one file (I can decode the string stored in my PSQL database), but when I call it from other file json_decode returns null, I've check the file encodings (all are u...
TITLE: php json_encode QUESTION: I have a symfony app that uses the json_encode and json_decode to keep a record of some prices. The problem is that json_decode works OK in one file (I can decode the string stored in my PSQL database), but when I call it from other file json_decode returns null, I've check the file en...
[ "php", "utf-8", "symfony1", "json" ]
2
2
6,631
5
0
2011-05-30T18:34:54.200000
2011-05-31T02:36:17.587000
6,179,653
6,180,900
Get the Embedded Width/Height of a Flash Player using AS3
I'm using swfobject to embed an swf into a web page. var params = {}; params['movie'] = 'player.swf'; params['wmode'] = 'transparent'; params['bgcolor'] = 'ffffff'; params['allowScriptAccess'] = 'always'; params['allowFullScreen'] = 'true'; var flashvars = {}; flashvars['url'] = 'video.flv'; flashvars['resize'] = 'fit...
Just use stage.width and stage.height. These return the full width and height of the embedded flash, rather than the stage's width and height set in flash.
Get the Embedded Width/Height of a Flash Player using AS3 I'm using swfobject to embed an swf into a web page. var params = {}; params['movie'] = 'player.swf'; params['wmode'] = 'transparent'; params['bgcolor'] = 'ffffff'; params['allowScriptAccess'] = 'always'; params['allowFullScreen'] = 'true'; var flashvars = {}; ...
TITLE: Get the Embedded Width/Height of a Flash Player using AS3 QUESTION: I'm using swfobject to embed an swf into a web page. var params = {}; params['movie'] = 'player.swf'; params['wmode'] = 'transparent'; params['bgcolor'] = 'ffffff'; params['allowScriptAccess'] = 'always'; params['allowFullScreen'] = 'true'; va...
[ "flash", "actionscript-3" ]
1
2
3,525
2
0
2011-05-30T18:36:17.310000
2011-05-30T21:27:55.577000
6,179,662
6,179,919
how to run asp.net project on iis real server windows 2008
HI, i developed application in Visual Studio... ASP.NET project with master.page. I do it on my notebook and now I want put it on my server... i copy all files and give it to wwwroot directori in iis7 on my windows server 2008, but when i try start ist it wrote: Runtime Error Description: An application error occurred ...
You could try to share the wwwroot folder, and create a publish configuration for your server's shared folder within Visual Studio. http://msdn.microsoft.com/en-us/library/20yh9f1b(v=vs.80).aspx
how to run asp.net project on iis real server windows 2008 HI, i developed application in Visual Studio... ASP.NET project with master.page. I do it on my notebook and now I want put it on my server... i copy all files and give it to wwwroot directori in iis7 on my windows server 2008, but when i try start ist it wrote...
TITLE: how to run asp.net project on iis real server windows 2008 QUESTION: HI, i developed application in Visual Studio... ASP.NET project with master.page. I do it on my notebook and now I want put it on my server... i copy all files and give it to wwwroot directori in iis7 on my windows server 2008, but when i try ...
[ "asp.net" ]
2
1
1,229
1
0
2011-05-30T18:37:14.163000
2011-05-30T19:09:28.680000
6,179,667
6,180,554
Remove files matching a pattern in iOS
Is there any way to remove all files in a given directory (not recursively) using a pattern? As an example, I have some files named file1.jpg, file2.jpg, file3.jpg, etc., and I want to know if there is any method that acceps wildcards like this UNIX command: rm file*.jpg
Try this: - (void)removeFiles:(NSRegularExpression*)regex inPath:(NSString*)path { NSDirectoryEnumerator *filesEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:path]; NSString *file; NSError *error; while (file = [filesEnumerator nextObject]) { NSUInteger match = [regex numberOfMatchesInString:file option...
Remove files matching a pattern in iOS Is there any way to remove all files in a given directory (not recursively) using a pattern? As an example, I have some files named file1.jpg, file2.jpg, file3.jpg, etc., and I want to know if there is any method that acceps wildcards like this UNIX command: rm file*.jpg
TITLE: Remove files matching a pattern in iOS QUESTION: Is there any way to remove all files in a given directory (not recursively) using a pattern? As an example, I have some files named file1.jpg, file2.jpg, file3.jpg, etc., and I want to know if there is any method that acceps wildcards like this UNIX command: rm f...
[ "ios", "objective-c" ]
4
17
3,379
2
0
2011-05-30T18:37:33.427000
2011-05-30T20:34:20.440000
6,179,687
6,180,757
Cannot validate dynamic choices with Django ModelForm
I have a Django ModelForm in Google App Engine with a ChoiceField, let's say location: class MyForm(ModelForm): location = ChoiceField(label="Location") class Meta: model = MyModel In order to dynamically add the choices for location, and not have issues with app caching, I add them after the form has initialized: for...
There must be other ways to do this, but possibly the most straightforward is to add the field in the form's __init__() method: class MyForm(ModelForm):... def __init__(self, *args, **kwargs): try: dynamic_choices = kwargs.pop('dynamic_choices') except KeyError: dynamic_choices = None # if normal form super(MyForm, sel...
Cannot validate dynamic choices with Django ModelForm I have a Django ModelForm in Google App Engine with a ChoiceField, let's say location: class MyForm(ModelForm): location = ChoiceField(label="Location") class Meta: model = MyModel In order to dynamically add the choices for location, and not have issues with app c...
TITLE: Cannot validate dynamic choices with Django ModelForm QUESTION: I have a Django ModelForm in Google App Engine with a ChoiceField, let's say location: class MyForm(ModelForm): location = ChoiceField(label="Location") class Meta: model = MyModel In order to dynamically add the choices for location, and not have...
[ "django", "google-app-engine", "django-forms" ]
3
4
918
1
0
2011-05-30T18:40:02.533000
2011-05-30T21:07:51.883000
6,179,692
6,179,825
Silverlight trying to access local crossdomainpolicy.xml
I have a Silverlight app that I developed locally, and I'm trying to run it on a Windows 2008 R2 server that I personally setup. Everything smooth and dandy, except that when I try to auth on the app, it tries to look locally for http://localhost/crossdomainpolicy.xml http://localhost/clientaccesspolicy.xml It also thr...
If your XAP file is on http://localhost/somewhere/somefile.xap it shouldn't look for a clientaccesspolicy. Are you using the ASP.NET dev. server to host the Silverlight app while you are using IIS for a WCF service that is called by the silverlight app? Silverlight's inability to present exception details is well known...
Silverlight trying to access local crossdomainpolicy.xml I have a Silverlight app that I developed locally, and I'm trying to run it on a Windows 2008 R2 server that I personally setup. Everything smooth and dandy, except that when I try to auth on the app, it tries to look locally for http://localhost/crossdomainpolic...
TITLE: Silverlight trying to access local crossdomainpolicy.xml QUESTION: I have a Silverlight app that I developed locally, and I'm trying to run it on a Windows 2008 R2 server that I personally setup. Everything smooth and dandy, except that when I try to auth on the app, it tries to look locally for http://localhos...
[ "silverlight", "crossdomain.xml", "clientaccesspolicy.xml" ]
1
1
404
2
0
2011-05-30T18:40:37.970000
2011-05-30T18:58:01.757000
6,179,697
6,179,763
android GPS second activity error when click the next button
enter code here 05-30 22:54:51.245: ERROR/AndroidRuntime(1383): FATAL EXCEPTION: main 05-30 22:54:51.245: ERROR/AndroidRuntime(1383): java.lang.IllegalStateException: Could not find a method appendText(View) in the activity class yaraby.y.yarab for onClick handler on view class android.widget.Button with id 'enter' 05-...
Your problem is here in the yarab.onCreate() method: } catch (Exception e) { Log.d("eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", e.getMessage()); } e.getMessage() is returning null, and Log.d doesn't like null messages. Try using e.toString() instead. Some exceptions just have null messages.
android GPS second activity error when click the next button enter code here 05-30 22:54:51.245: ERROR/AndroidRuntime(1383): FATAL EXCEPTION: main 05-30 22:54:51.245: ERROR/AndroidRuntime(1383): java.lang.IllegalStateException: Could not find a method appendText(View) in the activity class yaraby.y.yarab for onClick h...
TITLE: android GPS second activity error when click the next button QUESTION: enter code here 05-30 22:54:51.245: ERROR/AndroidRuntime(1383): FATAL EXCEPTION: main 05-30 22:54:51.245: ERROR/AndroidRuntime(1383): java.lang.IllegalStateException: Could not find a method appendText(View) in the activity class yaraby.y.y...
[ "android" ]
0
0
408
2
0
2011-05-30T18:40:53.730000
2011-05-30T18:49:12.870000
6,179,704
6,179,807
How do I make a floating div dynamically expand to take up maximum space?
I have 3 floated left objects, the one on the left will change in size all the time. The right on will always be fixed in size. The center one I want to fill up the space between the two outer divs. Right now that's not working though. If I set the width of the center div to 100% it gets way too big. Not sure how this ...
HTML 1 Date/Time Lots of text in here that can be any size.... CSS #left { float: left; width: 20%; } #center { margin-left: 20%; margin-right: 100px; } #right { float: right; width: 100px; } See fiddle.
How do I make a floating div dynamically expand to take up maximum space? I have 3 floated left objects, the one on the left will change in size all the time. The right on will always be fixed in size. The center one I want to fill up the space between the two outer divs. Right now that's not working though. If I set t...
TITLE: How do I make a floating div dynamically expand to take up maximum space? QUESTION: I have 3 floated left objects, the one on the left will change in size all the time. The right on will always be fixed in size. The center one I want to fill up the space between the two outer divs. Right now that's not working ...
[ "html", "css", "formatting" ]
5
2
3,164
3
0
2011-05-30T18:41:57.793000
2011-05-30T18:54:07.157000
6,179,709
6,179,758
Audio Appending using RandomAccessFile
I use the following code to append as many wav files present in the sdcard to a single file. audFullPath is an arraylist containing the path of the audiofiles. Is it correct. When I play the recordedaudio1, after doing this. It play only the first file. I want to play all the files. Any suggestion.. File file=new File(...
You can't append WAV files the way you do. That's because each WAV has special format: The simplest possible WAV file looks like this: [RIFF HEADER]... totalFileSize [FMT CHUNK]... audioFormat frequency bytesPerSample numberOfChannels... [DATA CHUNK] dataSize What you need to do is: Make sure that all WAV files are o...
Audio Appending using RandomAccessFile I use the following code to append as many wav files present in the sdcard to a single file. audFullPath is an arraylist containing the path of the audiofiles. Is it correct. When I play the recordedaudio1, after doing this. It play only the first file. I want to play all the file...
TITLE: Audio Appending using RandomAccessFile QUESTION: I use the following code to append as many wav files present in the sdcard to a single file. audFullPath is an arraylist containing the path of the audiofiles. Is it correct. When I play the recordedaudio1, after doing this. It play only the first file. I want to...
[ "android", "audio" ]
1
4
5,155
1
0
2011-05-30T18:42:36.157000
2011-05-30T18:48:21.583000
6,179,717
6,181,172
Richface Fileupload Button text justification
I have a richface fileupload and the code that I currently have is like so: My question is, how can I add text alignment/text justification to the button? Right now, it seems as though the text on the button, which is "Add", aligns to the right and I'd like it to be centered.
Here's what seems to work by playing with Firebug on the Richfaces 3.3 demo site:.rich-fileupload-button-content { text-align: center; } That class seems to control the text alignment of the button. Here is the url I was playing with: http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf
Richface Fileupload Button text justification I have a richface fileupload and the code that I currently have is like so: My question is, how can I add text alignment/text justification to the button? Right now, it seems as though the text on the button, which is "Add", aligns to the right and I'd like it to be centere...
TITLE: Richface Fileupload Button text justification QUESTION: I have a richface fileupload and the code that I currently have is like so: My question is, how can I add text alignment/text justification to the button? Right now, it seems as though the text on the button, which is "Add", aligns to the right and I'd lik...
[ "jsf", "file-upload", "richfaces" ]
0
1
1,052
1
0
2011-05-30T18:43:35.063000
2011-05-30T22:14:14.480000
6,179,720
6,179,765
Raise jquery draggable's "create" event
I've been trying to figure out how to use the 'create' event of the jquery.ui draggable control. And an example as simple as throwing an alert does not work: Drag "create event" test teste de drag I've searched and tested but i can't seem to get even this simple example to work. as stated on jquery draggable's web page...
In my opinion it should be: $(document).ready(function(){ $("#filho").bind("dragcreate", function(event, ui) { alert("VAAAAAAAAAAAI!"); }); $("#filho").draggable(); }); Firt bind event, then create draggable. JQuery UI Version update This will not work with JQueryUI version lower than 1.8.7. So you also need to upgrad...
Raise jquery draggable's "create" event I've been trying to figure out how to use the 'create' event of the jquery.ui draggable control. And an example as simple as throwing an alert does not work: Drag "create event" test teste de drag I've searched and tested but i can't seem to get even this simple example to work. ...
TITLE: Raise jquery draggable's "create" event QUESTION: I've been trying to figure out how to use the 'create' event of the jquery.ui draggable control. And an example as simple as throwing an alert does not work: Drag "create event" test teste de drag I've searched and tested but i can't seem to get even this simple...
[ "jquery", "events", "jquery-ui" ]
2
2
1,867
3
0
2011-05-30T18:43:51.393000
2011-05-30T18:49:31.977000
6,179,722
6,179,795
MySQL date query
I want to make a query that will select a random row from a table that has the start date + time less than the current date. This is what I have so far: $query="SELECT * FROM premium WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= start_date ORDER BY RAND() LIMIT 1 "; I want to replace 30 with the value from the time colu...
SELECT * FROM premium WHERE start_date < DATE_SUB(CURDATE(),INTERVAL HOUR(start_date) DAY) ORDER BY RAND() LIMIT 1 Or if your column is named time do SELECT * FROM premium WHERE start_date < DATE_SUB(CURDATE(),INTERVAL HOUR(`time`) DAY) ORDER BY RAND() LIMIT 1 Don't forget to put backticks ` around time, because time i...
MySQL date query I want to make a query that will select a random row from a table that has the start date + time less than the current date. This is what I have so far: $query="SELECT * FROM premium WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= start_date ORDER BY RAND() LIMIT 1 "; I want to replace 30 with the value f...
TITLE: MySQL date query QUESTION: I want to make a query that will select a random row from a table that has the start date + time less than the current date. This is what I have so far: $query="SELECT * FROM premium WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= start_date ORDER BY RAND() LIMIT 1 "; I want to replace 3...
[ "mysql" ]
1
0
208
2
0
2011-05-30T18:43:58.707000
2011-05-30T18:52:40.580000
6,179,725
6,180,212
HTML5 canvas object random path generation
I have a canvas object, a circle, that currently animates along a particular path, rather like a bounce. The simple animation code is as follows: if (x + dx > canvasW || x + dx < 0) dx = -dx; if (y + dy > canvasH || y + dy < 0) dy = -dy; x += dx; y += dy; Where dx and dy are set offets to increase the path by. I'd like...
You can find an implementation of the idea you proposed here. You might want to tweak it a bit but at least it's a start.:) In case you want to make the trajectory smoother, try evaluating a Bézier curve. Before that you'll have to generate a bunch of points in which to apply the algo.
HTML5 canvas object random path generation I have a canvas object, a circle, that currently animates along a particular path, rather like a bounce. The simple animation code is as follows: if (x + dx > canvasW || x + dx < 0) dx = -dx; if (y + dy > canvasH || y + dy < 0) dy = -dy; x += dx; y += dy; Where dx and dy are s...
TITLE: HTML5 canvas object random path generation QUESTION: I have a canvas object, a circle, that currently animates along a particular path, rather like a bounce. The simple animation code is as follows: if (x + dx > canvasW || x + dx < 0) dx = -dx; if (y + dy > canvasH || y + dy < 0) dy = -dy; x += dx; y += dy; Whe...
[ "html", "animation", "canvas", "path" ]
0
2
2,117
1
0
2011-05-30T18:44:43.093000
2011-05-30T19:45:03.287000
6,179,726
6,179,803
Linux: Find a List of Files in a Dictionary recursively
I have a Textfile with one Filename per row: Interpret 1 - Song 1.mp3 Interpret 2 - Song 2.mp3... (About 200 Filenames) Now I want to search a Folder recursivly for this Filenames to get the full path for each Filename in Filenames.txt. How to do this?:) (Purpose: Copied files to my MP3-Player but some of them are brok...
The easiest way may be the following: cat orig_filenames.txt | while read file; do find /dest/directory -name "$file"; done > output_file_with_paths
Linux: Find a List of Files in a Dictionary recursively I have a Textfile with one Filename per row: Interpret 1 - Song 1.mp3 Interpret 2 - Song 2.mp3... (About 200 Filenames) Now I want to search a Folder recursivly for this Filenames to get the full path for each Filename in Filenames.txt. How to do this?:) (Purpose:...
TITLE: Linux: Find a List of Files in a Dictionary recursively QUESTION: I have a Textfile with one Filename per row: Interpret 1 - Song 1.mp3 Interpret 2 - Song 2.mp3... (About 200 Filenames) Now I want to search a Folder recursivly for this Filenames to get the full path for each Filename in Filenames.txt. How to do...
[ "linux", "list", "shell", "recursion", "find" ]
3
4
8,426
4
0
2011-05-30T18:44:45.673000
2011-05-30T18:53:25.260000
6,179,733
6,180,642
Google Analytics PHP API: Get event total events
The analytics api allows you get events and total events across the profile, but I can't work out how to get the total events of a particular event. For example: Event 1 has 10 total events and 3 unique events. Event 2 has 5 total events and 5 unique events. If I use ga:totalEvents, it will return 15 and ga:uniqueEvent...
You need to add the ga:eventAction and/or ga:eventCategory dimensions to the request. This will give you a breakdown of the ga:totalEvents and ga:uniqueEvents metrics for each action and category.
Google Analytics PHP API: Get event total events The analytics api allows you get events and total events across the profile, but I can't work out how to get the total events of a particular event. For example: Event 1 has 10 total events and 3 unique events. Event 2 has 5 total events and 5 unique events. If I use ga:...
TITLE: Google Analytics PHP API: Get event total events QUESTION: The analytics api allows you get events and total events across the profile, but I can't work out how to get the total events of a particular event. For example: Event 1 has 10 total events and 3 unique events. Event 2 has 5 total events and 5 unique ev...
[ "php", "google-analytics", "google-api" ]
0
2
1,463
1
0
2011-05-30T18:45:41.833000
2011-05-30T20:48:25.413000
6,179,739
6,179,976
Show only a part of an ItemsControl's source at first
I have an ItemsControl displaying a collection of files. Those files are sorted by most recent modification, and there's a lot of them. So, I want to initially only show a small part (say, only 20 or so) of them, and display a button labelled "Show More" that would reveal everything when clicked. I already have a solut...
Why not have the object that you assign to the ItemsSource handle this logic - on first assignment, it would report a limited subset of the items. When Show More is clicked, the object is updated to show more (or all entries) and then notifies the framework that the property has changed (e.g. using the IPropertyNotifyC...
Show only a part of an ItemsControl's source at first I have an ItemsControl displaying a collection of files. Those files are sorted by most recent modification, and there's a lot of them. So, I want to initially only show a small part (say, only 20 or so) of them, and display a button labelled "Show More" that would ...
TITLE: Show only a part of an ItemsControl's source at first QUESTION: I have an ItemsControl displaying a collection of files. Those files are sorted by most recent modification, and there's a lot of them. So, I want to initially only show a small part (say, only 20 or so) of them, and display a button labelled "Show...
[ "c#", "wpf" ]
1
2
198
2
0
2011-05-30T18:46:10.923000
2011-05-30T19:17:37.243000
6,179,740
6,179,853
rotate window based iphone app
I am working on window based iPhone app. I wanted to add rotation feature by using, - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation!= UIInterfaceOrientationPortraitUpsideDown); } but it does not work. Wha...
In Xcode 4 click on the project the very top item in the left bar and then click on the summary tab and make sure the supported orientations is set correctly. If that is fine then you might try rewriting the return line to be something like this: return(interfaceOrientation == UIInterfaceOrientationPortrait || interfac...
rotate window based iphone app I am working on window based iPhone app. I wanted to add rotation feature by using, - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation!= UIInterfaceOrientationPortraitUpsideDow...
TITLE: rotate window based iphone app QUESTION: I am working on window based iPhone app. I wanted to add rotation feature by using, - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation!= UIInterfaceOrientatio...
[ "iphone", "xcode", "ios" ]
0
0
694
1
0
2011-05-30T18:46:16.507000
2011-05-30T19:01:24.987000
6,179,743
6,179,813
CFC to feed events into jQuery FullCalendar
I am trying to feed the events section of FullCalendar with a JSON string from a cfc. The cfc is returning data, but I cannot get the data to return in the format needed for this plugin. The calendar is not responding to the events. What do I need to do in setting up my cfc to return the proper format. The JSON I am ge...
This is a guess, but I strongly suspect that your client code wants something that looks more like this: [{"id": "237","title": "Robert Byrd - First Appt.","start": "2011-05-24 11:00:00.0","allDay": false},...] Note that the entries in the outer array are changed here from arrays of strings (as you have) into objects, ...
CFC to feed events into jQuery FullCalendar I am trying to feed the events section of FullCalendar with a JSON string from a cfc. The cfc is returning data, but I cannot get the data to return in the format needed for this plugin. The calendar is not responding to the events. What do I need to do in setting up my cfc t...
TITLE: CFC to feed events into jQuery FullCalendar QUESTION: I am trying to feed the events section of FullCalendar with a JSON string from a cfc. The cfc is returning data, but I cannot get the data to return in the format needed for this plugin. The calendar is not responding to the events. What do I need to do in s...
[ "jquery", "json", "fullcalendar", "coldfusion-8", "cfc" ]
0
1
948
2
0
2011-05-30T18:46:37.347000
2011-05-30T18:55:26.320000
6,179,764
6,179,820
calling exe on server from asp.net
want to run exe from asp.net on my server, is this possible? I use this method: System.Diagnostics.Process process1 = new System.Diagnostics.Process(); // Set the directory where the file resides process1.StartInfo.WorkingDirectory = @"D:\dev\Analyzer\bin\Release"; // Set the filename name of the file you want to open...
I am assuming here that the exception you are getting is an access violation one. If that is the case, you need to ensure to either start the process with a UserName and Password for an account with enough privileges to run the executable (and access the directory it is in), or setup the application pool with such an a...
calling exe on server from asp.net want to run exe from asp.net on my server, is this possible? I use this method: System.Diagnostics.Process process1 = new System.Diagnostics.Process(); // Set the directory where the file resides process1.StartInfo.WorkingDirectory = @"D:\dev\Analyzer\bin\Release"; // Set the filenam...
TITLE: calling exe on server from asp.net QUESTION: want to run exe from asp.net on my server, is this possible? I use this method: System.Diagnostics.Process process1 = new System.Diagnostics.Process(); // Set the directory where the file resides process1.StartInfo.WorkingDirectory = @"D:\dev\Analyzer\bin\Release"; ...
[ "c#", "asp.net", "iis", "windows-server-2008" ]
0
2
3,048
2
0
2011-05-30T18:49:31.140000
2011-05-30T18:56:30.250000
6,179,767
6,213,019
Strange .net webservice 503 issue
I have a fairly strange(IMO) issue here with a webservice provided by a third party. On calling the webservice on the live server, all works as expected. Calling it on a development setup, sometimes returns with a 503 - Service unavailable, other times it works. Intermittent.... Both of these tests are done from the sa...
In the end, this was caused by a issue on a transparent(ip spoofing) proxy, that sits upstream between my system and the remote system. The proxy was returning the 503, but under the guise of the target host. I only managed to find this by fluke, how would I have identified this if I was to look for this type of issue,...
Strange .net webservice 503 issue I have a fairly strange(IMO) issue here with a webservice provided by a third party. On calling the webservice on the live server, all works as expected. Calling it on a development setup, sometimes returns with a 503 - Service unavailable, other times it works. Intermittent.... Both o...
TITLE: Strange .net webservice 503 issue QUESTION: I have a fairly strange(IMO) issue here with a webservice provided by a third party. On calling the webservice on the live server, all works as expected. Calling it on a development setup, sometimes returns with a 503 - Service unavailable, other times it works. Inter...
[ ".net", "web-services", "http-status-code-503" ]
2
1
1,651
3
0
2011-05-30T18:49:47.013000
2011-06-02T10:00:21.403000
6,179,772
6,191,751
Trouble setting up psycopg2 (PostGreSQL/python database)
Hey, I'm pretty new to linux (using Ubuntu 11.04) so bear with me here. I downloaded psycopg2 2.4.1 from http://linux.softpedia.com/get/Database/Database-APIs/psycopg-6404.shtml Then I try running... python setup.py install..While in the directory but then it tells me.. Error: pg_config executable not found. Please add...
Here's an easy solution if you find your pg_config: find /opt /usr -name pg_config # Take note of path env PATH=${PATH}:/opt/local/lib/postgresql91/bin python setup.py build Or wherever your installation of PostgreSQL dumped off your pg_config file.
Trouble setting up psycopg2 (PostGreSQL/python database) Hey, I'm pretty new to linux (using Ubuntu 11.04) so bear with me here. I downloaded psycopg2 2.4.1 from http://linux.softpedia.com/get/Database/Database-APIs/psycopg-6404.shtml Then I try running... python setup.py install..While in the directory but then it tel...
TITLE: Trouble setting up psycopg2 (PostGreSQL/python database) QUESTION: Hey, I'm pretty new to linux (using Ubuntu 11.04) so bear with me here. I downloaded psycopg2 2.4.1 from http://linux.softpedia.com/get/Database/Database-APIs/psycopg-6404.shtml Then I try running... python setup.py install..While in the directo...
[ "python", "database", "postgresql", "ubuntu", "psycopg2" ]
0
2
2,609
2
0
2011-05-30T18:50:05.940000
2011-05-31T18:18:23.520000