PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
11,122,745
06/20/2012 15:19:33
457,584
09/24/2010 18:06:19
28
2
How to find RSS feed for a Qype account?
How do you find out the RSS feed URL for a specific Qype account? I want to be able to embed a feed from a specific Qype account within a website. (In this case I want to embed a feed from a client's Qype account that I can log into into their own website, but I'm interested to know whether it's possible to embed a feed from potentially any specified account whether you have access codes or not.)
rss
null
null
null
null
07/12/2012 12:29:07
not a real question
How to find RSS feed for a Qype account? === How do you find out the RSS feed URL for a specific Qype account? I want to be able to embed a feed from a specific Qype account within a website. (In this case I want to embed a feed from a client's Qype account that I can log into into their own website, but I'm interested to know whether it's possible to embed a feed from potentially any specified account whether you have access codes or not.)
1
1,721,387
11/12/2009 10:45:36
167,114
09/02/2009 09:08:54
75
3
How java.io.Buffer* stream differs from normal streams?
How buffered streams are working on the background and how it actually differs and what is the real advantage of using the same?
java
stream
bufferedinputstream
bufferedreader
null
null
open
How java.io.Buffer* stream differs from normal streams? === How buffered streams are working on the background and how it actually differs and what is the real advantage of using the same?
0
4,485,427
12/19/2010 22:17:48
385,478
07/07/2010 11:39:54
441
11
Android app widget: content added twice
I am writing an app widget which I intend to populate with a list of items. I'm trying to do it the easy way by extending `AppWidgetProvider`. I am seeing some strange behaviour where the list of items gets added to the parent widget twice. Here's the code: @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { Log.i("MyApp", "onUpdate called"); DbAdapter dbAdapter = new DbAdapter(context); dbAdapter.open(); final String[] columns = { DbTableCategory.KEY_NAME, DbTableCategory.KEY_CURRENTBAL }; Cursor cursor = dbAdapter.getDb().query(DbTableCategory.TABLE_NAME, columns, null, null, null, null, null); final int n = appWidgetIds.length; for (int i = 0; i < n; i++) { Log.i("MyApp", "Widget instance " + i); final int NUM_ITEMS = 4; int id = appWidgetIds[i]; RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.widget_layout); for (int c = 0; c < NUM_ITEMS; c++) { // get item info from db if (cursor.moveToPosition(c)) { RemoteViews itemView = new RemoteViews(context.getPackageName(), R.layout.widget_item); itemView.setTextViewText(R.id.widget_item_name, cursor.getString(0)); itemView.setTextViewText(R.id.widget_item_amnt, cursor.getString(1)); Log.i("MyApp", "Adding subview for item " + c); rv.addView(R.id.widget_container, itemView); } } appWidgetManager.updateAppWidget(id, rv); } cursor.close(); dbAdapter.close(); I add four items to the list, but I actually see eight items in the widget (the same four appearing twice). From the log output, it is telling me that there are two instances of the widget (according to the `appWidgetIds` array), so the outer loop is running twice, and the inner loop (for each item) is running four times as expected. I don't understand this, as I'm positive I've only added the widget to my home screen once. It's not on any of the other home screens either - I'm using the default HTC Sense launcher. Even if I had instantiated the widget twice, I'm creating a new RemoteViews for each widget instance. I just don't understand why the one widget instance seems to be receiving two lots of items. What am I getting wrong? Addendum: when I run the exact same code in the emulator, it works just fine, with just one widget instance being reported. It's only showing the strange behaviour on the actual phone (HTC Desire, Froyo).
android
widget
instance
null
null
null
open
Android app widget: content added twice === I am writing an app widget which I intend to populate with a list of items. I'm trying to do it the easy way by extending `AppWidgetProvider`. I am seeing some strange behaviour where the list of items gets added to the parent widget twice. Here's the code: @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { Log.i("MyApp", "onUpdate called"); DbAdapter dbAdapter = new DbAdapter(context); dbAdapter.open(); final String[] columns = { DbTableCategory.KEY_NAME, DbTableCategory.KEY_CURRENTBAL }; Cursor cursor = dbAdapter.getDb().query(DbTableCategory.TABLE_NAME, columns, null, null, null, null, null); final int n = appWidgetIds.length; for (int i = 0; i < n; i++) { Log.i("MyApp", "Widget instance " + i); final int NUM_ITEMS = 4; int id = appWidgetIds[i]; RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.widget_layout); for (int c = 0; c < NUM_ITEMS; c++) { // get item info from db if (cursor.moveToPosition(c)) { RemoteViews itemView = new RemoteViews(context.getPackageName(), R.layout.widget_item); itemView.setTextViewText(R.id.widget_item_name, cursor.getString(0)); itemView.setTextViewText(R.id.widget_item_amnt, cursor.getString(1)); Log.i("MyApp", "Adding subview for item " + c); rv.addView(R.id.widget_container, itemView); } } appWidgetManager.updateAppWidget(id, rv); } cursor.close(); dbAdapter.close(); I add four items to the list, but I actually see eight items in the widget (the same four appearing twice). From the log output, it is telling me that there are two instances of the widget (according to the `appWidgetIds` array), so the outer loop is running twice, and the inner loop (for each item) is running four times as expected. I don't understand this, as I'm positive I've only added the widget to my home screen once. It's not on any of the other home screens either - I'm using the default HTC Sense launcher. Even if I had instantiated the widget twice, I'm creating a new RemoteViews for each widget instance. I just don't understand why the one widget instance seems to be receiving two lots of items. What am I getting wrong? Addendum: when I run the exact same code in the emulator, it works just fine, with just one widget instance being reported. It's only showing the strange behaviour on the actual phone (HTC Desire, Froyo).
0
10,813,662
05/30/2012 09:37:23
1,425,663
05/30/2012 09:31:46
1
0
Records navigation
Using C# and SQL server, I want to be able to navigate through the records. Should I load all records into the dataset? Database could become very large. What is the best way to do this?
c#
sql
server
navigation
null
05/30/2012 20:01:54
not a real question
Records navigation === Using C# and SQL server, I want to be able to navigate through the records. Should I load all records into the dataset? Database could become very large. What is the best way to do this?
1
2,982,917
06/06/2010 02:44:25
304,725
11/04/2009 01:11:42
209
11
Good online HTML5 tutorials
Are there any good tutorials or resources online for learning HTML5? I already know HTML I am just looking to learn about the other things in HTML5. Thanks in advance!
html
resources
tutorials
html5
null
04/19/2012 20:09:45
not constructive
Good online HTML5 tutorials === Are there any good tutorials or resources online for learning HTML5? I already know HTML I am just looking to learn about the other things in HTML5. Thanks in advance!
4
6,391,004
06/17/2011 19:46:31
803,846
06/17/2011 19:40:31
1
0
Extracting value from onclick function call
In jQuery, how do I extract the number 4 from the doThisThing() function call from an onclick event: <div id="div1" onclick="doThisThing(4)"></div> and how do I set it? Thanks.
jquery
null
null
null
null
null
open
Extracting value from onclick function call === In jQuery, how do I extract the number 4 from the doThisThing() function call from an onclick event: <div id="div1" onclick="doThisThing(4)"></div> and how do I set it? Thanks.
0
5,530,020
04/03/2011 14:03:41
689,850
04/03/2011 13:55:07
1
0
C++ multiple header files and only one main
I have three .h files and a main file. How can I include all these files to use in the main file?. I included the first .h just fine and in the second I used static variables so that it could be included in the main but the third one I can't include. How can I include it? I'm using Dev C++.
c++
null
null
null
null
04/03/2011 16:44:02
not a real question
C++ multiple header files and only one main === I have three .h files and a main file. How can I include all these files to use in the main file?. I included the first .h just fine and in the second I used static variables so that it could be included in the main but the third one I can't include. How can I include it? I'm using Dev C++.
1
3,633,320
09/03/2010 05:47:13
438,644
09/03/2010 05:47:13
1
0
How to retrieve top users via FaceBook's API?
Is it possible? How to to do it?
php
api
facebook
null
null
11/24/2011 00:51:21
not a real question
How to retrieve top users via FaceBook's API? === Is it possible? How to to do it?
1
1,137,668
07/16/2009 13:38:43
131,050
06/30/2009 12:52:53
33
0
Is INNODB enabled by default in MySQL?
I am developing a web app for which I plan to use InnoDB. However I read that sometimes InnoDB is not enabled by default and, one needs to change mysql config to enable it... Is that true? Since my web app will be installed by client themselves on their own web space, I need to make sure my app is as compatible as possible. If InnoDB is disabled by default, then I have to look for workarounds.
mysql
innodb
null
null
null
null
open
Is INNODB enabled by default in MySQL? === I am developing a web app for which I plan to use InnoDB. However I read that sometimes InnoDB is not enabled by default and, one needs to change mysql config to enable it... Is that true? Since my web app will be installed by client themselves on their own web space, I need to make sure my app is as compatible as possible. If InnoDB is disabled by default, then I have to look for workarounds.
0
9,852,269
03/24/2012 13:51:15
675,931
03/24/2011 23:59:27
26
1
Rails CGI vs FastCGI vs PHP Godaddy
I want to get an opinion from the crowd. I'm a rails developer first and foremost. Any time a project comes into my lap, I always choose Rails over other platforms. I was a PHP dev for many years as well. I have a client who needs a site re-build. The current site is an old PHP app hosted on Godaddy "Deluxe" account. I would like to re-build the site in Rails. I read some documentation on the type of account and noticed that there is support (albeit, very limited) for Rails 2.3. So I went ahead and tried to get a Rails site running on that type of account. (I signed up for one just as a test). Turns out I can only get Rails 2.1 running in CGI mode. Nothing will run in FastCGI. I've tried just about everything. I've tried Freezing, and numerous tinkering with .htaccess, permissions..etc. Nothing works. I've spent hours of reading tons of potential solutions, I've been on and off calls with GD support. But in the end, Rails 2.1 and plan old CGI is my only option. (or 1.1.6, which is not going to happen) So, here's my question... do you as a developer, develop the site with Rails 2.1/cgi or bite the bullet and re-do the site with a PHP framework like Zend/Kohana/CI...etc? Before you say "Just switch hosting companies"... let me mention that this is not an option for this particular client. I know that sounds crazy, but its true. That option is off the table. Traffic for the site is lite. They get about 700-1000 hits a day max. In a perfect world, I'd throw these guys up on Heroku or Amazon and do it with Rails 3/Passenger. But alas, this is my predicament. Thoughts?
php
ruby-on-rails
ruby
cgi
fastcgi
03/27/2012 14:46:40
not constructive
Rails CGI vs FastCGI vs PHP Godaddy === I want to get an opinion from the crowd. I'm a rails developer first and foremost. Any time a project comes into my lap, I always choose Rails over other platforms. I was a PHP dev for many years as well. I have a client who needs a site re-build. The current site is an old PHP app hosted on Godaddy "Deluxe" account. I would like to re-build the site in Rails. I read some documentation on the type of account and noticed that there is support (albeit, very limited) for Rails 2.3. So I went ahead and tried to get a Rails site running on that type of account. (I signed up for one just as a test). Turns out I can only get Rails 2.1 running in CGI mode. Nothing will run in FastCGI. I've tried just about everything. I've tried Freezing, and numerous tinkering with .htaccess, permissions..etc. Nothing works. I've spent hours of reading tons of potential solutions, I've been on and off calls with GD support. But in the end, Rails 2.1 and plan old CGI is my only option. (or 1.1.6, which is not going to happen) So, here's my question... do you as a developer, develop the site with Rails 2.1/cgi or bite the bullet and re-do the site with a PHP framework like Zend/Kohana/CI...etc? Before you say "Just switch hosting companies"... let me mention that this is not an option for this particular client. I know that sounds crazy, but its true. That option is off the table. Traffic for the site is lite. They get about 700-1000 hits a day max. In a perfect world, I'd throw these guys up on Heroku or Amazon and do it with Rails 3/Passenger. But alas, this is my predicament. Thoughts?
4
9,772,645
03/19/2012 15:10:04
504,712
11/11/2010 15:49:34
58
2
ICS - JNI getmethodID crash
I'm currently porting Gingerbread code to ICS. The communication between C and Java happens properly in Gingerbread. But the same thing crashes in ICS. Not able to figure out. What are the major changes in ICS jni.? My current problem, 1. Get the Class Instance and convert it into global reference and store it. jclass myWrapperClass = (*env)->FindClass(env,"com/test/mypackage/Wrapper"); if (voipWrapperClass == NULL) { // class not found } WrapperClass = (jclass)(*env)->NewGlobalRef(env,WrapperClass); 2. From a JNI call the flow goes to below stack and returns callback to jni. From JNI to java the below function call void response(void* ptr, int result){ JNIEnv *envPtr= NULL; JavaVM* vmPtr= p_pdb->vm; if ((*vmPtr)->GetEnv(vmPtr,(void**) &envPtr, JNI_VERSION_1_4) == JNI_EDETACHED) { (*vmPtr)->AttachCurrentThread(vmPtr,(void**)&envPtr,NULL); } if (ptr->WrapperClass == NULL) { // Class found } RespMethodId = (*envPtr)->GetMethodID(envPtr,ptr->WrapperClass, "resp","(Z)V"); // this method is always 0 ... prev for gingerbread it returned a valid id.. } I tried the following methods... and still it remains the same... 1. Tried getting the method id in onLoad but it crashes with Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1) 2. Tried using classLoader.. but it crashes again { jclass activityClass = (*envPtr)->FindClass(envPtr,"android/app/NativeActivity"); jmethodID getClassLoader = (*envPtr)->GetMethodID(envPtr,activityClass,"getClassLoader", "()Ljava/lang/ClassLoader;"); jclass classLoader = (*envPtr)->FindClass(envPtr,"java/lang/ClassLoader"); jmethodID findClass = (*envPtr)->GetMethodID(envPtr,classLoader, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;"); jstring strClassName = (*envPtr)->NewStringUTF(envPtr,"com/test/mypackage/Wrapper"); jobject cls = (*envPtr)->CallObjectMethod(envPtr,ptr->WrapperClass, getClassLoader); // It crashes at this point saying local reference... jclass classIWant = (jclass)(*envPtr)->CallObjectMethod(envPtr,cls, findClass, strClassName); jmethodID initRespMethodId = (*envPtr)->GetMethodID(envPtr,classIWant, "init_resp","(Z)V"); } I m not able to proceed further.. pls do reply asap...
android
jni
ice-cream-sandwich
null
null
03/20/2012 17:15:40
not a real question
ICS - JNI getmethodID crash === I'm currently porting Gingerbread code to ICS. The communication between C and Java happens properly in Gingerbread. But the same thing crashes in ICS. Not able to figure out. What are the major changes in ICS jni.? My current problem, 1. Get the Class Instance and convert it into global reference and store it. jclass myWrapperClass = (*env)->FindClass(env,"com/test/mypackage/Wrapper"); if (voipWrapperClass == NULL) { // class not found } WrapperClass = (jclass)(*env)->NewGlobalRef(env,WrapperClass); 2. From a JNI call the flow goes to below stack and returns callback to jni. From JNI to java the below function call void response(void* ptr, int result){ JNIEnv *envPtr= NULL; JavaVM* vmPtr= p_pdb->vm; if ((*vmPtr)->GetEnv(vmPtr,(void**) &envPtr, JNI_VERSION_1_4) == JNI_EDETACHED) { (*vmPtr)->AttachCurrentThread(vmPtr,(void**)&envPtr,NULL); } if (ptr->WrapperClass == NULL) { // Class found } RespMethodId = (*envPtr)->GetMethodID(envPtr,ptr->WrapperClass, "resp","(Z)V"); // this method is always 0 ... prev for gingerbread it returned a valid id.. } I tried the following methods... and still it remains the same... 1. Tried getting the method id in onLoad but it crashes with Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1) 2. Tried using classLoader.. but it crashes again { jclass activityClass = (*envPtr)->FindClass(envPtr,"android/app/NativeActivity"); jmethodID getClassLoader = (*envPtr)->GetMethodID(envPtr,activityClass,"getClassLoader", "()Ljava/lang/ClassLoader;"); jclass classLoader = (*envPtr)->FindClass(envPtr,"java/lang/ClassLoader"); jmethodID findClass = (*envPtr)->GetMethodID(envPtr,classLoader, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;"); jstring strClassName = (*envPtr)->NewStringUTF(envPtr,"com/test/mypackage/Wrapper"); jobject cls = (*envPtr)->CallObjectMethod(envPtr,ptr->WrapperClass, getClassLoader); // It crashes at this point saying local reference... jclass classIWant = (jclass)(*envPtr)->CallObjectMethod(envPtr,cls, findClass, strClassName); jmethodID initRespMethodId = (*envPtr)->GetMethodID(envPtr,classIWant, "init_resp","(Z)V"); } I m not able to proceed further.. pls do reply asap...
1
7,228,769
08/29/2011 10:13:17
917,603
08/29/2011 10:13:17
1
0
JQuery tooltip on mouse over on images only in the form not to all img tags in a page
i got an example here at <http://www.kriesi.at/archives/create-simple-tooltips-with-css-and-jquery/comment-page-2#comment-2746> it creates a effect in style sheet and masks the default tooltip of any tag that is passed through this function $(document).ready(function() { simple_tooltip("img","tooltip"); }); function simple_tooltip(target_items, name){ $(target_items).each(function(i){ $("body").append("<div class='"+name+"' type='img' id='"+name+i+"'><p>"+$(this).attr('title')+"</p></div>"); var my_tooltip = $("#"+name+i); $(this).removeAttr("title").mouseover(function(){ my_tooltip.css({opacity:0.8, display:"none"}).fadeIn(400); }).mousemove(function(kmouse){ my_tooltip.css({left:kmouse.pageX+15, top:kmouse.pageY+15}); }).mouseout(function(){ my_tooltip.fadeOut(400); }); }); } but the problem is it shows tooltip on each an every image tag of the page where as i only wanted to show it on form validation help icon. here is my form <form id="form1"> <table id="tblSignUp" border="0" cellpadding="2" cellspacing="5" style="border: 0px solid black; color: #FFFFFF;"> <div id="inputs"> <tr> <td>First Name<font class="AsterikLabel">*</font> :</td> <td><input id="firstname" size="35" maxlength="50" type="text" style="width: 175px;" onblur="checkError(this);" name="fname" /> <img title="Alphabets, numbers and space(' ') , no special characters min 3 and max 20 characters." src="PsychOImages/20.png" align="bottom" /></td> <td id="firstName1"></td> </tr> <tr> <td>Last Name<font class="AsterikLabel">*</font> :</td> <td><input type="text" id="lastname" style="width: 175px;" name="lastname" onblur="checkError(this);" /> <img title="Alphabets, numbers and space(' ') , no special characters min 3 and max 20 characters." src="PsychOImages/20.png" align="bottom" /> </td> <td id="lastname1"></td> </tr> <tr> <td>Email<font class="AsterikLabel">*</font> :</td> <td><input id="email" type="text" style="width: 175px;" name="email" onblur="checkError(this);" /> <img title=" The Email address format is [email protected]." src="PsychOImages/20.png" align="bottom" /></td> <td id="email1"></td> </tr> <tr> <td>Telephone<font class="AsterikLabel">*</font> :</td> <td><input id="phone" type="text" style="width: 175px;" name="phone" onblur="checkError(this);" maxlength="16"/> <img title="Format : 339-4248 or (095) 2569835 or +7 (095)1452389" src="PsychOImages/20.png" align="bottom" /></td> <td id="phone1"></td> </tr> <tr> <td>Choose a Password<font class="AsterikLabel">*</font> :</td> <td><input id="password" type="password" style="width: 175px;" name="password" onblur="checkError(this);" /> <img title="Password feild can only contains 7 to 15 characters" src="PsychOImages/20.png" align="bottom" /></td> <td id="password1"></td> </tr> <tr> <td>Re-Type Password<font class="AsterikLabel">*</font> :</td> <td><input id="repassword" type="password" style="width: 175px;" name="retype" onblur="checkError(this);" /> <img title="Retype teh password same as above for confirmation" src="PsychOImages/20.png" align="bottom" /></td> <td id="repassword1"></td> </tr> </div> </table> </form> i have tried putting my form into a div and then giving that Div id to the function `simple_tooltip("","")` but it stops working then.... please help!
jquery
jquery-tooltip
null
null
null
null
open
JQuery tooltip on mouse over on images only in the form not to all img tags in a page === i got an example here at <http://www.kriesi.at/archives/create-simple-tooltips-with-css-and-jquery/comment-page-2#comment-2746> it creates a effect in style sheet and masks the default tooltip of any tag that is passed through this function $(document).ready(function() { simple_tooltip("img","tooltip"); }); function simple_tooltip(target_items, name){ $(target_items).each(function(i){ $("body").append("<div class='"+name+"' type='img' id='"+name+i+"'><p>"+$(this).attr('title')+"</p></div>"); var my_tooltip = $("#"+name+i); $(this).removeAttr("title").mouseover(function(){ my_tooltip.css({opacity:0.8, display:"none"}).fadeIn(400); }).mousemove(function(kmouse){ my_tooltip.css({left:kmouse.pageX+15, top:kmouse.pageY+15}); }).mouseout(function(){ my_tooltip.fadeOut(400); }); }); } but the problem is it shows tooltip on each an every image tag of the page where as i only wanted to show it on form validation help icon. here is my form <form id="form1"> <table id="tblSignUp" border="0" cellpadding="2" cellspacing="5" style="border: 0px solid black; color: #FFFFFF;"> <div id="inputs"> <tr> <td>First Name<font class="AsterikLabel">*</font> :</td> <td><input id="firstname" size="35" maxlength="50" type="text" style="width: 175px;" onblur="checkError(this);" name="fname" /> <img title="Alphabets, numbers and space(' ') , no special characters min 3 and max 20 characters." src="PsychOImages/20.png" align="bottom" /></td> <td id="firstName1"></td> </tr> <tr> <td>Last Name<font class="AsterikLabel">*</font> :</td> <td><input type="text" id="lastname" style="width: 175px;" name="lastname" onblur="checkError(this);" /> <img title="Alphabets, numbers and space(' ') , no special characters min 3 and max 20 characters." src="PsychOImages/20.png" align="bottom" /> </td> <td id="lastname1"></td> </tr> <tr> <td>Email<font class="AsterikLabel">*</font> :</td> <td><input id="email" type="text" style="width: 175px;" name="email" onblur="checkError(this);" /> <img title=" The Email address format is [email protected]." src="PsychOImages/20.png" align="bottom" /></td> <td id="email1"></td> </tr> <tr> <td>Telephone<font class="AsterikLabel">*</font> :</td> <td><input id="phone" type="text" style="width: 175px;" name="phone" onblur="checkError(this);" maxlength="16"/> <img title="Format : 339-4248 or (095) 2569835 or +7 (095)1452389" src="PsychOImages/20.png" align="bottom" /></td> <td id="phone1"></td> </tr> <tr> <td>Choose a Password<font class="AsterikLabel">*</font> :</td> <td><input id="password" type="password" style="width: 175px;" name="password" onblur="checkError(this);" /> <img title="Password feild can only contains 7 to 15 characters" src="PsychOImages/20.png" align="bottom" /></td> <td id="password1"></td> </tr> <tr> <td>Re-Type Password<font class="AsterikLabel">*</font> :</td> <td><input id="repassword" type="password" style="width: 175px;" name="retype" onblur="checkError(this);" /> <img title="Retype teh password same as above for confirmation" src="PsychOImages/20.png" align="bottom" /></td> <td id="repassword1"></td> </tr> </div> </table> </form> i have tried putting my form into a div and then giving that Div id to the function `simple_tooltip("","")` but it stops working then.... please help!
0
32,133
08/28/2008 12:50:16
3,018
08/26/2008 12:12:23
208
16
How can I introduce code reviews to my group/company?
My group is made up of very competent programmers. I work for the company's research team, which is pretty selective in hiring. Having said that, we all tend to work on different projects, so it is very easy to cut corners because no one is watching. I know that I have done it when time crunched. Every now and then, I have to work on someone else's project. Whenever this happens, I inevitably see a couple strange pieces of code that really should be improved upon. On the other side of the coin, before joining this team, I worked for another team that was comprised mostly of people that had never written one line of code prior to joining the team. This team had NO code review system. What kinds of things can I do to implement code reviews? I'm not a manager, in fact, I'm the newest person on my team, but I'd like my team to improve our code.
codereview
code-review
teamwork
null
null
11/08/2011 17:10:08
off topic
How can I introduce code reviews to my group/company? === My group is made up of very competent programmers. I work for the company's research team, which is pretty selective in hiring. Having said that, we all tend to work on different projects, so it is very easy to cut corners because no one is watching. I know that I have done it when time crunched. Every now and then, I have to work on someone else's project. Whenever this happens, I inevitably see a couple strange pieces of code that really should be improved upon. On the other side of the coin, before joining this team, I worked for another team that was comprised mostly of people that had never written one line of code prior to joining the team. This team had NO code review system. What kinds of things can I do to implement code reviews? I'm not a manager, in fact, I'm the newest person on my team, but I'd like my team to improve our code.
2
7,821,473
10/19/2011 12:41:07
1,003,136
10/19/2011 12:36:58
1
0
FFT in Javascript
Can you point me to an implementation of real fast fourier transform in javascript? Shuld work with just a simple array of real values. Thanks.
javascript
fft
null
null
null
10/19/2011 20:05:50
too localized
FFT in Javascript === Can you point me to an implementation of real fast fourier transform in javascript? Shuld work with just a simple array of real values. Thanks.
3
11,292,820
07/02/2012 11:32:12
1,495,743
07/02/2012 10:12:02
1
0
Coplanar Triangles get different shading?
I am a computer graphics beginner (have had 1 semester of CG basics). One question concerning shading (both flat and smooth) in THREE.js: Why are coplanar triangles shaded differently, both in flat and in smooth shading? The triangles, as you can see in the pictures below, have the correct face normals (i.e. all the same, perpendicular to the plane the triangles lie in, they are the blue ones in the pictures below). The vertex normals also look correct (i.e. also perpendicular to the plane except for the vertex normals of the vertices lying at the very border, red ones in the pictures below). I have a diamond-shaped geometry (as an ImmediateRenderObject) from which I subtract a CubeGeometry at the bottom (using THREE.CSG). Both before and after CSG operation, coplanar triangles get different shading, although face normals seem to be entirely correct (vertex normals don't seem to be entirely correct at the sharp edges of the diamond, but this shouldn't affect the coplanar parts at the top and on the different sides). Some idea why this happens and what I could do to get the correct shading?? I would really appreciate any help! Thanks in advance! :) Here are the pictures: Complete diamond with flat shading: http://i.stack.imgur.com/kWt6J.png Top of cut diamond with flat shading: http://i.stack.imgur.com/0OJZv.png
geometry
null
null
null
null
null
open
Coplanar Triangles get different shading? === I am a computer graphics beginner (have had 1 semester of CG basics). One question concerning shading (both flat and smooth) in THREE.js: Why are coplanar triangles shaded differently, both in flat and in smooth shading? The triangles, as you can see in the pictures below, have the correct face normals (i.e. all the same, perpendicular to the plane the triangles lie in, they are the blue ones in the pictures below). The vertex normals also look correct (i.e. also perpendicular to the plane except for the vertex normals of the vertices lying at the very border, red ones in the pictures below). I have a diamond-shaped geometry (as an ImmediateRenderObject) from which I subtract a CubeGeometry at the bottom (using THREE.CSG). Both before and after CSG operation, coplanar triangles get different shading, although face normals seem to be entirely correct (vertex normals don't seem to be entirely correct at the sharp edges of the diamond, but this shouldn't affect the coplanar parts at the top and on the different sides). Some idea why this happens and what I could do to get the correct shading?? I would really appreciate any help! Thanks in advance! :) Here are the pictures: Complete diamond with flat shading: http://i.stack.imgur.com/kWt6J.png Top of cut diamond with flat shading: http://i.stack.imgur.com/0OJZv.png
0
4,359,370
12/05/2010 15:00:29
264,419
02/02/2010 14:40:53
1,166
69
Reading XML vs reading CSV file java
What is quicker and better in performance? Reading XML with DocumentBuilder or CSV with FileReader/BufferReader in Java?
java
null
null
null
null
null
open
Reading XML vs reading CSV file java === What is quicker and better in performance? Reading XML with DocumentBuilder or CSV with FileReader/BufferReader in Java?
0
4,133,999
11/09/2010 13:12:13
253,924
01/19/2010 10:56:30
135
6
Hibernate not saving foreign key, but with junit it's ok
I have this strange problem. In a J2ee webapp with spring, smartgwt and hibernate, it happens that I have a class A wich has a set of class B, both of them mapped to table A and table B. I wrote a simple test case for testing the service manager which is supposed to do insert, update, delete and everything work as expected especially during insert. In the end I have one record in A and records in B with foreign key to A. But when I try to call the service from the web app, the entity in B are saved without a foreign key reference. I am sure that the service is the same. One thing I noticed is that enabling hibernate logging, seems that when the service is called from the application, one more update is made: - insert A - insert B - update A - update B - update B (foreign key only) - update A <--- ??? - update B <--- ??? Instead, when junit test case is run, the update is as follows: - insert A - insert B - update A - update B - update B (foreign key only) I suppose the latest update is what is causing the erroe, maybe it is overwriting values. Considering that the app is using spring, with the well known mechanism of DAO + Manager, where can I investigate to solve this issue ? Someone told me that the session is not closed, so hibernate would do one more update before release the objects by itself. I am pretty sure that all the configuration hbm, xml, and the rest are fine...but I maybe wrong. thanks
hibernate
foreign-key-relationship
null
null
null
null
open
Hibernate not saving foreign key, but with junit it's ok === I have this strange problem. In a J2ee webapp with spring, smartgwt and hibernate, it happens that I have a class A wich has a set of class B, both of them mapped to table A and table B. I wrote a simple test case for testing the service manager which is supposed to do insert, update, delete and everything work as expected especially during insert. In the end I have one record in A and records in B with foreign key to A. But when I try to call the service from the web app, the entity in B are saved without a foreign key reference. I am sure that the service is the same. One thing I noticed is that enabling hibernate logging, seems that when the service is called from the application, one more update is made: - insert A - insert B - update A - update B - update B (foreign key only) - update A <--- ??? - update B <--- ??? Instead, when junit test case is run, the update is as follows: - insert A - insert B - update A - update B - update B (foreign key only) I suppose the latest update is what is causing the erroe, maybe it is overwriting values. Considering that the app is using spring, with the well known mechanism of DAO + Manager, where can I investigate to solve this issue ? Someone told me that the session is not closed, so hibernate would do one more update before release the objects by itself. I am pretty sure that all the configuration hbm, xml, and the rest are fine...but I maybe wrong. thanks
0
4,243,164
11/22/2010 07:21:17
515,747
11/22/2010 07:21:17
1
0
SQL Server using Windows Authentication
[noob-alert]<br> Totally new to Windows programming.<br> [/noob-alert] I wish to connect to a MSSQL Server DB that utilizes AD authentication. All we need is a simplest possible command line utility to fetch some data and dump it to a txt file. Can I use VBScript for this/any-other-simple-script?<br> My first preference was to use Perl on Unix. Tried dbi:Sybase, doesn't seem to work :(. TIA,<br> Matt
windows
sql-server-2005
active-directory
null
null
null
open
SQL Server using Windows Authentication === [noob-alert]<br> Totally new to Windows programming.<br> [/noob-alert] I wish to connect to a MSSQL Server DB that utilizes AD authentication. All we need is a simplest possible command line utility to fetch some data and dump it to a txt file. Can I use VBScript for this/any-other-simple-script?<br> My first preference was to use Perl on Unix. Tried dbi:Sybase, doesn't seem to work :(. TIA,<br> Matt
0
9,837,391
03/23/2012 10:13:14
1,287,997
03/23/2012 10:05:02
1
0
Get emails from html source in c#
i have a html source, where is a few emails. I need grab this emails but i doesnt known how. It is posible with HtmlagilityPack? Thanks for help :)
c#
parsing
email
html-agility-pack
null
null
open
Get emails from html source in c# === i have a html source, where is a few emails. I need grab this emails but i doesnt known how. It is posible with HtmlagilityPack? Thanks for help :)
0
8,319,013
11/29/2011 23:04:38
1,060,565
11/22/2011 20:08:01
1
0
How would you output count()?
can someone please tell me how you would output this? Output it like Location M F Total. SELECT location, SUM(IF(gender='M',1,0)) AS M, SUM(IF(gender='F',1,0)) AS F, COUNT(*) AS total GROUP by location; Taken from - http://dev.mysql.com/tech-resources/articles/wizard/page3.html Thanks
php
count
null
null
null
11/29/2011 23:19:54
not a real question
How would you output count()? === can someone please tell me how you would output this? Output it like Location M F Total. SELECT location, SUM(IF(gender='M',1,0)) AS M, SUM(IF(gender='F',1,0)) AS F, COUNT(*) AS total GROUP by location; Taken from - http://dev.mysql.com/tech-resources/articles/wizard/page3.html Thanks
1
10,721,743
05/23/2012 14:11:14
1,412,209
05/23/2012 09:16:59
3
0
How to get current user's Pager number as part of MS Outlook Add-In using C#?
Currently I am developing an Add-In for MS Outlook 2010 using C# in VS2010. This will create an extra Menu in the ContextMenu when ever we click on the email id. On click of that menu it will display the corresponding user's pager no. I've followed the instructions as per the following url: (Extending the User Interface in Outlook 2010) http://msdn.microsoft.com/en-us/library/ee692172(office.14).aspx#OfficeOLExtendingUI_SampleAddin I can able to retrieve all user details like Address, First Name or Phone number etc. But I can't able to retrieve the Pager number. See the code below for the same: public void OnGetEmpIdClick(Office.IRibbonControl control) { try { Office.IMsoContactCard card = control.Context as Office.IMsoContactCard; if (card != null) { MessageBox.Show(GetEmpId(card), "Employee Id", MessageBoxButtons.OK); } else { MessageBox.Show("Unable to access contact card"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } private string GetEmpId(Office.IMsoContactCard card) { if (card.AddressType == Office.MsoContactCardAddressType.msoContactCardAddressTypeOutlook) { Outlook.Application host = Globals.ThisAddIn.Application; Outlook.AddressEntry ae = host.Session.GetAddressEntryFromID(card.Address); if ((ae.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeUserAddressEntry || ae.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeRemoteUserAddressEntry)) { Outlook.ExchangeUser ex = ae.GetExchangeUser(); return ex.BusinessTelephoneNumber; } else { throw new Exception("Valid address entry not found."); } } else { return card.Address; } } But Pager number property is not available. Please help me on this.
outlook
add-in
null
null
null
null
open
How to get current user's Pager number as part of MS Outlook Add-In using C#? === Currently I am developing an Add-In for MS Outlook 2010 using C# in VS2010. This will create an extra Menu in the ContextMenu when ever we click on the email id. On click of that menu it will display the corresponding user's pager no. I've followed the instructions as per the following url: (Extending the User Interface in Outlook 2010) http://msdn.microsoft.com/en-us/library/ee692172(office.14).aspx#OfficeOLExtendingUI_SampleAddin I can able to retrieve all user details like Address, First Name or Phone number etc. But I can't able to retrieve the Pager number. See the code below for the same: public void OnGetEmpIdClick(Office.IRibbonControl control) { try { Office.IMsoContactCard card = control.Context as Office.IMsoContactCard; if (card != null) { MessageBox.Show(GetEmpId(card), "Employee Id", MessageBoxButtons.OK); } else { MessageBox.Show("Unable to access contact card"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } private string GetEmpId(Office.IMsoContactCard card) { if (card.AddressType == Office.MsoContactCardAddressType.msoContactCardAddressTypeOutlook) { Outlook.Application host = Globals.ThisAddIn.Application; Outlook.AddressEntry ae = host.Session.GetAddressEntryFromID(card.Address); if ((ae.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeUserAddressEntry || ae.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeRemoteUserAddressEntry)) { Outlook.ExchangeUser ex = ae.GetExchangeUser(); return ex.BusinessTelephoneNumber; } else { throw new Exception("Valid address entry not found."); } } else { return card.Address; } } But Pager number property is not available. Please help me on this.
0
2,721,204
04/27/2010 12:41:59
159,118
08/19/2009 09:58:54
660
1
Whats wrong with this function
I cant work out which brackets are in the wrong place and where and now im completely lost: $("#slid").click(function() { $("#div1").animate({ top: "25px",}, 300 },function() { $("#div1").animate({ top: "85px",}, 300 }); }); Can anyone help?
jquery
null
null
null
null
null
open
Whats wrong with this function === I cant work out which brackets are in the wrong place and where and now im completely lost: $("#slid").click(function() { $("#div1").animate({ top: "25px",}, 300 },function() { $("#div1").animate({ top: "85px",}, 300 }); }); Can anyone help?
0
10,748,073
05/25/2012 03:20:54
1,416,452
05/25/2012 02:59:43
1
0
Find the overlap of a set of equal length string?
There are 1 million of equal length strings(short string).For example abcdefghi fghixyzyz ghiabcabc zyzdddxfg . . . I want to find pair-wise overlap of two string.The overlap of A"abcdefghi" and B"fghixyzyz" is "fghi",which is the maximal suffix of A , the maximal prefix of B ,satisfy the suffix and the prefix are equal. Is there efficient algorithm which can find the overlap of any two strings in the set?
string
algorithm
string-comparison
overlap
stringcollection
null
open
Find the overlap of a set of equal length string? === There are 1 million of equal length strings(short string).For example abcdefghi fghixyzyz ghiabcabc zyzdddxfg . . . I want to find pair-wise overlap of two string.The overlap of A"abcdefghi" and B"fghixyzyz" is "fghi",which is the maximal suffix of A , the maximal prefix of B ,satisfy the suffix and the prefix are equal. Is there efficient algorithm which can find the overlap of any two strings in the set?
0
5,922,395
05/07/2011 16:22:49
743,206
05/07/2011 16:22:49
1
0
How to keep grid cell height and width the same
I need to keep the Grid cell height = width when resizing. Here's the code: <Grid ShowGridLines="True"> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> </Grid> Please Help!
wpf
null
null
null
null
null
open
How to keep grid cell height and width the same === I need to keep the Grid cell height = width when resizing. Here's the code: <Grid ShowGridLines="True"> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> </Grid> Please Help!
0
8,866,604
01/15/2012 00:30:39
1,149,909
01/15/2012 00:25:03
1
0
Sheet music in Flash
I would like to know how much it would cost to create sheet input in flash like in this site - http://www.buttonbeats.com/sheetmusic.html or what knowledge do I need to have, to create it on my own. I haven't worked with flash yet, that's bad, but language itself is not problem for me. The methods I need to know is the problem for this. My goal is so that user can input notes with his keyboard, and after he presses button in page, I get inputed string as letters, not as notes. Nizerguy
flash
actionscript-3
null
null
null
01/15/2012 15:35:30
not constructive
Sheet music in Flash === I would like to know how much it would cost to create sheet input in flash like in this site - http://www.buttonbeats.com/sheetmusic.html or what knowledge do I need to have, to create it on my own. I haven't worked with flash yet, that's bad, but language itself is not problem for me. The methods I need to know is the problem for this. My goal is so that user can input notes with his keyboard, and after he presses button in page, I get inputed string as letters, not as notes. Nizerguy
4
5,868,043
05/03/2011 10:15:26
342,965
05/17/2010 11:14:03
36
0
Entity Data Model - export to other solutions in visual studio
a newbie question here... I've created an entity data model (.edmx) file in one project and now it's sitting there looking beautiful with complex types defined and diagrams all spaced properly.. Then I started a new project and try to reuse the same file by adding it to the project... I get a bunch of errors sayings it's not pointing to the right project... I tried to just copy the entire model into a new model and get a bunch of reference errors. How do I do this? surely it can't be this hard... I can of course import from the database but I don't get the complex types etc and remapping them is PIA.
.net
visual-studio-2010
visual
null
null
null
open
Entity Data Model - export to other solutions in visual studio === a newbie question here... I've created an entity data model (.edmx) file in one project and now it's sitting there looking beautiful with complex types defined and diagrams all spaced properly.. Then I started a new project and try to reuse the same file by adding it to the project... I get a bunch of errors sayings it's not pointing to the right project... I tried to just copy the entire model into a new model and get a bunch of reference errors. How do I do this? surely it can't be this hard... I can of course import from the database but I don't get the complex types etc and remapping them is PIA.
0
11,014,311
06/13/2012 11:55:06
1,410,239
05/22/2012 12:46:31
6
1
Share video on youtube and Facebook
"Hello sir/mam I want to share video on youtube and Facebook in my Xcode iOS 5.1 application. although i found the GDATA for Youtube and Facebook iOS sdk.Both work fine in individual project but when i want to use them in a single project then a problem is arise because both of them contain SBJson file.if i rename any one of them then they also not work.Please help me."
objective-c
ios
xcode
facebook-graph-api
null
06/20/2012 19:49:26
not a real question
Share video on youtube and Facebook === "Hello sir/mam I want to share video on youtube and Facebook in my Xcode iOS 5.1 application. although i found the GDATA for Youtube and Facebook iOS sdk.Both work fine in individual project but when i want to use them in a single project then a problem is arise because both of them contain SBJson file.if i rename any one of them then they also not work.Please help me."
1
1,398,230
09/09/2009 08:11:05
104,015
05/09/2009 09:59:12
1,021
0
How to send some data to server side and get the response with jQuery?
Like below,I need to send "name" and "psw" value to server side, and get the response as right or wrong. <table cellpadding="0" border="0" width="100%"> <tr align="center"> <td align="right">name/email:</td> <td><input type="text" id="name" /></td> </tr> <tr align="center"> <td align="right" valign="top">password:</td> <td> <input type="text" id="psw" /> </td> </tr> <tr align="center"> <td></td> <td><span id="loginErr"></span></td> </tr> </table> The simpler,the better.
jquery
ajax
null
null
null
null
open
How to send some data to server side and get the response with jQuery? === Like below,I need to send "name" and "psw" value to server side, and get the response as right or wrong. <table cellpadding="0" border="0" width="100%"> <tr align="center"> <td align="right">name/email:</td> <td><input type="text" id="name" /></td> </tr> <tr align="center"> <td align="right" valign="top">password:</td> <td> <input type="text" id="psw" /> </td> </tr> <tr align="center"> <td></td> <td><span id="loginErr"></span></td> </tr> </table> The simpler,the better.
0
3,618,914
09/01/2010 14:07:43
324,007
04/23/2010 08:46:15
134
4
Rails "moments ago" instead of created date?
Currently I have the following in my helper: def created_today k if k.created_at.to_date == Date.today then content_tag(:span, 'Today', :class => "todayhighlight") else k.created_at.to_s(:kasecreated) end end What I would like to do is replace TODAY with MOMENTS AGO if the `created_at` time is within the last 10 minutes. Is this possible? Would I just add another 'if' line after the current 'if k.created_at.to_date == Date.today then'? Thanks, Danny
ruby-on-rails
datetime
date
null
null
null
open
Rails "moments ago" instead of created date? === Currently I have the following in my helper: def created_today k if k.created_at.to_date == Date.today then content_tag(:span, 'Today', :class => "todayhighlight") else k.created_at.to_s(:kasecreated) end end What I would like to do is replace TODAY with MOMENTS AGO if the `created_at` time is within the last 10 minutes. Is this possible? Would I just add another 'if' line after the current 'if k.created_at.to_date == Date.today then'? Thanks, Danny
0
4,308,934
11/29/2010 22:55:31
518,308
11/24/2010 04:00:36
11
0
How to delete last character from a string using jQuery ?
How to delete last character from a string for instance in 123-4- when I delete 4 it should display 123- using **jQuery**.
jquery
null
null
null
null
null
open
How to delete last character from a string using jQuery ? === How to delete last character from a string for instance in 123-4- when I delete 4 it should display 123- using **jQuery**.
0
6,542,059
06/30/2011 23:05:57
467,195
10/05/2010 18:43:21
59
1
Unable to register java class with JSF 2.0 annotations
In my JSF project, I'm trying to register java classes with JSF 2.0 annotations instead of registering the classes in the faces-config.xml file. When I register the classes in the faces-config.xml file everything works. However, when I register the classes using annotations, I get the following error in the server log: WARNING: ApplicationDispatcher[/de.vogella.jsf.card2] PWC1231: Servlet.service() for servlet jsp threw exception javax.el.PropertyNotFoundException: Target Unreachable, identifier 'cardController' resolved to null at com.sun.el.parser.AstValue.getTarget(AstValue.java:131) ... WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception javax.el.PropertyNotFoundException: Target Unreachable, identifier 'cardController' resolved to null at com.sun.el.parser.AstValue.getTarget(AstValue.java:131) ... I'm new to these technologies so any help is greatly appreciated! The following is my set up when things don't work. **CardController.java** @ManagedBean @SessionScoped public class CardController { @ManagedProperty(value="#{card}") private Card card; ... public Card getCard() { return card; } public void setCard(Card card) { this.card = card; } } **Card.java** @ManagedBean public class Card { ... } **faces-config.xml** <?xml version="1.0" encoding="UTF-8"?> <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0"> </faces-config> I'm using JSF 2.0 with Mojarra 2.0.3-FCS and I'm running everything on Glassfish 3.1 integrated with Eclipse Helios and using JDK1.6.0_26. FYI, the tutorial this project is derived from is http://www.vogella.de/articles/JavaServerFaces/article.html#installation by Lars Vogel.
jsf
annotations
null
null
null
null
open
Unable to register java class with JSF 2.0 annotations === In my JSF project, I'm trying to register java classes with JSF 2.0 annotations instead of registering the classes in the faces-config.xml file. When I register the classes in the faces-config.xml file everything works. However, when I register the classes using annotations, I get the following error in the server log: WARNING: ApplicationDispatcher[/de.vogella.jsf.card2] PWC1231: Servlet.service() for servlet jsp threw exception javax.el.PropertyNotFoundException: Target Unreachable, identifier 'cardController' resolved to null at com.sun.el.parser.AstValue.getTarget(AstValue.java:131) ... WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception javax.el.PropertyNotFoundException: Target Unreachable, identifier 'cardController' resolved to null at com.sun.el.parser.AstValue.getTarget(AstValue.java:131) ... I'm new to these technologies so any help is greatly appreciated! The following is my set up when things don't work. **CardController.java** @ManagedBean @SessionScoped public class CardController { @ManagedProperty(value="#{card}") private Card card; ... public Card getCard() { return card; } public void setCard(Card card) { this.card = card; } } **Card.java** @ManagedBean public class Card { ... } **faces-config.xml** <?xml version="1.0" encoding="UTF-8"?> <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0"> </faces-config> I'm using JSF 2.0 with Mojarra 2.0.3-FCS and I'm running everything on Glassfish 3.1 integrated with Eclipse Helios and using JDK1.6.0_26. FYI, the tutorial this project is derived from is http://www.vogella.de/articles/JavaServerFaces/article.html#installation by Lars Vogel.
0
5,503,362
03/31/2011 16:49:19
309,412
04/05/2010 18:21:43
5,873
287
Passing array literal as macro argument
This has been bugging me for some time, for example, if I'm trying to write this code: // find the length of an array #define ARRAY_LENGTH(arr) (sizeof(arr)/sizeof(int)) // declare an array together with a variable containing the array's length #define ARRAY(name, arr) int name[] = arr; size_t name##_length = ARRAY_LENGTH(name); int main() { ARRAY(myarr, {1, 2, 3}); } The code gives this error: <stdin>:8:31: error: macro "ARRAY" passed 4 arguments, but takes just 2 Because it sees `ARRAY(myarr, {1, 2, 3});` as passing `ARRAY` the argument `myarr`, `{1`, `2`, and `3}`. Is there any way to pass an *array literal* to macros in C and C++?
c++
c
macros
null
null
null
open
Passing array literal as macro argument === This has been bugging me for some time, for example, if I'm trying to write this code: // find the length of an array #define ARRAY_LENGTH(arr) (sizeof(arr)/sizeof(int)) // declare an array together with a variable containing the array's length #define ARRAY(name, arr) int name[] = arr; size_t name##_length = ARRAY_LENGTH(name); int main() { ARRAY(myarr, {1, 2, 3}); } The code gives this error: <stdin>:8:31: error: macro "ARRAY" passed 4 arguments, but takes just 2 Because it sees `ARRAY(myarr, {1, 2, 3});` as passing `ARRAY` the argument `myarr`, `{1`, `2`, and `3}`. Is there any way to pass an *array literal* to macros in C and C++?
0
3,721,770
09/15/2010 21:02:03
148,510
07/31/2009 14:02:30
223
19
Why logic programming didn't win?
Seeing what it gives I see several huge advantages: - Better approach to bug-free programming. Example. If you have to enable/disable a menu item with imperative programming, you should not only remember on what condition this item is enabled, but also don't forget to track all the moments where this piece of the code should be executed. In LP the latter (I suppose) is not necessary - Potentially a great to way to write program that starts faster. Since everything is packed in dependencies, the actual code that is necessary, runs only when it is necessary. Generally many pieces of codes take much time during the start not because it is needed right now, but because it would be needed sometimes in the future. - Also seems a great way to automatically apply concurrency. This is because if we can track all the dependencies of the items, we can theoretically see that some branches of the graph can be evaluated in parallel. This is just my speculation, since I really didn't write any program with a logic programming language, but it seemed like very impressive concept. So are there disadvantages or my positive items not really true in real life? Thanks Max
language
theory
null
null
null
09/15/2010 21:33:34
not constructive
Why logic programming didn't win? === Seeing what it gives I see several huge advantages: - Better approach to bug-free programming. Example. If you have to enable/disable a menu item with imperative programming, you should not only remember on what condition this item is enabled, but also don't forget to track all the moments where this piece of the code should be executed. In LP the latter (I suppose) is not necessary - Potentially a great to way to write program that starts faster. Since everything is packed in dependencies, the actual code that is necessary, runs only when it is necessary. Generally many pieces of codes take much time during the start not because it is needed right now, but because it would be needed sometimes in the future. - Also seems a great way to automatically apply concurrency. This is because if we can track all the dependencies of the items, we can theoretically see that some branches of the graph can be evaluated in parallel. This is just my speculation, since I really didn't write any program with a logic programming language, but it seemed like very impressive concept. So are there disadvantages or my positive items not really true in real life? Thanks Max
4
1,970,154
12/28/2009 16:05:55
236,306
12/21/2009 19:47:17
11
0
jQuery replace all instances of a char in a node - working to a point
<a href="http://stackoverflow.com/questions/1512876/how-to-replace-text-in-html-document-without-affecting-the-markup/1512889#1512889">This answer</a> was almost exactly what I needed. After adding that fn, inline, at the top of my jQ code, I wrote this jQ lower down: $(":contains(|)").each(function() { replaceText('|', 'X'); }); This works, finding all pipe chars across the entire doc and replacing them with X. However I wanted to replace all pipe chars in a particular div, not across the whole doc. So I changed to: $("#mySpecificDiv:contains(|)").each(function() { replaceText('|', 'X'); }); However, this still replaces all instances across the doc. I am sure I should be using the third option 'node' (see linked-to answer) to limit the scope, but I've tried and failed to find the right syntax. Sorry that yet again, reading the books and trial and error and past experience has continued to thwart my efforts to master yet another stupidly simple jQ exercise and thanks in advance if you have time to show me what I am doing wrong. Cheers, -Alan
jquery
replace
null
null
null
null
open
jQuery replace all instances of a char in a node - working to a point === <a href="http://stackoverflow.com/questions/1512876/how-to-replace-text-in-html-document-without-affecting-the-markup/1512889#1512889">This answer</a> was almost exactly what I needed. After adding that fn, inline, at the top of my jQ code, I wrote this jQ lower down: $(":contains(|)").each(function() { replaceText('|', 'X'); }); This works, finding all pipe chars across the entire doc and replacing them with X. However I wanted to replace all pipe chars in a particular div, not across the whole doc. So I changed to: $("#mySpecificDiv:contains(|)").each(function() { replaceText('|', 'X'); }); However, this still replaces all instances across the doc. I am sure I should be using the third option 'node' (see linked-to answer) to limit the scope, but I've tried and failed to find the right syntax. Sorry that yet again, reading the books and trial and error and past experience has continued to thwart my efforts to master yet another stupidly simple jQ exercise and thanks in advance if you have time to show me what I am doing wrong. Cheers, -Alan
0
7,052,963
08/13/2011 20:09:15
499,560
11/07/2010 00:12:33
342
2
Are Project-Specific DSLs a Liability?
I've forked this question from a similar question I made in a comment I made to one of the many great answers I recieved. I was originally asking about AST macros, which mostly provoked very detailed and thoughtful responses from Lispers. Thanks. http://stackoverflow.com/questions/7046950/lazy-evaluation-vs-macros The question I made in a comment was whether project-specific DSLs are actually a good idea. Of course, this is completely subjective -- After all, when you are writing in a really expressive language, where do you draw the line between an expressive API and an actual DSL? For example, I think what most Rubyists call 'DSLs' are actually just well-designed APIs and nothing more. Note that I say **project-specific** APIs. I don't think many will argue against using regular expressions or SQL where it makes sense to do so. But despite this, I think we can all draw a vauge, hazy line between an API and a DSL. Of course they're both really APIs, but whatever. On one extreme you have Lisp, where DSLs seem to be actively encouraged via macros. On the other you have the likes of Java where DSLs are pretty much impossible. Proponents of DSLs would argue that they increase flexibility, expressiveness, and increase consistency (for example, a custom number object using the same operators as the language's own numbers). Detractors would say that they can lead to sub-languages that nobody except the DSL writer knows, kills the point of having different programming languages in the first place, and leads to code nobody can understand because the way of **interfacing** with API is different. I gotta say, I agree with both sides in many ways. Some Java APIs are just plain nasty due to the lack of expressiveness. Despite this, I can generally always work out what's going on without reading the documentation -- Which can't be said about custom DSLs in the slightest. Maybe DSL proponents argue that you should **always** read API documentation. I disagree, but I also digress. But let's look at some of the big languages at the moment. C# and Java, namely. Neither of them really 'do' DSLs, yet they're massively popular. Is this precisely because they **don't** allow things like DSLs, allowing mediocre coders to churn out code that's still comprehensible? Is the fact that DSLs allow mediocre coders to produce impenetrable garbage the reason why Lisp is not used as much as it should be, despite what a DSL can look like in the right hands?
java
api
macros
lisp
dsl
08/15/2011 04:23:36
off topic
Are Project-Specific DSLs a Liability? === I've forked this question from a similar question I made in a comment I made to one of the many great answers I recieved. I was originally asking about AST macros, which mostly provoked very detailed and thoughtful responses from Lispers. Thanks. http://stackoverflow.com/questions/7046950/lazy-evaluation-vs-macros The question I made in a comment was whether project-specific DSLs are actually a good idea. Of course, this is completely subjective -- After all, when you are writing in a really expressive language, where do you draw the line between an expressive API and an actual DSL? For example, I think what most Rubyists call 'DSLs' are actually just well-designed APIs and nothing more. Note that I say **project-specific** APIs. I don't think many will argue against using regular expressions or SQL where it makes sense to do so. But despite this, I think we can all draw a vauge, hazy line between an API and a DSL. Of course they're both really APIs, but whatever. On one extreme you have Lisp, where DSLs seem to be actively encouraged via macros. On the other you have the likes of Java where DSLs are pretty much impossible. Proponents of DSLs would argue that they increase flexibility, expressiveness, and increase consistency (for example, a custom number object using the same operators as the language's own numbers). Detractors would say that they can lead to sub-languages that nobody except the DSL writer knows, kills the point of having different programming languages in the first place, and leads to code nobody can understand because the way of **interfacing** with API is different. I gotta say, I agree with both sides in many ways. Some Java APIs are just plain nasty due to the lack of expressiveness. Despite this, I can generally always work out what's going on without reading the documentation -- Which can't be said about custom DSLs in the slightest. Maybe DSL proponents argue that you should **always** read API documentation. I disagree, but I also digress. But let's look at some of the big languages at the moment. C# and Java, namely. Neither of them really 'do' DSLs, yet they're massively popular. Is this precisely because they **don't** allow things like DSLs, allowing mediocre coders to churn out code that's still comprehensible? Is the fact that DSLs allow mediocre coders to produce impenetrable garbage the reason why Lisp is not used as much as it should be, despite what a DSL can look like in the right hands?
2
3,428,181
08/06/2010 22:13:40
234,790
12/18/2009 19:53:57
40
1
When an application pool is recycled in IIS, is the Application_End called?
I have some clean up stuff in Application_End method in Global.asax. When an application pool is recycled in IIS, is the Application_End called? or do I need to place the clean up code in any other function?
c#
asp.net
iis
null
null
null
open
When an application pool is recycled in IIS, is the Application_End called? === I have some clean up stuff in Application_End method in Global.asax. When an application pool is recycled in IIS, is the Application_End called? or do I need to place the clean up code in any other function?
0
7,974,347
11/01/2011 23:57:48
1,001,726
10/18/2011 17:53:23
1
0
What is the equivalent jQuery of this flash object...?
I trying to do a "slider" in my web but I haven't found a equivalent in jQuery of the continuos and automatic famous sliders of many web pages. Y only want that a few divs do a continuos and infinitive motion. Thnks so much. A greeting :)
jquery
flash
motion
null
null
11/02/2011 01:15:30
not a real question
What is the equivalent jQuery of this flash object...? === I trying to do a "slider" in my web but I haven't found a equivalent in jQuery of the continuos and automatic famous sliders of many web pages. Y only want that a few divs do a continuos and infinitive motion. Thnks so much. A greeting :)
1
7,933,070
10/28/2011 18:02:51
1,018,875
10/28/2011 17:56:24
1
0
Nested SQL statements For Oracle, How can I do this?
I am taking a sql database class using oracle, I am stuck on this problem I dont get it,.. "Find the book title, author last name, and units on hand for each book in branch number 4" I've tried different ways of nesting statement but none have worked. the tables are as fallows BOOK AUTHOR INVENTORY BRANCH can anyone help me fast!
sql
database
oracle
null
null
10/28/2011 18:56:24
not a real question
Nested SQL statements For Oracle, How can I do this? === I am taking a sql database class using oracle, I am stuck on this problem I dont get it,.. "Find the book title, author last name, and units on hand for each book in branch number 4" I've tried different ways of nesting statement but none have worked. the tables are as fallows BOOK AUTHOR INVENTORY BRANCH can anyone help me fast!
1
3,554,605
08/24/2010 08:17:09
298,106
03/20/2010 17:43:38
36
4
Call to a number, which contain #. (IPhone SDK)
I need to make call to a number, that start with #. For example phone number in Russia looks like +79123817711 and I need to call #79123817711. I'm trying this: NSURL *url = [NSURL URLWithString:@"tel://#79123817711"]; [[UIApplication sharedLibrary] openURL:url]; But it's replaced # with %23, and sure, not make a call. Is there any way to make such calls. I know, that is not a call, it's USSD request. But function of this ussd looks like a call.
iphone
ios
null
null
null
null
open
Call to a number, which contain #. (IPhone SDK) === I need to make call to a number, that start with #. For example phone number in Russia looks like +79123817711 and I need to call #79123817711. I'm trying this: NSURL *url = [NSURL URLWithString:@"tel://#79123817711"]; [[UIApplication sharedLibrary] openURL:url]; But it's replaced # with %23, and sure, not make a call. Is there any way to make such calls. I know, that is not a call, it's USSD request. But function of this ussd looks like a call.
0
6,817,227
07/25/2011 13:55:24
396,631
07/20/2010 09:38:10
1,110
70
Ninject Garbage Collection
I am using Ninject in a n-tier application consisting of services, repositories, all wired up with the UnitOfWork pattern and Ninject. Further, I have different jobs executing in separate threads referencing those services and repositories. Every now and again, seems at random times, I get an exception which crashes my console application executing the jobs. The exception is: Application: Playground.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.NullReferenceException Stack: at Ninject.Activation.Caching.GarbageCollectionCachePruner.PruneCacheIfGarbageCollectorHasRun(System.Object) at System.Threading.ExecutionContext.runTryCode(System.Object) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading._TimerCallback.PerformTimerCallback(System.Object) As far as I understand this has something to do with the new Cache-and-Collection management in Ninject. However, I have not specified any Scopes for any Ninject bindins. Any ideas are appreciated. Regards
c#
garbage-collection
ninject
null
null
08/20/2011 07:02:25
too localized
Ninject Garbage Collection === I am using Ninject in a n-tier application consisting of services, repositories, all wired up with the UnitOfWork pattern and Ninject. Further, I have different jobs executing in separate threads referencing those services and repositories. Every now and again, seems at random times, I get an exception which crashes my console application executing the jobs. The exception is: Application: Playground.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.NullReferenceException Stack: at Ninject.Activation.Caching.GarbageCollectionCachePruner.PruneCacheIfGarbageCollectorHasRun(System.Object) at System.Threading.ExecutionContext.runTryCode(System.Object) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading._TimerCallback.PerformTimerCallback(System.Object) As far as I understand this has something to do with the new Cache-and-Collection management in Ninject. However, I have not specified any Scopes for any Ninject bindins. Any ideas are appreciated. Regards
3
11,669,442
07/26/2012 12:36:46
1,448,979
06/11/2012 13:01:29
7
0
Using window.open to open a link in ios simulator,how can I close the page and return to the app?
I build an app with html+jquery+js,and using window.open(url) to open a webpage,now I don't know how to get back to my app because there is no close or return button on the page.Any ideas?Thanks.
javascript
jquery
ios
null
null
07/26/2012 20:46:47
not a real question
Using window.open to open a link in ios simulator,how can I close the page and return to the app? === I build an app with html+jquery+js,and using window.open(url) to open a webpage,now I don't know how to get back to my app because there is no close or return button on the page.Any ideas?Thanks.
1
4,135,751
11/09/2010 16:02:30
415,477
02/17/2010 14:41:29
241
3
Can we use a class created in an .asp file in a C# file
In my company one of the applications is a classic asp based application.In this application one the .asp has a Class Definition and a function associated with the class.I want to use this class an aspx.cs page.Is it possible to do this and how
c#
asp.net
asp-classic
null
null
null
open
Can we use a class created in an .asp file in a C# file === In my company one of the applications is a classic asp based application.In this application one the .asp has a Class Definition and a function associated with the class.I want to use this class an aspx.cs page.Is it possible to do this and how
0
5,695,610
04/17/2011 18:45:18
607,013
06/08/2010 22:15:48
31
2
Android- combining projects
Im currently working on a large project and I have built all the different modules into their own projects. Now I need to put all the modules together into one project. I would like for the separate activities to launch upon certain button clicks and I know how to do that. What Im kind of struggling with is importing all the other child activities into the main one. Can I just import all the source files from my modular projects into their places in the main app where they exist in their own project? Im imagining I will have to make declarations in the main activity.j file that I have to include everything but I havent built a really large project yet so some help would be much appreciated. If anybody has any tips on importing multiple projects into one main one I would love to here from them.
android
activity
projects
main
into
null
open
Android- combining projects === Im currently working on a large project and I have built all the different modules into their own projects. Now I need to put all the modules together into one project. I would like for the separate activities to launch upon certain button clicks and I know how to do that. What Im kind of struggling with is importing all the other child activities into the main one. Can I just import all the source files from my modular projects into their places in the main app where they exist in their own project? Im imagining I will have to make declarations in the main activity.j file that I have to include everything but I havent built a really large project yet so some help would be much appreciated. If anybody has any tips on importing multiple projects into one main one I would love to here from them.
0
9,461,793
02/27/2012 08:10:42
999,593
10/17/2011 16:37:51
340
17
How to parse & print get a element by element from xml in objective C?
I would like to parse an xml online & get it printed element by element of a single tag in iphone.I don't want it to be tabulated into UITableView,how can I do that.Please help me with an example on this which will be very much helpful.Thanks.
iphone
objective-c
xml
parsing
null
02/27/2012 17:11:35
not a real question
How to parse & print get a element by element from xml in objective C? === I would like to parse an xml online & get it printed element by element of a single tag in iphone.I don't want it to be tabulated into UITableView,how can I do that.Please help me with an example on this which will be very much helpful.Thanks.
1
7,803,729
10/18/2011 07:20:33
1,000,584
10/18/2011 07:18:34
1
0
Windows server CAL required?
My company is going to buy a new server to run our software on that we create. It's a java web application. We want it to be placed on a Windows Server 2008. Just a clean install of the server OS with our application on it. With our application we create a tomcat service. Then our cliënts can go to the site that's created with the tomcat to download our client application only, it's only accessible in our domain. (it's a server-client application). On the server there will be also a postgres installed. The application also takes files from a different file server (for connecting to the file server there are already CAL's). Do we need to buy CAL's for the new server where only a clean install of Windows Server 2008 is on installed and our application running a tomcat and postgres service?
windows
cal
null
null
null
11/13/2011 12:16:31
off topic
Windows server CAL required? === My company is going to buy a new server to run our software on that we create. It's a java web application. We want it to be placed on a Windows Server 2008. Just a clean install of the server OS with our application on it. With our application we create a tomcat service. Then our cliënts can go to the site that's created with the tomcat to download our client application only, it's only accessible in our domain. (it's a server-client application). On the server there will be also a postgres installed. The application also takes files from a different file server (for connecting to the file server there are already CAL's). Do we need to buy CAL's for the new server where only a clean install of Windows Server 2008 is on installed and our application running a tomcat and postgres service?
2
9,796,952
03/21/2012 00:24:45
374,833
06/24/2010 02:45:11
62
1
WM_COPYDATA: Can the receiver modify the COPYDATASTRUCT contents?
I am trying to communicate between two Windows applications in Delphi. Sender sends commands via SendMessage using WM_COPYDATA. That part is working fine. Is it possible for the receiver to reply back some result strings in the same call? It is failing for me and following is what is happening now. 1. Sender uses WM_COPYDATA to send a command to the Receiver using the blocking call SendMessge. 2. Receiver processes the command and modify the COPYDATASTRUCT with some result strings that must be sent back to the sender and exit out of the event handler 3. Receiver's "SendMessage" function returns but the contents of the COPYDATASTRUCT are still unchanged. Apparently Windows' messaging mechanism is not sharing the COPYDATASTRUCT memory between two applications. Instead it is making a copy.
delphi
inter-process-communicat
wm-copydata
null
null
null
open
WM_COPYDATA: Can the receiver modify the COPYDATASTRUCT contents? === I am trying to communicate between two Windows applications in Delphi. Sender sends commands via SendMessage using WM_COPYDATA. That part is working fine. Is it possible for the receiver to reply back some result strings in the same call? It is failing for me and following is what is happening now. 1. Sender uses WM_COPYDATA to send a command to the Receiver using the blocking call SendMessge. 2. Receiver processes the command and modify the COPYDATASTRUCT with some result strings that must be sent back to the sender and exit out of the event handler 3. Receiver's "SendMessage" function returns but the contents of the COPYDATASTRUCT are still unchanged. Apparently Windows' messaging mechanism is not sharing the COPYDATASTRUCT memory between two applications. Instead it is making a copy.
0
5,217,237
03/07/2011 08:01:16
437,703
09/02/2010 07:59:24
1,747
104
Android: How to catch only PACKAGE_REPLACED action
All I am trying to do is update my list on each Install & Uninstall but **not** on Package Replace .So the main problem is that Install & Uninstall intents are launched on each Replace action. So For this I have implemented a BroadcastReciever as below <receiver android:name =".IntentReceiverTest.AppReciever"> <intent-filter> <action android:name="android.intent.action.PACKAGE_REMOVED"/> <action android:name="android.intent.action.PACKAGE_REPLACED"/> <action android:name="android.intent.action.PACKAGE_ADDED"/> <data android:scheme="package"/> </intent-filter> </receiver> On each Replace I get 3 broadcasts with actions - First with **PACKAGE_REMOVED** which fires AppReciever - then after **PACKAGE_ADDED** which again fires AppReciever - And then after few seconds **PACKAGE_REPLACED** which again fires AppReciever So please suggest any better way to catch only Replace Action Or a way to **stop previously launched Services due to PACKAGE_REMOVED and PACKAGE_ADDED** action.
android
broadcastreceiver
intentfilter
null
null
null
open
Android: How to catch only PACKAGE_REPLACED action === All I am trying to do is update my list on each Install & Uninstall but **not** on Package Replace .So the main problem is that Install & Uninstall intents are launched on each Replace action. So For this I have implemented a BroadcastReciever as below <receiver android:name =".IntentReceiverTest.AppReciever"> <intent-filter> <action android:name="android.intent.action.PACKAGE_REMOVED"/> <action android:name="android.intent.action.PACKAGE_REPLACED"/> <action android:name="android.intent.action.PACKAGE_ADDED"/> <data android:scheme="package"/> </intent-filter> </receiver> On each Replace I get 3 broadcasts with actions - First with **PACKAGE_REMOVED** which fires AppReciever - then after **PACKAGE_ADDED** which again fires AppReciever - And then after few seconds **PACKAGE_REPLACED** which again fires AppReciever So please suggest any better way to catch only Replace Action Or a way to **stop previously launched Services due to PACKAGE_REMOVED and PACKAGE_ADDED** action.
0
8,175,363
11/17/2011 22:32:56
1,052,795
11/17/2011 22:14:21
1
0
java payroll week 2 compile errors
I am getting compile errors and am lost on how to correct them this is my inventory program part 2 that requires a method to calculate the entire inventory and a array to sort the product. I am not sure what I am doing wrong /** * @(#)inventory_2.java * * inventory_2 application * * @author * @version 1.00 2011/11/17 */ public class inventory_2 { public static void main(String args []) { DVD [] dvds = new DVD[5]; dvds[0] = new DVD("Fight Club", 4, 9.99, 685); dvds[1] = new DVD("Waiting", 8, 5.99, 565); dvds[2] = new DVD("Party Monster", 10, 11.99,785); dvds[3] = new DVD("Identity",8,5.99,578); dvds[4] = new DVD("Michael Clayton",3,7.99,823); dvd = new DVD("Fight Club", 4, 9.99, 685); System.out.println(dvd); System.out.println("Product Title is " + dvd.getDvdTitle()); System.out.println("The number of units in stock is" + dvd.getDvdStock()); System.out.println("The price of each DVD is" + dvd.getDvdPrice()); System.out.println("The item number is " + dvd.getDvdItem()); System.out.println("The value of the inventory is" + dvd.value()); dvd = new DVD ("Waiting", 8, 5.99, 565); System.out.println(dvd); System.out.println("Product Title is " + dvd.getDvdTitle()); System.out.println("The number of units in stock is" + dvd.getDvdStock()); System.out.println("The price of each DVD is" + dvd.getDvdPrice()); System.out.println("The item number is " + dvd.getDvdItem()); System.out.println("The value of the inventory is" + dvd.value()); dvd = new DVD ("Party Monster", 10, 11.99,785); System.out.println(dvd); System.out.println("Product Title is " + dvd.getDvdTitle()); System.out.println("The number of units in stock is" + dvd.getDvdStock()); System.out.println("The price of each DVD is" + dvd.getDvdPrice()); System.out.println("The item number is " + dvd.getDvdItem()); System.out.println("The value of the inventory is" + dvd.value()); dvd = new DVD ("Identity",8,5.99,578); System.out.println(dvd); System.out.println("Product Title is " + dvd.getDvdTitle()); System.out.println("The number of units in stock is" + dvd.getDvdStock()); System.out.println("The price of each DVD is" + dvd.getDvdPrice()); System.out.println("The item number is " + dvd.getDvdItem()); System.out.println("The value of the inventory is" + dvd.value()); dvd = new DVD ("Michael Clayton",3,7.99,823); System.out.println(dvd); System.out.println("Product Title is " + dvd.getDvdTitle()); System.out.println("The number of units in stock is" + dvd.getDvdStock()); System.out.println("The price of each DVD is" + dvd.getDvdPrice()); System.out.println("The item number is " + dvd.getDvdItem()); System.out.println("The value of the inventory is" + dvd.value()); }//end class main } // end class Inventory1 class InventoryList{ private String name; private int nbInStock; private double price; private int itemNumber; InventoryList(String pName, int nb, double priceEach, int itemNum){ itemNumber = itemNum; name = pName; nbInStock = nb; price = priceEach; class DVD { private String dvdTitle; private double dvdStock; private double dvdPrice; private double dvdItem; public DVD(String title, double stock, double price, double item) { dvdTitle = title; dvdStock = stock; dvdPrice = price; dvdItem = item; } //end four-argument constructor public void setDvdTitle(String title) { dvdTitle = title; } //end method setDvdTitle //return DVD Title public String getDvdTitle() { return dvdTitle; } //end method getDvdTitle //set DVD Stock public void setDvdStock(double stock) { dvdStock = stock; } //end method setDvdStock //return DvdStock public double getDvdStock() { return dvdStock; } //end method get Dvdstock public void setDvdPrice(double price) { dvdPrice = price; } //end method setDvdPrice //return dvdPrice public double getDvdPrice() { return dvdPrice; } //end method get Dvd Price public void setDvdItem(double item) { dvdItem = item; } //end method setdvdItem //return DVD item public double getDvdItem() { return dvdItem; } //end method getDvdItem //calculate inventory value public double value() { return dvdPrice * dvdStock; } //end method value } //end class DVD class Product{ int dvdNumber[] = new int[arrayLength]; String dvdName[] = new String[] {"Fight Club", "Waiting", "Party Monster", "Identity", "Michael Clayton"}; int dvdUnits[] = {5, 3, 2, 2, 3}; double dvdPrice[] = {9.99, 5.99, 11.95, 5.99, 7.99}; double dvdValue[] = new double[arrayLength]; } } } public class DVD public DVD (String DvdTitle, double ItemNumber, double ItemPrice, int NumberInStock, double RestockFee){ } public DVD(){ this.DvdTitle = DvdTitle; this.itemNumber = itemNumber; this.DVDPrice = DVDPrice; this.NumberInStock = NumberInStock; this. restockFee = RestockFee; } public String getDvdTitle() { return DvdTitle; } public void setDVDTitle(String DvdTitle) { this.DvdTitle = DvdTitle; } { public double getItemNumber() } return ItemNumber; ***<-----------class , interface, enum expected*** } public void setItemNumber(double ItemNumber) ***<-----------class , interface, enum expected*** { this.ItemNumber = itemNumber; public double getDvdPrice() { return DvdPrice; public void setDvdPrice(doublePrice) { this.DvdPrice = DvdPrice; public int getNumberInStock(int NumberInStock){***<-----------class , interface, enum expected*** } { return numberInStock; public double getRestockFee()***<-----------class , interface, enum expected*** } { } return(NumberInStock * DvdPrice); }***<-----------class , interface, enum expected*** }
java
null
null
null
null
11/18/2011 00:14:15
not a real question
java payroll week 2 compile errors === I am getting compile errors and am lost on how to correct them this is my inventory program part 2 that requires a method to calculate the entire inventory and a array to sort the product. I am not sure what I am doing wrong /** * @(#)inventory_2.java * * inventory_2 application * * @author * @version 1.00 2011/11/17 */ public class inventory_2 { public static void main(String args []) { DVD [] dvds = new DVD[5]; dvds[0] = new DVD("Fight Club", 4, 9.99, 685); dvds[1] = new DVD("Waiting", 8, 5.99, 565); dvds[2] = new DVD("Party Monster", 10, 11.99,785); dvds[3] = new DVD("Identity",8,5.99,578); dvds[4] = new DVD("Michael Clayton",3,7.99,823); dvd = new DVD("Fight Club", 4, 9.99, 685); System.out.println(dvd); System.out.println("Product Title is " + dvd.getDvdTitle()); System.out.println("The number of units in stock is" + dvd.getDvdStock()); System.out.println("The price of each DVD is" + dvd.getDvdPrice()); System.out.println("The item number is " + dvd.getDvdItem()); System.out.println("The value of the inventory is" + dvd.value()); dvd = new DVD ("Waiting", 8, 5.99, 565); System.out.println(dvd); System.out.println("Product Title is " + dvd.getDvdTitle()); System.out.println("The number of units in stock is" + dvd.getDvdStock()); System.out.println("The price of each DVD is" + dvd.getDvdPrice()); System.out.println("The item number is " + dvd.getDvdItem()); System.out.println("The value of the inventory is" + dvd.value()); dvd = new DVD ("Party Monster", 10, 11.99,785); System.out.println(dvd); System.out.println("Product Title is " + dvd.getDvdTitle()); System.out.println("The number of units in stock is" + dvd.getDvdStock()); System.out.println("The price of each DVD is" + dvd.getDvdPrice()); System.out.println("The item number is " + dvd.getDvdItem()); System.out.println("The value of the inventory is" + dvd.value()); dvd = new DVD ("Identity",8,5.99,578); System.out.println(dvd); System.out.println("Product Title is " + dvd.getDvdTitle()); System.out.println("The number of units in stock is" + dvd.getDvdStock()); System.out.println("The price of each DVD is" + dvd.getDvdPrice()); System.out.println("The item number is " + dvd.getDvdItem()); System.out.println("The value of the inventory is" + dvd.value()); dvd = new DVD ("Michael Clayton",3,7.99,823); System.out.println(dvd); System.out.println("Product Title is " + dvd.getDvdTitle()); System.out.println("The number of units in stock is" + dvd.getDvdStock()); System.out.println("The price of each DVD is" + dvd.getDvdPrice()); System.out.println("The item number is " + dvd.getDvdItem()); System.out.println("The value of the inventory is" + dvd.value()); }//end class main } // end class Inventory1 class InventoryList{ private String name; private int nbInStock; private double price; private int itemNumber; InventoryList(String pName, int nb, double priceEach, int itemNum){ itemNumber = itemNum; name = pName; nbInStock = nb; price = priceEach; class DVD { private String dvdTitle; private double dvdStock; private double dvdPrice; private double dvdItem; public DVD(String title, double stock, double price, double item) { dvdTitle = title; dvdStock = stock; dvdPrice = price; dvdItem = item; } //end four-argument constructor public void setDvdTitle(String title) { dvdTitle = title; } //end method setDvdTitle //return DVD Title public String getDvdTitle() { return dvdTitle; } //end method getDvdTitle //set DVD Stock public void setDvdStock(double stock) { dvdStock = stock; } //end method setDvdStock //return DvdStock public double getDvdStock() { return dvdStock; } //end method get Dvdstock public void setDvdPrice(double price) { dvdPrice = price; } //end method setDvdPrice //return dvdPrice public double getDvdPrice() { return dvdPrice; } //end method get Dvd Price public void setDvdItem(double item) { dvdItem = item; } //end method setdvdItem //return DVD item public double getDvdItem() { return dvdItem; } //end method getDvdItem //calculate inventory value public double value() { return dvdPrice * dvdStock; } //end method value } //end class DVD class Product{ int dvdNumber[] = new int[arrayLength]; String dvdName[] = new String[] {"Fight Club", "Waiting", "Party Monster", "Identity", "Michael Clayton"}; int dvdUnits[] = {5, 3, 2, 2, 3}; double dvdPrice[] = {9.99, 5.99, 11.95, 5.99, 7.99}; double dvdValue[] = new double[arrayLength]; } } } public class DVD public DVD (String DvdTitle, double ItemNumber, double ItemPrice, int NumberInStock, double RestockFee){ } public DVD(){ this.DvdTitle = DvdTitle; this.itemNumber = itemNumber; this.DVDPrice = DVDPrice; this.NumberInStock = NumberInStock; this. restockFee = RestockFee; } public String getDvdTitle() { return DvdTitle; } public void setDVDTitle(String DvdTitle) { this.DvdTitle = DvdTitle; } { public double getItemNumber() } return ItemNumber; ***<-----------class , interface, enum expected*** } public void setItemNumber(double ItemNumber) ***<-----------class , interface, enum expected*** { this.ItemNumber = itemNumber; public double getDvdPrice() { return DvdPrice; public void setDvdPrice(doublePrice) { this.DvdPrice = DvdPrice; public int getNumberInStock(int NumberInStock){***<-----------class , interface, enum expected*** } { return numberInStock; public double getRestockFee()***<-----------class , interface, enum expected*** } { } return(NumberInStock * DvdPrice); }***<-----------class , interface, enum expected*** }
1
510,876
02/04/2009 10:56:29
7,227
09/15/2008 13:23:05
121
8
Custom Spring sterotype annotation with scope of prototype?
I created a custom sterotype @Action, and Spring has managed to detect it in the package scan I configured in the configurations. The next step I would like to do is to tell Spring that all classes with @Action should be created with prototype, instead of Singleton. My @Action interface is as follows: @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented @Component public @interface Action { } I tried to mark it with @Scope("prototype") but that does not seem to help. Is what I desire possible? Kent
spring
java
null
null
null
null
open
Custom Spring sterotype annotation with scope of prototype? === I created a custom sterotype @Action, and Spring has managed to detect it in the package scan I configured in the configurations. The next step I would like to do is to tell Spring that all classes with @Action should be created with prototype, instead of Singleton. My @Action interface is as follows: @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented @Component public @interface Action { } I tried to mark it with @Scope("prototype") but that does not seem to help. Is what I desire possible? Kent
0
9,203,131
02/08/2012 23:22:39
1,188,695
02/04/2012 00:15:52
6
1
How to reference external JPA/JAXB domain model project?
I am developing a client/server application currently, where the server consists of a RESTful interface (jersey) and the client is a JSF application. Both are running on a glassfish 3.1.1 server. To persist some data and produce XML output I created a domain model with JAXB and JPA (eclipselink) annotations. Everything is fine, as long as the domain classes are within the server project. But I want to define the domain model in an external project, so that it can be used by the client (xml -> object) and the REST server (object -> xml) by referencing its *.jar. I alread achieved, that the JPA works correctly on the server, but the JAXB functionality has been "removed". I am very new to the Java EE stack.. maybe I am packaging in a wrong way. Would be very happy, if someone could give me a hint :-)
eclipse
java-ee
jpa
jaxb
glassfish
null
open
How to reference external JPA/JAXB domain model project? === I am developing a client/server application currently, where the server consists of a RESTful interface (jersey) and the client is a JSF application. Both are running on a glassfish 3.1.1 server. To persist some data and produce XML output I created a domain model with JAXB and JPA (eclipselink) annotations. Everything is fine, as long as the domain classes are within the server project. But I want to define the domain model in an external project, so that it can be used by the client (xml -> object) and the REST server (object -> xml) by referencing its *.jar. I alread achieved, that the JPA works correctly on the server, but the JAXB functionality has been "removed". I am very new to the Java EE stack.. maybe I am packaging in a wrong way. Would be very happy, if someone could give me a hint :-)
0
6,194,844
05/31/2011 23:53:10
528,813
12/03/2010 02:02:40
165
0
Manipulating strings - PHP or MySQL
I have a table filled with addresses which some have hyphens present in the string. Some are: *"Wheelbarrow rd"* others may be *"Potato cir - 1 through 100"* I'd like to be able to take out everything after the first occurrence of " - " if any at all before outputting the string. I don't plan on using the hyphenated strings anywhere as of yet - should I manipulate the string in MySQL or PHP. I imagine it'd be better to do in PHP but the upside to doing it in MySQL would be not having to manipulate the string every time I output it. What do you guys suggest? (I might need the full string later on so I don't necessarily want to do change the records in the DB) Cheers
php
mysql
string
null
null
06/03/2011 08:35:54
not a real question
Manipulating strings - PHP or MySQL === I have a table filled with addresses which some have hyphens present in the string. Some are: *"Wheelbarrow rd"* others may be *"Potato cir - 1 through 100"* I'd like to be able to take out everything after the first occurrence of " - " if any at all before outputting the string. I don't plan on using the hyphenated strings anywhere as of yet - should I manipulate the string in MySQL or PHP. I imagine it'd be better to do in PHP but the upside to doing it in MySQL would be not having to manipulate the string every time I output it. What do you guys suggest? (I might need the full string later on so I don't necessarily want to do change the records in the DB) Cheers
1
10,715,927
05/23/2012 08:10:30
683,024
03/29/2011 23:24:22
1
0
SQLite tables not persisting
My app makes a query with a default value from a sqlite table onCreate, but returns an error saying that that row does not exist. I then put in a method that drops all tables and recreates them before the query and it works perfectly. However, once I remove the method to recreate my tables, I get the same error saying that the row does not exist again. I don't know where to go from there since the error messages are not very helpful as the problem seems to lie somewhere deeper. Does anyone have an idea as to what I did wrong? Sorry for the lengthy and vague question and thanks for your reply.
android
sqlite
null
null
null
07/13/2012 17:50:21
too localized
SQLite tables not persisting === My app makes a query with a default value from a sqlite table onCreate, but returns an error saying that that row does not exist. I then put in a method that drops all tables and recreates them before the query and it works perfectly. However, once I remove the method to recreate my tables, I get the same error saying that the row does not exist again. I don't know where to go from there since the error messages are not very helpful as the problem seems to lie somewhere deeper. Does anyone have an idea as to what I did wrong? Sorry for the lengthy and vague question and thanks for your reply.
3
11,488,719
07/15/2012 01:34:35
1,075,423
06/21/2010 23:28:07
58
1
WPF Internals book recommendation
Most of the WPF books are oriented towards practical examples of how to use that technology. Those are mostly the HOW rather than WHY books. They are fine but a lot of times I find my self not completely understanding the logic behind some WPF features even though I use them daily. In order to become really good at something a deeper knowledge is required. So I was wondering is there some kind of WPF internals book that has deeper explanations of the whole technology (layout system, rendering, bindings...). That Dr.WPF guy had great explanations in his blog and MSDN forum posts but unfortunately he is no longer updating his blog. Some kind of book written in that style would be great but I am not aware of any?
wpf
books
internals
null
null
07/16/2012 10:28:07
not constructive
WPF Internals book recommendation === Most of the WPF books are oriented towards practical examples of how to use that technology. Those are mostly the HOW rather than WHY books. They are fine but a lot of times I find my self not completely understanding the logic behind some WPF features even though I use them daily. In order to become really good at something a deeper knowledge is required. So I was wondering is there some kind of WPF internals book that has deeper explanations of the whole technology (layout system, rendering, bindings...). That Dr.WPF guy had great explanations in his blog and MSDN forum posts but unfortunately he is no longer updating his blog. Some kind of book written in that style would be great but I am not aware of any?
4
1,428,333
09/15/2009 16:49:39
79,523
03/18/2009 14:46:44
115
6
Does anyone know any service similar to Tropo?
I have used tropo and pretty happy with the service http://tropo.com/ Does anyone know of a reliable alternative?
voip
voice
null
null
null
null
open
Does anyone know any service similar to Tropo? === I have used tropo and pretty happy with the service http://tropo.com/ Does anyone know of a reliable alternative?
0
7,177,907
08/24/2011 15:16:19
196,561
10/26/2009 10:50:57
8,691
337
Linux kernel - management of userspace memory
This book http://book.chinaunix.net/special/ebook/Linux_Kernel_Development/0672327201/ch14lev1sec2.html explains how the VMA (virtual memory areas) works in linux kernel. This is part of memory management subsystem, which manages memory of user-space process (`mmap`, virtual memory to physical memory and to page cache mappings, munmap, etc.) I want to learn how it works, but seems, the book is outdated and describes not a real linux kernel. E.g. it says in section "VMA Operations" struct page * nopage(struct vm_area_sruct *area, unsigned long address, int unused) int populate(struct vm_area_struct *area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock) But there are no `nopage` or `populate` functions in the current kernel (checked 2.6.0, 2.6.11, 2.6.28, 3.0.3 versions). **1st Q.** Can you recommend me good documentation about VMA in linux? Like it was described in the book (linked in second line of my question), but not outdated. I want to know, how anonymous `mmap(..."/dev/zero"...)` and `brk` will zero memory, when it will be mapped into writable physical page, how the page fault handler works on it (when it helps mmap to populate the memory page). There are some of my questions about this: **2nd Q.** For example, if I do an anonymous `mmap` of 1 MB and will write to it sequentially (from byte 0 up to byte 1024*1024-1), how much page faults will program have? **3rd Q.** If I do a `sbrk` of +1 MB, and will write to every byte of this memory, how much page faults will I get? **4th Q.** I did an `sbrk` of +1 MB; then I wrote to this memory (at this moment I don't count page faults); then I did `sbrk(-1MB)`, waited some time, and ask `sbrk` of +512 KB. How much page faults will I have on writes to memory, allocated in third sbrk? Is memory from 3rd `sbrk` zeroed or not? If you want to answer Questions 2..4, consider x86 platform with 2 GB of memory. Linux kernel version is 2.6.38 (ubuntu natty).
linux
memory-management
books
linux-kernel
mmap
null
open
Linux kernel - management of userspace memory === This book http://book.chinaunix.net/special/ebook/Linux_Kernel_Development/0672327201/ch14lev1sec2.html explains how the VMA (virtual memory areas) works in linux kernel. This is part of memory management subsystem, which manages memory of user-space process (`mmap`, virtual memory to physical memory and to page cache mappings, munmap, etc.) I want to learn how it works, but seems, the book is outdated and describes not a real linux kernel. E.g. it says in section "VMA Operations" struct page * nopage(struct vm_area_sruct *area, unsigned long address, int unused) int populate(struct vm_area_struct *area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock) But there are no `nopage` or `populate` functions in the current kernel (checked 2.6.0, 2.6.11, 2.6.28, 3.0.3 versions). **1st Q.** Can you recommend me good documentation about VMA in linux? Like it was described in the book (linked in second line of my question), but not outdated. I want to know, how anonymous `mmap(..."/dev/zero"...)` and `brk` will zero memory, when it will be mapped into writable physical page, how the page fault handler works on it (when it helps mmap to populate the memory page). There are some of my questions about this: **2nd Q.** For example, if I do an anonymous `mmap` of 1 MB and will write to it sequentially (from byte 0 up to byte 1024*1024-1), how much page faults will program have? **3rd Q.** If I do a `sbrk` of +1 MB, and will write to every byte of this memory, how much page faults will I get? **4th Q.** I did an `sbrk` of +1 MB; then I wrote to this memory (at this moment I don't count page faults); then I did `sbrk(-1MB)`, waited some time, and ask `sbrk` of +512 KB. How much page faults will I have on writes to memory, allocated in third sbrk? Is memory from 3rd `sbrk` zeroed or not? If you want to answer Questions 2..4, consider x86 platform with 2 GB of memory. Linux kernel version is 2.6.38 (ubuntu natty).
0
11,537,496
07/18/2012 08:44:49
1,531,541
07/17/2012 11:09:12
11
0
.NET SQL Server Authentication Schema issue
I am currently working on a project for a client. The application is written in ASP.NET C#. The Database used is SQL Server 2008. The project has been to migrate the old Oracle database to a new SQL Server database so it connects to the .NET code and works correctly. We used Microsoft Microsoft SQL Server Migration Assistant (SSMA) to convert the Oracle database across to SQL server. This worked for the most part, however we did have to make some changed to the stored procedures and some functions. The problem is that now when i try and run the .NET code it will not pick up any of the stored procedures or functions as they now have a schema prefix and the .NET code does not pick this up. The .NET code connects to the SQL Server database using Windowws Authentication and therefore i am unable to add a default schema to the user or login within SQL Server as it is a group. Is there any way i can get around this? If you would like more information i will be happy to provide it. Thanks Boldonglen
.net
sql-server
migration
schema
null
07/19/2012 14:08:38
off topic
.NET SQL Server Authentication Schema issue === I am currently working on a project for a client. The application is written in ASP.NET C#. The Database used is SQL Server 2008. The project has been to migrate the old Oracle database to a new SQL Server database so it connects to the .NET code and works correctly. We used Microsoft Microsoft SQL Server Migration Assistant (SSMA) to convert the Oracle database across to SQL server. This worked for the most part, however we did have to make some changed to the stored procedures and some functions. The problem is that now when i try and run the .NET code it will not pick up any of the stored procedures or functions as they now have a schema prefix and the .NET code does not pick this up. The .NET code connects to the SQL Server database using Windowws Authentication and therefore i am unable to add a default schema to the user or login within SQL Server as it is a group. Is there any way i can get around this? If you would like more information i will be happy to provide it. Thanks Boldonglen
2
10,680,557
05/21/2012 06:43:25
651,174
03/09/2011 08:26:41
1,831
48
Can't force string on enumerate?
I'm trying to do the following: for index, image_properties in enumerate(list_of_properties): index = str(index) But I keep getting TypeError at /gettingstarted/avatar_iframe/ 'str' object is not callable What is going wrong here?
python
null
null
null
null
null
open
Can't force string on enumerate? === I'm trying to do the following: for index, image_properties in enumerate(list_of_properties): index = str(index) But I keep getting TypeError at /gettingstarted/avatar_iframe/ 'str' object is not callable What is going wrong here?
0
7,145,152
08/22/2011 09:00:09
877,759
08/04/2011 02:45:02
13
1
change default date format in ruby on rails?
I want to change default date format in Rails. Format should be y/m/d . I add following code into my environment.rb ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS. merge!(:default => '%Y/%m/%d') But it didn't work. How can I change default format? I use rails 2.3.8 version
ruby-on-rails
ruby
date
null
null
null
open
change default date format in ruby on rails? === I want to change default date format in Rails. Format should be y/m/d . I add following code into my environment.rb ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS. merge!(:default => '%Y/%m/%d') But it didn't work. How can I change default format? I use rails 2.3.8 version
0
6,211,615
06/02/2011 07:19:06
780,707
06/02/2011 07:19:06
1
0
What's the fastest way to load big image on iPhone ?
HI there, I am building a scrollview which swipes through 100 images of houses. It works. But.... For every image viewed the allocated memory increases by 2.5 MB. In the end the app crashed because it ran out of memory. I use the code for decompress the image..... - (void)decompress { const CGImageRef cgImage = [self CGImage]; const int width = CGImageGetWidth(cgImage); const int height = CGImageGetHeight(cgImage); const CGColorSpaceRef colorspace = CGImageGetColorSpace(cgImage); const CGContextRef context = CGBitmapContextCreate( NULL, /* Where to store the data. NULL = don’t care */ width, height, /* width & height */ 8, width * 4, /* bits per component, bytes per row */ colorspace, kCGImageAlphaNoneSkipFirst); CGContextDrawImage(context, CGRectMake(0, 0, width, height), cgImage); CGContextRelease(context); } but its not working,very time to take load the image.
objective-c
null
null
null
null
null
open
What's the fastest way to load big image on iPhone ? === HI there, I am building a scrollview which swipes through 100 images of houses. It works. But.... For every image viewed the allocated memory increases by 2.5 MB. In the end the app crashed because it ran out of memory. I use the code for decompress the image..... - (void)decompress { const CGImageRef cgImage = [self CGImage]; const int width = CGImageGetWidth(cgImage); const int height = CGImageGetHeight(cgImage); const CGColorSpaceRef colorspace = CGImageGetColorSpace(cgImage); const CGContextRef context = CGBitmapContextCreate( NULL, /* Where to store the data. NULL = don’t care */ width, height, /* width & height */ 8, width * 4, /* bits per component, bytes per row */ colorspace, kCGImageAlphaNoneSkipFirst); CGContextDrawImage(context, CGRectMake(0, 0, width, height), cgImage); CGContextRelease(context); } but its not working,very time to take load the image.
0
7,186,577
08/25/2011 07:29:46
911,233
08/25/2011 05:30:11
1
0
if and else for visible form
i have this code but return error private void formshow_Click(object sender, EventArgs e) { if (form1.Visible) { MessageBox.Show("This form is visible"); } else { Form2 f = new Form2(); f.Show(); } } help me please
c#
visual-studio-2010
visibility
null
null
07/06/2012 22:24:22
not a real question
if and else for visible form === i have this code but return error private void formshow_Click(object sender, EventArgs e) { if (form1.Visible) { MessageBox.Show("This form is visible"); } else { Form2 f = new Form2(); f.Show(); } } help me please
1
8,447,519
12/09/2011 15:11:32
579,218
06/18/2010 18:55:48
14
1
IE9 Not Embedding/Rendering PDF Inline in Browser Window
We're using Reporting Services to generate a PDF report and we need it to be rendered out to the browser window AND embedded in the browser. We've been doing this a long time and it has always worked ... until IE9. In IE6, IE7, and IE8, we generate the byte array from Reporting Services that represents the PDF report and binary write it out to the browser, and everything works great. The PDF displays embedded in the browser. In IE9, we try the same exact thing and the PDF is NOT embedded in the browser window. The browser window stays open and is blank/empty, and the PDF is opened in Adobe Reader in a separate window. Here's a snippet of our code: try { // Set all the Reporting Services variables and parameters and render the report // ... byte[] result = rs.Render(format, devInfo, out extension, out mimeType, out encoding, out warnings, out streamIDs); // Force the render out of the report to the browser Response.Clear(); Response.ClearContent(); Response.ClearHeaders(); Response.AppendHeader("content-length", result.Length.ToString()); Response.AppendHeader("Pragma", "cache"); Response.AppendHeader("Expires", "3600"); Response.Buffer = true; Response.Cache.SetCacheability(HttpCacheability.Private); Response.CacheControl = "private"; Response.Charset = System.Text.UTF8Encoding.UTF8.WebName; Response.ContentEncoding = System.Text.UTF8Encoding.UTF8; switch (outputformat) { case "PDF": Response.AppendHeader("content-disposition", "inline; filename=report.pdf"); Response.ContentType = "application/pdf"; break; default: break; } Response.BinaryWrite(result); Response.Flush(); Response.Close(); Response.End(); } catch (System.Exception ex) { // ... } What can we do to get the PDF rendered and embedded in the IE9 broswer window? Thanks!
c#
pdf
pdf-generation
internet-explorer-9
null
null
open
IE9 Not Embedding/Rendering PDF Inline in Browser Window === We're using Reporting Services to generate a PDF report and we need it to be rendered out to the browser window AND embedded in the browser. We've been doing this a long time and it has always worked ... until IE9. In IE6, IE7, and IE8, we generate the byte array from Reporting Services that represents the PDF report and binary write it out to the browser, and everything works great. The PDF displays embedded in the browser. In IE9, we try the same exact thing and the PDF is NOT embedded in the browser window. The browser window stays open and is blank/empty, and the PDF is opened in Adobe Reader in a separate window. Here's a snippet of our code: try { // Set all the Reporting Services variables and parameters and render the report // ... byte[] result = rs.Render(format, devInfo, out extension, out mimeType, out encoding, out warnings, out streamIDs); // Force the render out of the report to the browser Response.Clear(); Response.ClearContent(); Response.ClearHeaders(); Response.AppendHeader("content-length", result.Length.ToString()); Response.AppendHeader("Pragma", "cache"); Response.AppendHeader("Expires", "3600"); Response.Buffer = true; Response.Cache.SetCacheability(HttpCacheability.Private); Response.CacheControl = "private"; Response.Charset = System.Text.UTF8Encoding.UTF8.WebName; Response.ContentEncoding = System.Text.UTF8Encoding.UTF8; switch (outputformat) { case "PDF": Response.AppendHeader("content-disposition", "inline; filename=report.pdf"); Response.ContentType = "application/pdf"; break; default: break; } Response.BinaryWrite(result); Response.Flush(); Response.Close(); Response.End(); } catch (System.Exception ex) { // ... } What can we do to get the PDF rendered and embedded in the IE9 broswer window? Thanks!
0
5,431,690
03/25/2011 11:16:56
601,367
01/31/2011 08:34:52
31
0
jquery video uploading
how to upload videos using jquery and display in lightbox
video
lightbox
null
null
null
07/30/2012 19:57:42
not a real question
jquery video uploading === how to upload videos using jquery and display in lightbox
1
4,862,790
02/01/2011 12:51:56
488,735
10/27/2010 11:15:57
98
1
Strategy to instantiate classes in a PHP Project
I'm building an application with a pattern that is something like the MVC and I need to know how to deal with a specific situation. I will explain visualy. I have the project folder this kind of organization: + database | - postgresql.php + models | - categories.php - countries.php - domains.php - example_usage.php Ok, in the database/postgresql.php I have the Driver for the PostgreSQL Database, with the code bellow: <?php // Just to test the Class // Parse Config.ini - Parsing do ficheiro de Configuração $ini_array = parse_ini_file("../Config.ini", true); // Mostra a BD configurada para funcionar $active_database = $ini_array['current_database']; // Mostra os dados da BD configurada para funcionar $details_active_database = $ini_array[$active_database]; // Instanciar a Base de Dados $db = new Postgresql( $details_active_database['host'], $details_active_database['port'], $details_active_database['user'], $details_active_database['password'], $details_active_database['dbname'] ); print_r( $db->query('select * from tdir_categorias') ); class Postgresql { private $connection; public function __construct($hostname, $port, $username, $password, $database) { // Lançar excepções para os parametros // hostname nulo ou branco if (is_null($hostname) OR $hostname == '') { // O $hostname não pode vir a vazio, vou lançar excepção throw new Exception("O parametro hostname nao pode vir a vazio, Metodo em causa: __construct()"); } // port nulo ou branco if (is_null($port) OR $port == '') { // O $port não pode vir a vazio, vou lançar excepção throw new Exception("O parametro port nao pode vir a vazio, Metodo em causa: __construct()"); } // username nulo ou branco if (is_null($username) OR $username == '') { // O $username não pode vir a vazio, vou lançar excepção throw new Exception("O parametro username nao pode vir a vazio, Metodo em causa: __construct()"); } // password nulo ou branco if (is_null($password) OR $password == '') { // O $password não pode vir a vazio, vou lançar excepção throw new Exception("O parametro password nao pode vir a vazio, Metodo em causa: __construct()"); } // database nulo ou branco if (is_null($database) OR $database == '') { // O $database não pode vir a vazio, vou lançar excepção throw new Exception("O parametro database nao pode vir a vazio, Metodo em causa: __construct()"); } // Connection String $connection_string = "host=$hostname port=$port dbname=$database user=$username password=$password"; // Connect to Database if (!$this->connection = pg_connect($connection_string)) { throw new Exception("Nao foi efectuada com sucesso ligacao a Base de Dados, Metodo em causa: __construct()"); } } public function query($sql) { $resource = pg_query($this->connection, $sql); // Se $resource for TRUE if ($resource) { if (is_resource($resource)) { $i = 0; $data = array(); while ($result = pg_fetch_assoc($resource)) { $data[$i] = $result; $i++; } pg_free_result($resource); $query = new stdClass(); $query->row = isset($data[0]) ? $data[0] : array(); $query->rows = $data; $query->num_rows = $i; unset($data); return $query; } else { return TRUE; } } else /* Se $resource for FALSE */ { throw new Exception(pg_last_error($this->connection) . " SQL, " . $sql . ": query()"); } } public function escape($value) { } public function countAffected() { } public function getLastId() { } public function __destruct() { } } ?> In the models files I don't have nothing yeat. <?php class Categories { // do things with the database calling the postgresql.php driver. } ?> And the file "example_usage.php" will be the file that I want to call the models, this file is a kind of controller in the MVC Pattern. My doubt... How can Instantiate the Postgresql.php Class and the Models Classes to call the methods inside the Models Classes in the example_usage.php Please give me a clue. I would be very aprreciated. Sorry for my bad english. Best Regards,
php
mvc
class
instantiation
null
null
open
Strategy to instantiate classes in a PHP Project === I'm building an application with a pattern that is something like the MVC and I need to know how to deal with a specific situation. I will explain visualy. I have the project folder this kind of organization: + database | - postgresql.php + models | - categories.php - countries.php - domains.php - example_usage.php Ok, in the database/postgresql.php I have the Driver for the PostgreSQL Database, with the code bellow: <?php // Just to test the Class // Parse Config.ini - Parsing do ficheiro de Configuração $ini_array = parse_ini_file("../Config.ini", true); // Mostra a BD configurada para funcionar $active_database = $ini_array['current_database']; // Mostra os dados da BD configurada para funcionar $details_active_database = $ini_array[$active_database]; // Instanciar a Base de Dados $db = new Postgresql( $details_active_database['host'], $details_active_database['port'], $details_active_database['user'], $details_active_database['password'], $details_active_database['dbname'] ); print_r( $db->query('select * from tdir_categorias') ); class Postgresql { private $connection; public function __construct($hostname, $port, $username, $password, $database) { // Lançar excepções para os parametros // hostname nulo ou branco if (is_null($hostname) OR $hostname == '') { // O $hostname não pode vir a vazio, vou lançar excepção throw new Exception("O parametro hostname nao pode vir a vazio, Metodo em causa: __construct()"); } // port nulo ou branco if (is_null($port) OR $port == '') { // O $port não pode vir a vazio, vou lançar excepção throw new Exception("O parametro port nao pode vir a vazio, Metodo em causa: __construct()"); } // username nulo ou branco if (is_null($username) OR $username == '') { // O $username não pode vir a vazio, vou lançar excepção throw new Exception("O parametro username nao pode vir a vazio, Metodo em causa: __construct()"); } // password nulo ou branco if (is_null($password) OR $password == '') { // O $password não pode vir a vazio, vou lançar excepção throw new Exception("O parametro password nao pode vir a vazio, Metodo em causa: __construct()"); } // database nulo ou branco if (is_null($database) OR $database == '') { // O $database não pode vir a vazio, vou lançar excepção throw new Exception("O parametro database nao pode vir a vazio, Metodo em causa: __construct()"); } // Connection String $connection_string = "host=$hostname port=$port dbname=$database user=$username password=$password"; // Connect to Database if (!$this->connection = pg_connect($connection_string)) { throw new Exception("Nao foi efectuada com sucesso ligacao a Base de Dados, Metodo em causa: __construct()"); } } public function query($sql) { $resource = pg_query($this->connection, $sql); // Se $resource for TRUE if ($resource) { if (is_resource($resource)) { $i = 0; $data = array(); while ($result = pg_fetch_assoc($resource)) { $data[$i] = $result; $i++; } pg_free_result($resource); $query = new stdClass(); $query->row = isset($data[0]) ? $data[0] : array(); $query->rows = $data; $query->num_rows = $i; unset($data); return $query; } else { return TRUE; } } else /* Se $resource for FALSE */ { throw new Exception(pg_last_error($this->connection) . " SQL, " . $sql . ": query()"); } } public function escape($value) { } public function countAffected() { } public function getLastId() { } public function __destruct() { } } ?> In the models files I don't have nothing yeat. <?php class Categories { // do things with the database calling the postgresql.php driver. } ?> And the file "example_usage.php" will be the file that I want to call the models, this file is a kind of controller in the MVC Pattern. My doubt... How can Instantiate the Postgresql.php Class and the Models Classes to call the methods inside the Models Classes in the example_usage.php Please give me a clue. I would be very aprreciated. Sorry for my bad english. Best Regards,
0
10,520,484
05/09/2012 16:45:16
553,609
12/24/2010 23:19:46
1,677
58
How can I make bugs for product backlog items in TFS Preview (Azure Hosted TFS)?
I'm new to team foundation server, and more specifically, the TFS preview (Azure Hosted TFS) on [tfspreview.com][1]. I find it strange that when I add a bug work item and link it as a child to one of my user stories, it is being shown individually in the system as a "container" that can contain several tasks in my scrum board as shown below. ![enter image description here][2] [1]: http://tfspreview.com [2]: http://i.stack.imgur.com/HiTYX.png *By the way, the bug is the one with the red "circle" around it.* As you can see, the bug has a plus icon next to it allowing me to add tasks for the bug. But why would that be needed? In which scenario is that handy? For me, there are always 2 tasks needed for every bug found (and my developers are aware of this). - Build an automated test to recreate the bug if possible. - Fix the bug itself, making the above tests pass. So how can I make my bug be contained within my "General: Translations" product backlog item, making it movable (as a task) from "To-do" to "In-progress", and from there to "Completed"? Right now it acts like a category for tasks, which is not at all appropriate for me.
tfs
azure-hosted-tfs
null
null
null
null
open
How can I make bugs for product backlog items in TFS Preview (Azure Hosted TFS)? === I'm new to team foundation server, and more specifically, the TFS preview (Azure Hosted TFS) on [tfspreview.com][1]. I find it strange that when I add a bug work item and link it as a child to one of my user stories, it is being shown individually in the system as a "container" that can contain several tasks in my scrum board as shown below. ![enter image description here][2] [1]: http://tfspreview.com [2]: http://i.stack.imgur.com/HiTYX.png *By the way, the bug is the one with the red "circle" around it.* As you can see, the bug has a plus icon next to it allowing me to add tasks for the bug. But why would that be needed? In which scenario is that handy? For me, there are always 2 tasks needed for every bug found (and my developers are aware of this). - Build an automated test to recreate the bug if possible. - Fix the bug itself, making the above tests pass. So how can I make my bug be contained within my "General: Translations" product backlog item, making it movable (as a task) from "To-do" to "In-progress", and from there to "Completed"? Right now it acts like a category for tasks, which is not at all appropriate for me.
0
1,951,002
12/23/2009 06:26:10
144,697
07/24/2009 19:02:35
84
2
Is learning Java and related technologies worth it today?
My career has always been C and C++ programming. I have some basic Java experience. I have a lot of personal Ruby/Rails experience and lately I've been doing some Grails stuff at work as well. I'm just curious if it's worth it to pick up Java and related technologies such as Spring, Hibernate, etc... Grails seems like it removes the need to learn these things for the most part except if you want to get into the guts of things. For professional purposes, is it more worth it to learn Java, Spring, Hibernate, etc? Are technologies such as Grails, Rails and other frameworks taking over? Are there other Java technologies that I'm missing that would be good to pick up in order to strengthen a career? Any comments are welcome but I would really like an unbiased point of view on this as I'm trying to move out of the C / C++ world and pick up some newer technologies that will help my career in the future.
java
grails
ruby-on-rails
spring
hibernate
12/23/2009 07:09:43
not constructive
Is learning Java and related technologies worth it today? === My career has always been C and C++ programming. I have some basic Java experience. I have a lot of personal Ruby/Rails experience and lately I've been doing some Grails stuff at work as well. I'm just curious if it's worth it to pick up Java and related technologies such as Spring, Hibernate, etc... Grails seems like it removes the need to learn these things for the most part except if you want to get into the guts of things. For professional purposes, is it more worth it to learn Java, Spring, Hibernate, etc? Are technologies such as Grails, Rails and other frameworks taking over? Are there other Java technologies that I'm missing that would be good to pick up in order to strengthen a career? Any comments are welcome but I would really like an unbiased point of view on this as I'm trying to move out of the C / C++ world and pick up some newer technologies that will help my career in the future.
4
8,993,701
01/24/2012 20:32:34
1,028,135
11/03/2011 16:24:52
620
42
How create portable version application?
How can I create portable version for my application? My application similar to Power Point. I have developed it using C++. Thanks.
c++
portability
null
null
null
01/24/2012 21:29:37
not a real question
How create portable version application? === How can I create portable version for my application? My application similar to Power Point. I have developed it using C++. Thanks.
1
2,648,212
04/15/2010 19:07:56
146,699
07/28/2009 21:33:22
70
3
Connecting to Python XML RPC from the Mac
I wrote an XML RPC server in python and a simple Test Client for it in python. The Server runs on a linux box. I tested it by running the python client on the same linux machine and it works. I then tried to run the python client on a Mac and i get the following error socket.error: (61, 'Connection Refused') I can ping and ssh into the linux machine from the Mac. So i dont think its a configuration or firewall error. Does anyone have any idea what could be going wrong? The code for the client is as below: import xmlrpclib s = xmlrpclib.ServerProxy('http://143.252.249.141:8000') print s.GetUsers() print s.system.listMethods()
python
xml-rpc
osx
null
null
null
open
Connecting to Python XML RPC from the Mac === I wrote an XML RPC server in python and a simple Test Client for it in python. The Server runs on a linux box. I tested it by running the python client on the same linux machine and it works. I then tried to run the python client on a Mac and i get the following error socket.error: (61, 'Connection Refused') I can ping and ssh into the linux machine from the Mac. So i dont think its a configuration or firewall error. Does anyone have any idea what could be going wrong? The code for the client is as below: import xmlrpclib s = xmlrpclib.ServerProxy('http://143.252.249.141:8000') print s.GetUsers() print s.system.listMethods()
0
7,572,708
09/27/2011 16:44:22
939,213
08/30/2011 15:46:38
66
9
How do I get a backgroundworker to report more than just an int?
I want the backgroundworker to send back some custom information to the ProgressChanged event handler, but it seems that all it can send is an int. Is there a way around this? Thanks
c#
backgroundworker
null
null
null
null
open
How do I get a backgroundworker to report more than just an int? === I want the backgroundworker to send back some custom information to the ProgressChanged event handler, but it seems that all it can send is an int. Is there a way around this? Thanks
0
11,328,887
07/04/2012 12:13:18
1,220,543
03/16/2011 19:17:33
38
3
Boost::Log - Log with severity and custom filter attribute? Which macro(s) to use?
I want to use boost::log to let my loadtest application log to different files and to console. Each workthread (representing one user connected to the server to be tested) shall log thread log and log failed calls to failed calls log. I try to achieve that by using filters. The goal is: => All logs with severity = lower than "INFO" will be discarded => All log records having the attribute "global" go to ./logs/loadtest.log AND to console => All log records having the attribute "thread" go to ./logs/thread.log AND to console => All log records having the attribute "faileCalls" go to ./logs/failedCalls.log AND to console This is my initialization code: void initLogging() { boost::shared_ptr<boost::log::core::basic_core> core = boost::log::core::get(); // Construct the sinks for our global log file and for console typedef boost::log::sinks::asynchronous_sink<boost::log::sinks::text_ostream_backend> text_sink; // global log file boost::shared_ptr<text_sink> sinkLoadtest = boost::make_shared<text_sink>(); sinkLoadtest->locked_backend()->add_stream(boost::make_shared<std::ofstream>("./logs/loadtest.log", std::ios::app)); sinkLoadtest->locked_backend()->auto_flush(true); sinkLoadtest->set_filter(boost::log::filters::has_attr("global")); core->add_sink(sinkLoadtest); // console boost::shared_ptr<text_sink> sinkConsole = boost::make_shared<text_sink>(); boost::shared_ptr<std::ostream> stream(&std::clog, boost::log::empty_deleter()); sinkConsole->locked_backend()->add_stream(stream); sinkConsole->locked_backend()->auto_flush(true); core->add_sink(sinkConsole); // thread dependent logging (one file per workthread) sinkThread = boost::make_shared<text_sink>(); sinkFailedCalls = boost::make_shared<text_sink>(); sinkThread->locked_backend()->add_stream(boost::make_shared<std::ofstream>("./logs/thread.log"), std::ios::app)); sinkFailedCalls->locked_backend()->add_stream(boost::make_shared<std::ofstream>("./logs/failedCalls.log", std::ios::app)); sinkThread->set_filter(boost::log::filters::has_attr("thread")); sinkFailedCalls->set_filter(boost::log::filters::has_attr("failedCalls")); core->add_sink(sinkThread); core->add_sink(sinkFailedCalls); // set global severity level core->set_filter(boost::log::filters::attr<boost::log::trivial::severity_level>("Severity") >= boost::log::trivial::info); } These are my questions: Which macro(s) to use to be able to pass Severity level PLUS one of my custom filter attributes? What is the best way to obtail the logger? Alwas get it from core or have a member variable "logger"? I need it to be thread-safe. Thank you in advance for your effort! Best Jan
c++
logging
boost
filter
null
null
open
Boost::Log - Log with severity and custom filter attribute? Which macro(s) to use? === I want to use boost::log to let my loadtest application log to different files and to console. Each workthread (representing one user connected to the server to be tested) shall log thread log and log failed calls to failed calls log. I try to achieve that by using filters. The goal is: => All logs with severity = lower than "INFO" will be discarded => All log records having the attribute "global" go to ./logs/loadtest.log AND to console => All log records having the attribute "thread" go to ./logs/thread.log AND to console => All log records having the attribute "faileCalls" go to ./logs/failedCalls.log AND to console This is my initialization code: void initLogging() { boost::shared_ptr<boost::log::core::basic_core> core = boost::log::core::get(); // Construct the sinks for our global log file and for console typedef boost::log::sinks::asynchronous_sink<boost::log::sinks::text_ostream_backend> text_sink; // global log file boost::shared_ptr<text_sink> sinkLoadtest = boost::make_shared<text_sink>(); sinkLoadtest->locked_backend()->add_stream(boost::make_shared<std::ofstream>("./logs/loadtest.log", std::ios::app)); sinkLoadtest->locked_backend()->auto_flush(true); sinkLoadtest->set_filter(boost::log::filters::has_attr("global")); core->add_sink(sinkLoadtest); // console boost::shared_ptr<text_sink> sinkConsole = boost::make_shared<text_sink>(); boost::shared_ptr<std::ostream> stream(&std::clog, boost::log::empty_deleter()); sinkConsole->locked_backend()->add_stream(stream); sinkConsole->locked_backend()->auto_flush(true); core->add_sink(sinkConsole); // thread dependent logging (one file per workthread) sinkThread = boost::make_shared<text_sink>(); sinkFailedCalls = boost::make_shared<text_sink>(); sinkThread->locked_backend()->add_stream(boost::make_shared<std::ofstream>("./logs/thread.log"), std::ios::app)); sinkFailedCalls->locked_backend()->add_stream(boost::make_shared<std::ofstream>("./logs/failedCalls.log", std::ios::app)); sinkThread->set_filter(boost::log::filters::has_attr("thread")); sinkFailedCalls->set_filter(boost::log::filters::has_attr("failedCalls")); core->add_sink(sinkThread); core->add_sink(sinkFailedCalls); // set global severity level core->set_filter(boost::log::filters::attr<boost::log::trivial::severity_level>("Severity") >= boost::log::trivial::info); } These are my questions: Which macro(s) to use to be able to pass Severity level PLUS one of my custom filter attributes? What is the best way to obtail the logger? Alwas get it from core or have a member variable "logger"? I need it to be thread-safe. Thank you in advance for your effort! Best Jan
0
11,336,297
07/04/2012 23:17:51
1,166,332
01/24/2012 05:27:16
42
0
Essential minimal Obj-C object set when writing C++ for iOS
I'm about to start writing an iOS app. I want to avoid the Apple libraries to keep the code mostly cross platform. I'm reading a book on Obj-C/iOS. I'm handling the the GUI with Ogre with 3D. The audio loop is handled as is SQL/Data -- All c++. I know I will need to use the Apple API for touch, but what are the other essential objects I should be looking into to go along with the bulk of the c++. What are the essential objects?
c++
objective-c
ios
cocoa-touch
null
07/05/2012 09:46:48
not constructive
Essential minimal Obj-C object set when writing C++ for iOS === I'm about to start writing an iOS app. I want to avoid the Apple libraries to keep the code mostly cross platform. I'm reading a book on Obj-C/iOS. I'm handling the the GUI with Ogre with 3D. The audio loop is handled as is SQL/Data -- All c++. I know I will need to use the Apple API for touch, but what are the other essential objects I should be looking into to go along with the bulk of the c++. What are the essential objects?
4
8,957,138
01/21/2012 22:07:34
1,162,860
01/21/2012 22:02:15
1
0
Easy to use web API's to start playing with
Im at the point where i would like to start playing around with some web information apis in my programs. Noting Specific but something that i can use with java or python. I tried using the google task api, but it seemed a little tough with the authentication process.Any suggestions?
java
python
api
null
null
01/23/2012 18:30:33
not constructive
Easy to use web API's to start playing with === Im at the point where i would like to start playing around with some web information apis in my programs. Noting Specific but something that i can use with java or python. I tried using the google task api, but it seemed a little tough with the authentication process.Any suggestions?
4
7,025,624
08/11/2011 12:12:54
341,189
05/14/2010 11:40:24
11
2
Font-face Flicker Firefox FadeIn
Whenever I fade in text that has a font-face applied. As it finishes fadding in it flickers. Why would this be? Thanks.
jquery
firefox
font-face
null
null
null
open
Font-face Flicker Firefox FadeIn === Whenever I fade in text that has a font-face applied. As it finishes fadding in it flickers. Why would this be? Thanks.
0
1,045,581
06/25/2009 18:49:09
122,847
06/14/2009 21:54:32
22
1
Fill textbox with current username logged in sharepoint.
I made a custom list, it is actually a form fill out for an absence request workflow. Before publishing it I found a flaw. The first textbox is a Person or Group textbox, this helps out to retrieve the Active Directory username, but the flaw is that I can type whatever username I want, Example: "User X is logged on, but if he types User Y and hits enter he can request an absence for User Y" So what I want is, hide the textbox and fill it automatically with the current logged on user. I've been looking for formulas for the calculated textboxes but I haven't found anything.
sharepoint
textbox
formulas
null
null
null
open
Fill textbox with current username logged in sharepoint. === I made a custom list, it is actually a form fill out for an absence request workflow. Before publishing it I found a flaw. The first textbox is a Person or Group textbox, this helps out to retrieve the Active Directory username, but the flaw is that I can type whatever username I want, Example: "User X is logged on, but if he types User Y and hits enter he can request an absence for User Y" So what I want is, hide the textbox and fill it automatically with the current logged on user. I've been looking for formulas for the calculated textboxes but I haven't found anything.
0
9,847,846
03/23/2012 23:44:06
434,445
08/29/2010 21:48:46
240
2
Leiningen unable to run
Just installed leiningen on my mac via homebrew, and whenever I try and use it I get the following: Exception in thread "main" java.lang.RuntimeException: java.lang.NoSuchMethodError: clojure.lang.KeywordLookupSite.<init>(ILclojure/lang/Keyword;)V Every post to fix this I seem to come across involves the use of lein... which I can't run. any ideas?
osx
clojure
leiningen
null
null
null
open
Leiningen unable to run === Just installed leiningen on my mac via homebrew, and whenever I try and use it I get the following: Exception in thread "main" java.lang.RuntimeException: java.lang.NoSuchMethodError: clojure.lang.KeywordLookupSite.<init>(ILclojure/lang/Keyword;)V Every post to fix this I seem to come across involves the use of lein... which I can't run. any ideas?
0
8,184,284
11/18/2011 14:50:50
1,053,986
11/18/2011 14:29:22
1
0
Applications using .netframework 2.0 are not working on windows7
I am running problems with windows7, applications using ,net framework 2.0 are not running, i know that i cannot install 2.0 from net as it is shipped with OS. I tried to enable(ON) .net framework 3.5 from windows feature but didn't help. A message appears that not all feature were completed in success. When I expand Microsoft .net framework 3.5 there are only two items Wndows Communication Foundation HTTP Activation and Windows Communication Foundation Non HTTP Activation. There is no .net framework 2.0 or any other listed there. Can any body here help me how can i enable/install .net framework 2.0 or 3.5. thanks in advance
.net
windows
windows-7
operating-system
microsoft
11/18/2011 15:24:31
off topic
Applications using .netframework 2.0 are not working on windows7 === I am running problems with windows7, applications using ,net framework 2.0 are not running, i know that i cannot install 2.0 from net as it is shipped with OS. I tried to enable(ON) .net framework 3.5 from windows feature but didn't help. A message appears that not all feature were completed in success. When I expand Microsoft .net framework 3.5 there are only two items Wndows Communication Foundation HTTP Activation and Windows Communication Foundation Non HTTP Activation. There is no .net framework 2.0 or any other listed there. Can any body here help me how can i enable/install .net framework 2.0 or 3.5. thanks in advance
2
11,650,202
07/25/2012 12:55:03
1,551,650
07/25/2012 12:50:30
1
0
Accessing Google spreadsheet data in an android app
i need to access Google spreadsheet data in my android app.I did find the gdata plugin and a couple of examples but i am not able to run it.So please give me the steps so as how to do it.Is there any working android app for this.And do i need to obtain api key to use the gdata api? Awaiting your answers.
android
null
null
null
null
07/25/2012 13:50:59
not a real question
Accessing Google spreadsheet data in an android app === i need to access Google spreadsheet data in my android app.I did find the gdata plugin and a couple of examples but i am not able to run it.So please give me the steps so as how to do it.Is there any working android app for this.And do i need to obtain api key to use the gdata api? Awaiting your answers.
1
5,657,655
04/14/2011 01:38:23
707,115
04/14/2011 01:38:23
1
0
SharePoint 2007 Search error
SharePoint search started failing all of a sudden, so I did some reading and performed "Reset all crawled content". Now the crawl is running fine, however, when search is performed on the site, following exception is thrown: System.Runtime.InteropServices.COMException (0x800703FA): Retrieving the COM class factory for component with CLSID {5AD0CC67-4776-4D91-B9A8-0078B0BAF32D} failed due to the following error: 800703fa. at Microsoft.Office.Server.Search.Query.QueryInfo.InitializeCanaryChecker() at Microsoft.Office.Server.Search.Query.QueryInfo.GenerateDigest(Page CurrentPage) at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.ClickLogPostdata() at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnPreRender(EventArgs e) I came across only one post when I searched for this particular problem and I don't believe we have the same case here. [http://social.technet.microsoft.com/Forums/en-GB/sharepointadmin/thread/84861057-d862-464d-b5fc-888db5bd6805] Any help would be great.
sharepoint
null
null
null
null
05/06/2012 14:18:59
too localized
SharePoint 2007 Search error === SharePoint search started failing all of a sudden, so I did some reading and performed "Reset all crawled content". Now the crawl is running fine, however, when search is performed on the site, following exception is thrown: System.Runtime.InteropServices.COMException (0x800703FA): Retrieving the COM class factory for component with CLSID {5AD0CC67-4776-4D91-B9A8-0078B0BAF32D} failed due to the following error: 800703fa. at Microsoft.Office.Server.Search.Query.QueryInfo.InitializeCanaryChecker() at Microsoft.Office.Server.Search.Query.QueryInfo.GenerateDigest(Page CurrentPage) at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.ClickLogPostdata() at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnPreRender(EventArgs e) I came across only one post when I searched for this particular problem and I don't believe we have the same case here. [http://social.technet.microsoft.com/Forums/en-GB/sharepointadmin/thread/84861057-d862-464d-b5fc-888db5bd6805] Any help would be great.
3
10,367,279
04/28/2012 20:29:08
885,654
08/09/2011 09:42:46
36
0
mp3 sent OK, but mp4 not (Django & X-Sendfile)
Apon clicking play on my web page, an mp3 file is sent from the server and in the browser see only 3 requests sent. I added to the response X-Sendfile header, and the responds arrived without it so I understand mod_xsendfile is configured OK. Weirdly, when I click play on **mp4**, the browser start sending **hundreds** of requests, and the movie starts and gets stuck! No "X-Sendfile" header in responses here eather... If I change the source in the cideo element to some mp4 file of a different site - all is OK (movie runs smoothly & only few requests). *What is the problem?* ###Some Code... HTML: <video id="videoId" preload="none" controls="controls" style="direction:ltr;text-align:left;" width="300px" height="286px" src="private/url/of/file.mp4"> Sorry, unable to play video. </video> Django: def audioFile(request,audio_file): response = HttpResponse(mimetype='audio/mpeg') if audio_file[-4:]==".mp4": response = HttpResponse(mimetype='video/mp4') response['Accept-Ranges'] = "bytes" response['X-Sendfile'] = "private/url/of/"+audio_file response['Content-Disposition'] = 'filename='+audio_file response['Content-Length'] = os.path.getsize("private/url/of/"+audio_file) return response .htaccess: <filesMatch "\.(mp3|ogg|mp4)$"> XSendFile on </filesMatch> Response Header: (of mp4) Accept-Ranges:bytes Connection:Keep-Alive Content-Disposition:filename=fileName.mp4 Content-Length:1392497 Content-Range:bytes 8382477-9774973/9774974 Content-Type:video/mp4 Date:Sat, 28 Apr 2012 20:27:07 GMT ETag:"b2b051c-95277e-4bda2fcc58f80" Keep-Alive:timeout=5, max=100 Last-Modified:Sat, 14 Apr 2012 12:47:10 GMT Server:Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_fcgid/2.3.6 Set-Cookie:sessionid=35c60c4e66c481e8a6bba8ed20639fb6; expires=Sat, 28-Apr-2012 23:00:29 GMT; Max-Age=9202; Path=/;
django
mp3
mp4
x-sendfile
null
04/30/2012 10:41:02
too localized
mp3 sent OK, but mp4 not (Django & X-Sendfile) === Apon clicking play on my web page, an mp3 file is sent from the server and in the browser see only 3 requests sent. I added to the response X-Sendfile header, and the responds arrived without it so I understand mod_xsendfile is configured OK. Weirdly, when I click play on **mp4**, the browser start sending **hundreds** of requests, and the movie starts and gets stuck! No "X-Sendfile" header in responses here eather... If I change the source in the cideo element to some mp4 file of a different site - all is OK (movie runs smoothly & only few requests). *What is the problem?* ###Some Code... HTML: <video id="videoId" preload="none" controls="controls" style="direction:ltr;text-align:left;" width="300px" height="286px" src="private/url/of/file.mp4"> Sorry, unable to play video. </video> Django: def audioFile(request,audio_file): response = HttpResponse(mimetype='audio/mpeg') if audio_file[-4:]==".mp4": response = HttpResponse(mimetype='video/mp4') response['Accept-Ranges'] = "bytes" response['X-Sendfile'] = "private/url/of/"+audio_file response['Content-Disposition'] = 'filename='+audio_file response['Content-Length'] = os.path.getsize("private/url/of/"+audio_file) return response .htaccess: <filesMatch "\.(mp3|ogg|mp4)$"> XSendFile on </filesMatch> Response Header: (of mp4) Accept-Ranges:bytes Connection:Keep-Alive Content-Disposition:filename=fileName.mp4 Content-Length:1392497 Content-Range:bytes 8382477-9774973/9774974 Content-Type:video/mp4 Date:Sat, 28 Apr 2012 20:27:07 GMT ETag:"b2b051c-95277e-4bda2fcc58f80" Keep-Alive:timeout=5, max=100 Last-Modified:Sat, 14 Apr 2012 12:47:10 GMT Server:Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_fcgid/2.3.6 Set-Cookie:sessionid=35c60c4e66c481e8a6bba8ed20639fb6; expires=Sat, 28-Apr-2012 23:00:29 GMT; Max-Age=9202; Path=/;
3
8,189,989
11/18/2011 22:32:09
759,536
05/18/2011 15:56:49
165
9
How to run a project when another is selected?
I'm devolping an application with libgdx. Because of the structure, I need devolp on one project, and then click onto another project and hit run for testing. How can I remove this step, and just click run on the devolping application and it will choose the project I want and run that.
eclipse
null
null
null
null
null
open
How to run a project when another is selected? === I'm devolping an application with libgdx. Because of the structure, I need devolp on one project, and then click onto another project and hit run for testing. How can I remove this step, and just click run on the devolping application and it will choose the project I want and run that.
0
10,346,713
04/27/2012 07:43:23
1,360,537
04/27/2012 07:30:21
1
0
Flags. Variables, variables bits or bit fields
on my system I have strong efficiency constraints (old PC), also there are large amount of job with flags. I would like to know which flag realization technique (n bytes variables, variable bits, bit fiels or any other realization)bit better from x86-32 architecure point of view. In which case setting, clearing and checking flag operation will be executed faster. Thanks.
c++
c
performance
null
null
04/27/2012 07:55:50
too localized
Flags. Variables, variables bits or bit fields === on my system I have strong efficiency constraints (old PC), also there are large amount of job with flags. I would like to know which flag realization technique (n bytes variables, variable bits, bit fiels or any other realization)bit better from x86-32 architecure point of view. In which case setting, clearing and checking flag operation will be executed faster. Thanks.
3
7,269,377
09/01/2011 11:02:04
923,322
09/01/2011 11:02:04
1
0
Function for certain values in rows
I have a paneldata which looks like: (Only the substantially cutting for my question) Persno 122 122 122 333 333 333 333 333 444 444 Income 1500 1500 2000 2000 2100 2500 2500 1500 2000 2200 year 1 2 3 1 2 3 4 5 1 2 I need a command or function to recognises the different Persno. For all rows with the same Persn I would like to give out the average income. Thank you very much.
r
null
null
null
null
null
open
Function for certain values in rows === I have a paneldata which looks like: (Only the substantially cutting for my question) Persno 122 122 122 333 333 333 333 333 444 444 Income 1500 1500 2000 2000 2100 2500 2500 1500 2000 2200 year 1 2 3 1 2 3 4 5 1 2 I need a command or function to recognises the different Persno. For all rows with the same Persn I would like to give out the average income. Thank you very much.
0
2,563,124
04/01/2010 19:33:46
303,921
08/09/2009 07:24:16
25
0
save remote files from a blackberry app
How do I save a remote file (i.e. http://example.com/somefile.pdf) to blackberry's local disk from my custom app Thanks
blackberry
file
null
null
null
null
open
save remote files from a blackberry app === How do I save a remote file (i.e. http://example.com/somefile.pdf) to blackberry's local disk from my custom app Thanks
0
11,468,626
07/13/2012 10:25:04
1,439,299
06/06/2012 09:10:03
55
9
android gallary view in webview
Does android **webivew** or **browser** use **gallary** for view **google images** like gallery view. Thanks in advance.
android
webview
gallery
null
null
07/16/2012 14:22:02
not a real question
android gallary view in webview === Does android **webivew** or **browser** use **gallary** for view **google images** like gallery view. Thanks in advance.
1
5,832,728
04/29/2011 13:32:35
717,191
04/20/2011 13:10:33
8
0
How to clear cache on Silverlight 4.0 ?
i want to use this code but it only erase caches on mozilla browser.I want to use it for IE Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1)); Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Cache.SetNoStore();
silverlight-4.0
null
null
null
null
null
open
How to clear cache on Silverlight 4.0 ? === i want to use this code but it only erase caches on mozilla browser.I want to use it for IE Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1)); Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Cache.SetNoStore();
0
6,848,148
07/27/2011 16:47:30
837,196
07/09/2011 23:45:16
6
0
how to host a domain in freehostia using co.cc?
Does anyone know if the host supports frehostia co.cc domains in free mode? because when I try to stay in the (cp) of freehostia tells me that can be hosted on their servers.
domain
free-hosting
null
null
null
07/27/2011 19:27:08
off topic
how to host a domain in freehostia using co.cc? === Does anyone know if the host supports frehostia co.cc domains in free mode? because when I try to stay in the (cp) of freehostia tells me that can be hosted on their servers.
2
11,100,315
06/19/2012 11:51:24
1,466,226
06/19/2012 11:13:06
1
0
DevExpress how to set and get tree node text and name at run time?
I am new in dev express technology. I am having a problem with devexpress XtraTreeList because i am unable to get node "NAME" and "TEXT" property.Please any one help me out through code.
devexpress
null
null
null
null
null
open
DevExpress how to set and get tree node text and name at run time? === I am new in dev express technology. I am having a problem with devexpress XtraTreeList because i am unable to get node "NAME" and "TEXT" property.Please any one help me out through code.
0
8,053,291
11/08/2011 15:58:23
821,110
06/29/2011 12:55:24
101
2
If Java improved on C++, why cant it be called a suitable replacement?
After reading the Java White Paper, I have a question on my mind and it might not be a very smart question but here it is anyway: From what I gathered, Java attempted to improve an a number of fallacies associated with C++ such as redundancy, confusion with pointers, full-object orientation etc., If Java managed to overcome these issues, why would it be incorret to say that Java can replace C++.
java
c++
null
null
null
11/08/2011 16:04:55
not constructive
If Java improved on C++, why cant it be called a suitable replacement? === After reading the Java White Paper, I have a question on my mind and it might not be a very smart question but here it is anyway: From what I gathered, Java attempted to improve an a number of fallacies associated with C++ such as redundancy, confusion with pointers, full-object orientation etc., If Java managed to overcome these issues, why would it be incorret to say that Java can replace C++.
4
4,114,498
11/06/2010 18:29:17
489,151
10/27/2010 17:23:55
1
0
JQGrid - How Can We make an Custom Row Detail
Some one give me the some Sample Code to make my Grid like this.I read in document that jqgrid just supports subgrid. like this page in Hierachy http://trirand.net/demoaspnetmvc.aspx thanks !
jqgrid
null
null
null
null
null
open
JQGrid - How Can We make an Custom Row Detail === Some one give me the some Sample Code to make my Grid like this.I read in document that jqgrid just supports subgrid. like this page in Hierachy http://trirand.net/demoaspnetmvc.aspx thanks !
0
7,307,657
09/05/2011 11:51:21
801,042
06/16/2011 08:01:29
1,293
90
isset() with dynamic property names
Why does `isset()` not work when the property names are in variables? $Object = new stdClass(); $Object->tst = array('one' => 1, 'two' => 2); $tst = 'tst'; $one = 'one'; var_dump( $Object, isset( $Object->tst['one'] ), isset( $Object->$tst[ $one ] ) ); outputs the following: object(stdClass)#39 (1) { ["tst"]=> array(2) { ["one"]=> int(1) ["two"]=> int(2) } } bool(true) bool(false) // was expecting true here..
php
oop
null
null
null
null
open
isset() with dynamic property names === Why does `isset()` not work when the property names are in variables? $Object = new stdClass(); $Object->tst = array('one' => 1, 'two' => 2); $tst = 'tst'; $one = 'one'; var_dump( $Object, isset( $Object->tst['one'] ), isset( $Object->$tst[ $one ] ) ); outputs the following: object(stdClass)#39 (1) { ["tst"]=> array(2) { ["one"]=> int(1) ["two"]=> int(2) } } bool(true) bool(false) // was expecting true here..
0
2,323,114
02/24/2010 01:48:25
60,922
01/31/2009 05:40:36
1
1
In php is there a reason to use a static method on a class instead of an independent method?
We're having this discussion here. Which is better and why? 1) a php file that just includes a function... function bar(){} called like this bar(); 2) a php that contains a class with a static method. class foo{ static function bar(){} } called like this foo::bar(); Are there any performance reasons to do one or the other? For code organization purposes the static method looks better to me but there are a few programmers here who see no reason to declare classes.
php
static
global
methods
null
null
open
In php is there a reason to use a static method on a class instead of an independent method? === We're having this discussion here. Which is better and why? 1) a php file that just includes a function... function bar(){} called like this bar(); 2) a php that contains a class with a static method. class foo{ static function bar(){} } called like this foo::bar(); Are there any performance reasons to do one or the other? For code organization purposes the static method looks better to me but there are a few programmers here who see no reason to declare classes.
0
11,692,100
07/27/2012 16:41:05
1,197,913
02/08/2012 18:09:53
23
3
Cannot edit bash_profile on Mac OsX
I am using MacOSX Snow Leopard 10.6.8.... I am the only user on this machine and I should be admin. I trying to edit my bash_profile to give it this simple alias: `alias server=' open http://localhost:8000 && python -m SimpleHTTPServer'` however when I use the terminal and type: `vim ~/. bash_profile` and paste in this alias I get message saying I cant save due to permissions. So then I show all hidden files and go to fix the permissions on this file but the file is all grayed out.... I cant change anything. What can I do??
osx
permissions
osx-snow-leopard
alias
.bash-profile
07/27/2012 16:56:35
off topic
Cannot edit bash_profile on Mac OsX === I am using MacOSX Snow Leopard 10.6.8.... I am the only user on this machine and I should be admin. I trying to edit my bash_profile to give it this simple alias: `alias server=' open http://localhost:8000 && python -m SimpleHTTPServer'` however when I use the terminal and type: `vim ~/. bash_profile` and paste in this alias I get message saying I cant save due to permissions. So then I show all hidden files and go to fix the permissions on this file but the file is all grayed out.... I cant change anything. What can I do??
2
490,450
01/29/2009 04:06:28
56,409
01/18/2009 12:57:57
17
3
PHP array problem
I'm sending some data over AJAX to a PHP file. It's about filter options. Anyway, I am sending it like this: filter[0][data][type] string filter[0][data][value] automobiles filter[0][field] product filter[1][data][type] numeric filter[1][data][value] 6000 filter[1][field] price This above is taken from FireBug console. Then, in PHP: $filter = $_POST['filter'.$i]; if (is_array($filter)) { for ($i=0;$i<count($filter);$i++){ switch($filter[$i]['data']['type']){ case 'string' : // I'm doing my select from database based on that and so on So, the translation of this would be: "Get me all the records from database that are: *hmm, let's check the filters*... I'm getting the first filter type witch is "string" witch needs to be applied to the mysql column named "product"...So I'm searching for the value of "automobiles" there...But I'm not finished yet, the second filter refers to a numeric filter for the column "price" from database. so I'm taking its value and add it to the query. So I'll end up selecting all the automobiles that have a price greater than 6000. So far so good. The problem is that my way of getting data have changed and I can't send my data in this format no more. The new format is an URL witch looks like this: filter[0][field]=prodct&filter[0][data][type]=string&filter[0][data][value]=automobiles&filter[1][field]=price&filter[1][data][type]=numeric&filter[1][data][value]=6000 I can do an explode on this one by the "&" and end up with an array...I can do a lot... The problem is that I don't know how to adjust my query building script to work with that kind of received data..So that I can do a "switch($filter[$i]['data']['type']){" again... Any ideas for modifying the code ? Thank you!
php
arrays
mysql
url
post
null
open
PHP array problem === I'm sending some data over AJAX to a PHP file. It's about filter options. Anyway, I am sending it like this: filter[0][data][type] string filter[0][data][value] automobiles filter[0][field] product filter[1][data][type] numeric filter[1][data][value] 6000 filter[1][field] price This above is taken from FireBug console. Then, in PHP: $filter = $_POST['filter'.$i]; if (is_array($filter)) { for ($i=0;$i<count($filter);$i++){ switch($filter[$i]['data']['type']){ case 'string' : // I'm doing my select from database based on that and so on So, the translation of this would be: "Get me all the records from database that are: *hmm, let's check the filters*... I'm getting the first filter type witch is "string" witch needs to be applied to the mysql column named "product"...So I'm searching for the value of "automobiles" there...But I'm not finished yet, the second filter refers to a numeric filter for the column "price" from database. so I'm taking its value and add it to the query. So I'll end up selecting all the automobiles that have a price greater than 6000. So far so good. The problem is that my way of getting data have changed and I can't send my data in this format no more. The new format is an URL witch looks like this: filter[0][field]=prodct&filter[0][data][type]=string&filter[0][data][value]=automobiles&filter[1][field]=price&filter[1][data][type]=numeric&filter[1][data][value]=6000 I can do an explode on this one by the "&" and end up with an array...I can do a lot... The problem is that I don't know how to adjust my query building script to work with that kind of received data..So that I can do a "switch($filter[$i]['data']['type']){" again... Any ideas for modifying the code ? Thank you!
0
11,410,004
07/10/2012 09:05:55
1,449,409
06/11/2012 16:14:14
1
0
youtube video not playing on blackberry
We are trying to embed youtube videos in a site intended for mobiles. Here is the link http://bit.ly/NhK5Gt. The videos are not playing in blackberry phones, a sizeable market. We are not able to identify the problem. Is there a fix?
php
blackberry
youtube
null
null
07/10/2012 23:10:22
too localized
youtube video not playing on blackberry === We are trying to embed youtube videos in a site intended for mobiles. Here is the link http://bit.ly/NhK5Gt. The videos are not playing in blackberry phones, a sizeable market. We are not able to identify the problem. Is there a fix?
3
3,708,947
09/14/2010 12:43:47
410,576
08/04/2010 09:24:41
11
3
Compress GIF Images Quality in PHP ?
How would one compress GIF image file in PHP5 ? I know that its possible to do with JPG like this imagejpeg($resource, $filename, $quality) according to http://us.php.net/manual/en/function.imagejpeg.php
image
php5
gif
null
null
null
open
Compress GIF Images Quality in PHP ? === How would one compress GIF image file in PHP5 ? I know that its possible to do with JPG like this imagejpeg($resource, $filename, $quality) according to http://us.php.net/manual/en/function.imagejpeg.php
0
3,072,620
06/18/2010 19:44:09
41,934
11/30/2008 13:19:33
13
0
ASP.NET - Browser always returns "Page not found" message the first time I request the start page
Whenever I start a new browser session and request the start page of my ASP.NET site, I am redirected to a different URL that is similar to the one I requested. For example, if I request the page http://myserveralias.xyz.com/virtualfolder/startpage.aspx I am redirected to http://myserveralias.xyz.com/virtualfolder/startpage.aspx,/virtualfolder/startpage.aspx
asp.net
null
null
null
null
null
open
ASP.NET - Browser always returns "Page not found" message the first time I request the start page === Whenever I start a new browser session and request the start page of my ASP.NET site, I am redirected to a different URL that is similar to the one I requested. For example, if I request the page http://myserveralias.xyz.com/virtualfolder/startpage.aspx I am redirected to http://myserveralias.xyz.com/virtualfolder/startpage.aspx,/virtualfolder/startpage.aspx
0
9,754,809
03/17/2012 23:48:11
1,276,349
03/17/2012 23:44:03
1
0
How to make MongoDB Server start on Linux Startup (CentOS)
I'm using Linux CentOS 5.4, I installed MongoDB now it's availabled as a Daemon and Service When I execute service mongod start is says : [OK] --> in green as if the service started but when I try to connect to it I find it not working. but when I try to run "mongod" from the shell normally it starts but if I closed the shell connections it stops. how do I add it to the start up of the OS ? or how do I run it in the background ?
mongodb
centos
null
null
null
03/19/2012 13:27:15
off topic
How to make MongoDB Server start on Linux Startup (CentOS) === I'm using Linux CentOS 5.4, I installed MongoDB now it's availabled as a Daemon and Service When I execute service mongod start is says : [OK] --> in green as if the service started but when I try to connect to it I find it not working. but when I try to run "mongod" from the shell normally it starts but if I closed the shell connections it stops. how do I add it to the start up of the OS ? or how do I run it in the background ?
2
11,462,373
07/12/2012 23:54:21
258,482
01/25/2010 14:18:53
722
29
how to convert c# code to vb.net
I have some code I want to convert to VB.NET. It is the program source file that every empty console application starts with in VS2010. The program compiles *and runs* without any problems, but I always get an EOF expected error when using code converters. I have had this problem for years and have never been able to figure it out. Are there any converters that actually work?
c#
vb.net
visual-studio-2010
null
null
07/13/2012 01:23:11
off topic
how to convert c# code to vb.net === I have some code I want to convert to VB.NET. It is the program source file that every empty console application starts with in VS2010. The program compiles *and runs* without any problems, but I always get an EOF expected error when using code converters. I have had this problem for years and have never been able to figure it out. Are there any converters that actually work?
2
4,845,789
01/30/2011 21:54:27
241,654
12/31/2009 17:56:43
135
2
Generate a date range of the latest 2 weeks?
I want to generate 2 DATETIME which represent the latest 2 weeks starting from sunday to saturday 2x, It shouldn't include the current incomplete week. Appreciate your help.
php
date
null
null
null
null
open
Generate a date range of the latest 2 weeks? === I want to generate 2 DATETIME which represent the latest 2 weeks starting from sunday to saturday 2x, It shouldn't include the current incomplete week. Appreciate your help.
0
10,680,081
05/21/2012 05:52:45
1,407,118
05/21/2012 05:32:17
1
0
ImageView - Detecting Image Boundry
I have a tableView with some images in it. I would like to be able to drag these images around the screen. I have created a custom view which is the size of the visible screen that contains an onTouch method handler and also contains onDraw to allow me to drag an image. I would like some opinions on the best way to get the images from the table view and add them to the custom view when the action_down event is triggered (enabling the image to be dragged). Should I add the tableView to the custom view? Would I beable to detect the image boundry? Thanks
drag-and-drop
imageview
draggable
tableview
drag
05/22/2012 14:52:59
not a real question
ImageView - Detecting Image Boundry === I have a tableView with some images in it. I would like to be able to drag these images around the screen. I have created a custom view which is the size of the visible screen that contains an onTouch method handler and also contains onDraw to allow me to drag an image. I would like some opinions on the best way to get the images from the table view and add them to the custom view when the action_down event is triggered (enabling the image to be dragged). Should I add the tableView to the custom view? Would I beable to detect the image boundry? Thanks
1
1,116,503
07/12/2009 17:42:43
126,781
06/22/2009 08:27:51
91
19
High-quality libraries for C++.
We all know about [Boost][1]. What other C++ libraries are worth using? Why? Are they easily usable with common compilers? [1]: http://www.boost.org/
c++
visual-c++
multiplatform
null
null
07/12/2009 18:22:27
not a real question
High-quality libraries for C++. === We all know about [Boost][1]. What other C++ libraries are worth using? Why? Are they easily usable with common compilers? [1]: http://www.boost.org/
1