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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,633,877 |
09/03/2010 07:46:54
| 438,734 |
09/03/2010 07:37:45
| 1 | 0 |
Google adsense look alike
|
Hi im looking for an advertising program like google adsense but one that does not prohibit me from offering compensation to users for viewing ads. Thanks.
|
blocking
|
add
| null | null | null |
09/04/2010 12:25:26
|
off topic
|
Google adsense look alike
===
Hi im looking for an advertising program like google adsense but one that does not prohibit me from offering compensation to users for viewing ads. Thanks.
| 2 |
10,572,760 |
05/13/2012 15:02:09
| 1,205,044 |
02/12/2012 12:20:45
| 18 | 0 |
Multiplication using FOR LOOP in visual studio 2008
|
<how do i multiply using loop? using this code
dim a as integer
dim b as integer
a= inputBox("Enter first Number:")
b= inputBox("Enter second Number:")
and i want the answer to be shown in a label ...>
|
visual-studio-2008
| null | null | null | null |
05/14/2012 15:54:29
|
not a real question
|
Multiplication using FOR LOOP in visual studio 2008
===
<how do i multiply using loop? using this code
dim a as integer
dim b as integer
a= inputBox("Enter first Number:")
b= inputBox("Enter second Number:")
and i want the answer to be shown in a label ...>
| 1 |
10,383,178 |
04/30/2012 11:46:44
| 878,246 |
02/14/2011 07:12:36
| 736 | 87 |
Android using IFC files
|
Can someone tell me whether it is possible to access or modify IFC files?
If yes, is there any third party libraries available to view IFC files in Android.
Industry Foundation Class (IFC) generated by the Auto CAD software and render the 3D.
Thanks in Advance
|
android
|
3d
| null | null | null |
04/30/2012 19:59:21
|
not a real question
|
Android using IFC files
===
Can someone tell me whether it is possible to access or modify IFC files?
If yes, is there any third party libraries available to view IFC files in Android.
Industry Foundation Class (IFC) generated by the Auto CAD software and render the 3D.
Thanks in Advance
| 1 |
5,250,742 |
03/09/2011 18:56:19
| 652,198 |
03/09/2011 18:56:19
| 1 | 0 |
oracle - c# How can I implement this kindly help me to complete.
|
Table1: empid (primary key), empdoj, empamt, empadd
Table2: emploanid(primary key), empph, empdob
Table3: empsal,emploan,empint
I have to use empdoj, empamt, emploanid in table3 and I have to search, update the details by using emploanid
Frond end : c#
Database : oracle
Thanks in advance.
|
c#
|
oracle
| null | null | null |
03/09/2011 20:52:00
|
not a real question
|
oracle - c# How can I implement this kindly help me to complete.
===
Table1: empid (primary key), empdoj, empamt, empadd
Table2: emploanid(primary key), empph, empdob
Table3: empsal,emploan,empint
I have to use empdoj, empamt, emploanid in table3 and I have to search, update the details by using emploanid
Frond end : c#
Database : oracle
Thanks in advance.
| 1 |
1,054,730 |
06/28/2009 11:12:27
| 17,674 |
09/18/2008 13:26:13
| 79 | 6 |
Is it possible to specify formatting options for to_yaml in ruby?
|
require 'yaml'
puts YAML.load("
is_something:
values: ['yes', 'no']
").to_yaml
produces
---
is_something:
values:
- "yes"
- "no"
While this is a correct yaml, it just looks ugly when you have a hash of arrays. Is there a way for me to get `to_yaml` to produce the inline array version of the yaml?
_An options hash can be passed to <a href="http://www.ruby-doc.org/stdlib/libdoc/yaml/rdoc/classes/Array.html#M010476">`to_yaml`</a> but how do you use it?_
|
ruby
|
yaml
|
to-yaml
| null | null | null |
open
|
Is it possible to specify formatting options for to_yaml in ruby?
===
require 'yaml'
puts YAML.load("
is_something:
values: ['yes', 'no']
").to_yaml
produces
---
is_something:
values:
- "yes"
- "no"
While this is a correct yaml, it just looks ugly when you have a hash of arrays. Is there a way for me to get `to_yaml` to produce the inline array version of the yaml?
_An options hash can be passed to <a href="http://www.ruby-doc.org/stdlib/libdoc/yaml/rdoc/classes/Array.html#M010476">`to_yaml`</a> but how do you use it?_
| 0 |
10,424,109 |
05/03/2012 02:00:01
| 1,371,375 |
05/03/2012 01:49:20
| 1 | 0 |
preg_split by words including trailing white spaces
|
What's the regex to use in preg_split in this example?
Example
<?$a='Word with white trailing spaces. ';
Output
Array(
[0] => 'Word ',
[1] => 'with ',
[2] => 'white ',
[3] => 'trailing ',
[3] => 'spaces. '
)
|
php
|
whitespace
|
words
|
preg-split
|
trailing
|
05/04/2012 15:19:14
|
not a real question
|
preg_split by words including trailing white spaces
===
What's the regex to use in preg_split in this example?
Example
<?$a='Word with white trailing spaces. ';
Output
Array(
[0] => 'Word ',
[1] => 'with ',
[2] => 'white ',
[3] => 'trailing ',
[3] => 'spaces. '
)
| 1 |
4,218,377 |
11/18/2010 18:47:48
| 512,585 |
11/18/2010 18:47:48
| 1 | 0 |
Tumblr Audio Player not loading with Infinite Scroll
|
I implemented infinite scroll along with masonry on this tumblr: http://fuckyeahempathy.tumblr.com/
The audio player does not appear in posts loaded through infinite scroll, instead it displays the text "[Flash 9 is required to listen to audio.]"
The Inspire Well tumblr theme (I can't post another hyperlink but you can easily google it) seems to have solved this problem through this code:
if(InspireWell.infiniteScrolling && InspireWell.indexPage){
$masonedColumn.infinitescroll({
navSelector : 'ul.page_nav', // selector for the paged navigation
nextSelector : 'ul.page_nav li.page_next a', // selector for the NEXT link (to page 2)
itemSelector : '.post', // selector for all items you'll retrieve
loadingImg : '',
donetext : 'No more pages to load.',
errorCallback: function() {
// fade out the error message after 2 seconds
//$('#infscr-loading').animate({opacity: .8},2000).fadeOut('normal');
}
},
// call masonry as a callback
function( newElements ) {
$(newElements).css({ visibility: 'hidden' });
$(newElements).each(function() {
if($(this).hasClass("audio")){
var audioID = $(this).attr("id");
var $audioPost = $(this);
$audioPost.find(".player span").css({ visibility: 'hidden' });
var script=document.createElement('script');
script.type='text/javascript';
script.src="http://assets.tumblr.com/javascript/tumblelog.js?16";
$("body").append(script);
$.ajax({
url: "http://thetestinggrounds.tumblr.com/api/read/json?id=" + audioID,
dataType: "jsonp",
timeout: 5000,
success: function(data){
$audioPost.find(".player span").css({ visibility: 'visible' });
$audioPost.find("span:first").append('<script type="text/javascript">replaceIfFlash(9,"audio_player_' + audioID + '",\'\x3cdiv class=\x22audio_player\x22\x3e' + data.posts[0]['audio-player'] +'\x3c/div\x3e\')</script>');
}
});
}
});
I tried to adapt this for my tumblr (with placeholder text to see if it was finding the correct element):
$(window).load(function(){
$('#allposts').masonry({
singleMode: true,
itemSelector: '.box'
});
$('#allposts').infinitescroll({
navSelector : "div.navigation",
nextSelector : "div.navigation a:first",
itemSelector : ".box",
debug : true
},
function( newElements ) {
$(this).masonry({ appendedContent: $( newElements ) });
$(newElements).each(function(){
if($(this).hasClass("audio")){
var audioID = $(this).attr("id");
var $audioPost = $(this);
$audioPost.find(".audio span");
var script=document.createElement('script');
script.type='text/javascript';
script.src="http://assets.tumblr.com/javascript/tumblelog.js?16";
$("body").append(script);
$.ajax({
url: "http://fuckyeahempathy.tumblr.com/api/read/json?id=" + audioID,
dataType: "jsonp",
timeout: 5000,
success: function(data){
$audioPost.find(".audio span");
$audioPost.find("span:first").append("<p>audio player not working</p>");
}
});
}
});
}
);
});
But there is no sign of the text. Any help would be greatly appreciated.
[1]: http://inspirewell.tumblr.com/
|
tumblr
|
audio-player
| null | null | null | null |
open
|
Tumblr Audio Player not loading with Infinite Scroll
===
I implemented infinite scroll along with masonry on this tumblr: http://fuckyeahempathy.tumblr.com/
The audio player does not appear in posts loaded through infinite scroll, instead it displays the text "[Flash 9 is required to listen to audio.]"
The Inspire Well tumblr theme (I can't post another hyperlink but you can easily google it) seems to have solved this problem through this code:
if(InspireWell.infiniteScrolling && InspireWell.indexPage){
$masonedColumn.infinitescroll({
navSelector : 'ul.page_nav', // selector for the paged navigation
nextSelector : 'ul.page_nav li.page_next a', // selector for the NEXT link (to page 2)
itemSelector : '.post', // selector for all items you'll retrieve
loadingImg : '',
donetext : 'No more pages to load.',
errorCallback: function() {
// fade out the error message after 2 seconds
//$('#infscr-loading').animate({opacity: .8},2000).fadeOut('normal');
}
},
// call masonry as a callback
function( newElements ) {
$(newElements).css({ visibility: 'hidden' });
$(newElements).each(function() {
if($(this).hasClass("audio")){
var audioID = $(this).attr("id");
var $audioPost = $(this);
$audioPost.find(".player span").css({ visibility: 'hidden' });
var script=document.createElement('script');
script.type='text/javascript';
script.src="http://assets.tumblr.com/javascript/tumblelog.js?16";
$("body").append(script);
$.ajax({
url: "http://thetestinggrounds.tumblr.com/api/read/json?id=" + audioID,
dataType: "jsonp",
timeout: 5000,
success: function(data){
$audioPost.find(".player span").css({ visibility: 'visible' });
$audioPost.find("span:first").append('<script type="text/javascript">replaceIfFlash(9,"audio_player_' + audioID + '",\'\x3cdiv class=\x22audio_player\x22\x3e' + data.posts[0]['audio-player'] +'\x3c/div\x3e\')</script>');
}
});
}
});
I tried to adapt this for my tumblr (with placeholder text to see if it was finding the correct element):
$(window).load(function(){
$('#allposts').masonry({
singleMode: true,
itemSelector: '.box'
});
$('#allposts').infinitescroll({
navSelector : "div.navigation",
nextSelector : "div.navigation a:first",
itemSelector : ".box",
debug : true
},
function( newElements ) {
$(this).masonry({ appendedContent: $( newElements ) });
$(newElements).each(function(){
if($(this).hasClass("audio")){
var audioID = $(this).attr("id");
var $audioPost = $(this);
$audioPost.find(".audio span");
var script=document.createElement('script');
script.type='text/javascript';
script.src="http://assets.tumblr.com/javascript/tumblelog.js?16";
$("body").append(script);
$.ajax({
url: "http://fuckyeahempathy.tumblr.com/api/read/json?id=" + audioID,
dataType: "jsonp",
timeout: 5000,
success: function(data){
$audioPost.find(".audio span");
$audioPost.find("span:first").append("<p>audio player not working</p>");
}
});
}
});
}
);
});
But there is no sign of the text. Any help would be greatly appreciated.
[1]: http://inspirewell.tumblr.com/
| 0 |
9,323,788 |
02/17/2012 06:20:16
| 851,753 |
07/19/2011 10:21:46
| 124 | 12 |
What are some popular open source document managers with GUI that can run on an intranet?
|
I am looking for ways to manage deployment and management information for multiple websites. This includes script files, module packages, images, templates and extensive SEO information on a database. We already have an intranet and access to shared Windows files, but are looking for a more functional GUI, possibly with multiple features to choose from.
I have considered ideas in Java Swing or Scala as a project, but as it is for work I have to look for something ready to deploy fairly fast otherwise on my own time. If there are any ideas on a good source for ideas on building this other than completed software I am interested as well. My boss is looking at possibly a Joomla K2 feature and I came across similar Drupal systems.
|
java
|
drupal
|
scala
|
gui
|
joomla
|
02/18/2012 03:36:50
|
not constructive
|
What are some popular open source document managers with GUI that can run on an intranet?
===
I am looking for ways to manage deployment and management information for multiple websites. This includes script files, module packages, images, templates and extensive SEO information on a database. We already have an intranet and access to shared Windows files, but are looking for a more functional GUI, possibly with multiple features to choose from.
I have considered ideas in Java Swing or Scala as a project, but as it is for work I have to look for something ready to deploy fairly fast otherwise on my own time. If there are any ideas on a good source for ideas on building this other than completed software I am interested as well. My boss is looking at possibly a Joomla K2 feature and I came across similar Drupal systems.
| 4 |
8,483,458 |
12/13/2011 01:57:31
| 1,092,547 |
12/11/2011 18:12:03
| 10 | 2 |
Getting help in complicated query for mysql
|
having this piece of schema
Doctor(licence_no, doctor_name, specialty)
Patient(pat_id, pat_name, pat_address, pat_phone, date_of_birth)
Visit(licence_no, pat_id, date, type, diagnosis, charge)
and i want to get the names of all patients who visited all doctors
i did it as follows
SELECT p.pat_name FROM Patient p
INNER JOIN Visit v ON (v.pat_ID = p.pat_ID)
INNER JOIN Doctor d ON (d.licence_no = v.licence_no)
WHERE (SELECT d.licence_no FROM Doctor d) = (SELECT v.licence_no FROM Visit v2 WHERE
p.pat_ID =v.pat_ID)
but there is an error as the sub query returns more than 1 value and i have to make sure that this patient had visited all doctors, any suggestions to make this?
|
mysql
|
sql
|
sql-server
|
sql-server-2008
| null | null |
open
|
Getting help in complicated query for mysql
===
having this piece of schema
Doctor(licence_no, doctor_name, specialty)
Patient(pat_id, pat_name, pat_address, pat_phone, date_of_birth)
Visit(licence_no, pat_id, date, type, diagnosis, charge)
and i want to get the names of all patients who visited all doctors
i did it as follows
SELECT p.pat_name FROM Patient p
INNER JOIN Visit v ON (v.pat_ID = p.pat_ID)
INNER JOIN Doctor d ON (d.licence_no = v.licence_no)
WHERE (SELECT d.licence_no FROM Doctor d) = (SELECT v.licence_no FROM Visit v2 WHERE
p.pat_ID =v.pat_ID)
but there is an error as the sub query returns more than 1 value and i have to make sure that this patient had visited all doctors, any suggestions to make this?
| 0 |
5,718,654 |
04/19/2011 15:15:04
| 692,734 |
04/05/2011 11:06:20
| 1 | 0 |
Rails:create association between an element and a 2nd level nested element
|
The following system is for managing contacts.
Each contact belongs to an organisation, and each organisation has many locations. A contact is also related to one location from the parent organisation.
The organisation model looks like this
has_many :contacts
has_many :locations
accepts_nested_attributes_for :locations, :reject_if => lambda { |a| a["name"].blank? }
I want it to accept nested attributes for locations because when a user adds an organisation he can also add a location for it on the fly.
The contact model looks like this
has_one :location
belongs_to :organisation
accepts_nested_attributes_for :organisation
Same story, when a contact is added I want the user to be able to add the organisation on the fly, but the organisation needs to have a location, so a second level of nesting exists in the view to also create the location for the organsiation.
It works fine, it adds the contact, it adds the organisation and the location, it creates the association between the location and the organisation but what happens is that I have a field "location_id" in contact and I want to have in that the id of the location added for the organisation on the fly. Does anyone know a clean way to do it through the model or do I have to workaround it with some tweaks in the controllers?
|
ruby-on-rails
|
nesting
| null | null | null | null |
open
|
Rails:create association between an element and a 2nd level nested element
===
The following system is for managing contacts.
Each contact belongs to an organisation, and each organisation has many locations. A contact is also related to one location from the parent organisation.
The organisation model looks like this
has_many :contacts
has_many :locations
accepts_nested_attributes_for :locations, :reject_if => lambda { |a| a["name"].blank? }
I want it to accept nested attributes for locations because when a user adds an organisation he can also add a location for it on the fly.
The contact model looks like this
has_one :location
belongs_to :organisation
accepts_nested_attributes_for :organisation
Same story, when a contact is added I want the user to be able to add the organisation on the fly, but the organisation needs to have a location, so a second level of nesting exists in the view to also create the location for the organsiation.
It works fine, it adds the contact, it adds the organisation and the location, it creates the association between the location and the organisation but what happens is that I have a field "location_id" in contact and I want to have in that the id of the location added for the organisation on the fly. Does anyone know a clean way to do it through the model or do I have to workaround it with some tweaks in the controllers?
| 0 |
6,976,983 |
08/08/2011 01:23:17
| 80,340 |
03/20/2009 06:06:12
| 29 | 9 |
getting grails 2.0.0M1 config info in domain object, and static scope?
|
How do I get to the Config.groovy information from a domain object, or from a static scope? I'm using ConfigurationHolder.config.* now for static access, but that and ApplicationHolder are deprecated so I'd like to 'do it right' ... but the grailsApplication object isn't available in a DO/static scope.
|
grails
|
grails-domain-class
| null | null | null | null |
open
|
getting grails 2.0.0M1 config info in domain object, and static scope?
===
How do I get to the Config.groovy information from a domain object, or from a static scope? I'm using ConfigurationHolder.config.* now for static access, but that and ApplicationHolder are deprecated so I'd like to 'do it right' ... but the grailsApplication object isn't available in a DO/static scope.
| 0 |
11,328,341 |
07/04/2012 11:36:48
| 1,471,807 |
06/21/2012 10:31:30
| 1 | 0 |
Optional call-by-name parameter without parentheses
|
I would like a method with 2 call-by-name parameters, where one is optional, but still call it without parentheses. So you can do either:
transaction { ... }
or
transaction { ... } { ... }
I tried (and settled for):
def transaction(body: => Unit) { transaction(body, {}) }
def transaction(body: => Unit, err: => Unit) { ... } // Works by transaction({ ... },{ ... })
Which apparently is different from (for a reason I don't know):
def transaction(body: => Unit, err: => Unit = {}) { ... }
And the one I hoped would work (but I guess doesn't because the first parameter list is the same).
def transaction(body: => Unit) { transaction(body)() }
def transaction(body: => Unit)(err: => Unit) { ... }
How would you use the concept of a optional second call-by-name parameter?
|
scala
| null | null | null | null | null |
open
|
Optional call-by-name parameter without parentheses
===
I would like a method with 2 call-by-name parameters, where one is optional, but still call it without parentheses. So you can do either:
transaction { ... }
or
transaction { ... } { ... }
I tried (and settled for):
def transaction(body: => Unit) { transaction(body, {}) }
def transaction(body: => Unit, err: => Unit) { ... } // Works by transaction({ ... },{ ... })
Which apparently is different from (for a reason I don't know):
def transaction(body: => Unit, err: => Unit = {}) { ... }
And the one I hoped would work (but I guess doesn't because the first parameter list is the same).
def transaction(body: => Unit) { transaction(body)() }
def transaction(body: => Unit)(err: => Unit) { ... }
How would you use the concept of a optional second call-by-name parameter?
| 0 |
7,124,312 |
08/19/2011 16:02:43
| 213,323 |
11/17/2009 22:24:42
| 1,715 | 86 |
Adding a margin/padding between the navigationbar and the content in a uinavigationcontroller
|
The title says it all. I wan't to add some space between the navigationbar and the content of the navigationcontroller. So I would like to change the frame of the content. However, I have been unable to figure out how to do this. This should hopefully be a easy enough task, it's probably just me that don't know the right apis. Just to clarify, this is the effect I want:
+-----------+
| TITLE |
+-----------+
<--- margin/padding that I should be able to set in code
+ - - - - - +
SOME
| TABLE- |
VIEW
| OR |
WHATEVER
+ - - - - - +
|
ios
|
uinavigationcontroller
| null | null | null | null |
open
|
Adding a margin/padding between the navigationbar and the content in a uinavigationcontroller
===
The title says it all. I wan't to add some space between the navigationbar and the content of the navigationcontroller. So I would like to change the frame of the content. However, I have been unable to figure out how to do this. This should hopefully be a easy enough task, it's probably just me that don't know the right apis. Just to clarify, this is the effect I want:
+-----------+
| TITLE |
+-----------+
<--- margin/padding that I should be able to set in code
+ - - - - - +
SOME
| TABLE- |
VIEW
| OR |
WHATEVER
+ - - - - - +
| 0 |
6,108,988 |
05/24/2011 10:22:16
| 761,451 |
05/19/2011 16:36:47
| 11 | 0 |
Understanding Linux scheduling when pthreads are involved
|
through the discussion of another problem, see http://stackoverflow.com/questions/6099178, I ran into some questions about the scheduling of my threads. I am on Linux 2.6.x, running with root-rights and using pthreads to do parallel things in a timing critical application written in C/C++.
I'll try to give some short, boiled down, snippets to explain my question:
In main I somewhere at the beginning do:
struct sched_param sp;
memset(&sp, 0, sizeof(sched_param));
sp.sched_priority = 99;
sched_setscheduler(getpid(), SCHED_RR, &sp);
I understand this to be the code that switches my program to use the RR-Scheduler, running at max. priority.
When starting a pthread, I do:
sched_param param;
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
pthread_attr_getschedparam(&attr, ¶m);
param.sched_priority = priority;
pthread_attr_setschedpolicy(&attr, SCHED_RR);
pthread_attr_setschedparam(&attr, ¶m);
I understand this, to be the code that switches the thread that's gonna be started to RR-Scheduler, using the priority given in 'priority'.
Is that going to work equivalently if main would **not** switch the scheduler?
What I do not understand is, if it is necessary to call that code in main? (The main-function does not do anything than starting everything and then block on keyboard input.)
Where can I find precise documentation of how this works. I don't think the manpages do a good job on explaining the background.
Thanks in advance.
|
linux
|
pthreads
|
real-time
|
scheduler
| null | null |
open
|
Understanding Linux scheduling when pthreads are involved
===
through the discussion of another problem, see http://stackoverflow.com/questions/6099178, I ran into some questions about the scheduling of my threads. I am on Linux 2.6.x, running with root-rights and using pthreads to do parallel things in a timing critical application written in C/C++.
I'll try to give some short, boiled down, snippets to explain my question:
In main I somewhere at the beginning do:
struct sched_param sp;
memset(&sp, 0, sizeof(sched_param));
sp.sched_priority = 99;
sched_setscheduler(getpid(), SCHED_RR, &sp);
I understand this to be the code that switches my program to use the RR-Scheduler, running at max. priority.
When starting a pthread, I do:
sched_param param;
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
pthread_attr_getschedparam(&attr, ¶m);
param.sched_priority = priority;
pthread_attr_setschedpolicy(&attr, SCHED_RR);
pthread_attr_setschedparam(&attr, ¶m);
I understand this, to be the code that switches the thread that's gonna be started to RR-Scheduler, using the priority given in 'priority'.
Is that going to work equivalently if main would **not** switch the scheduler?
What I do not understand is, if it is necessary to call that code in main? (The main-function does not do anything than starting everything and then block on keyboard input.)
Where can I find precise documentation of how this works. I don't think the manpages do a good job on explaining the background.
Thanks in advance.
| 0 |
7,408,561 |
09/13/2011 21:12:24
| 579,689 |
01/18/2011 09:35:00
| 352 | 4 |
How to display the ssh logins
|
One of the user is copying files from my pc to his using scp.
How to find out whether the scp session is completed or not.
|
linux
|
ssh
|
openssh
| null | null |
09/13/2011 21:32:12
|
off topic
|
How to display the ssh logins
===
One of the user is copying files from my pc to his using scp.
How to find out whether the scp session is completed or not.
| 2 |
6,110,478 |
05/24/2011 12:35:03
| 177,694 |
09/23/2009 09:45:11
| 471 | 31 |
NuGet: remote server returned an Error(403) Forbidden
|
Whenever i attempt to install a package i get this error
remote server returned an Error(403) Forbidden
I can use other commands, such as get-package -ListAvailable, and discover whether there are any updates for installed packages but cannot actually install anything via Nuget.
This is the same for the command line and the package manager GUI.
I'm using Visual Web Developer 2010.
I'm in a corporate environment too, which i suspect is the chief issue.
Any possible pointers?
|
nuget
|
nuget-package
| null | null | null | null |
open
|
NuGet: remote server returned an Error(403) Forbidden
===
Whenever i attempt to install a package i get this error
remote server returned an Error(403) Forbidden
I can use other commands, such as get-package -ListAvailable, and discover whether there are any updates for installed packages but cannot actually install anything via Nuget.
This is the same for the command line and the package manager GUI.
I'm using Visual Web Developer 2010.
I'm in a corporate environment too, which i suspect is the chief issue.
Any possible pointers?
| 0 |
1,229,166 |
08/04/2009 18:35:40
| 67,531 |
02/17/2009 19:29:51
| 294 | 11 |
Why does JQuery not fade a flash object properly?
|
I am trying to fade out a Flash embed object and fade in regular Html.
For some reason the callback of the fadeout method gets fired multiple times, before the fade out has finished. The result is that the Html gets appended multiple times in the callback function and it blinks an extra time.
This doesn't happen when I try fading regular Html.
Is the fadeout function not meant to work with flash?
**Html:**
<a id="HideFlash" href="#">Hide Flash</a>
<div id="FlashContainer" >
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
width="100" height="50" id="TEST" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="demo_banner.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="wmode" value="transparent">
<embed src="demo_banner.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="100" height="50" name="TEST"
align="middle" allowscriptaccess="sameDomain" allowfullscreen="false" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div>
<div id="RegularContent" >
<h1>Before Fade</h1>
</div>
**JQuery:**
$('#HideFlash').click(function() {
$('#FlashContainer *').fadeOut('slow', function() {
$('#FlashContainer').append("<p style='display: none;'>This is in the flash container</p>");
$('#FlashContainer p').fadeIn('slow');
});
$('#RegularContent *').fadeOut('slow', function() {
$('#RegularContent').append("<p style='display: none;'>This is in the regular content after fade</p>");
$('#RegularContent p').fadeIn('slow');
});
});
|
jquery
|
fade
|
flash
| null | null | null |
open
|
Why does JQuery not fade a flash object properly?
===
I am trying to fade out a Flash embed object and fade in regular Html.
For some reason the callback of the fadeout method gets fired multiple times, before the fade out has finished. The result is that the Html gets appended multiple times in the callback function and it blinks an extra time.
This doesn't happen when I try fading regular Html.
Is the fadeout function not meant to work with flash?
**Html:**
<a id="HideFlash" href="#">Hide Flash</a>
<div id="FlashContainer" >
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
width="100" height="50" id="TEST" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="demo_banner.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="wmode" value="transparent">
<embed src="demo_banner.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="100" height="50" name="TEST"
align="middle" allowscriptaccess="sameDomain" allowfullscreen="false" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div>
<div id="RegularContent" >
<h1>Before Fade</h1>
</div>
**JQuery:**
$('#HideFlash').click(function() {
$('#FlashContainer *').fadeOut('slow', function() {
$('#FlashContainer').append("<p style='display: none;'>This is in the flash container</p>");
$('#FlashContainer p').fadeIn('slow');
});
$('#RegularContent *').fadeOut('slow', function() {
$('#RegularContent').append("<p style='display: none;'>This is in the regular content after fade</p>");
$('#RegularContent p').fadeIn('slow');
});
});
| 0 |
8,835,740 |
01/12/2012 13:21:16
| 1,140,663 |
01/10/2012 10:47:47
| 1 | 0 |
Use of Distinct & Order by in Sql Server 2008
|
I wan to use distinct in a join query with order by. Distinct column and order by columns are different.
Please anyone suggest me the answer fast.......
|
sql-server
|
distinct
| null | null | null |
01/12/2012 14:09:45
|
not a real question
|
Use of Distinct & Order by in Sql Server 2008
===
I wan to use distinct in a join query with order by. Distinct column and order by columns are different.
Please anyone suggest me the answer fast.......
| 1 |
5,187,345 |
03/03/2011 22:20:12
| 643,794 |
03/03/2011 22:18:35
| 1 | 0 |
Dataset bind to Gridview within WCF REST retrieval method and Linq to Sql
|
I used a WCF REST template to build a WCF service library to create PUT and GET calls. PUT method works fine sending my blob to a database.
On the GET, I want to be able to access the web service directly and display the results from a stored procedure as a dataset and bind this to a gridview. The stored procedure is a simple select statement, returning three of the four columns from the table. I have the following:
[WebGet(UriTemplate = "/?name={name}", ResponseFormat = WebMessageFormat.Xml)]
public List<Object> GetCollection(string name)
{
try
{
db.OpenDbConnection();
// Call to SQL stored procedure
return db.GetCustFromName(name);
}
catch (Exception e)
{
Log.Error("Stored Proc execution failed. ", e);
}
finally
{
db.CloseDbConnection();
}
return null;
}
I also added Linq to SQL class to include my database table and stored procedures access. I also created the Default.aspx file in addition to the other required files.
protected void Page_Load(object sender, EventArgs e)
{
ServiceDataContext objectContext = new ServiceDataContext();
var source = objectContext.GetCustFromName("Tiger");
Menu1.DataSource = source;
Menu1.DataBind();
}
But this gives me The entity type '' does not belong to any registered model.
Where should the data binding be done? What should be the return type for GetCollection()? I am stuck with this. Please provide help on how to do this.
|
c#
|
wcf
|
gridview
|
dataset
|
webget
| null |
open
|
Dataset bind to Gridview within WCF REST retrieval method and Linq to Sql
===
I used a WCF REST template to build a WCF service library to create PUT and GET calls. PUT method works fine sending my blob to a database.
On the GET, I want to be able to access the web service directly and display the results from a stored procedure as a dataset and bind this to a gridview. The stored procedure is a simple select statement, returning three of the four columns from the table. I have the following:
[WebGet(UriTemplate = "/?name={name}", ResponseFormat = WebMessageFormat.Xml)]
public List<Object> GetCollection(string name)
{
try
{
db.OpenDbConnection();
// Call to SQL stored procedure
return db.GetCustFromName(name);
}
catch (Exception e)
{
Log.Error("Stored Proc execution failed. ", e);
}
finally
{
db.CloseDbConnection();
}
return null;
}
I also added Linq to SQL class to include my database table and stored procedures access. I also created the Default.aspx file in addition to the other required files.
protected void Page_Load(object sender, EventArgs e)
{
ServiceDataContext objectContext = new ServiceDataContext();
var source = objectContext.GetCustFromName("Tiger");
Menu1.DataSource = source;
Menu1.DataBind();
}
But this gives me The entity type '' does not belong to any registered model.
Where should the data binding be done? What should be the return type for GetCollection()? I am stuck with this. Please provide help on how to do this.
| 0 |
944,167 |
06/03/2009 11:09:52
| 57,872 |
01/22/2009 11:56:21
| 27 | 2 |
Can some explain what this script does please
|
lass person {
var $name;
var $email;
//Getters
function get_name() { return $this->name; }
function get_email() { return $this->email; }
//Setters
function set_name( $name ) { $this->name = $name; }
function set_email( $email ) {
if ( !eregi("^([0-9,a-z,A-Z]+)([.,_,-]([0-9,a-z,A-Z]+))*[@]([0-9,a-z,A-Z]+)([.,_,-]([0-9,a-z,A-Z]+))*[.]([0-9,a-z,A-Z]){2}([0-9,a-z,A-Z])*$", $email ) ) {
return false;
} else {
$this->email = $email;
return true;
}
}//EOM set_email
}//EOC person
|
php
|
php5
|
regex
| null | null | null |
open
|
Can some explain what this script does please
===
lass person {
var $name;
var $email;
//Getters
function get_name() { return $this->name; }
function get_email() { return $this->email; }
//Setters
function set_name( $name ) { $this->name = $name; }
function set_email( $email ) {
if ( !eregi("^([0-9,a-z,A-Z]+)([.,_,-]([0-9,a-z,A-Z]+))*[@]([0-9,a-z,A-Z]+)([.,_,-]([0-9,a-z,A-Z]+))*[.]([0-9,a-z,A-Z]){2}([0-9,a-z,A-Z])*$", $email ) ) {
return false;
} else {
$this->email = $email;
return true;
}
}//EOM set_email
}//EOC person
| 0 |
10,722,654 |
05/23/2012 15:01:19
| 1,293,343 |
03/26/2012 15:08:20
| 1 | 0 |
3 table Linq Query
|
I Have 3 Relational Tables on SQLCE Database.
<p>Product ProductCategory ProductPhoto</p>
<p>---------- ---------------------- -----------------</p>
<p>PId CatId PhotoId</p>
<p>Name Name Value</p>
<p>CatId PId</p>
I Need, List ProductCategories with first Product Photo for Linq.
<br />
If not possible Linq, please sql code.
<br />
Thanks.
|
sql
|
linq
|
sql-server-ce
| null | null |
05/23/2012 21:11:45
|
not a real question
|
3 table Linq Query
===
I Have 3 Relational Tables on SQLCE Database.
<p>Product ProductCategory ProductPhoto</p>
<p>---------- ---------------------- -----------------</p>
<p>PId CatId PhotoId</p>
<p>Name Name Value</p>
<p>CatId PId</p>
I Need, List ProductCategories with first Product Photo for Linq.
<br />
If not possible Linq, please sql code.
<br />
Thanks.
| 1 |
7,221,293 |
08/28/2011 13:34:17
| 916,457 |
08/28/2011 13:34:17
| 1 | 0 |
help with scanf hex in C
|
i am trying to scan an input file with such format
r1 = 0c100009
So far I have tried this but the while loop is skipped and the output is 0.
int
read_reg (reg_t reg) {
char r, eq;
int i, hex;
while (scanf("%c,%d,%[=],%x", &r, &i, &eq, &hex)==4) {
if ((r != 'r') || (i < 1) || (i > 31) || (eq != '=')){
error();
}
reg[i] = hex;
}
printf("%#x\n",hex);
return 0;
}
Thanks for the help!
|
c
| null | null | null | null |
08/28/2011 19:32:29
|
too localized
|
help with scanf hex in C
===
i am trying to scan an input file with such format
r1 = 0c100009
So far I have tried this but the while loop is skipped and the output is 0.
int
read_reg (reg_t reg) {
char r, eq;
int i, hex;
while (scanf("%c,%d,%[=],%x", &r, &i, &eq, &hex)==4) {
if ((r != 'r') || (i < 1) || (i > 31) || (eq != '=')){
error();
}
reg[i] = hex;
}
printf("%#x\n",hex);
return 0;
}
Thanks for the help!
| 3 |
3,841,553 |
10/01/2010 17:21:11
| 118,649 |
06/06/2009 21:18:25
| 106 | 1 |
Not able to copy jar to an absolute path
|
I am trying to copy Demo.jar file (generated by an ant task) on my desktop(or any directory specified by it's absolute path on my XP machine).
I am specifying **absolute path** in a properties file and reading it on the fly.
The problem is I am not able to read this absolute path properly, where I want my Demo.jar to be copied.
Absolute path given in properties file is :-
***"C:\Documents and Settings\Administrator\Desktop\google\my java"***
and script is echoing :-
***[echo] C:Documents and SettingsAdministratorDesktopgooglemy java***
Below is my edited version of build.xml and antParams.properties:-
build.xml
---------
<project default="copy">
<property file="antParams.properties" prefix="antParams"/>
<target name="jar" >
<jar destfile="${antParams.jarName}"
basedir="${antParams.binDir}"
includes="**/*.class"
/>
</target>
<target name="copy" depends="jar">
<echo>${antParams.jarDestination}</echo>
<!-- what goes here -->
</target>
</project>
----------
antParams.properties
--------------------
jarName=Demo.jar
binDir=bin
jarDestination=C:\Documents and Settings\Administrator\Desktop\
Thanx in advance.... :-)
|
java
|
ant
|
jar
|
copy
| null | null |
open
|
Not able to copy jar to an absolute path
===
I am trying to copy Demo.jar file (generated by an ant task) on my desktop(or any directory specified by it's absolute path on my XP machine).
I am specifying **absolute path** in a properties file and reading it on the fly.
The problem is I am not able to read this absolute path properly, where I want my Demo.jar to be copied.
Absolute path given in properties file is :-
***"C:\Documents and Settings\Administrator\Desktop\google\my java"***
and script is echoing :-
***[echo] C:Documents and SettingsAdministratorDesktopgooglemy java***
Below is my edited version of build.xml and antParams.properties:-
build.xml
---------
<project default="copy">
<property file="antParams.properties" prefix="antParams"/>
<target name="jar" >
<jar destfile="${antParams.jarName}"
basedir="${antParams.binDir}"
includes="**/*.class"
/>
</target>
<target name="copy" depends="jar">
<echo>${antParams.jarDestination}</echo>
<!-- what goes here -->
</target>
</project>
----------
antParams.properties
--------------------
jarName=Demo.jar
binDir=bin
jarDestination=C:\Documents and Settings\Administrator\Desktop\
Thanx in advance.... :-)
| 0 |
2,992,796 |
06/07/2010 20:14:44
| 360,794 |
06/07/2010 20:14:44
| 1 | 0 |
rng random number
|
I have a question. How can I calculate/estimate upper bound of random number, that a random number can generate ? Thanks in advance!
|
random
|
numbers
|
generator
| null | null |
06/08/2010 00:04:33
|
not a real question
|
rng random number
===
I have a question. How can I calculate/estimate upper bound of random number, that a random number can generate ? Thanks in advance!
| 1 |
10,720,413 |
05/23/2012 12:57:38
| 1,304,968 |
03/31/2012 11:46:23
| 24 | 0 |
How to add pdf upload functionality in wordpress user post
|
I want to add pdf upload functionality in user post, I was trying this with Quick Post Widget, but unable to upload PDF with that.
|
php
|
wordpress
|
pdf
| null | null |
05/31/2012 13:52:04
|
not a real question
|
How to add pdf upload functionality in wordpress user post
===
I want to add pdf upload functionality in user post, I was trying this with Quick Post Widget, but unable to upload PDF with that.
| 1 |
9,377,860 |
02/21/2012 12:45:10
| 1,077,385 |
12/02/2011 12:28:00
| 20 | 1 |
Mef WPF MVVM Simple application,
|
Can anybody give me a simple wpf application using mef and following mvvm pattern. I have looked a lot on the internet but i found very few examples and those example are very complex to understand. some examples are wpf, mef but dont follow mvvm pattern.
|
wpf
|
mvvm
|
mef
| null | null |
02/22/2012 14:55:02
|
not constructive
|
Mef WPF MVVM Simple application,
===
Can anybody give me a simple wpf application using mef and following mvvm pattern. I have looked a lot on the internet but i found very few examples and those example are very complex to understand. some examples are wpf, mef but dont follow mvvm pattern.
| 4 |
11,039,486 |
06/14/2012 18:48:28
| 1,454,627 |
06/13/2012 19:42:40
| 1 | 0 |
jquery fadein is flickering
|
I'm hoping someone can help me please. I have the following problem:
http://jsfiddle.net/zhPAF/
When the #topNavSecond ('Our People') anchor is hovered the ul #subList1 should fade in. Now as you can see from the fiddle it's not fading on the first hover but only on subsequent hovers. Similarly the next anchor ('Our Services') is doing the same and there is some fading issues when going between them.
I've reached the limits of my knowledge of jquery (which admittedly isn't much!) and would dearly appreciate some help.
I'm thinking it maybe to do with using absolute positioning left:-9999px to hide the ul.
|
jquery
|
css
|
menu
|
absolute-positioning
| null | null |
open
|
jquery fadein is flickering
===
I'm hoping someone can help me please. I have the following problem:
http://jsfiddle.net/zhPAF/
When the #topNavSecond ('Our People') anchor is hovered the ul #subList1 should fade in. Now as you can see from the fiddle it's not fading on the first hover but only on subsequent hovers. Similarly the next anchor ('Our Services') is doing the same and there is some fading issues when going between them.
I've reached the limits of my knowledge of jquery (which admittedly isn't much!) and would dearly appreciate some help.
I'm thinking it maybe to do with using absolute positioning left:-9999px to hide the ul.
| 0 |
7,000,437 |
08/09/2011 17:43:00
| 886,112 |
08/09/2011 14:15:59
| 6 | 0 |
ASP.NET mvc : populate (bind data) in listbox
|
I need to populate two listboxes with data from a database.
But I need to display two listboxes in one view, so I created a ListBoxModel class.
public class ListboxModel
{
public ListBox LB1 { get; set; }
public ListBox LB2 { get; set; }
}
And in my Controller:
public ActionResult IndexStudents(Docent docent, int lessonid, int classid)
{
var MyListBox = new ListboxModel
{
LB1 = new ListBox(docent.ReturnStudentsNormal(lessonid, classid),
LB2 = new ListBox(docent.ReturnStudentsNoClass(lessonid, classid)
};
return View(MyListBox);
}
But this code does not work, how can I bind the data to the listboxes?
So I'd like to use 2 models, one for each listbox... one with normal students and one with students who are not subscribed for lessons.
How could I do that?
And what code do I have to write in my view?
Something like:
<div class="editor-field">
<%: Html.ListBox("IndexStudentsNormal", Model.LB1) %>
</div>
<div class="editor-field">
<%: Html.ListBox("IndexStudentsNoClass", Model.LB2) %>
</div>
The listbox has to be a listbox with multiple colums so that it can contain the name, sirname, class, teacher of the student.
Student is an object, I'd like to display student.Name, student.Sirname, student.Class, and so on as column tags in that listbox.
So can I use an object in a ListBox, or do I have to convert everything to strings?
How can I do that?
Thanks in advance!
|
c#
|
asp.net-mvc
|
model
|
listbox
| null | null |
open
|
ASP.NET mvc : populate (bind data) in listbox
===
I need to populate two listboxes with data from a database.
But I need to display two listboxes in one view, so I created a ListBoxModel class.
public class ListboxModel
{
public ListBox LB1 { get; set; }
public ListBox LB2 { get; set; }
}
And in my Controller:
public ActionResult IndexStudents(Docent docent, int lessonid, int classid)
{
var MyListBox = new ListboxModel
{
LB1 = new ListBox(docent.ReturnStudentsNormal(lessonid, classid),
LB2 = new ListBox(docent.ReturnStudentsNoClass(lessonid, classid)
};
return View(MyListBox);
}
But this code does not work, how can I bind the data to the listboxes?
So I'd like to use 2 models, one for each listbox... one with normal students and one with students who are not subscribed for lessons.
How could I do that?
And what code do I have to write in my view?
Something like:
<div class="editor-field">
<%: Html.ListBox("IndexStudentsNormal", Model.LB1) %>
</div>
<div class="editor-field">
<%: Html.ListBox("IndexStudentsNoClass", Model.LB2) %>
</div>
The listbox has to be a listbox with multiple colums so that it can contain the name, sirname, class, teacher of the student.
Student is an object, I'd like to display student.Name, student.Sirname, student.Class, and so on as column tags in that listbox.
So can I use an object in a ListBox, or do I have to convert everything to strings?
How can I do that?
Thanks in advance!
| 0 |
8,910,280 |
01/18/2012 12:43:55
| 447,426 |
09/14/2010 13:58:57
| 133 | 2 |
use of [context].xml and web.xml for configuring web app
|
i just learned that i could retrieve parameters and other stuff from "ServletContext" (i.e. by overriding contextInitialized).
reading [tomcats context doc][1] reveals that i could set parameters via web.xml (used as default values) and then overwrite them with an [context].xml file.
First question: is this a good way to set default properties and let server administrators overwrite them?
First is there an overview that shows all kinds of attributes/parameters that are available with it's tag used in tomcats context xml, the tag used in web xml, how the retrieve it from within java and a use case / example for what kind of stuff a parameter should be used?
By toying around with it i am facing the following problems: I tried to set <context-param> in web.xml and a <Parameter> with same name in [context].xml. But overriding does not work (no matter if i set override to true or false in [context].xml)
I tested if the [context].xml is correctly deployed by setting a 2nd <parameter> this works. The next problem is, if i deploy the web app via tomcats web interface the [context].xml is completly ignored (console states that it is deployed but 2nd <Parameter> is null)
To cut a long story short: how to properly use web.xml and [context].xml - the link below isn't much help :-|
thx in advance
[1]: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
|
java
|
web-applications
|
java-ee
|
tomcat
|
configuration
| null |
open
|
use of [context].xml and web.xml for configuring web app
===
i just learned that i could retrieve parameters and other stuff from "ServletContext" (i.e. by overriding contextInitialized).
reading [tomcats context doc][1] reveals that i could set parameters via web.xml (used as default values) and then overwrite them with an [context].xml file.
First question: is this a good way to set default properties and let server administrators overwrite them?
First is there an overview that shows all kinds of attributes/parameters that are available with it's tag used in tomcats context xml, the tag used in web xml, how the retrieve it from within java and a use case / example for what kind of stuff a parameter should be used?
By toying around with it i am facing the following problems: I tried to set <context-param> in web.xml and a <Parameter> with same name in [context].xml. But overriding does not work (no matter if i set override to true or false in [context].xml)
I tested if the [context].xml is correctly deployed by setting a 2nd <parameter> this works. The next problem is, if i deploy the web app via tomcats web interface the [context].xml is completly ignored (console states that it is deployed but 2nd <Parameter> is null)
To cut a long story short: how to properly use web.xml and [context].xml - the link below isn't much help :-|
thx in advance
[1]: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
| 0 |
2,873,973 |
05/20/2010 13:10:53
| 61,197 |
02/01/2009 13:47:21
| 242 | 14 |
CPU usage extremely high on TS deployment
|
Our application is written in .NET (framework 3.5). We are experiencing problems with the applications performance when deployed in a terminal services environment. The client is using a TS farm. They have 4GB ram and a decent xeon processor.
When the application is opened in this environment, it sits at 25% CPU usage even when idle. When deployed in a normal client - server environment, it behaves normally, spiking the CPU usage when necessary and drops down to 0 when idle.
Does anyone have any ideas what could be causing this? Or, what I could do to investigate? We have no memory leaks that we can find using performance profiling tools.
|
c#
|
.net
|
cpu
|
memory-management
| null | null |
open
|
CPU usage extremely high on TS deployment
===
Our application is written in .NET (framework 3.5). We are experiencing problems with the applications performance when deployed in a terminal services environment. The client is using a TS farm. They have 4GB ram and a decent xeon processor.
When the application is opened in this environment, it sits at 25% CPU usage even when idle. When deployed in a normal client - server environment, it behaves normally, spiking the CPU usage when necessary and drops down to 0 when idle.
Does anyone have any ideas what could be causing this? Or, what I could do to investigate? We have no memory leaks that we can find using performance profiling tools.
| 0 |
325,501 |
11/28/2008 11:04:27
| 5,789 |
09/11/2008 11:33:18
| 763 | 35 |
Castle/ Active Records: How do you count objects?
|
I'm trying to do a simple "Select Count(*) from PRODUCTS where date > xxx" with Castle on NHibernate.
If I was directly using NHibernate, I could reuse [this question][1] answers but unfortunately I see no easy way to access the Current NHibernate session from Castle Records.
I obviously don't want to retrieve all my objects and do a Count on the C# side ;). I only need to know how many objects there are.
Any ideas?
[1]: http://stackoverflow.com/questions/116188/how-do-i-select-the-count-of-an-nhibernate-subquerys-results
|
nhibernate
|
castle-activerecord
|
sql
|
.net
| null | null |
open
|
Castle/ Active Records: How do you count objects?
===
I'm trying to do a simple "Select Count(*) from PRODUCTS where date > xxx" with Castle on NHibernate.
If I was directly using NHibernate, I could reuse [this question][1] answers but unfortunately I see no easy way to access the Current NHibernate session from Castle Records.
I obviously don't want to retrieve all my objects and do a Count on the C# side ;). I only need to know how many objects there are.
Any ideas?
[1]: http://stackoverflow.com/questions/116188/how-do-i-select-the-count-of-an-nhibernate-subquerys-results
| 0 |
6,065,150 |
05/19/2011 21:36:27
| 761,812 |
05/19/2011 21:34:11
| 1 | 0 |
Rseize UItableView in interface builder
|
i created UItableViewController . I wan't to reseize the table and put a my application background image, labels and a button... But i can't . Some one have an idea ?thanx
|
iphone
|
objective-c
|
interface-builder
| null | null | null |
open
|
Rseize UItableView in interface builder
===
i created UItableViewController . I wan't to reseize the table and put a my application background image, labels and a button... But i can't . Some one have an idea ?thanx
| 0 |
8,351,948 |
12/02/2011 04:54:17
| 63,580 |
02/07/2009 03:01:02
| 400 | 11 |
How do I save additional content into my UIManagedDocument file packages?
|
I'm having a lot of trouble deciphering [Apple's documentation around `UIManagedDocument`](http://developer.apple.com/library/IOs/#documentation/UIKit/Reference/UIManagedDocument_Class/Reference/Reference.html), specifically the following methods:
* `- (id)additionalContentForURL:(NSURL *)absoluteURL error:(NSError **)error`
* `- (BOOL)readAdditionalContentFromURL:(NSURL *)absoluteURL error:(NSError **)error`
* `- (BOOL)writeAdditionalContent:(id)content toURL:(NSURL *)absoluteURL originalContentsURL:(NSURL *)absoluteOriginalContentsURL error:(NSError **)error`
Has anyone successfully managed to save additional content into the "addition content" directory inside their UIManagedDocument packages? I'm looking to save straight images (PNGs, JPEGs, etc) and videos (m4v, etc) into this directory using UUIDs as the filenames (with the correct file extension), and storing references to these individual files as `NSString` file paths within my persistent store.
|
ios
|
cocoa-touch
|
core-data
|
uidocumentinteraction
| null | null |
open
|
How do I save additional content into my UIManagedDocument file packages?
===
I'm having a lot of trouble deciphering [Apple's documentation around `UIManagedDocument`](http://developer.apple.com/library/IOs/#documentation/UIKit/Reference/UIManagedDocument_Class/Reference/Reference.html), specifically the following methods:
* `- (id)additionalContentForURL:(NSURL *)absoluteURL error:(NSError **)error`
* `- (BOOL)readAdditionalContentFromURL:(NSURL *)absoluteURL error:(NSError **)error`
* `- (BOOL)writeAdditionalContent:(id)content toURL:(NSURL *)absoluteURL originalContentsURL:(NSURL *)absoluteOriginalContentsURL error:(NSError **)error`
Has anyone successfully managed to save additional content into the "addition content" directory inside their UIManagedDocument packages? I'm looking to save straight images (PNGs, JPEGs, etc) and videos (m4v, etc) into this directory using UUIDs as the filenames (with the correct file extension), and storing references to these individual files as `NSString` file paths within my persistent store.
| 0 |
53,428 |
09/10/2008 04:49:32
| 5,499 |
09/10/2008 03:15:54
| 1 | 1 |
What are some good Python ORM solutions?
|
I'm evaluating and looking at using CherryPy for a project that's basically a javascript front-end from the client-side (browser) that talks to a Python web service on the back-end. So, I really need something fast and lightweight on the back-end that I can implement using Python that then speaks to the PostgreSQL db via an ORM (JSON to the browser).
I'm also looking at Django, which I like, since its ORM is built-in. However, I think Django might be a little more than I really need (i.e. more features than I really need == slower?).
Anyone have any experience with different Python ORM solutions that can compare and contrast their features and functionality, speed, efficiency, etc.?
|
python
|
orm
| null | null | null |
07/14/2012 14:12:05
|
not constructive
|
What are some good Python ORM solutions?
===
I'm evaluating and looking at using CherryPy for a project that's basically a javascript front-end from the client-side (browser) that talks to a Python web service on the back-end. So, I really need something fast and lightweight on the back-end that I can implement using Python that then speaks to the PostgreSQL db via an ORM (JSON to the browser).
I'm also looking at Django, which I like, since its ORM is built-in. However, I think Django might be a little more than I really need (i.e. more features than I really need == slower?).
Anyone have any experience with different Python ORM solutions that can compare and contrast their features and functionality, speed, efficiency, etc.?
| 4 |
11,414,611 |
07/10/2012 13:41:26
| 886,906 |
08/09/2011 23:14:53
| 677 | 1 |
Text above - Is my code good enough?
|
Is my code good enough to display text above image? It looks similar to the stackoverflow orange button "Ask Question", but not a button, not a link. It's just a text and the orange color around it. It works fine but I'm courious if the code looks fine and not stupid.
//css
.date
{
float : left;
width : 100px;
}
//html
<div class="date">
<img src="orange.png">
<div style="margin-top:-18px; margin-left:6px; color:#fff;">22.11.2012
</div>
</div>
As result, the text is exactly above (in the center) of the image.
|
html
|
css
|
image
|
html5
|
text
|
07/10/2012 13:53:27
|
off topic
|
Text above - Is my code good enough?
===
Is my code good enough to display text above image? It looks similar to the stackoverflow orange button "Ask Question", but not a button, not a link. It's just a text and the orange color around it. It works fine but I'm courious if the code looks fine and not stupid.
//css
.date
{
float : left;
width : 100px;
}
//html
<div class="date">
<img src="orange.png">
<div style="margin-top:-18px; margin-left:6px; color:#fff;">22.11.2012
</div>
</div>
As result, the text is exactly above (in the center) of the image.
| 2 |
8,377,023 |
12/04/2011 17:10:38
| 247,298 |
10/13/2009 19:35:37
| 22 | 0 |
mod_rewrite with between 1 and 3 variables
|
I am trying to rewrite:
/test or /test/
to
/index.php?section=test
and
/test/this or /test/this/
to
/index.php?section=test&category=this
and
/test/this/code or /test/this/code/
to
/index.php?section=test&category=this&filename=code
I also want to ignore paths to images, css or js files.
This is my code:
RewriteEngine On
RewriteRule \.(jpg|jpeg|png|css|js)$ - [NC,S=2]
RewriteRule ([^/]*)/([^/]*)/([^/]*)/$ index.php?section=$1&category=$2&filename=$3 [L]
RewriteRule ([^/]*)/([^/]*)/([^/]*)$ index.php?section=$1&category=$2&filename=$3 [L]
RewriteRule ([^/]*)/([^/]*)/$ index.php?section=$1&category=$2 [L]
RewriteRule ([^/]*)/([^/]*)$ index.php?section=$1&category=$2 [L]
RewriteRule ([^/]*)/$ index.php?section=$1 [L]
RewriteRule ([^/]*)$ index.php?section=$1 [L]
Do you have any idea what is wrong with it?
|
apache
|
mod-rewrite
| null | null | null |
12/05/2011 20:01:59
|
off topic
|
mod_rewrite with between 1 and 3 variables
===
I am trying to rewrite:
/test or /test/
to
/index.php?section=test
and
/test/this or /test/this/
to
/index.php?section=test&category=this
and
/test/this/code or /test/this/code/
to
/index.php?section=test&category=this&filename=code
I also want to ignore paths to images, css or js files.
This is my code:
RewriteEngine On
RewriteRule \.(jpg|jpeg|png|css|js)$ - [NC,S=2]
RewriteRule ([^/]*)/([^/]*)/([^/]*)/$ index.php?section=$1&category=$2&filename=$3 [L]
RewriteRule ([^/]*)/([^/]*)/([^/]*)$ index.php?section=$1&category=$2&filename=$3 [L]
RewriteRule ([^/]*)/([^/]*)/$ index.php?section=$1&category=$2 [L]
RewriteRule ([^/]*)/([^/]*)$ index.php?section=$1&category=$2 [L]
RewriteRule ([^/]*)/$ index.php?section=$1 [L]
RewriteRule ([^/]*)$ index.php?section=$1 [L]
Do you have any idea what is wrong with it?
| 2 |
7,919,238 |
10/27/2011 16:33:12
| 1,009,269 |
10/23/2011 06:30:39
| 1 | 0 |
How Use obfuscation in .Net Project and C++ Project for DLL File?
|
I have big problem in my project security. How i can improve them?? I know Obfuscation and Stolen. How i can use them in my project?
|
c#
| null | null | null | null |
10/27/2011 18:00:22
|
not a real question
|
How Use obfuscation in .Net Project and C++ Project for DLL File?
===
I have big problem in my project security. How i can improve them?? I know Obfuscation and Stolen. How i can use them in my project?
| 1 |
7,676,533 |
10/06/2011 15:19:45
| 107,409 |
05/15/2009 00:13:17
| 1,892 | 89 |
What are the steps to convert a large class from static to non-static?
|
I have a rather large open source class that I need to convert from static to non-static.
The reason I need to do this is to make it thread safe; I want one copy of the class per thread.
In general, what are the recommended steps to convert a C# library from static to non-static?
|
c#
|
.net
|
multithreading
|
static
| null |
10/07/2011 08:23:13
|
not a real question
|
What are the steps to convert a large class from static to non-static?
===
I have a rather large open source class that I need to convert from static to non-static.
The reason I need to do this is to make it thread safe; I want one copy of the class per thread.
In general, what are the recommended steps to convert a C# library from static to non-static?
| 1 |
1,687,912 |
11/06/2009 14:20:35
| 197,375 |
10/27/2009 14:05:03
| 264 | 14 |
Has anyone checked out Drupal 7?
|
Has anyone checked out a copy of Drupal 7 yet? What do people think?
I'm pretty excited about the PDO and all of the designers I work with a very excited about the new admin interface/structure.
Do we have any Drupal core developers here on Stack Overflow?
|
drupal-7
|
drupal
| null | null | null |
11/14/2011 21:27:47
|
not constructive
|
Has anyone checked out Drupal 7?
===
Has anyone checked out a copy of Drupal 7 yet? What do people think?
I'm pretty excited about the PDO and all of the designers I work with a very excited about the new admin interface/structure.
Do we have any Drupal core developers here on Stack Overflow?
| 4 |
4,323,445 |
12/01/2010 10:38:39
| 501,134 |
11/08/2010 20:38:58
| 16 | 1 |
Reboot system with Assembly
|
I have a question.
Can I reboot my system (OS: MS Windows XP/7) with Assembly?
How?? (can you give me a .com file?)
|
assembly
| null | null | null | null |
12/01/2010 20:54:48
|
not a real question
|
Reboot system with Assembly
===
I have a question.
Can I reboot my system (OS: MS Windows XP/7) with Assembly?
How?? (can you give me a .com file?)
| 1 |
8,922,372 |
01/19/2012 07:22:16
| 680,334 |
03/28/2011 13:50:53
| 92 | 5 |
how improve this sample of side menu with jquery?
|
i have simple side menu with this html code :
<div id="menu">
<div>
Menu Title
</div>
<ul class="menu">
<li>
<span>
first item
</span>
<ul>
<li>
sub item
</li>
<li>
sub item
</li>
<li>
sub item
</li>
</ul>
</li>
<li>
<span>
second item
</span>
<ul>
<li>sub menu</li>
<li>sub menu</li>
</ul>
</li>
<li>
<span>
third item
</span>
<ul>
<li>
sub menu
</li>
<li>
sub menu
</li>
</ul>
</li>
</ul>
</div>
and css is :
#menu{
text-align:center;
font-size:13px;
font-family:tahoma;
color:#0000AA;
padding:2px 0;}
#menu div{
color:#0000AA;}
#menu ul{
text-align:right;
background-color: #FFFFFF;
list-style-type: none;
margin: 0px;
padding: 0px;}
#menu ul li{
display:block;
margin: 3px 2px;
cursor:hand;
cursor:pointer;}
#menu ul li span{
width:100%;
display:block;
background-color:#DDDDFF;}
#menu ul li span:hover{
background-color:#9999EE;}
#menu ul li ul{
display:none;}
#menu ul li ul li{
background-color:#EEEEEE;
margin:2px;
display: block;}
#menu ul li ul li:hover{
background-color:#FFFFFF;}
.submenu{
background-color: #CCCCFF;}
and jquery code is :
$(window).load(function(){
$(".submenu").children(this).slideUp("slow");
});
$(document).ready(function(){
$('ul.menu li span').click(function(){
$("ul.menu li").find('ul').slideUp('fast');
$(this).parent(this).find('ul').slideDown('fast');
});
});
and my complate menu locate in [http://jsfiddle.net/parseha/NkuG5/3/][1]
this problem is : when clicking first item , sub menus sliding up and then sliding down , i want do not this run .
excuse me for this text and my mistake in content.
thanks.
[1]: http://jsfiddle.net/parseha/NkuG5/3/
|
jquery
|
html
|
menubar
| null | null | null |
open
|
how improve this sample of side menu with jquery?
===
i have simple side menu with this html code :
<div id="menu">
<div>
Menu Title
</div>
<ul class="menu">
<li>
<span>
first item
</span>
<ul>
<li>
sub item
</li>
<li>
sub item
</li>
<li>
sub item
</li>
</ul>
</li>
<li>
<span>
second item
</span>
<ul>
<li>sub menu</li>
<li>sub menu</li>
</ul>
</li>
<li>
<span>
third item
</span>
<ul>
<li>
sub menu
</li>
<li>
sub menu
</li>
</ul>
</li>
</ul>
</div>
and css is :
#menu{
text-align:center;
font-size:13px;
font-family:tahoma;
color:#0000AA;
padding:2px 0;}
#menu div{
color:#0000AA;}
#menu ul{
text-align:right;
background-color: #FFFFFF;
list-style-type: none;
margin: 0px;
padding: 0px;}
#menu ul li{
display:block;
margin: 3px 2px;
cursor:hand;
cursor:pointer;}
#menu ul li span{
width:100%;
display:block;
background-color:#DDDDFF;}
#menu ul li span:hover{
background-color:#9999EE;}
#menu ul li ul{
display:none;}
#menu ul li ul li{
background-color:#EEEEEE;
margin:2px;
display: block;}
#menu ul li ul li:hover{
background-color:#FFFFFF;}
.submenu{
background-color: #CCCCFF;}
and jquery code is :
$(window).load(function(){
$(".submenu").children(this).slideUp("slow");
});
$(document).ready(function(){
$('ul.menu li span').click(function(){
$("ul.menu li").find('ul').slideUp('fast');
$(this).parent(this).find('ul').slideDown('fast');
});
});
and my complate menu locate in [http://jsfiddle.net/parseha/NkuG5/3/][1]
this problem is : when clicking first item , sub menus sliding up and then sliding down , i want do not this run .
excuse me for this text and my mistake in content.
thanks.
[1]: http://jsfiddle.net/parseha/NkuG5/3/
| 0 |
5,958,772 |
05/11/2011 03:02:59
| 737,562 |
05/04/2011 07:56:54
| 25 | 0 |
How to add a bar like "Congrats ... – learn more" of this site?
|
I think the floating bar saying
"Congrats, you've gained the privilege – talk in chat learn more"
looks so cool, and so neat to for reporting status. How to add one to my own site please?
|
bar
|
floating
| null | null | null |
05/13/2011 02:53:21
|
not a real question
|
How to add a bar like "Congrats ... – learn more" of this site?
===
I think the floating bar saying
"Congrats, you've gained the privilege – talk in chat learn more"
looks so cool, and so neat to for reporting status. How to add one to my own site please?
| 1 |
8,613,686 |
12/23/2011 08:16:30
| 956,098 |
09/21/2011 04:15:23
| 28 | 3 |
What is the source of this error org.hibernate.AssertionFailure: collection was processed twice by flush() and how to prevent it?
|
Im getting this kind of error that said.
> org.hibernate.AssertionFailure: collection was processed twice by
> flush()
When do this error raised, and how to avoid it.
Im using hibernate 3 + seam 2 in my web apps..
Thanks in advanced.
|
hibernate
|
search
| null | null | null | null |
open
|
What is the source of this error org.hibernate.AssertionFailure: collection was processed twice by flush() and how to prevent it?
===
Im getting this kind of error that said.
> org.hibernate.AssertionFailure: collection was processed twice by
> flush()
When do this error raised, and how to avoid it.
Im using hibernate 3 + seam 2 in my web apps..
Thanks in advanced.
| 0 |
10,485,951 |
05/07/2012 16:55:27
| 1,208,392 |
02/14/2012 05:32:41
| 1 | 0 |
How to wrap rsync with interactive login using Java?
|
I am trying to wrap rsync using java, and I have been having difficulty dealing with interactive login. I can get the unix command line utility `expect` to work, but I cannot seem to figure out the java equivalent `ExpectJ`. Here is my current code:
<!-- language: lang-js -->
import java.io.IOException;
import expectj.ExpectJ;
import expectj.Spawn;
public class ExpectjTest {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
String mypassword= "example";
String cmd = "rsync -e ssh --list-only --recursive user@host:~/\n";
ExpectJ expectinator = new ExpectJ();
Spawn rsync = expectinator.spawn("/bin/bash");
try {
rsync.send(cmd);
rsync.expect("password:",2);
rsync.send(mypassword+"\n");
rsync.expectClose();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
When I run this, I get the error:
ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
Permission denied (gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive).
It seems like the normal ssh interactive login is not being initiated because I am calling rsync from java. The analogous shell script using `expect` works just fine. Also, when I use public key authorization, similar java code seems to work. If I just wanted to use `ssh`, I would use some library like JSch, but I don't really trust any of the java rsync libraries, so I want to wrap the command line tool.
Thanks for your help!
|
java
|
rsync
|
expectj
| null | null | null |
open
|
How to wrap rsync with interactive login using Java?
===
I am trying to wrap rsync using java, and I have been having difficulty dealing with interactive login. I can get the unix command line utility `expect` to work, but I cannot seem to figure out the java equivalent `ExpectJ`. Here is my current code:
<!-- language: lang-js -->
import java.io.IOException;
import expectj.ExpectJ;
import expectj.Spawn;
public class ExpectjTest {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
String mypassword= "example";
String cmd = "rsync -e ssh --list-only --recursive user@host:~/\n";
ExpectJ expectinator = new ExpectJ();
Spawn rsync = expectinator.spawn("/bin/bash");
try {
rsync.send(cmd);
rsync.expect("password:",2);
rsync.send(mypassword+"\n");
rsync.expectClose();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
When I run this, I get the error:
ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
Permission denied (gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive).
It seems like the normal ssh interactive login is not being initiated because I am calling rsync from java. The analogous shell script using `expect` works just fine. Also, when I use public key authorization, similar java code seems to work. If I just wanted to use `ssh`, I would use some library like JSch, but I don't really trust any of the java rsync libraries, so I want to wrap the command line tool.
Thanks for your help!
| 0 |
5,465,231 |
03/28/2011 21:22:57
| 234,253 |
12/18/2009 00:56:42
| 476 | 21 |
Adobe X Enable Protected Mode at Startup - disable via code
|
Our application, write in Delphi, generates a series of reports, most of then in PDF format, that opens automatically when it is generated.
Adobe X introduced a feature that is enabled by default "Enable Protected Mode at Startup".
The report pdf files are oppened using "ShelExecute".
Becuase of this new Adobe Reader new setting, under Win 7 or Vista, we are getting an error message when opening the document. Double clicking the document to open it does not give any problem.
Is there a way to disable the protected method - or another way to open the document without getting the error (a workaround)?
|
delphi
|
windows-7
|
windows-vista
|
adobe
| null | null |
open
|
Adobe X Enable Protected Mode at Startup - disable via code
===
Our application, write in Delphi, generates a series of reports, most of then in PDF format, that opens automatically when it is generated.
Adobe X introduced a feature that is enabled by default "Enable Protected Mode at Startup".
The report pdf files are oppened using "ShelExecute".
Becuase of this new Adobe Reader new setting, under Win 7 or Vista, we are getting an error message when opening the document. Double clicking the document to open it does not give any problem.
Is there a way to disable the protected method - or another way to open the document without getting the error (a workaround)?
| 0 |
9,702,011 |
03/14/2012 12:29:26
| 807,494 |
06/20/2011 22:32:43
| 1 | 0 |
How can I properly download a file with MsBuild Community Tasks WebDownload?
|
If I do this
`[...]`
`<UsingTask AssemblyFile=".\MSBuild.Community.Tasks.dll"
TaskName="MsBuild.Community.Tasks.WebDownload" />`
`<Target Name="Download">
<WebDownload FileName="Deploy.zip"
FileUri="http://[...]/Deploy.zip" />
</Target>`
the resulting file is broken and only a fraction of the size of the file. Only textfiles seem to work.
The msbuild extension pack alternative isnt working either.
(http://www.msbuildextensionpack.com/help/3.5.5.0/html/fbcabc54-e80e-3176-dcd0-8be24fc60602.htm)
What am I doing wrong?
|
msbuild
|
file-download
|
msbuildcommunitytasks
|
msbuildextensionpack
| null |
03/15/2012 18:53:35
|
too localized
|
How can I properly download a file with MsBuild Community Tasks WebDownload?
===
If I do this
`[...]`
`<UsingTask AssemblyFile=".\MSBuild.Community.Tasks.dll"
TaskName="MsBuild.Community.Tasks.WebDownload" />`
`<Target Name="Download">
<WebDownload FileName="Deploy.zip"
FileUri="http://[...]/Deploy.zip" />
</Target>`
the resulting file is broken and only a fraction of the size of the file. Only textfiles seem to work.
The msbuild extension pack alternative isnt working either.
(http://www.msbuildextensionpack.com/help/3.5.5.0/html/fbcabc54-e80e-3176-dcd0-8be24fc60602.htm)
What am I doing wrong?
| 3 |
8,060,237 |
11/09/2011 04:08:54
| 998,521 |
10/17/2011 04:47:04
| 1 | 0 |
how to add recursive option in paypal IPN and paypal pro
|
am building a messaging site, which need to pay for messaging, am using the paypal option in my site to pay the money. Here an option to add recursive payment, and i want to get a response after the recuring instant occured, that is i want to update my site data base with these values after each recuring.
|
php
|
codeigniter-2
|
paypal-ipn
| null | null |
11/10/2011 00:17:29
|
not a real question
|
how to add recursive option in paypal IPN and paypal pro
===
am building a messaging site, which need to pay for messaging, am using the paypal option in my site to pay the money. Here an option to add recursive payment, and i want to get a response after the recuring instant occured, that is i want to update my site data base with these values after each recuring.
| 1 |
2,925,600 |
05/27/2010 22:57:05
| 323,719 |
04/22/2010 21:30:00
| 15 | 0 |
How do i select all the text nodes within a specific element node using XSL?
|
How do i select all the text nodes within a specific element node using XSL?
Input xml:
<node1 id="1">
<node2 id="2">
<node3 id="3" />
<node4 id="4">
<node5 id="5">Text node1</node5>
<node6 id="6">Text node2</node6>
</node4>
</node2>
<node7 id="7">Text node3
<node8 id="8">Text node4</node8>
<node9 id="9">Text node5</node9>
</node7>
<node10 id="10">Text node6</node10>
<node11 id="11">Text node3
<node12 id="12">Text node4</node12>
<node13 id="13">Text node5</node13>
</node11>
</node1>
Input Param: List of ids of the element nodes whose txt nodes are to be retrieved.
<nodes><node>4</node><node>7</node><node>10</node></nodes>
Expected Output:
Text node1
Text node2
Text node3
Text node4
Text node5
Text node6
How can this be achieved using XSL? Please share your ideas.
|
xslt
|
xslt-2.0
| null | null | null | null |
open
|
How do i select all the text nodes within a specific element node using XSL?
===
How do i select all the text nodes within a specific element node using XSL?
Input xml:
<node1 id="1">
<node2 id="2">
<node3 id="3" />
<node4 id="4">
<node5 id="5">Text node1</node5>
<node6 id="6">Text node2</node6>
</node4>
</node2>
<node7 id="7">Text node3
<node8 id="8">Text node4</node8>
<node9 id="9">Text node5</node9>
</node7>
<node10 id="10">Text node6</node10>
<node11 id="11">Text node3
<node12 id="12">Text node4</node12>
<node13 id="13">Text node5</node13>
</node11>
</node1>
Input Param: List of ids of the element nodes whose txt nodes are to be retrieved.
<nodes><node>4</node><node>7</node><node>10</node></nodes>
Expected Output:
Text node1
Text node2
Text node3
Text node4
Text node5
Text node6
How can this be achieved using XSL? Please share your ideas.
| 0 |
7,911,608 |
10/27/2011 04:06:29
| 116,895 |
06/03/2009 20:40:38
| 3,787 | 147 |
When did ".NET" get dropped from the name of Visual Studio?
|
I was reading the installation guide of a development tool today, and it claimed to support the IDE named "Visual Studio .NET 2010 Professional, Premium, or Ultimate".
Isn't it true that the ".NET" mention in the "Visual Studio" product name was dropped after 2003?
|
.net
|
visual-studio-2010
|
history
|
naming
| null |
11/23/2011 01:51:56
|
off topic
|
When did ".NET" get dropped from the name of Visual Studio?
===
I was reading the installation guide of a development tool today, and it claimed to support the IDE named "Visual Studio .NET 2010 Professional, Premium, or Ultimate".
Isn't it true that the ".NET" mention in the "Visual Studio" product name was dropped after 2003?
| 2 |
5,488,551 |
03/30/2011 15:35:01
| 438,039 |
09/02/2010 13:48:28
| 288 | 47 |
How to unpack (64-bit) unsigned long in 64-bit Perl?
|
I'm trying to unpack unsigned long value, that is passed from C program to Perl script via SysV::IPC.
It is known that value is correct (I made a test which sends same value into two queues, one read by Perl, second by C app), and all predecessing values are read correctly (used `q` instead of `i!` to work with 64-bit int).
It is also known that PHP had [something similar][1] in bugs (search for "unsigned long on 64 bit machines"), and there's no answer here too:
http://stackoverflow.com/questions/3265285/php-pack-unpack-64bit-int-on-64bit-architecture
Arguments tested so far:
- ..Q ( = some value that is larger than expected)
- ..L ( = 0)
- ..L! ( = large value)
- ..l ( = 0)
- ..l! ( = large value)
- ..lN! ( = 0)
- ..N, ..N! ( = 0)
[1]:http://php.net/manual/en/function.unpack.php
|
perl
|
64bit
|
unpack
| null | null | null |
open
|
How to unpack (64-bit) unsigned long in 64-bit Perl?
===
I'm trying to unpack unsigned long value, that is passed from C program to Perl script via SysV::IPC.
It is known that value is correct (I made a test which sends same value into two queues, one read by Perl, second by C app), and all predecessing values are read correctly (used `q` instead of `i!` to work with 64-bit int).
It is also known that PHP had [something similar][1] in bugs (search for "unsigned long on 64 bit machines"), and there's no answer here too:
http://stackoverflow.com/questions/3265285/php-pack-unpack-64bit-int-on-64bit-architecture
Arguments tested so far:
- ..Q ( = some value that is larger than expected)
- ..L ( = 0)
- ..L! ( = large value)
- ..l ( = 0)
- ..l! ( = large value)
- ..lN! ( = 0)
- ..N, ..N! ( = 0)
[1]:http://php.net/manual/en/function.unpack.php
| 0 |
7,498,739 |
09/21/2011 11:09:30
| 681,705 |
02/26/2011 15:58:56
| 52 | 0 |
Pros & Cons on different game engines
|
I've been working with the XNA-Framework(only in 2D) for over a year now. Now I want to try and start a bigger 3D-project. But somehow I have difficulties to decide which engine/Framework I should use. So far I gathered three possible Frameworks, I want to list here:
1. XNA with the OX-engine:
I already have some experience with XNA and the Ox-engine seems to be the best possible open source engine I could use here.
2. OGRE-engine:
Always wanted to get a little deeper into C++ and the engine seems to be well documented.
3. Cryengine/Sandbox 2 or higher:
Well this one also needs C++ knowledge, seems to be user friendly and lets face it one of the most powerful engines out there.
My goals are to start learning 3D-programming and to realize first 3D projects by taking baby steps.
So the question is what engine would you guys recommend? Is there any other stuff I have overseen? as mentioned before getting a little more into C++ would be great to but it is not a "must have" as I alredy worked with C/C#. Most important to me would be that I could lear stuff that I can use later on for example in other Frameworks.
Thanks in advance!
|
c++
|
3d
|
engine
| null | null |
09/21/2011 11:17:34
|
off topic
|
Pros & Cons on different game engines
===
I've been working with the XNA-Framework(only in 2D) for over a year now. Now I want to try and start a bigger 3D-project. But somehow I have difficulties to decide which engine/Framework I should use. So far I gathered three possible Frameworks, I want to list here:
1. XNA with the OX-engine:
I already have some experience with XNA and the Ox-engine seems to be the best possible open source engine I could use here.
2. OGRE-engine:
Always wanted to get a little deeper into C++ and the engine seems to be well documented.
3. Cryengine/Sandbox 2 or higher:
Well this one also needs C++ knowledge, seems to be user friendly and lets face it one of the most powerful engines out there.
My goals are to start learning 3D-programming and to realize first 3D projects by taking baby steps.
So the question is what engine would you guys recommend? Is there any other stuff I have overseen? as mentioned before getting a little more into C++ would be great to but it is not a "must have" as I alredy worked with C/C#. Most important to me would be that I could lear stuff that I can use later on for example in other Frameworks.
Thanks in advance!
| 2 |
7,707,442 |
10/10/2011 00:06:53
| 637,142 |
02/28/2011 04:31:33
| 910 | 45 |
how many combinations of 5 can be formed from selecting ether blue, green, or red balls
|
I am having a little trouble using the COMBIN formula in excel. for example I know that if I have 5 distinct cards and I want to know how many different combinations can be formed when selecting two cards it will be =COMBIN(5,2) .
I don't know how to use the COMBIN formula in this situation:
I have infinite number of balls in a bag. the balls are ether blue, green, or red. I have to select 5 balls from that bag. so one combination could be all green balls for example. a different combination could be two green and three red. etc...
How can I know how many distinct combinations of 5 could be created?
I generated this table:
0 0 0 0 0
0 0 0 0 1
0 0 0 0 2
0 0 0 1 0
0 0 0 1 1
0 0 0 1 2
0 0 0 2 0
0 0 0 2 1
0 0 0 2 2
0 0 1 0 0
0 0 1 0 1
0 0 1 0 2
0 0 1 1 0
0 0 1 1 1
0 0 1 1 2
0 0 1 2 0
0 0 1 2 1
0 0 1 2 2
0 0 2 0 0
0 0 2 0 1
0 0 2 0 2
0 0 2 1 0
0 0 2 1 1
0 0 2 1 2
0 0 2 2 0
0 0 2 2 1
0 0 2 2 2
1 1 0 0 0
1 1 0 0 1
1 1 0 0 2
1 1 0 1 0
1 1 0 1 1
1 1 0 1 2
1 1 0 2 0
1 1 0 2 1
1 1 0 2 2
1 1 1 0 0
1 1 1 0 1
1 1 1 0 2
1 1 1 1 0
1 1 1 1 1
1 1 1 1 2
1 1 1 2 0
1 1 1 2 1
1 1 1 2 2
1 1 2 0 0
1 1 2 0 1
1 1 2 0 2
1 1 2 1 0
1 1 2 1 1
1 1 2 1 2
1 1 2 2 0
1 1 2 2 1
1 1 2 2 2
2 2 0 0 0
2 2 0 0 1
2 2 0 0 2
2 2 0 1 0
2 2 0 1 1
2 2 0 1 2
2 2 0 2 0
2 2 0 2 1
2 2 0 2 2
2 2 1 0 0
2 2 1 0 1
2 2 1 0 2
2 2 1 1 0
2 2 1 1 1
2 2 1 1 2
2 2 1 2 0
2 2 1 2 1
2 2 1 2 2
2 2 2 0 0
2 2 2 0 1
2 2 2 0 2
2 2 2 1 0
2 2 2 1 1
2 2 2 1 2
2 2 2 2 0
2 2 2 2 1
2 2 2 2 2
where 0 represents a blue ball, 1 represents a green ball and 2 represents a red ball.
this gives me a total of 81 different combinations where order does matter. but combination 2,2,2,2,1 is the same as 1,2,2,2,2 and also the same as 2,2,2,1,2 etc. How can I know how many combinations can be formed?
|
excel
|
combinations
|
probability
| null | null |
10/10/2011 01:58:45
|
off topic
|
how many combinations of 5 can be formed from selecting ether blue, green, or red balls
===
I am having a little trouble using the COMBIN formula in excel. for example I know that if I have 5 distinct cards and I want to know how many different combinations can be formed when selecting two cards it will be =COMBIN(5,2) .
I don't know how to use the COMBIN formula in this situation:
I have infinite number of balls in a bag. the balls are ether blue, green, or red. I have to select 5 balls from that bag. so one combination could be all green balls for example. a different combination could be two green and three red. etc...
How can I know how many distinct combinations of 5 could be created?
I generated this table:
0 0 0 0 0
0 0 0 0 1
0 0 0 0 2
0 0 0 1 0
0 0 0 1 1
0 0 0 1 2
0 0 0 2 0
0 0 0 2 1
0 0 0 2 2
0 0 1 0 0
0 0 1 0 1
0 0 1 0 2
0 0 1 1 0
0 0 1 1 1
0 0 1 1 2
0 0 1 2 0
0 0 1 2 1
0 0 1 2 2
0 0 2 0 0
0 0 2 0 1
0 0 2 0 2
0 0 2 1 0
0 0 2 1 1
0 0 2 1 2
0 0 2 2 0
0 0 2 2 1
0 0 2 2 2
1 1 0 0 0
1 1 0 0 1
1 1 0 0 2
1 1 0 1 0
1 1 0 1 1
1 1 0 1 2
1 1 0 2 0
1 1 0 2 1
1 1 0 2 2
1 1 1 0 0
1 1 1 0 1
1 1 1 0 2
1 1 1 1 0
1 1 1 1 1
1 1 1 1 2
1 1 1 2 0
1 1 1 2 1
1 1 1 2 2
1 1 2 0 0
1 1 2 0 1
1 1 2 0 2
1 1 2 1 0
1 1 2 1 1
1 1 2 1 2
1 1 2 2 0
1 1 2 2 1
1 1 2 2 2
2 2 0 0 0
2 2 0 0 1
2 2 0 0 2
2 2 0 1 0
2 2 0 1 1
2 2 0 1 2
2 2 0 2 0
2 2 0 2 1
2 2 0 2 2
2 2 1 0 0
2 2 1 0 1
2 2 1 0 2
2 2 1 1 0
2 2 1 1 1
2 2 1 1 2
2 2 1 2 0
2 2 1 2 1
2 2 1 2 2
2 2 2 0 0
2 2 2 0 1
2 2 2 0 2
2 2 2 1 0
2 2 2 1 1
2 2 2 1 2
2 2 2 2 0
2 2 2 2 1
2 2 2 2 2
where 0 represents a blue ball, 1 represents a green ball and 2 represents a red ball.
this gives me a total of 81 different combinations where order does matter. but combination 2,2,2,2,1 is the same as 1,2,2,2,2 and also the same as 2,2,2,1,2 etc. How can I know how many combinations can be formed?
| 2 |
7,606,941 |
09/30/2011 06:56:26
| 232,694 |
12/16/2009 06:35:49
| 82 | 4 |
How can a connection be represented only by a small space in a HTTP server running on node.js?
|
I have read that a HTTP server created in node.js does not create new threads for each incoming connection(request). Instead it executes a function that has been registered as a callback corresponding to the event of receiving a request.
It is said that each connection is represented by some small space in the heap. I cannot figure this out. Are connections not represented by sockets ? Should sockets not be opened for every connection made to the node.js server and this would mean each connection cannot be represented by just a space allocation in the javascript heap ?
|
node.js
|
http-server
| null | null | null | null |
open
|
How can a connection be represented only by a small space in a HTTP server running on node.js?
===
I have read that a HTTP server created in node.js does not create new threads for each incoming connection(request). Instead it executes a function that has been registered as a callback corresponding to the event of receiving a request.
It is said that each connection is represented by some small space in the heap. I cannot figure this out. Are connections not represented by sockets ? Should sockets not be opened for every connection made to the node.js server and this would mean each connection cannot be represented by just a space allocation in the javascript heap ?
| 0 |
3,554,344 |
08/24/2010 07:34:52
| 179,736 |
09/27/2009 11:27:55
| 4,127 | 38 |
What is the equivalent of this string concatenation in Ruby?
|
From Python...
s = "hello, %s. Where is %s?" % ("John","Mary")
How do you do that in Ruby?
|
python
|
ruby
| null | null | null | null |
open
|
What is the equivalent of this string concatenation in Ruby?
===
From Python...
s = "hello, %s. Where is %s?" % ("John","Mary")
How do you do that in Ruby?
| 0 |
4,288,964 |
11/26/2010 22:33:18
| 408,390 |
08/02/2010 07:16:34
| 513 | 39 |
Cant deploy a release version with developer profile
|
I cant make a release build which is signed with my developer profile. I duplicated the release config and changed the signing cert to my developer profile but when it builds it signs with the App Store cert.
Id like to able to test the release builds before sending out for review but im wondering why I cant and if this is an Xcode bug. Im using XCode 3.2.5 . So far I have got away with just testing the debug builds but I'm sure I am going to get bitten on the a** some time.
|
iphone
|
xcode
|
ipad
|
ios
|
provisioning
| null |
open
|
Cant deploy a release version with developer profile
===
I cant make a release build which is signed with my developer profile. I duplicated the release config and changed the signing cert to my developer profile but when it builds it signs with the App Store cert.
Id like to able to test the release builds before sending out for review but im wondering why I cant and if this is an Xcode bug. Im using XCode 3.2.5 . So far I have got away with just testing the debug builds but I'm sure I am going to get bitten on the a** some time.
| 0 |
521,432 |
02/06/2009 18:04:52
| 56,007 |
01/16/2009 20:58:18
| 103 | 2 |
Best jQuery rounded corners script?
|
I've been looking at varios scripts for adding automatic rounded corners to a div using jQuery but there are loads of plugins available, none of which seem perfect.
So, does anybody know of a script that is quick to render, supports IE6, anti-aliases and supports opacity?
Any help would really be appreciated, Jon.
|
javascript
|
rounded-corners
|
jquery
|
css
| null |
05/23/2012 12:48:30
|
not constructive
|
Best jQuery rounded corners script?
===
I've been looking at varios scripts for adding automatic rounded corners to a div using jQuery but there are loads of plugins available, none of which seem perfect.
So, does anybody know of a script that is quick to render, supports IE6, anti-aliases and supports opacity?
Any help would really be appreciated, Jon.
| 4 |
8,780,014 |
01/08/2012 18:22:27
| 642,128 |
03/02/2011 23:37:27
| 334 | 19 |
Added Flash Titles to Premiere
|
I want to develop a video with professional text effects, which it seems are easiest to create in Adobe Flash. However, I'm assembling the entire video in Adobe Premiere.
Since I can't seem to import Flash files into Premiere (AVI/MOV can be imported, but not with a transparent background and importing all the frames doesn't seem to work either), what's the best/preferred way to accomplish this?
Do I need to render the video in Premiere and then finish the editing in Flash?
Thanks in advance for any help!
|
flash
|
video
|
after-effects
|
adobe-premiere
| null |
01/08/2012 23:20:28
|
off topic
|
Added Flash Titles to Premiere
===
I want to develop a video with professional text effects, which it seems are easiest to create in Adobe Flash. However, I'm assembling the entire video in Adobe Premiere.
Since I can't seem to import Flash files into Premiere (AVI/MOV can be imported, but not with a transparent background and importing all the frames doesn't seem to work either), what's the best/preferred way to accomplish this?
Do I need to render the video in Premiere and then finish the editing in Flash?
Thanks in advance for any help!
| 2 |
2,559,720 |
04/01/2010 10:34:34
| 297,753 |
03/19/2010 22:23:04
| 25 | 1 |
Handling multiple UISwitch controls in a table view without using tag property
|
I have a table view controller with multiple UISwitch controls in them. I set the delegate to the table view controller with the same action for all switches. I need to be able to determine what switch was changed, so I create an array of strings that contains the name of each switch. The indexes in the array will be put in the tag property of each UISwitch.
However, I'm ready using the tag property for something else, namely to find the right control in the cell in cellForRowAtIndexPath with viewWithTag! (There are several things I need to set within each cell.)
So, am I thinking along the right lines here? I feel I'm rather limited in how I find out exactly which UISwitch changed its value, so I can do something useful with it.
|
iphone
|
objective-c
|
cocoa-touch
|
uiswitch
| null | null |
open
|
Handling multiple UISwitch controls in a table view without using tag property
===
I have a table view controller with multiple UISwitch controls in them. I set the delegate to the table view controller with the same action for all switches. I need to be able to determine what switch was changed, so I create an array of strings that contains the name of each switch. The indexes in the array will be put in the tag property of each UISwitch.
However, I'm ready using the tag property for something else, namely to find the right control in the cell in cellForRowAtIndexPath with viewWithTag! (There are several things I need to set within each cell.)
So, am I thinking along the right lines here? I feel I'm rather limited in how I find out exactly which UISwitch changed its value, so I can do something useful with it.
| 0 |
10,185,488 |
04/17/2012 05:17:01
| 1,253,989 |
03/07/2012 06:39:10
| 6 | 0 |
How to get current url from web view cocoa?
|
I have loaded a web view of a e commerce web site ,then i search something in the search option of that web view and web view gets reloaded with new url,how to get that url?
|
objective-c
| null | null | null | null |
04/17/2012 11:51:52
|
not a real question
|
How to get current url from web view cocoa?
===
I have loaded a web view of a e commerce web site ,then i search something in the search option of that web view and web view gets reloaded with new url,how to get that url?
| 1 |
9,901,449 |
03/28/2012 05:04:05
| 942,391 |
09/13/2011 11:16:37
| 2,446 | 117 |
HWPF CharacterRun getColor()..?
|
I am extracting text from a word document to import it into an appllication I am currently developing. I am using Version 3.7
CharacterRun run;
for (int index = 0; index < paragraph.numCharacterRuns(); index++) {
run = paragraph.getCharacterRun(index);
}
I can easily acces methods like `run.isBold()` or `run.isItalic()` but `run.getColor()` only **returns one-digit integers.**
At first i thought that this is an index and i need to find some kind of
Collection that holds
all used colors in the document but that was not the case. I did not
find one.
So my question is: What does this integer stand for? And how do i need
to use it to get the color of the CharacterRun?
|
java
|
pdf
|
pdf-generation
|
apache-poi
| null | null |
open
|
HWPF CharacterRun getColor()..?
===
I am extracting text from a word document to import it into an appllication I am currently developing. I am using Version 3.7
CharacterRun run;
for (int index = 0; index < paragraph.numCharacterRuns(); index++) {
run = paragraph.getCharacterRun(index);
}
I can easily acces methods like `run.isBold()` or `run.isItalic()` but `run.getColor()` only **returns one-digit integers.**
At first i thought that this is an index and i need to find some kind of
Collection that holds
all used colors in the document but that was not the case. I did not
find one.
So my question is: What does this integer stand for? And how do i need
to use it to get the color of the CharacterRun?
| 0 |
1,158,519 |
07/21/2009 11:02:38
| 91,757 |
04/16/2009 17:54:19
| 146 | 9 |
Crash when using C# Assembly from Managed C++ DLL
|
On a Windows XP system, I'm writing a Mangaged C++ library which calls code in a C# Assembly. Unfortunately, as soon as I start referencing a symbol in the C# Assembly, running the Managed C++ library fails with this error (I copied this from the XP crash dialog):
EventType : clr20r3
P1 : treeviewdemo.exe
P2 : 0.0.0.0
P3 : 4a5d6d62
P4 : system.windows.forms
P5 : 2.0.0.0
P6 : 4889dee7
P7 : 12fc
P8 : ac
P9 : system.io.filenotfoundexception
The Manged C++ library is basically just:
#using "C:\\MyCSharpAssembly.dll";
__declspec(dllexport) void callMangagedCode() {
ManagedObject ^o = nullptr;
}
The '#using' itself doesn't seem to cause any problem, but as soon as I start using symbols form the C# DLL, I get problems. Does anybody know what's going on?
The `system.io.filenotfoundexception` part makes me think that some DLL is not being found, but I have no idea which or where it's looking.
|
managed
|
c++
|
c#
|
dll
|
crash
| null |
open
|
Crash when using C# Assembly from Managed C++ DLL
===
On a Windows XP system, I'm writing a Mangaged C++ library which calls code in a C# Assembly. Unfortunately, as soon as I start referencing a symbol in the C# Assembly, running the Managed C++ library fails with this error (I copied this from the XP crash dialog):
EventType : clr20r3
P1 : treeviewdemo.exe
P2 : 0.0.0.0
P3 : 4a5d6d62
P4 : system.windows.forms
P5 : 2.0.0.0
P6 : 4889dee7
P7 : 12fc
P8 : ac
P9 : system.io.filenotfoundexception
The Manged C++ library is basically just:
#using "C:\\MyCSharpAssembly.dll";
__declspec(dllexport) void callMangagedCode() {
ManagedObject ^o = nullptr;
}
The '#using' itself doesn't seem to cause any problem, but as soon as I start using symbols form the C# DLL, I get problems. Does anybody know what's going on?
The `system.io.filenotfoundexception` part makes me think that some DLL is not being found, but I have no idea which or where it's looking.
| 0 |
11,191,613 |
06/25/2012 14:48:33
| 1,003,163 |
10/19/2011 12:52:09
| 1 | 0 |
Orchard Query List Rendering - Remove ul li
|
I am using the latest version of Orchard and have created a projection widget of three articles. I would like to display them in source terms directly after eachother:
`<article>content</article>
<article>content</article>
<article>content</article>`
i.e. not contained in a list
`<ul>
<li>
<article>content</article>
</li>
<li>
<article>content</article>
</li>
</ul>`
How can I strip out the list tags but leave the articles? I don't know how to edit the `Model.List` in the ProjectionPart.cshtml, if this is even the right file to be editing!?
I would really appreciate any help anyone could give me?
Thank you in advance
Andy
|
query
|
list
|
widget
|
orchardcms
|
projection
|
06/25/2012 14:57:55
|
not a real question
|
Orchard Query List Rendering - Remove ul li
===
I am using the latest version of Orchard and have created a projection widget of three articles. I would like to display them in source terms directly after eachother:
`<article>content</article>
<article>content</article>
<article>content</article>`
i.e. not contained in a list
`<ul>
<li>
<article>content</article>
</li>
<li>
<article>content</article>
</li>
</ul>`
How can I strip out the list tags but leave the articles? I don't know how to edit the `Model.List` in the ProjectionPart.cshtml, if this is even the right file to be editing!?
I would really appreciate any help anyone could give me?
Thank you in advance
Andy
| 1 |
8,365,623 |
12/03/2011 04:56:48
| 443,700 |
09/09/2010 17:51:32
| 80 | 8 |
What is the best way to upgrade Magento
|
So I need to upgrade Magento from 1.1~ to 1.6~
The main reason I need to do this is because all the order fullfillment extensions require a newer version. http://www.xtento.com/magento-extensions/magento-order-export-module.html
What is the best/most effective way to do this? Any recommended extensions that would work well?
I'm a complete n00b at Magento so the more detailed the help the better!
|
magento
|
e-commerce
| null | null | null | null |
open
|
What is the best way to upgrade Magento
===
So I need to upgrade Magento from 1.1~ to 1.6~
The main reason I need to do this is because all the order fullfillment extensions require a newer version. http://www.xtento.com/magento-extensions/magento-order-export-module.html
What is the best/most effective way to do this? Any recommended extensions that would work well?
I'm a complete n00b at Magento so the more detailed the help the better!
| 0 |
5,666,296 |
04/14/2011 16:16:40
| 88,513 |
04/08/2009 10:10:44
| 282 | 19 |
Will Silverlight 5 still support OSX
|
Will Silverlight 5 still support OSX?
|
silverlight
|
osx
| null | null | null | null |
open
|
Will Silverlight 5 still support OSX
===
Will Silverlight 5 still support OSX?
| 0 |
6,932,076 |
08/03/2011 19:21:59
| 869,269 |
07/29/2011 11:28:12
| -2 | 0 |
combine two image maps
|
How I can combine two image maps?
I have the following areas ...
<area shape="poly" a coords="260,143, 265,143, 265,142, 266,142, 266,143, 267,143, 267,144, 276,144, 277,144, 277,145, 280,145, 280,146, 286,146, 286,147, 287,147, 287,156, 288,156, 288,157, 290,157, 290,159, 291,159, 291,168, 290,168, 290,176, 288,176, 288,177, 287,177, 287,181, 286,181, 286,182,
280,182, 280,183,
279,183, 279,184, 277,184, 277,185, 275,185, 275,186, 272,186, 272,189, 269,189, 269,188, 265,188, 265,187, 262,187, 262,186, 261,186, 261,185, 260,185, 260,184, 258,184, 258,183, 257,183, 257,182, 256,182, 256,181, 255,181, 255,180, 253,180, 253,178, 251,178, 251,175, 250,175, 250,173, 249,173, 249,171, 248,171, 248,170,
247,170, 247,163, 248,163, 248,161, 249,161, 249,159, 251,159, 251,158, 252,158, 252,157, 253,157, 253,156, 254,156, 254,155, 256,155, 256,154, 257,154, 257,153, 258,153, 258,152, 259,152, 259,151, 260,151" href="#" />
<area shape="poly" a coords="286,142, 286,144, 287,144, 288,144, 288,143, 289,143, 289,141, 287,141, 287,142" href="#" />
Can it be done?
|
html
|
imagemap
| null | null | null | null |
open
|
combine two image maps
===
How I can combine two image maps?
I have the following areas ...
<area shape="poly" a coords="260,143, 265,143, 265,142, 266,142, 266,143, 267,143, 267,144, 276,144, 277,144, 277,145, 280,145, 280,146, 286,146, 286,147, 287,147, 287,156, 288,156, 288,157, 290,157, 290,159, 291,159, 291,168, 290,168, 290,176, 288,176, 288,177, 287,177, 287,181, 286,181, 286,182,
280,182, 280,183,
279,183, 279,184, 277,184, 277,185, 275,185, 275,186, 272,186, 272,189, 269,189, 269,188, 265,188, 265,187, 262,187, 262,186, 261,186, 261,185, 260,185, 260,184, 258,184, 258,183, 257,183, 257,182, 256,182, 256,181, 255,181, 255,180, 253,180, 253,178, 251,178, 251,175, 250,175, 250,173, 249,173, 249,171, 248,171, 248,170,
247,170, 247,163, 248,163, 248,161, 249,161, 249,159, 251,159, 251,158, 252,158, 252,157, 253,157, 253,156, 254,156, 254,155, 256,155, 256,154, 257,154, 257,153, 258,153, 258,152, 259,152, 259,151, 260,151" href="#" />
<area shape="poly" a coords="286,142, 286,144, 287,144, 288,144, 288,143, 289,143, 289,141, 287,141, 287,142" href="#" />
Can it be done?
| 0 |
7,413,338 |
09/14/2011 08:25:33
| 945,648 |
09/14/2011 08:25:33
| 1 | 0 |
Play video on my QRCode Reader
|
I created an application to read QRCode, but when I have a video link I can not start the player in order to play.
He shows me only the link in the QRCode.
Solutions?
thank you very much
PS: excuse for my bad English
Andrea
|
video
|
qr-code
| null | null | null |
09/15/2011 01:01:10
|
not a real question
|
Play video on my QRCode Reader
===
I created an application to read QRCode, but when I have a video link I can not start the player in order to play.
He shows me only the link in the QRCode.
Solutions?
thank you very much
PS: excuse for my bad English
Andrea
| 1 |
6,909,543 |
08/02/2011 08:58:14
| 555,600 |
12/28/2010 03:43:40
| 81 | 7 |
How to loop each()
|
how will i make it go back to the first image and fadein each again
$('img').hide().each(function (i) {
var delayInterval = 500;
$(this).delay(i * delayInterval).fadeIn()
})
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
|
jquery
|
each
| null | null | null |
11/09/2011 00:51:50
|
not a real question
|
How to loop each()
===
how will i make it go back to the first image and fadein each again
$('img').hide().each(function (i) {
var delayInterval = 500;
$(this).delay(i * delayInterval).fadeIn()
})
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
<img1>
| 1 |
972,750 |
06/09/2009 22:09:30
| 2,354 |
08/21/2008 19:55:59
| 2,095 | 20 |
Ad-hoc override of ASP.NET maximum request size
|
Is there a way to override the maximum request size for a specific ASP.NET/ASP.NET MVC page, **without** also changing it for the rest of the website via `Web.config`?
|
asp.net
|
asp.net-mvc
| null | null | null | null |
open
|
Ad-hoc override of ASP.NET maximum request size
===
Is there a way to override the maximum request size for a specific ASP.NET/ASP.NET MVC page, **without** also changing it for the rest of the website via `Web.config`?
| 0 |
3,816,269 |
09/28/2010 19:21:07
| 394,616 |
07/17/2010 11:31:25
| 26 | 2 |
Rendering an ActionLink programmatically
|
I have a scenario where I'd like to render an ActionLink programmatically, ether from a controller or ideally an extension method. This is so I can wrap up some logic of wether to display the link and remove that logic from my view.
I can create an ActionLink using the MVC Futures project from CodePlex.
ActionLink actionLink = new ActionLink();
actionLink.ActionName = "MyActionName";
actionLink.ControllerName = "MyControllerName";
There is a RenderControl method that takes a HtmlTextWriter which I've been trying to use. I can't get this to work and a null reference exception is thrown each time within the Microsoft.Web.Mvc assembly (Futures).
[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.Web.Mvc.Controls.ActionLink.Render(HtmlTextWriter writer) +643
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
MvcSpike.Controllers.HomeController.Index() in C:\...\Controllers\HomeController.cs:33
lambda_method(ExecutionScope , ControllerBase , Object[] ) +74
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +178
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +24
System.Web.Mvc.<>c__DisplayClassd.<InvokeActionMethodWithFilters>b__a() +52
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +254
System.Web.Mvc.<>c__DisplayClassf.<InvokeActionMethodWithFilters>b__c() +19
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +192
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +314
System.Web.Mvc.Controller.ExecuteCore() +105
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +39
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__4() +34
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +59
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +44
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +7
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8679150
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Any help would be great.
Thanks
|
asp.net
|
mvc
|
asp.net-mvc-2
| null | null | null |
open
|
Rendering an ActionLink programmatically
===
I have a scenario where I'd like to render an ActionLink programmatically, ether from a controller or ideally an extension method. This is so I can wrap up some logic of wether to display the link and remove that logic from my view.
I can create an ActionLink using the MVC Futures project from CodePlex.
ActionLink actionLink = new ActionLink();
actionLink.ActionName = "MyActionName";
actionLink.ControllerName = "MyControllerName";
There is a RenderControl method that takes a HtmlTextWriter which I've been trying to use. I can't get this to work and a null reference exception is thrown each time within the Microsoft.Web.Mvc assembly (Futures).
[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.Web.Mvc.Controls.ActionLink.Render(HtmlTextWriter writer) +643
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
MvcSpike.Controllers.HomeController.Index() in C:\...\Controllers\HomeController.cs:33
lambda_method(ExecutionScope , ControllerBase , Object[] ) +74
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +178
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +24
System.Web.Mvc.<>c__DisplayClassd.<InvokeActionMethodWithFilters>b__a() +52
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +254
System.Web.Mvc.<>c__DisplayClassf.<InvokeActionMethodWithFilters>b__c() +19
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +192
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +314
System.Web.Mvc.Controller.ExecuteCore() +105
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +39
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__4() +34
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +59
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +44
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +7
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8679150
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Any help would be great.
Thanks
| 0 |
6,453,404 |
06/23/2011 11:38:14
| 774,157 |
05/28/2011 08:37:06
| 1 | 0 |
How to load a library .so file into android application ?
|
Can anyone tell me If a .so file given we need to calla jni method in app..so file contains implementation methods in c.
Thanks in advance.
|
java
|
android
|
jni
| null | null |
06/23/2011 22:16:42
|
not a real question
|
How to load a library .so file into android application ?
===
Can anyone tell me If a .so file given we need to calla jni method in app..so file contains implementation methods in c.
Thanks in advance.
| 1 |
6,097,050 |
05/23/2011 12:17:23
| 765,973 |
05/23/2011 12:17:23
| 1 | 0 |
on clicking a4j:commandbutton, method does not get executed.
|
I am developing an application using jsf2.0, richfaces 4.0, tomcat 6.0. On a page I am trying to delete a row . But when I click the delete icon, sometimes popup panel does not appear and when it is shown , nothing happens on clicking the delete button.
Following is my .xhtml file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<ui:composition template="template.xhtml">
<ui:define name="metadata">
<f:metadata>
<f:viewParam name="meetingId" required="true" value="#{meetingBean.selectedMeetId}" />
</f:metadata>
</ui:define>
<ui:define name="content">
<h3>List of Employees in selected meeting</h3>
<a4j:status onstart="#{rich:component('statPane')}.show()"
onstop="#{rich:component('statPane')}.hide()" />
<h:form>
<c:if test="#{! empty meetingBean.selectedMeeting}">
<c:set target="#{flash}" property="selectedMeeting"
value="#{meetingBean.selectedMeeting}" />
</c:if>
<c:if test="#{! empty flash.selectedMeeting}">
<c:set target="#{meetingBean}" property="selectedMeeting"
value="#{flash.selectedMeeting}" />
</c:if>
<rich:extendedDataTable value="#{meetingBean.selectedMeeting.employees}" var="empMeet" border="1" id="table">
<rich:column>
<f:facet name="header">Employee Id</f:facet>
#{empMeet.empId}
</rich:column>
<rich:column>
<f:facet name="header"> Employee Name</f:facet>
#{empMeet.firstName} #{empMeet.lastName}
</rich:column>
<rich:column>
<a4j:commandLink execute="@this" render="@none" oncomplete="#{rich:component('confirmPanel')}.show();">
<h:graphicImage value="/images/icons/delete.gif" alt="delete" />
<a4j:param value="#{empMeet.empId}" assignTo="#{meetingBean.deleteEmpId}" />
</a4j:commandLink>
</rich:column>
</rich:extendedDataTable>
<a4j:jsFunction name="removeEmp" action="#{meetingBean.deleteEmployee}" render="table" execute="@this"
oncomplete="#{rich:component('confirmPanel')}.hide();" >
</a4j:jsFunction>
<rich:popupPanel id="statPane" autosized="true">
<h:graphicImage value="/images/ai.gif" />
Please wait...
</rich:popupPanel>
<rich:popupPanel id="confirmPanel" autosized="true" >
Are you sure you want to delete the row?
<a4j:commandButton value="Cancel" onclick="#{rich:component('confirmPane')}.hide(); return false;" />
<a4j:commandButton value="Delete" onclick="removeEmp(); return false;" />
</rich:popupPanel>
<h:commandButton action="addEmpMeeting" value="Invite More Employees" />
</h:form>
</ui:define>
</ui:composition>
</html>
Following is my bean class:
package com.drishti.apps.mommanager.meeting;
/**
* this class represents a meeting object
*/
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.event.ComponentSystemEvent;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
import org.richfaces.component.SortOrder;
import com.drishti.apps.mommanager.employee.AbstractBacking;
import com.drishti.apps.mommanager.employee.EmployeeEntity;
import com.drishti.apps.mommanager.employee.EmployeeService;
@ManagedBean
public class MeetingBean extends AbstractBacking {
@ManagedProperty(value = "#{requestScope}")
private Map<String, Object> requestMap;
private int meetingId;
private Date meetingTime;
private String agenda;
private String result;
public String[] empIdsInMeeting;
private List<EmployeeEntity> employees = new ArrayList<EmployeeEntity>();
private Integer selectedMeetId;
private MeetingEntity selectedMeeting;
private String selectedAgenda;
private int deleteEmpId;
private EmployeeEntity deletableEmployee;
/**
* this method is used to load a meeting object when it is being updated
*
* @param cse
*/
public void loadMeeting(ComponentSystemEvent cse) {
if (null == getSelectedMeeting()) {
Integer meetId = getSelectedMeetId();
if (meetId == null) {
meetId = (Integer)getFlash().get("selectedMeetId");
}
if (meetId == null) {
getFacesContext().addMessage(null, new FacesMessage("The meeting is invalid"));
getFlash().setKeepMessages(true);
getFacesContext().getApplication().getNavigationHandler()
.handleNavigation(getFacesContext(), null, "listMeetings");
} else {
MeetingEntity meet = MeetingService.getCurrentInstance().getMeetingForId(meetId);
if (meet == null) {
getFacesContext().addMessage(null, new FacesMessage("The meeting is invalid"));
getFlash().setKeepMessages(true);
getFacesContext().getApplication().getNavigationHandler()
.handleNavigation(getFacesContext(), null, "listMeetings");
} else {
getFlash().put("selectedMeeting", meet);
getSelectedMeeting();
}
}
}
}
/**
* this method updates a meeting object
*
* @return
*/
public void updateMeeting() {
//String result = null;
MeetingService meetSer = MeetingService.getCurrentInstance();
MeetingEntity meeting = getSelectedMeeting();
meetSer.updateMeeting(meeting);
getFlash().clear();
//result = "meetUpdated";
//return result;
}
/**
* this method adds a meeting object to database
*
* @return
*/
public void addMeeting() {
MeetingEntity meeting = (MeetingEntity)getRequestMap().get("meetingEntity");
MeetingService.getCurrentInstance().addMeeting(meeting);
//return "successMeeting";
}
/**
* this method is used to delete a meeting
*/
public void deleteMeeting(){
MeetingService meetSer = MeetingService.getCurrentInstance();
MeetingEntity meeting = getSelectedMeeting();
meetSer.deleteMeeting(meeting);
getFlash().clear();
}
/**
* returns data model containing all meetings present in database
*
* @return
*/
public DataModel<MeetingEntity> getMeetingList() {
DataModel<MeetingEntity> meetingList = new ListDataModel<MeetingEntity>(MeetingService.getCurrentInstance()
.getMeetings());
return meetingList;
}
/**
* returns list containing agenda of all meetings
*
* @return
*/
public ArrayList<String> getAgendaList() {
ArrayList<String> agendaList = new ArrayList<String>();
agendaList.add(getSelectedMeeting().getAgenda());
return agendaList;
}
/**
* this method is used to get a list of employee names for employees who are not invited to a particular meeting
*/
public List<String> getEmpNameIdList() {
List<EmployeeEntity> employeeList = new ArrayList<EmployeeEntity>(EmployeeService.getCurrentInstance()
.getEmployeeList());
List<String> uninvitedEmpList = new ArrayList<String>();
ListIterator<EmployeeEntity> empIter = employeeList.listIterator();
ArrayList<Integer> idList = new ArrayList<Integer>();
while (empIter.hasNext()) {
idList.add(empIter.next().getEmpId());
}
MeetingEntity meeting = getSelectedMeeting();
List<EmployeeEntity> employees = meeting.getEmployees();
if(employees!=null){
ListIterator<EmployeeEntity> invitedIter = employees.listIterator();
ArrayList<Integer> invitedIds = new ArrayList<Integer>();
while (invitedIter.hasNext()) {
invitedIds.add(invitedIter.next().getEmpId());
}
idList.removeAll(invitedIds);
}
EmployeeEntity emp;
ListIterator<Integer> idIter = idList.listIterator();
while (idIter.hasNext()) {
int id = idIter.next();
emp = EmployeeService.getCurrentInstance().getEmployeeForId(id);
uninvitedEmpList.add(emp.getFirstName() + " " + emp.getLastName() + " (" + emp.getEmpId() + ")");
}
return uninvitedEmpList;
}
/**
* this method adds employees to a meeting
* @return
*/
public String addEmpToMeeting() {
MeetingEntity meeting = MeetingService.getCurrentInstance().getMeetingFromAgenda(
getSelectedMeeting().getAgenda());
for (int i = 0; i < empIdsInMeeting.length; i++) {
String id = null;
id = empIdsInMeeting[i].substring(empIdsInMeeting[i].lastIndexOf("(") + 1,
empIdsInMeeting[i].lastIndexOf(")"));
int empId = Integer.parseInt(id);
meeting.getEmployees().add(EmployeeService.getCurrentInstance().getEmployeeForId(empId));
}
MeetingService.getCurrentInstance().addMeeting(meeting);
return "empAddedToMeeting";
}
/**
* this method removes employee from a meeting
* @return
*/
public void deleteEmployee(){
List<EmployeeEntity>inviteEmployees=getSelectedMeeting().getEmployees();
EmployeeEntity emp=getDeletableEmployee();
inviteEmployees.remove(emp);
}
public Integer getSelectedMeetId() {
return selectedMeetId;
}
public void setSelectedMeetId(Integer selectedMeetId) {
this.selectedMeetId = selectedMeetId;
setSelectedMeeting(MeetingService.getCurrentInstance().getMeetingForId(selectedMeetId));
}
public MeetingEntity getSelectedMeeting() {
return selectedMeeting;
}
public void setSelectedMeeting(MeetingEntity selectedMeeting) {
this.selectedMeeting = selectedMeeting;
}
public Map<String, Object> getRequestMap() {
return requestMap;
}
public void setRequestMap(Map<String, Object> requestMap) {
this.requestMap = requestMap;
}
public Date getMeetingTime() {
return meetingTime;
}
public void setMeetingTime(Date meetingTime) {
this.meetingTime = meetingTime;
}
public String getAgenda() {
return agenda;
}
public void setAgenda(String agenda) {
this.agenda = agenda;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public int getMeetingId() {
return this.meetingId;
}
public List<EmployeeEntity> getEmployees() {
return employees;
}
public String[] getEmpIdsInMeeting() {
return empIdsInMeeting;
}
public void setEmpIdsInMeeting(String[] empIdsInMeeting) {
this.empIdsInMeeting = empIdsInMeeting;
}
public void setEmployees(List<EmployeeEntity> employees) {
this.employees = employees;
}
public String getSelectedAgenda() {
return selectedAgenda;
}
public void setSelectedAgenda(String selectedAgenda) {
this.selectedAgenda = selectedAgenda;
}
public void setTimeOrder(SortOrder timeOrder) {
this.timeOrder = timeOrder;
}
public int getDeleteEmpId() {
return deleteEmpId;
}
public void setDeleteEmpId(int deleteEmpId) {
this.deleteEmpId = deleteEmpId;
setDeletableEmployee(EmployeeService.getCurrentInstance().getEmployeeForId(deleteEmpId));
}
public EmployeeEntity getDeletableEmployee() {
return deletableEmployee;
}
public void setDeletableEmployee(EmployeeEntity deletableEmployee) {
this.deletableEmployee = deletableEmployee;
}
}
Please help .
|
jsf-2.0
|
richfaces
| null | null | null | null |
open
|
on clicking a4j:commandbutton, method does not get executed.
===
I am developing an application using jsf2.0, richfaces 4.0, tomcat 6.0. On a page I am trying to delete a row . But when I click the delete icon, sometimes popup panel does not appear and when it is shown , nothing happens on clicking the delete button.
Following is my .xhtml file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<ui:composition template="template.xhtml">
<ui:define name="metadata">
<f:metadata>
<f:viewParam name="meetingId" required="true" value="#{meetingBean.selectedMeetId}" />
</f:metadata>
</ui:define>
<ui:define name="content">
<h3>List of Employees in selected meeting</h3>
<a4j:status onstart="#{rich:component('statPane')}.show()"
onstop="#{rich:component('statPane')}.hide()" />
<h:form>
<c:if test="#{! empty meetingBean.selectedMeeting}">
<c:set target="#{flash}" property="selectedMeeting"
value="#{meetingBean.selectedMeeting}" />
</c:if>
<c:if test="#{! empty flash.selectedMeeting}">
<c:set target="#{meetingBean}" property="selectedMeeting"
value="#{flash.selectedMeeting}" />
</c:if>
<rich:extendedDataTable value="#{meetingBean.selectedMeeting.employees}" var="empMeet" border="1" id="table">
<rich:column>
<f:facet name="header">Employee Id</f:facet>
#{empMeet.empId}
</rich:column>
<rich:column>
<f:facet name="header"> Employee Name</f:facet>
#{empMeet.firstName} #{empMeet.lastName}
</rich:column>
<rich:column>
<a4j:commandLink execute="@this" render="@none" oncomplete="#{rich:component('confirmPanel')}.show();">
<h:graphicImage value="/images/icons/delete.gif" alt="delete" />
<a4j:param value="#{empMeet.empId}" assignTo="#{meetingBean.deleteEmpId}" />
</a4j:commandLink>
</rich:column>
</rich:extendedDataTable>
<a4j:jsFunction name="removeEmp" action="#{meetingBean.deleteEmployee}" render="table" execute="@this"
oncomplete="#{rich:component('confirmPanel')}.hide();" >
</a4j:jsFunction>
<rich:popupPanel id="statPane" autosized="true">
<h:graphicImage value="/images/ai.gif" />
Please wait...
</rich:popupPanel>
<rich:popupPanel id="confirmPanel" autosized="true" >
Are you sure you want to delete the row?
<a4j:commandButton value="Cancel" onclick="#{rich:component('confirmPane')}.hide(); return false;" />
<a4j:commandButton value="Delete" onclick="removeEmp(); return false;" />
</rich:popupPanel>
<h:commandButton action="addEmpMeeting" value="Invite More Employees" />
</h:form>
</ui:define>
</ui:composition>
</html>
Following is my bean class:
package com.drishti.apps.mommanager.meeting;
/**
* this class represents a meeting object
*/
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.event.ComponentSystemEvent;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
import org.richfaces.component.SortOrder;
import com.drishti.apps.mommanager.employee.AbstractBacking;
import com.drishti.apps.mommanager.employee.EmployeeEntity;
import com.drishti.apps.mommanager.employee.EmployeeService;
@ManagedBean
public class MeetingBean extends AbstractBacking {
@ManagedProperty(value = "#{requestScope}")
private Map<String, Object> requestMap;
private int meetingId;
private Date meetingTime;
private String agenda;
private String result;
public String[] empIdsInMeeting;
private List<EmployeeEntity> employees = new ArrayList<EmployeeEntity>();
private Integer selectedMeetId;
private MeetingEntity selectedMeeting;
private String selectedAgenda;
private int deleteEmpId;
private EmployeeEntity deletableEmployee;
/**
* this method is used to load a meeting object when it is being updated
*
* @param cse
*/
public void loadMeeting(ComponentSystemEvent cse) {
if (null == getSelectedMeeting()) {
Integer meetId = getSelectedMeetId();
if (meetId == null) {
meetId = (Integer)getFlash().get("selectedMeetId");
}
if (meetId == null) {
getFacesContext().addMessage(null, new FacesMessage("The meeting is invalid"));
getFlash().setKeepMessages(true);
getFacesContext().getApplication().getNavigationHandler()
.handleNavigation(getFacesContext(), null, "listMeetings");
} else {
MeetingEntity meet = MeetingService.getCurrentInstance().getMeetingForId(meetId);
if (meet == null) {
getFacesContext().addMessage(null, new FacesMessage("The meeting is invalid"));
getFlash().setKeepMessages(true);
getFacesContext().getApplication().getNavigationHandler()
.handleNavigation(getFacesContext(), null, "listMeetings");
} else {
getFlash().put("selectedMeeting", meet);
getSelectedMeeting();
}
}
}
}
/**
* this method updates a meeting object
*
* @return
*/
public void updateMeeting() {
//String result = null;
MeetingService meetSer = MeetingService.getCurrentInstance();
MeetingEntity meeting = getSelectedMeeting();
meetSer.updateMeeting(meeting);
getFlash().clear();
//result = "meetUpdated";
//return result;
}
/**
* this method adds a meeting object to database
*
* @return
*/
public void addMeeting() {
MeetingEntity meeting = (MeetingEntity)getRequestMap().get("meetingEntity");
MeetingService.getCurrentInstance().addMeeting(meeting);
//return "successMeeting";
}
/**
* this method is used to delete a meeting
*/
public void deleteMeeting(){
MeetingService meetSer = MeetingService.getCurrentInstance();
MeetingEntity meeting = getSelectedMeeting();
meetSer.deleteMeeting(meeting);
getFlash().clear();
}
/**
* returns data model containing all meetings present in database
*
* @return
*/
public DataModel<MeetingEntity> getMeetingList() {
DataModel<MeetingEntity> meetingList = new ListDataModel<MeetingEntity>(MeetingService.getCurrentInstance()
.getMeetings());
return meetingList;
}
/**
* returns list containing agenda of all meetings
*
* @return
*/
public ArrayList<String> getAgendaList() {
ArrayList<String> agendaList = new ArrayList<String>();
agendaList.add(getSelectedMeeting().getAgenda());
return agendaList;
}
/**
* this method is used to get a list of employee names for employees who are not invited to a particular meeting
*/
public List<String> getEmpNameIdList() {
List<EmployeeEntity> employeeList = new ArrayList<EmployeeEntity>(EmployeeService.getCurrentInstance()
.getEmployeeList());
List<String> uninvitedEmpList = new ArrayList<String>();
ListIterator<EmployeeEntity> empIter = employeeList.listIterator();
ArrayList<Integer> idList = new ArrayList<Integer>();
while (empIter.hasNext()) {
idList.add(empIter.next().getEmpId());
}
MeetingEntity meeting = getSelectedMeeting();
List<EmployeeEntity> employees = meeting.getEmployees();
if(employees!=null){
ListIterator<EmployeeEntity> invitedIter = employees.listIterator();
ArrayList<Integer> invitedIds = new ArrayList<Integer>();
while (invitedIter.hasNext()) {
invitedIds.add(invitedIter.next().getEmpId());
}
idList.removeAll(invitedIds);
}
EmployeeEntity emp;
ListIterator<Integer> idIter = idList.listIterator();
while (idIter.hasNext()) {
int id = idIter.next();
emp = EmployeeService.getCurrentInstance().getEmployeeForId(id);
uninvitedEmpList.add(emp.getFirstName() + " " + emp.getLastName() + " (" + emp.getEmpId() + ")");
}
return uninvitedEmpList;
}
/**
* this method adds employees to a meeting
* @return
*/
public String addEmpToMeeting() {
MeetingEntity meeting = MeetingService.getCurrentInstance().getMeetingFromAgenda(
getSelectedMeeting().getAgenda());
for (int i = 0; i < empIdsInMeeting.length; i++) {
String id = null;
id = empIdsInMeeting[i].substring(empIdsInMeeting[i].lastIndexOf("(") + 1,
empIdsInMeeting[i].lastIndexOf(")"));
int empId = Integer.parseInt(id);
meeting.getEmployees().add(EmployeeService.getCurrentInstance().getEmployeeForId(empId));
}
MeetingService.getCurrentInstance().addMeeting(meeting);
return "empAddedToMeeting";
}
/**
* this method removes employee from a meeting
* @return
*/
public void deleteEmployee(){
List<EmployeeEntity>inviteEmployees=getSelectedMeeting().getEmployees();
EmployeeEntity emp=getDeletableEmployee();
inviteEmployees.remove(emp);
}
public Integer getSelectedMeetId() {
return selectedMeetId;
}
public void setSelectedMeetId(Integer selectedMeetId) {
this.selectedMeetId = selectedMeetId;
setSelectedMeeting(MeetingService.getCurrentInstance().getMeetingForId(selectedMeetId));
}
public MeetingEntity getSelectedMeeting() {
return selectedMeeting;
}
public void setSelectedMeeting(MeetingEntity selectedMeeting) {
this.selectedMeeting = selectedMeeting;
}
public Map<String, Object> getRequestMap() {
return requestMap;
}
public void setRequestMap(Map<String, Object> requestMap) {
this.requestMap = requestMap;
}
public Date getMeetingTime() {
return meetingTime;
}
public void setMeetingTime(Date meetingTime) {
this.meetingTime = meetingTime;
}
public String getAgenda() {
return agenda;
}
public void setAgenda(String agenda) {
this.agenda = agenda;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public int getMeetingId() {
return this.meetingId;
}
public List<EmployeeEntity> getEmployees() {
return employees;
}
public String[] getEmpIdsInMeeting() {
return empIdsInMeeting;
}
public void setEmpIdsInMeeting(String[] empIdsInMeeting) {
this.empIdsInMeeting = empIdsInMeeting;
}
public void setEmployees(List<EmployeeEntity> employees) {
this.employees = employees;
}
public String getSelectedAgenda() {
return selectedAgenda;
}
public void setSelectedAgenda(String selectedAgenda) {
this.selectedAgenda = selectedAgenda;
}
public void setTimeOrder(SortOrder timeOrder) {
this.timeOrder = timeOrder;
}
public int getDeleteEmpId() {
return deleteEmpId;
}
public void setDeleteEmpId(int deleteEmpId) {
this.deleteEmpId = deleteEmpId;
setDeletableEmployee(EmployeeService.getCurrentInstance().getEmployeeForId(deleteEmpId));
}
public EmployeeEntity getDeletableEmployee() {
return deletableEmployee;
}
public void setDeletableEmployee(EmployeeEntity deletableEmployee) {
this.deletableEmployee = deletableEmployee;
}
}
Please help .
| 0 |
9,950,360 |
03/30/2012 21:01:31
| 1,304,156 |
03/30/2012 20:58:22
| 1 | 0 |
FlashBuilder 4.6: My compile errors don't come with paths, just line numbers. why?
|
If I have compile errors in my project, the Problems window shows the the line # for each error but it doesn't show a path. The result is that I can't dbl-click on the error to jump the problem.
Has anyone seen this before and how I can fix this?
In theory I could diff against my repo but sometimes error don't always happen in changed code.
|
path
|
compilation
| null | null | null | null |
open
|
FlashBuilder 4.6: My compile errors don't come with paths, just line numbers. why?
===
If I have compile errors in my project, the Problems window shows the the line # for each error but it doesn't show a path. The result is that I can't dbl-click on the error to jump the problem.
Has anyone seen this before and how I can fix this?
In theory I could diff against my repo but sometimes error don't always happen in changed code.
| 0 |
9,064,989 |
01/30/2012 13:59:34
| 321,167 |
04/20/2010 09:53:35
| 50 | 1 |
Event before server side validation on model is performed in MVC3
|
Im using custom validation attributes per property in a model posted from an HTML form.
In order to do the custom validation I need to call a web service with the model.
The answer is then used inside each custom validation.
Question: What do I do to call the web service with the unvalidated model before its validated.
|
asp.net
|
asp.net-mvc
| null | null | null | null |
open
|
Event before server side validation on model is performed in MVC3
===
Im using custom validation attributes per property in a model posted from an HTML form.
In order to do the custom validation I need to call a web service with the model.
The answer is then used inside each custom validation.
Question: What do I do to call the web service with the unvalidated model before its validated.
| 0 |
3,962,181 |
10/18/2010 18:29:04
| 28,543 |
10/16/2008 11:36:40
| 6,422 | 259 |
Lucene.NET highlighter plugin highlighting strangely
|
I'm trying to add the Lucene.NET Highlighter to my search, however its doing some really strange highlighting, what am I doing wrong?
Heres the highlighting code:
// stuff here to get scoreDocs
var content = doc.GetField("content").StringValue();
// content = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been"
var highlighter = new Highlighter(new StrongFormatter(), new HtmlEncoder(), new QueryScorer(query.Rewrite(indexSearcher.GetIndexReader())));
highlighter.SetTextFragmenter(new SimpleFragmenter(100));
var tokenStream = analyzer.TokenStream("content", new StringReader(content));
var bestFragment = highlighter.GetBestFragment(tokenStream, content);
Searching for `"lorem"` gives me this bestFragment value:
<strong>Lorem</strong> <strong>Ipsum</strong> is <strong>simply</strong> <strong>dummy</strong> <strong>text</strong> of the <strong>printing</strong> and <strong>typesetting</strong> <strong>industry</strong>. <strong>Lorem</strong> <strong>Ipsum</strong> <strong>has</strong> <strong>been</strong>
As you can see, its highlighted much more than just `"Lorem"`. Why?
How do I make this behave sensibly?
I'm using a `StandardAnalyzer` and my query looks like `"content:lorem"`
**Edit: ** Im using Lucene.NET 2.9.2
Thanks
|
lucene.net
|
lucene-highlighter
| null | null | null | null |
open
|
Lucene.NET highlighter plugin highlighting strangely
===
I'm trying to add the Lucene.NET Highlighter to my search, however its doing some really strange highlighting, what am I doing wrong?
Heres the highlighting code:
// stuff here to get scoreDocs
var content = doc.GetField("content").StringValue();
// content = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been"
var highlighter = new Highlighter(new StrongFormatter(), new HtmlEncoder(), new QueryScorer(query.Rewrite(indexSearcher.GetIndexReader())));
highlighter.SetTextFragmenter(new SimpleFragmenter(100));
var tokenStream = analyzer.TokenStream("content", new StringReader(content));
var bestFragment = highlighter.GetBestFragment(tokenStream, content);
Searching for `"lorem"` gives me this bestFragment value:
<strong>Lorem</strong> <strong>Ipsum</strong> is <strong>simply</strong> <strong>dummy</strong> <strong>text</strong> of the <strong>printing</strong> and <strong>typesetting</strong> <strong>industry</strong>. <strong>Lorem</strong> <strong>Ipsum</strong> <strong>has</strong> <strong>been</strong>
As you can see, its highlighted much more than just `"Lorem"`. Why?
How do I make this behave sensibly?
I'm using a `StandardAnalyzer` and my query looks like `"content:lorem"`
**Edit: ** Im using Lucene.NET 2.9.2
Thanks
| 0 |
11,401,596 |
07/09/2012 19:17:27
| 1,449,919 |
06/11/2012 21:17:38
| 26 | 0 |
combine PCA, LDA and LBP
|
Now the FaceRecognizer works fine with my OpenCV 2.3.1 and I can see the predicted class is correct.
What I'm thinking is to combine PCA features, LDA features and LBP features together to get a higher accuracy, since I think the three features are all kind of histogram vectors and when we decide the label of a test image, we compare the histogram of the test image to the histograms of existing images. So is it possible to combine the feature vectors together?
However I think the feature histogram of LBP is very long. If we use 8 by 8 grids then the histogram will be 8*8*256 = 16384 long. And the eigenface weight vectors are of the length of how many eigenface components we choose, say 80. So I'm not sure whether we can do this.
I'll keep thinking on this and any help is highly appreciated.
|
algorithm
|
opencv
|
face-recognition
| null | null |
07/10/2012 18:32:44
|
off topic
|
combine PCA, LDA and LBP
===
Now the FaceRecognizer works fine with my OpenCV 2.3.1 and I can see the predicted class is correct.
What I'm thinking is to combine PCA features, LDA features and LBP features together to get a higher accuracy, since I think the three features are all kind of histogram vectors and when we decide the label of a test image, we compare the histogram of the test image to the histograms of existing images. So is it possible to combine the feature vectors together?
However I think the feature histogram of LBP is very long. If we use 8 by 8 grids then the histogram will be 8*8*256 = 16384 long. And the eigenface weight vectors are of the length of how many eigenface components we choose, say 80. So I'm not sure whether we can do this.
I'll keep thinking on this and any help is highly appreciated.
| 2 |
8,887,408 |
01/16/2012 22:50:46
| 499,926 |
11/07/2010 16:10:36
| 58 | 0 |
About threads and callbacks
|
I'm working with Python and threads by some time, but I still have a little doubt about callbacks. Take the following code:
import threading
def cb_func(data):
"""The callback function"""
print data
def th_func(callback):
"""The threaded function"""
# do some work here
callback()
thr = threading.Thread(target=th_func, args=(cb_func,)).start()
Now, according to this code, function cb_func will run in the main thread, or in the newly created (**thr**) thread? I'm asking because I'm working with a GUI toolkit (GTK) and I'm occasionally getting X errors (and segfaults) when calling callbacks in this way (yes, I know about gobject.idle_add).
Thank you in advance and sorry for my silly question.
|
python
|
multithreading
|
thread-safety
| null | null | null |
open
|
About threads and callbacks
===
I'm working with Python and threads by some time, but I still have a little doubt about callbacks. Take the following code:
import threading
def cb_func(data):
"""The callback function"""
print data
def th_func(callback):
"""The threaded function"""
# do some work here
callback()
thr = threading.Thread(target=th_func, args=(cb_func,)).start()
Now, according to this code, function cb_func will run in the main thread, or in the newly created (**thr**) thread? I'm asking because I'm working with a GUI toolkit (GTK) and I'm occasionally getting X errors (and segfaults) when calling callbacks in this way (yes, I know about gobject.idle_add).
Thank you in advance and sorry for my silly question.
| 0 |
9,138,822 |
02/04/2012 06:10:18
| 981,700 |
10/06/2011 07:09:53
| 1 | 0 |
What's the best combination of LaTex writing in Chinese?
|
someone rcommend the xelatex, but others insist on the latex+CJK, which one is prefer? thanks.
|
latex
|
xelatex
| null | null | null |
02/04/2012 07:10:33
|
off topic
|
What's the best combination of LaTex writing in Chinese?
===
someone rcommend the xelatex, but others insist on the latex+CJK, which one is prefer? thanks.
| 2 |
1,545,442 |
10/09/2009 18:45:43
| 171,742 |
09/10/2009 22:17:54
| 253 | 17 |
.net service bus recommendations?
|
We are in need of a distributed architecture messaging system/service bus with the capability of Publish/Subscribe. Does anyone have any reccomendations for a framework that we can use for .net applications?
|
c#
|
.net
|
messaging
|
servicebus
|
distributed
|
10/25/2011 13:05:57
|
not constructive
|
.net service bus recommendations?
===
We are in need of a distributed architecture messaging system/service bus with the capability of Publish/Subscribe. Does anyone have any reccomendations for a framework that we can use for .net applications?
| 4 |
3,975,027 |
10/20/2010 05:34:02
| 150,172 |
08/04/2009 07:45:18
| 686 | 23 |
Quick introduction on how to use oracle xml data type
|
How do you work with the oracle XML data type?
_This question is intended to be asked and answered by me, just to share the information with others_
|
sql
|
xml
|
oracle
| null | null | null |
open
|
Quick introduction on how to use oracle xml data type
===
How do you work with the oracle XML data type?
_This question is intended to be asked and answered by me, just to share the information with others_
| 0 |
8,744,581 |
01/05/2012 14:59:04
| 20,358 |
09/22/2008 10:58:53
| 1,168 | 19 |
Code review approaches
|
Just going out on a limb here. Is doing a code review by sampling a few classes and units of code by a developer good enough to judge what he has done wrong to provide inputs? This is just in case you are pressed for time and can't review every single line written by them. I am working on the assumption that the developers might duplicate the same type of mistakes everywhere. Is this an effective approach? or partially effective, or not at all effective?
What other approaches are better? Sitting with each developer who has written the lines of code and asking them why they did that a particular way? or doing it by yourself and then sending a synopsis of your findings via email?
How do you approach reviewing code written by junior developers/peers when you have to review all the code base in a typical 15 day sprint?
|
code-review
| null | null | null | null |
01/06/2012 05:41:48
|
off topic
|
Code review approaches
===
Just going out on a limb here. Is doing a code review by sampling a few classes and units of code by a developer good enough to judge what he has done wrong to provide inputs? This is just in case you are pressed for time and can't review every single line written by them. I am working on the assumption that the developers might duplicate the same type of mistakes everywhere. Is this an effective approach? or partially effective, or not at all effective?
What other approaches are better? Sitting with each developer who has written the lines of code and asking them why they did that a particular way? or doing it by yourself and then sending a synopsis of your findings via email?
How do you approach reviewing code written by junior developers/peers when you have to review all the code base in a typical 15 day sprint?
| 2 |
10,586,667 |
05/14/2012 15:46:43
| 839,015 |
07/11/2011 13:51:02
| 174 | 3 |
How to print serial number to Crystal Reports - WPF C#
|
I have a WPF application, where I print labels for products. Sometimes, I have to print more than one copy of the same label. But the serial number will be different for each copy. I have a database table which keeps track of the last serial number printed. How can I do this using a formula?
|
c#
|
wpf
|
crystal-reports
| null | null |
05/15/2012 16:24:29
|
not a real question
|
How to print serial number to Crystal Reports - WPF C#
===
I have a WPF application, where I print labels for products. Sometimes, I have to print more than one copy of the same label. But the serial number will be different for each copy. I have a database table which keeps track of the last serial number printed. How can I do this using a formula?
| 1 |
6,263,686 |
06/07/2011 10:07:44
| 111,804 |
05/24/2009 17:04:11
| 835 | 59 |
How to call class method from NSString in obj-c?
|
In obj-c, how can I call
`[myClass myString];`
where `myString = @"myMethod";`
Which should be the equivalent of `[myClass myMethod];`
Not sure if this kind of meta language manipulation is possible.
|
iphone
|
objective-c
|
ios
|
meta
| null | null |
open
|
How to call class method from NSString in obj-c?
===
In obj-c, how can I call
`[myClass myString];`
where `myString = @"myMethod";`
Which should be the equivalent of `[myClass myMethod];`
Not sure if this kind of meta language manipulation is possible.
| 0 |
3,220,823 |
07/10/2010 21:02:30
| 133,124 |
07/04/2009 13:06:33
| 126 | 2 |
Using scanf with NSStrings
|
I want the user to input a string and then assign the input to an NSString. Right now my code looks like this:
NSString *word;
scanf("%s", &word);
|
objective-c
|
string
|
scanf
| null | null | null |
open
|
Using scanf with NSStrings
===
I want the user to input a string and then assign the input to an NSString. Right now my code looks like this:
NSString *word;
scanf("%s", &word);
| 0 |
10,466,966 |
05/05/2012 23:59:24
| 194,261 |
10/22/2009 02:07:46
| 672 | 41 |
NoSQL and Analytics
|
I am starting to build an application that is likely to demand scaling, so I am seriously considering NoSQL. One thing that holds me back from perusing NoSQL is the availability of the data I store in it for analytics. One of the major benefits of my application is going to be trending (age, location, etc). Since I have not been able to fully shift my mentality from relational to NoSQL, I'm not sure if I'm just looking at the problem wrong, or if there really is a need for relational data to be available via live, ad-hoc querying.
Please set me straight!
|
nosql
|
analytics
| null | null | null | null |
open
|
NoSQL and Analytics
===
I am starting to build an application that is likely to demand scaling, so I am seriously considering NoSQL. One thing that holds me back from perusing NoSQL is the availability of the data I store in it for analytics. One of the major benefits of my application is going to be trending (age, location, etc). Since I have not been able to fully shift my mentality from relational to NoSQL, I'm not sure if I'm just looking at the problem wrong, or if there really is a need for relational data to be available via live, ad-hoc querying.
Please set me straight!
| 0 |
9,053,728 |
01/29/2012 13:58:49
| 1,176,487 |
01/29/2012 13:27:29
| 1 | 0 |
Silverlight 5 NotificationWindow captures mainwindow mouse
|
I'm finding that if you use the NotificationWindow with Silverlight 5 runtime in an out of browser app, while the notificationwindow is visible it captures any mouse input in the top left corner of the application's main window.
This can be easily demonstrated for example the sample here : http://forums.silverlight.net/t/212852.aspx/1
You simply add a button so it sits at the top left of the screen. It is not possible to click the button while the NotificationWindow is visible. This does NOT happen on SL4 runtime, but does happen on each of the SL5 machines I have tested.
The area that gets captured corresponds to the size of the NotificationWindow, as if the notification window was located at the top left of the MainWindow. If your NotificationWindow content has any controls, you can even click those controls by clicking in the corresponding location on the main window!
I've hit this problem on a SL4 application where users with Silverlight 5 runtime can no longer use the buttons on the top left of the main window.
Any help would be much appreciated.
Thanks
Danny
|
silverlight
|
silverlight-oob
|
silverlight-5.0
| null | null | null |
open
|
Silverlight 5 NotificationWindow captures mainwindow mouse
===
I'm finding that if you use the NotificationWindow with Silverlight 5 runtime in an out of browser app, while the notificationwindow is visible it captures any mouse input in the top left corner of the application's main window.
This can be easily demonstrated for example the sample here : http://forums.silverlight.net/t/212852.aspx/1
You simply add a button so it sits at the top left of the screen. It is not possible to click the button while the NotificationWindow is visible. This does NOT happen on SL4 runtime, but does happen on each of the SL5 machines I have tested.
The area that gets captured corresponds to the size of the NotificationWindow, as if the notification window was located at the top left of the MainWindow. If your NotificationWindow content has any controls, you can even click those controls by clicking in the corresponding location on the main window!
I've hit this problem on a SL4 application where users with Silverlight 5 runtime can no longer use the buttons on the top left of the main window.
Any help would be much appreciated.
Thanks
Danny
| 0 |
6,287,122 |
06/09/2011 01:27:01
| 701,510 |
04/11/2011 03:40:18
| 165 | 0 |
how to make jquery toggle action go over all my content?
|
I have a jquery toggler on the very top of my page that will eventually open up to reveal a form. The problem is that when the panel expands it will push down all the content under it instead of the panel going over the content. How do I make sure the panel expands over the content instead of pushing it down?
I only have the basic slidetoggle function set up:
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle("slow");
});
});
</script>
<style type="text/css">
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 1px #c3c3c3;
}
div.panel
{
height:120px;
display:none;
}
</style>
</head>
<body>
<div class="panel">
<p>this will be a form</p>
</div>
<p class="flip">sign up!</p>
</body>
</html>
|
javascript
|
jquery
|
html
|
css
|
forms
| null |
open
|
how to make jquery toggle action go over all my content?
===
I have a jquery toggler on the very top of my page that will eventually open up to reveal a form. The problem is that when the panel expands it will push down all the content under it instead of the panel going over the content. How do I make sure the panel expands over the content instead of pushing it down?
I only have the basic slidetoggle function set up:
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle("slow");
});
});
</script>
<style type="text/css">
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 1px #c3c3c3;
}
div.panel
{
height:120px;
display:none;
}
</style>
</head>
<body>
<div class="panel">
<p>this will be a form</p>
</div>
<p class="flip">sign up!</p>
</body>
</html>
| 0 |
5,348,023 |
03/18/2011 04:18:45
| 460,794 |
09/28/2010 15:40:44
| 59 | 2 |
Extracting user id from Facebook Javascript SDK session object
|
I am using Facebook's Javascript SDK "FB.ui" to pull up an OAuth dialog. Once you click allow, I need to capture the session object, extract the user id and use it further in my script. For some reason I cannot get this working properly, I keep getting undefined, even though the session does exist.
<script src="http://connect.facebook.net/en_US/all.js"></script>
<div id="fb-root"></div>
<script type="text/javascript">
FB.init({
appId : '***************',
status : true,
cookie : true,
xfbml : true
});
FB.getLoginStatus(function(response) {
if (response.session) {
//do something
} else {
FB.ui({
method: 'oauth',
display: 'page',
scope: 'email',
perms: 'email'
},
function(response) {
alert(response.session.uid); //returns underfined
});
}
});
</script>
|
facebook
|
facebook-connect
|
facebook-graph-api
|
facebook-javascript-sdk
|
facebook-java-api
| null |
open
|
Extracting user id from Facebook Javascript SDK session object
===
I am using Facebook's Javascript SDK "FB.ui" to pull up an OAuth dialog. Once you click allow, I need to capture the session object, extract the user id and use it further in my script. For some reason I cannot get this working properly, I keep getting undefined, even though the session does exist.
<script src="http://connect.facebook.net/en_US/all.js"></script>
<div id="fb-root"></div>
<script type="text/javascript">
FB.init({
appId : '***************',
status : true,
cookie : true,
xfbml : true
});
FB.getLoginStatus(function(response) {
if (response.session) {
//do something
} else {
FB.ui({
method: 'oauth',
display: 'page',
scope: 'email',
perms: 'email'
},
function(response) {
alert(response.session.uid); //returns underfined
});
}
});
</script>
| 0 |
11,066,752 |
06/16/2012 20:21:41
| 519,856 |
11/25/2010 08:33:46
| 716 | 29 |
Why is SQL integral numeric column generated in C# code as decimal
|
Why is SQL integral numeric column (for example `NUMERIC(3,0)`) generated in C# (in DataSet
as column type or in DataAdapter as parameter type) as type `Decimal`?
`NUMERIC(3,0)` can store integral values in range of -999 to 999. I think it should be in C# generated as type `int` or another integral one.
I think, this behavior is .NET or Visual Studio serious bug. How should I solve it, if I don't want rewrite generated code and I don't want to convert everywhere I use it between int and decimal? Thank you.
|
c#
|
sql-server
|
types
|
dataset
|
dataadapter
|
06/17/2012 17:11:45
|
not constructive
|
Why is SQL integral numeric column generated in C# code as decimal
===
Why is SQL integral numeric column (for example `NUMERIC(3,0)`) generated in C# (in DataSet
as column type or in DataAdapter as parameter type) as type `Decimal`?
`NUMERIC(3,0)` can store integral values in range of -999 to 999. I think it should be in C# generated as type `int` or another integral one.
I think, this behavior is .NET or Visual Studio serious bug. How should I solve it, if I don't want rewrite generated code and I don't want to convert everywhere I use it between int and decimal? Thank you.
| 4 |
2,942,650 |
05/31/2010 09:36:38
| 354,457 |
05/31/2010 09:36:37
| 1 | 0 |
Can't view Hindi words
|
I am not able to browse Hindi words in my multilingual site in php.
|
multilingual
| null | null | null | null |
05/31/2010 09:53:10
|
not a real question
|
Can't view Hindi words
===
I am not able to browse Hindi words in my multilingual site in php.
| 1 |
3,939,071 |
10/15/2010 02:31:23
| 476,477 |
10/15/2010 02:31:23
| 1 | 0 |
Android: How to make a specific SharedPreference reset itself after the system reboots?
|
I have a SharedPreference that I need to reset itself to its initial value after the phone reboots... any ideas?
|
android
| null | null | null | null | null |
open
|
Android: How to make a specific SharedPreference reset itself after the system reboots?
===
I have a SharedPreference that I need to reset itself to its initial value after the phone reboots... any ideas?
| 0 |
7,414,784 |
09/14/2011 10:27:54
| 887,962 |
08/10/2011 13:25:14
| 43 | 2 |
moved symlink disappears from Windows Explorer
|
I'd like to change the structure of our source code inside ClearCase before using a custom script to export that to another SCM system. As the original code may still change slightly, I did this by symlinking the contents of the existing folders into the new structure.
Now the desired folder structure has changed and I need to move those symlinks (or start the whole process over, which is my fall-back strategy if no one can help me here). But after moving any symlinks (inside the same VOB in a dynamic view by the way), Windows Explorer does not show the elements at the new position. ClearCase Explorer does show them as expected, in the new location and tagged as a symbolic link; but they appearantly lost their target, as the option "Warp to target" in the context menu is greyed out.
Restarting the PC and un-/remounting the VOB all did nothing to better the situaton.
Can anyone tell me how this could happen, how to prevent this from happening again and possibly how I can restore the appearantly broken links?
Thanks in advance,<br/>
Sven
|
clearcase
|
symlink
|
windows-explorer
| null | null | null |
open
|
moved symlink disappears from Windows Explorer
===
I'd like to change the structure of our source code inside ClearCase before using a custom script to export that to another SCM system. As the original code may still change slightly, I did this by symlinking the contents of the existing folders into the new structure.
Now the desired folder structure has changed and I need to move those symlinks (or start the whole process over, which is my fall-back strategy if no one can help me here). But after moving any symlinks (inside the same VOB in a dynamic view by the way), Windows Explorer does not show the elements at the new position. ClearCase Explorer does show them as expected, in the new location and tagged as a symbolic link; but they appearantly lost their target, as the option "Warp to target" in the context menu is greyed out.
Restarting the PC and un-/remounting the VOB all did nothing to better the situaton.
Can anyone tell me how this could happen, how to prevent this from happening again and possibly how I can restore the appearantly broken links?
Thanks in advance,<br/>
Sven
| 0 |
1,086,798 |
07/06/2009 12:53:25
| 3,848 |
08/31/2008 11:24:27
| 3,855 | 121 |
Differences between shared_ptr
|
Are there any differences between [`boost::shared_ptr`](http://www.boost.org/doc/libs/1_39_0/libs/smart_ptr/shared_ptr.htm), `std::tr1::shared_ptr` and the upcoming (in `C++0x`) `std::shared_ptr`?
Will porting from one to another have any overhead or are they basically the same?
|
shared-ptr
|
boost
|
tr1
|
c++0x
| null | null |
open
|
Differences between shared_ptr
===
Are there any differences between [`boost::shared_ptr`](http://www.boost.org/doc/libs/1_39_0/libs/smart_ptr/shared_ptr.htm), `std::tr1::shared_ptr` and the upcoming (in `C++0x`) `std::shared_ptr`?
Will porting from one to another have any overhead or are they basically the same?
| 0 |
5,104,544 |
02/24/2011 12:19:10
| 632,252 |
02/24/2011 11:56:35
| 1 | 0 |
Site display problems
|
My site gives problem when opened in IE6 it frendzpark.co.cc. It is not displayed correctly. Its displayed correct in new and latest browsers
|
html
|
css
| null | null | null |
02/24/2011 12:47:37
|
not a real question
|
Site display problems
===
My site gives problem when opened in IE6 it frendzpark.co.cc. It is not displayed correctly. Its displayed correct in new and latest browsers
| 1 |
2,559,934 |
04/01/2010 11:14:21
| 300,204 |
03/23/2010 18:18:13
| 43 | 2 |
id vs class selection benchmark
|
Has anybody bench marked selecting elements with id's and class's from CSS and javascript?
It would make sense that an element with an id is faster to select than if it had a class even if it was the only element with that class.
Do I really need to be concerned?
|
css
|
javascript
|
html
|
selectors
|
benchmarking
| null |
open
|
id vs class selection benchmark
===
Has anybody bench marked selecting elements with id's and class's from CSS and javascript?
It would make sense that an element with an id is faster to select than if it had a class even if it was the only element with that class.
Do I really need to be concerned?
| 0 |
6,599,003 |
07/06/2011 15:29:36
| 759,929 |
05/18/2011 20:39:15
| 44 | 9 |
Serialization using Protobuf-net and Protobuf C#Port vs XML
|
I'm interested in a certain situation. I have an object in C# that I would like to serialize and deserialize.
I'm kind of conducting an experiment. I'm trying to see if switching the libraries of protobuf will have any affect on the time it takes to serialize and deserialize an object. Additionally, I'm throwing an XML serialization in the mix to see if that can compete as well, even though I'm pretty sure protobuf is faster.
In terms of speed, is there a clear, definite winner between protobuf and XML? Assuming everything was done consistently? i.e. Same path, parallel code, straightforward, etc.. And also, would the speed be affected if I switched the libraries that the protobuf is using to serialize and deserialize? (From protobuf-net to protobuf C# port?) I'm quite new to this so I do not know the answer yet, but what I heard was that protobuf is supposed to be smaller, faster, and easier than XML.
Any insight is greatly appreciated! Thanks! Off to write the tests now.
|
xml-serialization
|
protobuf-net
| null | null | null | null |
open
|
Serialization using Protobuf-net and Protobuf C#Port vs XML
===
I'm interested in a certain situation. I have an object in C# that I would like to serialize and deserialize.
I'm kind of conducting an experiment. I'm trying to see if switching the libraries of protobuf will have any affect on the time it takes to serialize and deserialize an object. Additionally, I'm throwing an XML serialization in the mix to see if that can compete as well, even though I'm pretty sure protobuf is faster.
In terms of speed, is there a clear, definite winner between protobuf and XML? Assuming everything was done consistently? i.e. Same path, parallel code, straightforward, etc.. And also, would the speed be affected if I switched the libraries that the protobuf is using to serialize and deserialize? (From protobuf-net to protobuf C# port?) I'm quite new to this so I do not know the answer yet, but what I heard was that protobuf is supposed to be smaller, faster, and easier than XML.
Any insight is greatly appreciated! Thanks! Off to write the tests now.
| 0 |
10,530,803 |
05/10/2012 09:08:09
| 911,519 |
08/25/2011 08:04:56
| 665 | 50 |
Tastypie with ImageKit relationship
|
Consider these pseudo models:
class Product:
name = charfield
class ProductImage:
image = foreignKey(Product)
And this resource
class ProductResource(ModelResource):
images = fields.RelatedField('path.to.resources.ProductImageResource', 'images__all', full=True)
class Meta:
queryset = Product.objects.all()
resource_name = 'products'
The returning JSON is:
{
"meta": { ... },
"objects": [
{
"name": "Test",
"images": "[<ProductImage: ProductImage object>, <ProductImage: ProductImage object>]",
}
]
}
Offcourse this is rather useless, I just need to list some attribute of the instances. Is this only possible with the dehydrate approach?
|
python
|
django
|
tastypie
| null | null | null |
open
|
Tastypie with ImageKit relationship
===
Consider these pseudo models:
class Product:
name = charfield
class ProductImage:
image = foreignKey(Product)
And this resource
class ProductResource(ModelResource):
images = fields.RelatedField('path.to.resources.ProductImageResource', 'images__all', full=True)
class Meta:
queryset = Product.objects.all()
resource_name = 'products'
The returning JSON is:
{
"meta": { ... },
"objects": [
{
"name": "Test",
"images": "[<ProductImage: ProductImage object>, <ProductImage: ProductImage object>]",
}
]
}
Offcourse this is rather useless, I just need to list some attribute of the instances. Is this only possible with the dehydrate approach?
| 0 |
8,022,977 |
11/05/2011 20:16:42
| 702,275 |
04/11/2011 13:46:41
| 98 | 4 |
php codeigniter how to restrict access to files in a directory
|
i wanted to follow up a question which i'm still not able to answer: http://stackoverflow.com/questions/6050844/how-to-restrict-access-to-a-directorys-files-in-the-browser.
The answer given by user "anonymous" about writing some authentication in the controller constructor is what i've tried to do but it is not working yet for me.
i'm returning content details including its src="" via a controller named "content":
/content/account_id# (e.g., 3)/item_id# ((e.g., 2)
and in the "www.mysite.com/content/3/2" view file, I like to play the content, e.g., a video file, through the aforementioned video tag's src="" attribute that i'd like to have the following directory structure: /uploads/3/2/my_video.m4v
Here's my uploads controller code so far:
class Uploads extends CI_Controller {
function Uploads()
{
parent::__construct();
$account_id= $this->session->userdata('account_id'); // =3 in this example
$item_id=$this->uri->segment('3'); // =2 in this example
$this->db->select('*');
$this->db->from('items');
$this->db->where('account_id, $account_id)->where('item_id, $item_id);
$query=$this->db->get();
if(empty($query){ return false; }
else { return true; }
}
}
As you can see from the SQL DB query, i'd like to restrict access to the indicated directory if a given account_id, doesn't own a given item_id.
Unfortunately, though if i go to www.mysite.com/content/3/2 only user "2" can access "my_video.m4v" but if anyone goes to www.mysite.com/uploads/3/2/my_video.m4v, they can access this video (it is downloaded by firefox, safari, and just played by natively by chrome).
Any thoughts someone might have would be greatly appreciated!
thank you,
tim
|
php
|
.htaccess
|
codeigniter
|
directory
| null | null |
open
|
php codeigniter how to restrict access to files in a directory
===
i wanted to follow up a question which i'm still not able to answer: http://stackoverflow.com/questions/6050844/how-to-restrict-access-to-a-directorys-files-in-the-browser.
The answer given by user "anonymous" about writing some authentication in the controller constructor is what i've tried to do but it is not working yet for me.
i'm returning content details including its src="" via a controller named "content":
/content/account_id# (e.g., 3)/item_id# ((e.g., 2)
and in the "www.mysite.com/content/3/2" view file, I like to play the content, e.g., a video file, through the aforementioned video tag's src="" attribute that i'd like to have the following directory structure: /uploads/3/2/my_video.m4v
Here's my uploads controller code so far:
class Uploads extends CI_Controller {
function Uploads()
{
parent::__construct();
$account_id= $this->session->userdata('account_id'); // =3 in this example
$item_id=$this->uri->segment('3'); // =2 in this example
$this->db->select('*');
$this->db->from('items');
$this->db->where('account_id, $account_id)->where('item_id, $item_id);
$query=$this->db->get();
if(empty($query){ return false; }
else { return true; }
}
}
As you can see from the SQL DB query, i'd like to restrict access to the indicated directory if a given account_id, doesn't own a given item_id.
Unfortunately, though if i go to www.mysite.com/content/3/2 only user "2" can access "my_video.m4v" but if anyone goes to www.mysite.com/uploads/3/2/my_video.m4v, they can access this video (it is downloaded by firefox, safari, and just played by natively by chrome).
Any thoughts someone might have would be greatly appreciated!
thank you,
tim
| 0 |
9,885,156 |
03/27/2012 07:33:50
| 960,567 |
09/23/2011 06:57:46
| 904 | 9 |
Showing Clipped Area of Html 5 Canvas while user dragging the canvas?
|
I need to clip my canvas accordingly when user start dragging the canvas for seeing the clipped region, just like we do in google map.
|
javascript
|
jquery
|
html5
|
html5-canvas
| null | null |
open
|
Showing Clipped Area of Html 5 Canvas while user dragging the canvas?
===
I need to clip my canvas accordingly when user start dragging the canvas for seeing the clipped region, just like we do in google map.
| 0 |
8,792,786 |
01/09/2012 17:46:54
| 784,385 |
06/05/2011 01:05:23
| 56 | 5 |
Thread.sleep() in a while loop
|
I notice that NetBeans is warning me about using Thread.sleep() in a while loop in my Java code, so I've done some research on the subject. It seems primarily the issue is one of performance, where your while condition may become true while the counter is still sleeping, thus wasting wall-clock time as you wait for the next iteration. This all makes perfect sense.
My application has a need to contact a remote system and periodically poll for the state of an operation, waiting until the operation is complete before sending the next request. At the moment the code logically does this:
String state = get state via RPC call
while (!state.equals("complete")) {
Thread.sleep(10000); // Wait 10 seconds
state = {update state via RPC call}
}
Given that the circumstance is checking a remote operation (which is a somewhat expensive process, in that it runs for several seconds), is this a valid use of Thread.sleep() in a while loop? Is there a better way to structure this logic? I've seen some examples where I could use a Timer class, but I fail to see the benefit, as it still seems to boil down to the same straightforward logic above, but with a lot more complexity thrown in.
Bear in mind that the remote system in this case is neither under my direct control, nor is it written in Java, so changing that end to be more "cooperative" in this scenario is not an option. My only option for updating my application's value for state is to create and send an XML message, receive a response, parse it, and then extract the piece of information I need.
Any suggestions or comments would be most welcome.
|
java
|
while-loops
|
sleep
| null | null | null |
open
|
Thread.sleep() in a while loop
===
I notice that NetBeans is warning me about using Thread.sleep() in a while loop in my Java code, so I've done some research on the subject. It seems primarily the issue is one of performance, where your while condition may become true while the counter is still sleeping, thus wasting wall-clock time as you wait for the next iteration. This all makes perfect sense.
My application has a need to contact a remote system and periodically poll for the state of an operation, waiting until the operation is complete before sending the next request. At the moment the code logically does this:
String state = get state via RPC call
while (!state.equals("complete")) {
Thread.sleep(10000); // Wait 10 seconds
state = {update state via RPC call}
}
Given that the circumstance is checking a remote operation (which is a somewhat expensive process, in that it runs for several seconds), is this a valid use of Thread.sleep() in a while loop? Is there a better way to structure this logic? I've seen some examples where I could use a Timer class, but I fail to see the benefit, as it still seems to boil down to the same straightforward logic above, but with a lot more complexity thrown in.
Bear in mind that the remote system in this case is neither under my direct control, nor is it written in Java, so changing that end to be more "cooperative" in this scenario is not an option. My only option for updating my application's value for state is to create and send an XML message, receive a response, parse it, and then extract the piece of information I need.
Any suggestions or comments would be most welcome.
| 0 |
11,546,429 |
07/18/2012 16:50:08
| 1,531,075 |
07/17/2012 08:04:12
| 3 | 0 |
linked list multiply
|
this code is part of homework about linked lists
in the final process i got that last node of result list does not meet null however i set to
, here is pic of debugging.
while(first)
{
while(second)
{
temp = new polynomial;
temp->coef = (first->coef) * (second->coef) ;
temp->exp = (first->exp) + (second->exp);
temp->next = 0;
result->next = temp;
second = second->next;
delete(temp);
}
first = first->next;
}
[1]: http://i.stack.imgur.com/yHgAM.png
|
c++
|
c
|
homework
| null | null |
07/19/2012 17:26:27
|
too localized
|
linked list multiply
===
this code is part of homework about linked lists
in the final process i got that last node of result list does not meet null however i set to
, here is pic of debugging.
while(first)
{
while(second)
{
temp = new polynomial;
temp->coef = (first->coef) * (second->coef) ;
temp->exp = (first->exp) + (second->exp);
temp->next = 0;
result->next = temp;
second = second->next;
delete(temp);
}
first = first->next;
}
[1]: http://i.stack.imgur.com/yHgAM.png
| 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.