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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10,474,412 | 05/06/2012 21:21:08 | 920,796 | 08/31/2011 01:44:54 | 316 | 0 | What steps run when it executes the '@article.user = @user' code? | I am using Ruby on Rails 3.2.2 and I would like to know *exactly* what steps run when it executes the following code assuming that `@user` and `@article` are class instances and the related association exists:
@article.user = @user
*I am looking for the source code* that handles that operation, but I can't find it out. | ruby-on-rails | ruby | ruby-on-rails-3 | class | associations | null | open | What steps run when it executes the '@article.user = @user' code?
===
I am using Ruby on Rails 3.2.2 and I would like to know *exactly* what steps run when it executes the following code assuming that `@user` and `@article` are class instances and the related association exists:
@article.user = @user
*I am looking for the source code* that handles that operation, but I can't find it out. | 0 |
6,957,629 | 08/05/2011 14:08:38 | 603,019 | 02/04/2011 11:00:01 | 584 | 2 | Windows Forms Timer doesn't stop. How is that possible? | During debugging I can see that after `Timer.Stop()` or `Timer.Enabled = false` commands are executed, Timer is still running (Timer.Enabled = true). How is that possible? | c# | .net | winforms | debugging | timer | null | open | Windows Forms Timer doesn't stop. How is that possible?
===
During debugging I can see that after `Timer.Stop()` or `Timer.Enabled = false` commands are executed, Timer is still running (Timer.Enabled = true). How is that possible? | 0 |
1,349,854 | 08/28/2009 23:23:46 | 93,399 | 04/20/2009 19:20:37 | 987 | 74 | Useful JavaScript/JQuery libraries? | Being rather new to the whole JavaScript/JQuery/JQueryUI lark, I have just discovered the [Yahoo User Interface Library][1] and was wondering if there are any other similar (i.e. free and fully functionaly) JavaScript libraries out on the web that I should be aware of? Mainly around UI design, although "programming" libraries are also of interest.
[1]: http://developer.yahoo.com/yui/ | javascript | jquery | jquery-ui | null | null | 07/14/2012 00:39:16 | not constructive | Useful JavaScript/JQuery libraries?
===
Being rather new to the whole JavaScript/JQuery/JQueryUI lark, I have just discovered the [Yahoo User Interface Library][1] and was wondering if there are any other similar (i.e. free and fully functionaly) JavaScript libraries out on the web that I should be aware of? Mainly around UI design, although "programming" libraries are also of interest.
[1]: http://developer.yahoo.com/yui/ | 4 |
3,646,063 | 09/05/2010 12:32:44 | 438,046 | 09/02/2010 13:56:17 | 1 | 0 | Display the link but not the CCK form. | I have created a form using add new content type and cck fields. I want anonymous users to view the menu item to this form but not the content. So when users click on the link they should get redirected to login page. I have granted the permissions of access all content. Any suggestions please.
Thanks
Kanwal | drupal | null | null | null | null | null | open | Display the link but not the CCK form.
===
I have created a form using add new content type and cck fields. I want anonymous users to view the menu item to this form but not the content. So when users click on the link they should get redirected to login page. I have granted the permissions of access all content. Any suggestions please.
Thanks
Kanwal | 0 |
2,474,861 | 03/19/2010 03:43:14 | 296,238 | 03/18/2010 05:35:53 | 1 | 3 | Shortest Ruby Quine | Just finished reading this blog post: http://www.skorks.com/2010/03/an-interview-question-that-prints-out-its-own-source-code-in-ruby/
In it, the author argues the case for using a quine as an interview question. I'm not sure I agree but thats not what this question is about.
He goes on to construct a quine in Ruby and refactor it to make it shorter. He then challenges the reader to try to make it even shorter.
I played around with it for a while and came up with the following:
s=”s=;puts s[0,2]+34.chr+s+34.chr+s[2,36]“;puts s[0,2]+34.chr+s+34.chr+s[2,36]
This is the first time I have ever attempted a quine and I can't figure out how to make it any shorter.
What is the shortest Ruby quine you can come up with? Please post an explanation if your implementation requires it. | ruby | quine | short | null | null | 01/10/2012 00:51:05 | not constructive | Shortest Ruby Quine
===
Just finished reading this blog post: http://www.skorks.com/2010/03/an-interview-question-that-prints-out-its-own-source-code-in-ruby/
In it, the author argues the case for using a quine as an interview question. I'm not sure I agree but thats not what this question is about.
He goes on to construct a quine in Ruby and refactor it to make it shorter. He then challenges the reader to try to make it even shorter.
I played around with it for a while and came up with the following:
s=”s=;puts s[0,2]+34.chr+s+34.chr+s[2,36]“;puts s[0,2]+34.chr+s+34.chr+s[2,36]
This is the first time I have ever attempted a quine and I can't figure out how to make it any shorter.
What is the shortest Ruby quine you can come up with? Please post an explanation if your implementation requires it. | 4 |
3,659,049 | 09/07/2010 13:27:44 | 440,279 | 09/06/2010 00:57:16 | 11 | 1 | Extracting everything outside of html and xml tags from a web page without a parser - using scanner and regex | Working on Android SDK, it's java minus some things.
I have a solution that pulls out two regex patterns from web pages. The problems I'm having is that it's finding things inside html tags. I tried jTidy, but it was just too slow on the Android. Not sure why but my scanner regex match solution whips it many times over.
currently, I grab the page source into a intputstream
is = uconn.getInputStream();
and the match and extract like this:
Scanner scanner = new Scanner(in, "UTF-8");
String match = "";
while (match != null) {
match = scanner.findWithinHorizon(extractPattern, 0);
if (match != null) {
String matchit = scanner.match().group(grp);
it works very nicely and is fast.
My regex pattern is already kinda crazy, actually two patterns in an or like this (p1|p2)
Any ideas on how I do that "but not inside html tags" or exclude html tags at the start?
If I can exclude html tags from my source that will likely speed up my interface significantly as I have a few other things I need to do with the raw data.
Thanks! | regex | html-parsing | scanner | inputstream | null | null | open | Extracting everything outside of html and xml tags from a web page without a parser - using scanner and regex
===
Working on Android SDK, it's java minus some things.
I have a solution that pulls out two regex patterns from web pages. The problems I'm having is that it's finding things inside html tags. I tried jTidy, but it was just too slow on the Android. Not sure why but my scanner regex match solution whips it many times over.
currently, I grab the page source into a intputstream
is = uconn.getInputStream();
and the match and extract like this:
Scanner scanner = new Scanner(in, "UTF-8");
String match = "";
while (match != null) {
match = scanner.findWithinHorizon(extractPattern, 0);
if (match != null) {
String matchit = scanner.match().group(grp);
it works very nicely and is fast.
My regex pattern is already kinda crazy, actually two patterns in an or like this (p1|p2)
Any ideas on how I do that "but not inside html tags" or exclude html tags at the start?
If I can exclude html tags from my source that will likely speed up my interface significantly as I have a few other things I need to do with the raw data.
Thanks! | 0 |
11,563,400 | 07/19/2012 14:48:19 | 1,512,504 | 07/09/2012 16:01:39 | 8 | 0 | White Space Bug With List Using Internet Explorer | I have researched this problem quite a bit, but still cannot find a fix. IE adds a massive amount of white space under each item in my unordered list and fixes like adding a border to the bottom, setting the display inline, etc have not been working.
CSS:
body
{
font-family: Carbon Block;
font-size: 18px;
margin: 0px;
padding: 0px;
font-weight:lighter;
}
html
{
height: 100%; margin-bottom: 1px; overflow-y: scroll;
}
ul li
{
}
.footer
{
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
font-size:18px;
font-weight:normal;
text-align:center;
font-family: Carbon Block;
color:#FFFFFF;
}
.noproduct
{
font-size:24px;
font-weight:normal;
text-align:center;
font-family: Carbon Block;
color:#000000;
}
.topnavigation
{
font: normal 20px Carbon Block;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
padding: 5px 0;
margin: 0;
width: 650px;
text-align: Center;
}
.topnavigation li
{
list-style: none;
display: inline;
font-size:20px;
}
.topnavigation li a
{
padding: 3px 0.5em;
text-decoration: none;
color: white;
background-color: #CC5302;
}
.topnavigation li a:hover
{
color: white;
background-color: #CC5302;
font-weight: bold;
font-size:22px
}
.topnavigation li a:active
{
/* Apply mousedown effect only to NON IE browsers */
/*border-style: inset;*/
color: black;
text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
background-color: #CC5302;
}
/****************************************************************************************
* LAYOUT CSS FOR THE MENU
****************************************************************************************/
#dhtmlgoodies_listMenu a
{/* Main menu items */
color:#FFFFFF;
text-decoration:none;
font-weight:normal;
vertical-align:middle;
height:650px;
}
#dhtmlgoodies_listMenu a:hover
{/* Main menu items (hover)*/
color:#FFFFFF;
text-decoration:none;
font-weight:bold;
font-size:20px
}
#dhtmlgoodies_listMenu a:active
{/* Main menu items (active)*/
color:#000000;
text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
text-decoration:none;
font-weight:normal;
}
#dhtmlgoodies_listMenu ul li a
{/* Sub menu */
color: #000000;
text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
font-weight:normal;
text-align:center;
}
#dhtmlgoodies_listMenu ul li a:hover
{/* Sub menu */
color: #000000;
text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
font-weight:normal;
text-align:center;
}
#dhtmlgoodies_listMenu ul li a:active
{/* Sub menu */
color: #FFFFFF;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
font-weight:normal;
text-align:center;
}
#dhtmlgoodies_listMenu ul li ul li a
{/* Sub Sub menu */
color: #000;
font-style:italic;
font-size:7em;
font-weight:normal;
}
#dhtmlgoodies_listMenu .activeMenuLink
{/* Styling of active menu item */
color:blue;
}
/*
No bullets
*/
#dhtmlgoodies_listMenu li
{
list-style-type:none;
padding: 3px 0.5em;
}
/*
No margin and padding
*/
#dhtmlgoodies_listMenu, #dhtmlgoodies_listMenu ul
{
margin:0px;
padding:0px;
}
/* Margin of sub menu items */
#dhtmlgoodies_listMenu ul
{
display:none;
margin-left:10px;
}
#products_title
{
font-weight:bold;
font-size:18px;
text-align:center;
padding: 3px 0.5em;
color:#fff;
height: 26px;
}
#products
{
z-index:1;
font-size: 16px;
position:absolute;
right:0px;
top:280px;
text-align:center;
vertical-align:middle;
height:552px;
width:290px;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}
#productsBackground
{
z-index:-2;
position:absolute;
top:220px;
right:60px;
width:170px;
height:634px;
}
html, body
{
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
#pinterest
{
z-index:1;
position:absolute;
top:80px;
right:40px;
}
#manta
{
z-index:1;
position:absolute;
top:135px;
right:170px;
}
#twitter
{
z-index:1;
position:absolute;
top:113px;
right:40px;
}
#facebook
{
z-index:1;
position:absolute;
top:75px;
right:195px;
}
#socialNetworking
{
color:#652474;
font-size:32px;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
z-index:1;
position:absolute;
top:35px;
right:45px;
}
#logo
{
z-index:1;
position:absolute;
top:0px;
left:80px;
height:220px;
width:155px;
}
#topNav
{
z-index:1;
position:absolute;
top:160px;
left:320px;
height:50px;
width:650px;
}
#productsTitle
{
font-size:20px;
text-align:center;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
z-index:1;
position:absolute;
top:245px;
right:0px;
height:50px;
width:290px;
}
#centerRotator
{
z-index:1;
position:absolute;
top:220px;
left:320px;
width:650px;
border-top:7px solid;
border-right:7px solid;
border-bottom:7px solid;
}
#topBanner
{
color:#652474;
font-size:20px;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
z-index:1;
position:absolute;
top:35px;
right:5px;
height:33px;
text-align:center;
}
#title
{
z-index:-3;
position:absolute;
top:30px;
left:290px;
}
#footer
{
z-index:-2;
position:absolute;
bottom:0px;
left:480px;
width:440px;
height:31px;
}
#pictureOne
{
z-index:-1;
position:absolute;
top:220px;
left:0px;
width:320px;
height:217px;
}
#pictureTwo
{
z-index:-2;
position:absolute;
top:434px;
left:0px;
width:320px;
height:250px;
}
#pictureThree
{
z-index:-2;
position:absolute;
top:684px;
left:0px;
width:320px;
height:170px;
}
#pictureFour
{
z-index:-3;
position:absolute;
top:684px;
left:315px;
width:320px;
height:170px;
}
#pictureFive
{
z-index:-4;
position:absolute;
top:684px;
left:635px;
width:342px;
height:170px;
}
#pictureSix
{
z-index:-5;
position:absolute;
top:684px;
right:0px;
width:303px;
height:170px;
}
#pictureSeven
{
z-index:-6;
position:absolute;
top:455px;
right:0px;
width:303px;
height:232px;
}
#pictureEight
{
z-index:-7;
position:absolute;
top:220px;
right:0px;
width:303px;
height:235px;
}
#divider1
{
z-index:-8;
position:absolute;
top:0px;
left:314px;
width:7px;
height:220px;
}
#divider2
{
z-index:-8;
position:absolute;
top:0px;
right:286px;
width:7px;
height:220px;
}
#showHide
{
z-index:1;
position:absolute;
top:198px;
right:93px;
width:104px;
height:22px;
}
#bt1
{
font-family:Carbon Block;
font-size:18px;
color:White;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
background-color:#cc5302;
width:104px;
height:22px;
padding:0px 0 4px 0;
border:2px solid #ffffff;
border-radius:5px;
cursor:pointer;
}
HTML:
<html>
<head>
<title>| Bali Thai Imports |</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Description" content="Wholesale fashion accessories, discount designer handbags, vases, wall hangings, decorative bird cages, musical instruments, lanterns and offered by Bali Thai Imports." />
<meta name="Keywords" content="wholesale fashion accessories, discount designer handbags, decorative bird cages, decorative vases, online musical instruments, decorative lanterns, wholesale keychains, discount vases, decorative pillow covers, wind chimes for sale, decorative wall hanging, decorative wall hangings, kites" />
<meta name="robots" content="Index,ALL" />
<meta name="revisit-after" content="7 Days" />
<meta name="rating" content="General" />
<meta name="language" content="en" />
<meta name="distribution" content="Global" />
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function setVisibility(className) {
var elems = document.getElementsByClassName(className);
var displayVal;
if(document.getElementById('bt1').value=='Hide Products'){
document.getElementById('bt1').value = 'Show Products';
displayVal = 'none';
}else{
document.getElementById('bt1').value = 'Hide Products';
displayVal = 'inline';
}
for (var i = 0; i < elems.length; i++) {
elems[i].style.display = displayVal;
}
}
</script>
<script type="text/javascript">
var activeMenuItem = new Array();
function isUlInArray(inputObj,ulObj){
while(inputObj && inputObj.id!='dhtmlgoodies_listMenu'){
if(inputObj==ulObj)return true;
inputObj = inputObj.parentNode;
}
return false;
}
function showHideSub(e,inputObj)
{
if(!inputObj)inputObj=this;
var parentObj = inputObj.parentNode;
var ul = parentObj.getElementsByTagName('UL')[0];
if(activeMenuItem.length>0){
for(var no=0;no<activeMenuItem.length;no++){
if(!isUlInArray(ul,activeMenuItem[0]) && !isUlInArray(activeMenuItem[0],ul)){
activeMenuItem[no].style.display='none';
activeMenuItem.splice(no,1);
no--;
}
}
}
if(ul.offsetHeight == 0){
ul.style.display='block';
activeMenuItem.push(ul);
}else{
ul.style.display='none';
}
}
function showHidePath(inputObj)
{
var startTag = inputObj;
showHideSub(false,inputObj);
inputObj = inputObj.parentNode;
while(inputObj){
inputObj = inputObj.parentNode;
if(inputObj.tagName=='LI')showHideSub(false,inputObj.getElementsByTagName('A')[0]);
if(inputObj.id=='dhtmlgoodies_listMenu')inputObj=false;
}
}
function initMenu()
{
var obj = document.getElementById('dhtmlgoodies_listMenu');
var linkCounter=0;
var aTags = obj.getElementsByTagName('A');
var activeMenuItem = false;
var activeMenuLink = false;
var thisLocationArray = location.href.split(/\//);
var fileNameThis = thisLocationArray[thisLocationArray.length-1];
if(fileNameThis.indexOf('?')>0)fileNameThis = fileNameThis.substr(0,fileNameThis.indexOf('?'));
if(fileNameThis.indexOf('#')>0)fileNameThis = fileNameThis.substr(0,fileNameThis.indexOf('#'));
for(var no=0;no<aTags.length;no++){
var parent = aTags[no].parentNode;
var subs = parent.getElementsByTagName('UL');
if(subs.length>0){
aTags[no].onclick = showHideSub;
linkCounter++;
aTags[no].id = 'aLink' + linkCounter;
}
if(aTags[no].href.indexOf(fileNameThis)>=0 && aTags[no].href.charAt(aTags[no].href.length-1)!='#'){
if(aTags[no].parentNode.parentNode){
var parentObj = aTags[no].parentNode.parentNode.parentNode;
var a = parentObj.getElementsByTagName('A')[0];
if(a.id && !activeMenuLink){
activeMenuLink = aTags[no];
activeMenuItem = a.id;
}
}
}
}
if(activeMenuLink){
activeMenuLink.className='activeMenuLink';
}
if(activeMenuItem){
if(document.getElementById(activeMenuItem))showHidePath(document.getElementById(activeMenuItem));
}
}
window.onload = initMenu;
</script>
<style type="text/css">
body {
background-color: #cc5302;
}
</style>
</head>
<body>
<div id="title"><img src="images/title2.png" alt=""></div>
<div id="topBanner">LIKE US ON FACEBOOK FOR A 10% DISCOUNT!</div>
<div id="productsTitle" class="toggleVisible"><span style="color:white;font-weight=bold;"><span style="color:black;">| </span> PRODUCTS <span style="color:black;"> |</span></span></div>
<div id="topNav"><ul class="topnavigation">
|
<li><a href="index.htm">HOME</a></li>
|
<li><a href="http://balithaiimports.3dcartstores.com/view_cart.asp" target="_blank">VIEW CART</a></li>
|
<li><a href="http://balithaiimports.3dcartstores.com/" target="_blank">PRODUCTS</a></li>
|
<li><a href="http://balithaiimports.3dcartstores.com/About-Us_ep_7.html" target="_blank">ABOUT US</a></li>
|
<li><a href="https://balithaiimports.3dcartstores.com/myaccount.asp?" target="_blank">MY ACCOUNT</a></li>
|
<li><a href="https://balithaiimports.3dcartstores.com/crm.asp?action=contactus" target="_blank">CONTACT US</a></li>
|
</ul>
</div>
<div id="centerRotator">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="650" height="457">
<param name="movie" value="Flash/center_rotator.swf">
<param name="quality" value="high">
<embed src="Flash/center_rotator.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="650" height="457"></embed>
</object>
</div>
<!--<div id="socialNetworking">Social Networking</div>-->
<div id="facebook"><a href="https://www.facebook.com/pages/Bali-Thai-Imports/184255874965768" target="_blank"><img src="images/Facebook.png" width="40" height="40" align="middle" alt="Like us On Facebook" /></a> </div>
<div id="twitter"><a href="https://twitter.com/BaliThaiImports" target="_blank"><img src="http://a0.twimg.com/a/1341848431/images/resources/twitter-bird-light-bgs.png" width="80" height="80" align="middle" alt="Follow us on Twitter" /></a> </div>
<div id="pinterest"><a href="http://pinterest.com/balithaiimports/" target="_blank"><img src="http://passets-ec.pinterest.com/images/about/buttons/pinterest-button.png" width="80" height="28" alt="Follow Us on Pinterest" /></a></div>
<div id="manta"><a href="http://www.manta.com/c/mxcpctc/bali-thai-imports" target="_blank"><img src="images/mantaBadge_lg.png" width="80" height="40" alt="Follow Us on Manta" /></a></div>
<div id="logo"><img src="images/Logo.jpg" width="155" height="220" alt=""></div>
<div id="products" class="toggleVisible">
<ul id="dhtmlgoodies_listMenu" padding:"0";>
<li><a href="http://balithaiimports.3dcartstores.com/Jewelry_c_39.html" target="_blank">Jewelry</a>
<li><a href="http://balithaiimports.3dcartstores.com/Pottery_c_150.html" target="_blank">Pottery</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Toys_c_160.html" target="_blank">Toys</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Lanterns_c_98.html" target="_blank">Lanterns</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Bags_c_95.html" target="_blank">Handbags</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Batik-Shoulder-Bags_c_138.html" target="_blank">Batik Shoulder Bag</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Hats_c_183.html" target="_blank">Hats</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Incense_c_69.html" target="_blank">Incense</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Mobiles_c_180.html" target="_blank">Mobiles</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Childrens-Bags_c_181.html" target="_blank">Children's Backpacks</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Birdcage-Decoration_c_205.html" target="_blank">Decorative Birdcages</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Musical-Instruments_c_158.html" target="_blank">Musical Instruments</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Hand-Painted-Containers_c_111.html" target="_blank">Hand Painted Containers</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Windchimes_c_99.html" target="_blank">Windchimes</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Wood-Carvings_c_156.html" target="_blank">Wood Carvings</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Story-Boards_c_167.html" target="_blank">Storyboards</a></li>
<li><a href="#">Gift Items</a>
<ul>
<li><a href="http://balithaiimports.3dcartstores.com/Coconut-Shells_c_202.html" target="_blank">Coconut Shells</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Bells_c_217.html" target="_blank">Gongs & Bells</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Statues_c_211.html" target="_blank">Statues</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Napkin-Rings_c_106.html" target="_blank">Napkin Rings</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Bowls_c_125.html" target="_blank">Wooden Bowls</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Trays_c_201.html" target="_blank">Trays</a></li>
</ul>
</li>
<li><a href="http://balithaiimports.3dcartstores.com/Wall-Hangings_c_124.html" target="_blank">Wall Hangings</a></li>
<li><a href="#">Clothing</a>
<ul>
<li><a href="http://balithaiimports.3dcartstores.com/Sandals_c_172.html" target="_blank">Sandals</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Sarong-Buckles_c_152.html" target="_blank">Sarong Buckles</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Scarves_c_194.html" target="_blank">Silk Scarves</a></li>
</ul>
</li>
<li><a href="http://balithaiimports.3dcartstores.com/Umbrellas_c_121.html" target="_blank">Umbrellas</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Backpacks_c_139.html" target="_blank">Backpacks</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Vases_c_47.html" target="_blank">Vases</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Sarongs_c_187.html" target="_blank">Sarongs</a></li>
</ul>
</div>
<div id="footer"><span class="footer">Bali Thai Imports LLC - 2011 All Rights Reserved</span></div>
<div id="pictureOne"><img src="images/dscn0062.jpg" alt=""></div>
<div id="pictureTwo"><img src="images/jsr-03.jpg" alt=""></div>
<div id="pictureThree"><img src="images/snr0.jpg" alt=""></div>
<div id="pictureFour"><img src="images/brb050.jpg" alt=""></div>
<div id="pictureFive"><img src="images/cipa-02h.jpg" alt=""></div>
<div id="pictureSix"><img src="images/21840499b_2.jpg" alt=""></div>
<div id="pictureSeven"><img src="images/gd-02.jpg" alt=""></div>
<div id="pictureEight"><img src="images/sst-098.jpg" alt=""></div>
<div id="productsBackground" class="toggleVisible"><img src="images/productsBackground.png" alt=""></div>
<div id="divider1"><img src="images/divider.png" alt=""></div>
<div id="divider2"><img src="images/divider.png" alt=""></div>
<!--<div id="showHide"><input type='button' name=type id='bt1' value='Hide Products' onclick="setVisibility('toggleVisible');";></div>-->
</body>
</html> | list | bugs | internet | whitespace | explorer | 07/20/2012 01:44:21 | too localized | White Space Bug With List Using Internet Explorer
===
I have researched this problem quite a bit, but still cannot find a fix. IE adds a massive amount of white space under each item in my unordered list and fixes like adding a border to the bottom, setting the display inline, etc have not been working.
CSS:
body
{
font-family: Carbon Block;
font-size: 18px;
margin: 0px;
padding: 0px;
font-weight:lighter;
}
html
{
height: 100%; margin-bottom: 1px; overflow-y: scroll;
}
ul li
{
}
.footer
{
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
font-size:18px;
font-weight:normal;
text-align:center;
font-family: Carbon Block;
color:#FFFFFF;
}
.noproduct
{
font-size:24px;
font-weight:normal;
text-align:center;
font-family: Carbon Block;
color:#000000;
}
.topnavigation
{
font: normal 20px Carbon Block;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
padding: 5px 0;
margin: 0;
width: 650px;
text-align: Center;
}
.topnavigation li
{
list-style: none;
display: inline;
font-size:20px;
}
.topnavigation li a
{
padding: 3px 0.5em;
text-decoration: none;
color: white;
background-color: #CC5302;
}
.topnavigation li a:hover
{
color: white;
background-color: #CC5302;
font-weight: bold;
font-size:22px
}
.topnavigation li a:active
{
/* Apply mousedown effect only to NON IE browsers */
/*border-style: inset;*/
color: black;
text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
background-color: #CC5302;
}
/****************************************************************************************
* LAYOUT CSS FOR THE MENU
****************************************************************************************/
#dhtmlgoodies_listMenu a
{/* Main menu items */
color:#FFFFFF;
text-decoration:none;
font-weight:normal;
vertical-align:middle;
height:650px;
}
#dhtmlgoodies_listMenu a:hover
{/* Main menu items (hover)*/
color:#FFFFFF;
text-decoration:none;
font-weight:bold;
font-size:20px
}
#dhtmlgoodies_listMenu a:active
{/* Main menu items (active)*/
color:#000000;
text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
text-decoration:none;
font-weight:normal;
}
#dhtmlgoodies_listMenu ul li a
{/* Sub menu */
color: #000000;
text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
font-weight:normal;
text-align:center;
}
#dhtmlgoodies_listMenu ul li a:hover
{/* Sub menu */
color: #000000;
text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
font-weight:normal;
text-align:center;
}
#dhtmlgoodies_listMenu ul li a:active
{/* Sub menu */
color: #FFFFFF;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
font-weight:normal;
text-align:center;
}
#dhtmlgoodies_listMenu ul li ul li a
{/* Sub Sub menu */
color: #000;
font-style:italic;
font-size:7em;
font-weight:normal;
}
#dhtmlgoodies_listMenu .activeMenuLink
{/* Styling of active menu item */
color:blue;
}
/*
No bullets
*/
#dhtmlgoodies_listMenu li
{
list-style-type:none;
padding: 3px 0.5em;
}
/*
No margin and padding
*/
#dhtmlgoodies_listMenu, #dhtmlgoodies_listMenu ul
{
margin:0px;
padding:0px;
}
/* Margin of sub menu items */
#dhtmlgoodies_listMenu ul
{
display:none;
margin-left:10px;
}
#products_title
{
font-weight:bold;
font-size:18px;
text-align:center;
padding: 3px 0.5em;
color:#fff;
height: 26px;
}
#products
{
z-index:1;
font-size: 16px;
position:absolute;
right:0px;
top:280px;
text-align:center;
vertical-align:middle;
height:552px;
width:290px;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}
#productsBackground
{
z-index:-2;
position:absolute;
top:220px;
right:60px;
width:170px;
height:634px;
}
html, body
{
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
#pinterest
{
z-index:1;
position:absolute;
top:80px;
right:40px;
}
#manta
{
z-index:1;
position:absolute;
top:135px;
right:170px;
}
#twitter
{
z-index:1;
position:absolute;
top:113px;
right:40px;
}
#facebook
{
z-index:1;
position:absolute;
top:75px;
right:195px;
}
#socialNetworking
{
color:#652474;
font-size:32px;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
z-index:1;
position:absolute;
top:35px;
right:45px;
}
#logo
{
z-index:1;
position:absolute;
top:0px;
left:80px;
height:220px;
width:155px;
}
#topNav
{
z-index:1;
position:absolute;
top:160px;
left:320px;
height:50px;
width:650px;
}
#productsTitle
{
font-size:20px;
text-align:center;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
z-index:1;
position:absolute;
top:245px;
right:0px;
height:50px;
width:290px;
}
#centerRotator
{
z-index:1;
position:absolute;
top:220px;
left:320px;
width:650px;
border-top:7px solid;
border-right:7px solid;
border-bottom:7px solid;
}
#topBanner
{
color:#652474;
font-size:20px;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
z-index:1;
position:absolute;
top:35px;
right:5px;
height:33px;
text-align:center;
}
#title
{
z-index:-3;
position:absolute;
top:30px;
left:290px;
}
#footer
{
z-index:-2;
position:absolute;
bottom:0px;
left:480px;
width:440px;
height:31px;
}
#pictureOne
{
z-index:-1;
position:absolute;
top:220px;
left:0px;
width:320px;
height:217px;
}
#pictureTwo
{
z-index:-2;
position:absolute;
top:434px;
left:0px;
width:320px;
height:250px;
}
#pictureThree
{
z-index:-2;
position:absolute;
top:684px;
left:0px;
width:320px;
height:170px;
}
#pictureFour
{
z-index:-3;
position:absolute;
top:684px;
left:315px;
width:320px;
height:170px;
}
#pictureFive
{
z-index:-4;
position:absolute;
top:684px;
left:635px;
width:342px;
height:170px;
}
#pictureSix
{
z-index:-5;
position:absolute;
top:684px;
right:0px;
width:303px;
height:170px;
}
#pictureSeven
{
z-index:-6;
position:absolute;
top:455px;
right:0px;
width:303px;
height:232px;
}
#pictureEight
{
z-index:-7;
position:absolute;
top:220px;
right:0px;
width:303px;
height:235px;
}
#divider1
{
z-index:-8;
position:absolute;
top:0px;
left:314px;
width:7px;
height:220px;
}
#divider2
{
z-index:-8;
position:absolute;
top:0px;
right:286px;
width:7px;
height:220px;
}
#showHide
{
z-index:1;
position:absolute;
top:198px;
right:93px;
width:104px;
height:22px;
}
#bt1
{
font-family:Carbon Block;
font-size:18px;
color:White;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
background-color:#cc5302;
width:104px;
height:22px;
padding:0px 0 4px 0;
border:2px solid #ffffff;
border-radius:5px;
cursor:pointer;
}
HTML:
<html>
<head>
<title>| Bali Thai Imports |</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Description" content="Wholesale fashion accessories, discount designer handbags, vases, wall hangings, decorative bird cages, musical instruments, lanterns and offered by Bali Thai Imports." />
<meta name="Keywords" content="wholesale fashion accessories, discount designer handbags, decorative bird cages, decorative vases, online musical instruments, decorative lanterns, wholesale keychains, discount vases, decorative pillow covers, wind chimes for sale, decorative wall hanging, decorative wall hangings, kites" />
<meta name="robots" content="Index,ALL" />
<meta name="revisit-after" content="7 Days" />
<meta name="rating" content="General" />
<meta name="language" content="en" />
<meta name="distribution" content="Global" />
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function setVisibility(className) {
var elems = document.getElementsByClassName(className);
var displayVal;
if(document.getElementById('bt1').value=='Hide Products'){
document.getElementById('bt1').value = 'Show Products';
displayVal = 'none';
}else{
document.getElementById('bt1').value = 'Hide Products';
displayVal = 'inline';
}
for (var i = 0; i < elems.length; i++) {
elems[i].style.display = displayVal;
}
}
</script>
<script type="text/javascript">
var activeMenuItem = new Array();
function isUlInArray(inputObj,ulObj){
while(inputObj && inputObj.id!='dhtmlgoodies_listMenu'){
if(inputObj==ulObj)return true;
inputObj = inputObj.parentNode;
}
return false;
}
function showHideSub(e,inputObj)
{
if(!inputObj)inputObj=this;
var parentObj = inputObj.parentNode;
var ul = parentObj.getElementsByTagName('UL')[0];
if(activeMenuItem.length>0){
for(var no=0;no<activeMenuItem.length;no++){
if(!isUlInArray(ul,activeMenuItem[0]) && !isUlInArray(activeMenuItem[0],ul)){
activeMenuItem[no].style.display='none';
activeMenuItem.splice(no,1);
no--;
}
}
}
if(ul.offsetHeight == 0){
ul.style.display='block';
activeMenuItem.push(ul);
}else{
ul.style.display='none';
}
}
function showHidePath(inputObj)
{
var startTag = inputObj;
showHideSub(false,inputObj);
inputObj = inputObj.parentNode;
while(inputObj){
inputObj = inputObj.parentNode;
if(inputObj.tagName=='LI')showHideSub(false,inputObj.getElementsByTagName('A')[0]);
if(inputObj.id=='dhtmlgoodies_listMenu')inputObj=false;
}
}
function initMenu()
{
var obj = document.getElementById('dhtmlgoodies_listMenu');
var linkCounter=0;
var aTags = obj.getElementsByTagName('A');
var activeMenuItem = false;
var activeMenuLink = false;
var thisLocationArray = location.href.split(/\//);
var fileNameThis = thisLocationArray[thisLocationArray.length-1];
if(fileNameThis.indexOf('?')>0)fileNameThis = fileNameThis.substr(0,fileNameThis.indexOf('?'));
if(fileNameThis.indexOf('#')>0)fileNameThis = fileNameThis.substr(0,fileNameThis.indexOf('#'));
for(var no=0;no<aTags.length;no++){
var parent = aTags[no].parentNode;
var subs = parent.getElementsByTagName('UL');
if(subs.length>0){
aTags[no].onclick = showHideSub;
linkCounter++;
aTags[no].id = 'aLink' + linkCounter;
}
if(aTags[no].href.indexOf(fileNameThis)>=0 && aTags[no].href.charAt(aTags[no].href.length-1)!='#'){
if(aTags[no].parentNode.parentNode){
var parentObj = aTags[no].parentNode.parentNode.parentNode;
var a = parentObj.getElementsByTagName('A')[0];
if(a.id && !activeMenuLink){
activeMenuLink = aTags[no];
activeMenuItem = a.id;
}
}
}
}
if(activeMenuLink){
activeMenuLink.className='activeMenuLink';
}
if(activeMenuItem){
if(document.getElementById(activeMenuItem))showHidePath(document.getElementById(activeMenuItem));
}
}
window.onload = initMenu;
</script>
<style type="text/css">
body {
background-color: #cc5302;
}
</style>
</head>
<body>
<div id="title"><img src="images/title2.png" alt=""></div>
<div id="topBanner">LIKE US ON FACEBOOK FOR A 10% DISCOUNT!</div>
<div id="productsTitle" class="toggleVisible"><span style="color:white;font-weight=bold;"><span style="color:black;">| </span> PRODUCTS <span style="color:black;"> |</span></span></div>
<div id="topNav"><ul class="topnavigation">
|
<li><a href="index.htm">HOME</a></li>
|
<li><a href="http://balithaiimports.3dcartstores.com/view_cart.asp" target="_blank">VIEW CART</a></li>
|
<li><a href="http://balithaiimports.3dcartstores.com/" target="_blank">PRODUCTS</a></li>
|
<li><a href="http://balithaiimports.3dcartstores.com/About-Us_ep_7.html" target="_blank">ABOUT US</a></li>
|
<li><a href="https://balithaiimports.3dcartstores.com/myaccount.asp?" target="_blank">MY ACCOUNT</a></li>
|
<li><a href="https://balithaiimports.3dcartstores.com/crm.asp?action=contactus" target="_blank">CONTACT US</a></li>
|
</ul>
</div>
<div id="centerRotator">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="650" height="457">
<param name="movie" value="Flash/center_rotator.swf">
<param name="quality" value="high">
<embed src="Flash/center_rotator.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="650" height="457"></embed>
</object>
</div>
<!--<div id="socialNetworking">Social Networking</div>-->
<div id="facebook"><a href="https://www.facebook.com/pages/Bali-Thai-Imports/184255874965768" target="_blank"><img src="images/Facebook.png" width="40" height="40" align="middle" alt="Like us On Facebook" /></a> </div>
<div id="twitter"><a href="https://twitter.com/BaliThaiImports" target="_blank"><img src="http://a0.twimg.com/a/1341848431/images/resources/twitter-bird-light-bgs.png" width="80" height="80" align="middle" alt="Follow us on Twitter" /></a> </div>
<div id="pinterest"><a href="http://pinterest.com/balithaiimports/" target="_blank"><img src="http://passets-ec.pinterest.com/images/about/buttons/pinterest-button.png" width="80" height="28" alt="Follow Us on Pinterest" /></a></div>
<div id="manta"><a href="http://www.manta.com/c/mxcpctc/bali-thai-imports" target="_blank"><img src="images/mantaBadge_lg.png" width="80" height="40" alt="Follow Us on Manta" /></a></div>
<div id="logo"><img src="images/Logo.jpg" width="155" height="220" alt=""></div>
<div id="products" class="toggleVisible">
<ul id="dhtmlgoodies_listMenu" padding:"0";>
<li><a href="http://balithaiimports.3dcartstores.com/Jewelry_c_39.html" target="_blank">Jewelry</a>
<li><a href="http://balithaiimports.3dcartstores.com/Pottery_c_150.html" target="_blank">Pottery</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Toys_c_160.html" target="_blank">Toys</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Lanterns_c_98.html" target="_blank">Lanterns</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Bags_c_95.html" target="_blank">Handbags</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Batik-Shoulder-Bags_c_138.html" target="_blank">Batik Shoulder Bag</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Hats_c_183.html" target="_blank">Hats</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Incense_c_69.html" target="_blank">Incense</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Mobiles_c_180.html" target="_blank">Mobiles</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Childrens-Bags_c_181.html" target="_blank">Children's Backpacks</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Birdcage-Decoration_c_205.html" target="_blank">Decorative Birdcages</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Musical-Instruments_c_158.html" target="_blank">Musical Instruments</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Hand-Painted-Containers_c_111.html" target="_blank">Hand Painted Containers</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Windchimes_c_99.html" target="_blank">Windchimes</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Wood-Carvings_c_156.html" target="_blank">Wood Carvings</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Story-Boards_c_167.html" target="_blank">Storyboards</a></li>
<li><a href="#">Gift Items</a>
<ul>
<li><a href="http://balithaiimports.3dcartstores.com/Coconut-Shells_c_202.html" target="_blank">Coconut Shells</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Bells_c_217.html" target="_blank">Gongs & Bells</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Statues_c_211.html" target="_blank">Statues</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Napkin-Rings_c_106.html" target="_blank">Napkin Rings</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Bowls_c_125.html" target="_blank">Wooden Bowls</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Trays_c_201.html" target="_blank">Trays</a></li>
</ul>
</li>
<li><a href="http://balithaiimports.3dcartstores.com/Wall-Hangings_c_124.html" target="_blank">Wall Hangings</a></li>
<li><a href="#">Clothing</a>
<ul>
<li><a href="http://balithaiimports.3dcartstores.com/Sandals_c_172.html" target="_blank">Sandals</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Sarong-Buckles_c_152.html" target="_blank">Sarong Buckles</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Scarves_c_194.html" target="_blank">Silk Scarves</a></li>
</ul>
</li>
<li><a href="http://balithaiimports.3dcartstores.com/Umbrellas_c_121.html" target="_blank">Umbrellas</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Backpacks_c_139.html" target="_blank">Backpacks</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Vases_c_47.html" target="_blank">Vases</a></li>
<li><a href="http://balithaiimports.3dcartstores.com/Sarongs_c_187.html" target="_blank">Sarongs</a></li>
</ul>
</div>
<div id="footer"><span class="footer">Bali Thai Imports LLC - 2011 All Rights Reserved</span></div>
<div id="pictureOne"><img src="images/dscn0062.jpg" alt=""></div>
<div id="pictureTwo"><img src="images/jsr-03.jpg" alt=""></div>
<div id="pictureThree"><img src="images/snr0.jpg" alt=""></div>
<div id="pictureFour"><img src="images/brb050.jpg" alt=""></div>
<div id="pictureFive"><img src="images/cipa-02h.jpg" alt=""></div>
<div id="pictureSix"><img src="images/21840499b_2.jpg" alt=""></div>
<div id="pictureSeven"><img src="images/gd-02.jpg" alt=""></div>
<div id="pictureEight"><img src="images/sst-098.jpg" alt=""></div>
<div id="productsBackground" class="toggleVisible"><img src="images/productsBackground.png" alt=""></div>
<div id="divider1"><img src="images/divider.png" alt=""></div>
<div id="divider2"><img src="images/divider.png" alt=""></div>
<!--<div id="showHide"><input type='button' name=type id='bt1' value='Hide Products' onclick="setVisibility('toggleVisible');";></div>-->
</body>
</html> | 3 |
788,407 | 04/25/2009 06:56:38 | 83,013 | 03/26/2009 09:27:35 | 3 | 1 | Spidermonkey pointing to a NSPR/DIST directory, HELP! | I've been trying to cross-compile Spidermonkey and I am stuck with the problem wherein prtypes.h(NSPR) is unrecognizable. I alread triedy modifying Makefile.ref/config.mk/jsconfig.mk to point to a desired NSPR/DIS directory. I must have missed some basic steps because it still won't make things work.
Do you have any ideas on how to properly modify the makefiles to point my spidermonkey to the right NSPR libraries?
Thanks! | nspr | spidermonkey | mozilla-plugin | mozila | cross-compile | null | open | Spidermonkey pointing to a NSPR/DIST directory, HELP!
===
I've been trying to cross-compile Spidermonkey and I am stuck with the problem wherein prtypes.h(NSPR) is unrecognizable. I alread triedy modifying Makefile.ref/config.mk/jsconfig.mk to point to a desired NSPR/DIS directory. I must have missed some basic steps because it still won't make things work.
Do you have any ideas on how to properly modify the makefiles to point my spidermonkey to the right NSPR libraries?
Thanks! | 0 |
11,072,657 | 06/17/2012 15:48:16 | 1,445,920 | 06/09/2012 07:49:56 | 1 | 1 | Can I convert an iphone app on android within a specific time? | I have made an application which is using simple navigation, IBactions and some animation. I want to also convert it onto android platform but I dont have any idea about it. So i want to ask that can I convert it into 20-25 days or not? B/c I dont have extra time. | android | iphone | null | null | null | 06/17/2012 15:58:36 | not constructive | Can I convert an iphone app on android within a specific time?
===
I have made an application which is using simple navigation, IBactions and some animation. I want to also convert it onto android platform but I dont have any idea about it. So i want to ask that can I convert it into 20-25 days or not? B/c I dont have extra time. | 4 |
11,374,892 | 07/07/2012 12:12:07 | 1,508,685 | 07/07/2012 12:06:30 | 1 | 0 | about jquery not working in my joomla 1.5 template | about jquery not working in my joomla 1.5 template.I used a slider in my template which has a j-query involved in it. | javascript | jquery | null | null | null | 07/08/2012 23:02:23 | not a real question | about jquery not working in my joomla 1.5 template
===
about jquery not working in my joomla 1.5 template.I used a slider in my template which has a j-query involved in it. | 1 |
11,170,670 | 06/23/2012 15:25:10 | 1,453,439 | 06/13/2012 10:44:53 | 1 | 0 | SSL certificate | How to generate SSL certificate on Window 7 and cPanel
In my projecct i need SSL Certificate
I want to generate ssl certificate on windows 7
I have cPanel account
I want a SSL certificate which can work on Both windows and cpanel
I dont know how to use SSL Certificate in Secure pages of php
so please guide me | ssl | openssl | ssl-certificate | cpanel | null | 06/23/2012 15:36:12 | off topic | SSL certificate
===
How to generate SSL certificate on Window 7 and cPanel
In my projecct i need SSL Certificate
I want to generate ssl certificate on windows 7
I have cPanel account
I want a SSL certificate which can work on Both windows and cpanel
I dont know how to use SSL Certificate in Secure pages of php
so please guide me | 2 |
6,892,717 | 07/31/2011 22:21:11 | 39,677 | 11/03/2008 21:48:03 | 10,934 | 6 | Help designing a dynamic form generator using helpers | So my database has a list of form elements that I need to generate on a page, these form elements are like:
text boxes, text areas, drop down lists, etc.
If you had to do this, would you use the built in helpers in rails? I'm not too familiar with using the helpers and figured I would have more control if I just generating my own library of controls so I have total control over the html etc.
Advice? | ruby-on-rails | null | null | null | null | 08/01/2011 05:01:22 | not a real question | Help designing a dynamic form generator using helpers
===
So my database has a list of form elements that I need to generate on a page, these form elements are like:
text boxes, text areas, drop down lists, etc.
If you had to do this, would you use the built in helpers in rails? I'm not too familiar with using the helpers and figured I would have more control if I just generating my own library of controls so I have total control over the html etc.
Advice? | 1 |
3,680,986 | 09/09/2010 22:22:34 | 73,398 | 03/03/2009 21:07:58 | 370 | 3 | Trace unmanaged function calls at runtime? | Is it possible to generate a tree of function calls at runtime? I'd like to get a feel of what the program is calling.
This is essentially the same as breaking at a particular location, stepping through each function, and recording down what the function names are. I have no performance constraints.
I am using Visual Studio, but do not have to. | c++ | windows | visual-studio | trace | null | null | open | Trace unmanaged function calls at runtime?
===
Is it possible to generate a tree of function calls at runtime? I'd like to get a feel of what the program is calling.
This is essentially the same as breaking at a particular location, stepping through each function, and recording down what the function names are. I have no performance constraints.
I am using Visual Studio, but do not have to. | 0 |
2,414,085 | 03/10/2010 02:15:12 | 123,915 | 06/16/2009 20:25:47 | 141 | 10 | How do you transfer data from MS SQL to db4o? | I came across this question after searching for a ODBC or JDBC. To my surprise, since I am new to db4o I found there are tools to browse db4o, including a Netbeans and Eclipse plug in. However, when it comes to the question at hand, I only found one company, and the product is not being sold nor demoed (makes me think is not ready yet).
So, how do you transfer data? Is there a tool or script I have not found yet? | db4o | sql-server | null | null | null | null | open | How do you transfer data from MS SQL to db4o?
===
I came across this question after searching for a ODBC or JDBC. To my surprise, since I am new to db4o I found there are tools to browse db4o, including a Netbeans and Eclipse plug in. However, when it comes to the question at hand, I only found one company, and the product is not being sold nor demoed (makes me think is not ready yet).
So, how do you transfer data? Is there a tool or script I have not found yet? | 0 |
7,153,635 | 08/22/2011 21:09:07 | 906,659 | 08/22/2011 21:09:07 | 1 | 0 | Displaying jobs from different hudson masters in one hudson view | How can I display the jobs from different hudson masters at one place or in one hudson view?
I don't have an alternative of using a single hudson master. Using iframes and hrefs in view "description" seem not be a clean solution. Is there a way by which hudson view can be modified to display jobs from different hudson master? Thanks for help. | hudson | null | null | null | null | null | open | Displaying jobs from different hudson masters in one hudson view
===
How can I display the jobs from different hudson masters at one place or in one hudson view?
I don't have an alternative of using a single hudson master. Using iframes and hrefs in view "description" seem not be a clean solution. Is there a way by which hudson view can be modified to display jobs from different hudson master? Thanks for help. | 0 |
949,937 | 06/04/2009 11:24:10 | 3,685 | 08/29/2008 22:02:10 | 270 | 33 | WIN32 memory issue (differences between debug/release). | I'm currently working on a legacy app (win32, Visual C++ 2005) that allocates memory using LocalAlloc (in a supplied library I can't change). The app keeps very large state in fixed memory (created at the start with multiple calls to LocalAlloc( LPTR, size)). I notice that in release mode I run out of memory at about 1.8gb but in debug it happily goes on to over 3.8gb. I'm running XP64 with the /3gb switch. I need to increase the memory used in the app and I'm hitting the memory limit in release (debug works ok). Any ideas?
| c | c++ | winapi | null | null | null | open | WIN32 memory issue (differences between debug/release).
===
I'm currently working on a legacy app (win32, Visual C++ 2005) that allocates memory using LocalAlloc (in a supplied library I can't change). The app keeps very large state in fixed memory (created at the start with multiple calls to LocalAlloc( LPTR, size)). I notice that in release mode I run out of memory at about 1.8gb but in debug it happily goes on to over 3.8gb. I'm running XP64 with the /3gb switch. I need to increase the memory used in the app and I'm hitting the memory limit in release (debug works ok). Any ideas?
| 0 |
806,144 | 04/30/2009 09:42:05 | 42,475 | 12/02/2008 15:10:57 | 2,841 | 128 | Tricks, hints, shortcuts in documentation | Which tricks, hints or shortcuts do you use regularly when you document your sourcecode?
What type of comment does help you most (or is most desired) when looking over a piece of sourcecode.
For an example, we always use date, shortcut of name and a +, -, * (added, deletet/commented, modified) and then some description:
// 30.04.09 PL+: blablalba
| documentation | source-code | language-agnostic | hints-and-tips | null | 11/27/2011 17:35:46 | not constructive | Tricks, hints, shortcuts in documentation
===
Which tricks, hints or shortcuts do you use regularly when you document your sourcecode?
What type of comment does help you most (or is most desired) when looking over a piece of sourcecode.
For an example, we always use date, shortcut of name and a +, -, * (added, deletet/commented, modified) and then some description:
// 30.04.09 PL+: blablalba
| 4 |
11,389,611 | 07/09/2012 05:45:32 | 280,174 | 02/24/2010 09:08:55 | 2,308 | 96 | Wifi finder/connector | I have noticed a lot of wifi finder apps in the app store. Do they actually detect wifi hotspots or do they just have a giant database with all the hotspots? If they do detect then how do they do it?
Thanks,
Manjunath | iphone | ipad | ios5 | iphone-sdk-4.0 | ios4 | 07/10/2012 17:23:45 | off topic | Wifi finder/connector
===
I have noticed a lot of wifi finder apps in the app store. Do they actually detect wifi hotspots or do they just have a giant database with all the hotspots? If they do detect then how do they do it?
Thanks,
Manjunath | 2 |
8,671,389 | 12/29/2011 17:53:09 | 240,385 | 12/29/2009 18:49:27 | 82 | 2 | jquery-file-upload plugin | I am trying to implement a jquery file upload for grails. I am using this plugin here [grails jquery-file-upload][1]
unfortunately, there densest seem to be any document ion on how to implement it in a grails environment. I have been struggling with it for days now. I am able to get the front end to work but I am unable to process the upload. Does anyone have a working example or know of a tutorial for grails? I would really appreciate any help. Or, if there is a better jquery upload plugin, let me know too.
thanks,
jason
[1]: http://blueimp.github.com/jQuery-File-Upload/ | jquery | grails | jquery-plugins | grails-plugin | grails-controller | null | open | jquery-file-upload plugin
===
I am trying to implement a jquery file upload for grails. I am using this plugin here [grails jquery-file-upload][1]
unfortunately, there densest seem to be any document ion on how to implement it in a grails environment. I have been struggling with it for days now. I am able to get the front end to work but I am unable to process the upload. Does anyone have a working example or know of a tutorial for grails? I would really appreciate any help. Or, if there is a better jquery upload plugin, let me know too.
thanks,
jason
[1]: http://blueimp.github.com/jQuery-File-Upload/ | 0 |
10,831,059 | 05/31/2012 09:39:08 | 1,218,285 | 02/18/2012 16:21:26 | 48 | 1 | SQL CE 3.5 Duplicate Records | been doing some research on finding a solution to my problem with little luck! Is there a SQL keyword which allows me to easily remove duplicate records from a table (SQLCE Compatible)? If not could any of you guys possibly know any resources which can help?
Thanks in advance. | c# | sql | database | sql-server-ce | null | null | open | SQL CE 3.5 Duplicate Records
===
been doing some research on finding a solution to my problem with little luck! Is there a SQL keyword which allows me to easily remove duplicate records from a table (SQLCE Compatible)? If not could any of you guys possibly know any resources which can help?
Thanks in advance. | 0 |
9,306,420 | 02/16/2012 06:12:23 | 1,213,150 | 02/16/2012 06:09:07 | 1 | 0 | CoffeeScript for Java | CoffeeScript is so cool. If there is any language use the coffee syntax but running on jvm, like groovy, scala?
Python's syntax is not cool. i can't use so many __xx__,self in my code, that's ugly. | java | jvm | coffeescript | null | null | 02/16/2012 06:53:03 | not constructive | CoffeeScript for Java
===
CoffeeScript is so cool. If there is any language use the coffee syntax but running on jvm, like groovy, scala?
Python's syntax is not cool. i can't use so many __xx__,self in my code, that's ugly. | 4 |
3,770,558 | 09/22/2010 14:57:59 | 371,471 | 06/20/2010 10:16:34 | -3 | 0 | ASP.NET Applications - Development with thunder fast speed | .
Dear All,
We are working on ASP.NET applications development (in different domains). Management is expecting the applications development with thunder fast speed. They are not much bothered about the code quality.
So in this case, could any paid/free software/plug-ins/modules can help us? If so, could you please provide elaborate details.
Many Thanks,
Regards,
Arti.
.
| asp.net | application | null | null | null | 09/22/2010 15:20:46 | not a real question | ASP.NET Applications - Development with thunder fast speed
===
.
Dear All,
We are working on ASP.NET applications development (in different domains). Management is expecting the applications development with thunder fast speed. They are not much bothered about the code quality.
So in this case, could any paid/free software/plug-ins/modules can help us? If so, could you please provide elaborate details.
Many Thanks,
Regards,
Arti.
.
| 1 |
4,536,595 | 12/27/2010 04:18:15 | 45,963 | 12/13/2008 12:23:04 | 2,157 | 43 | How can I make the mouse cursor disappear in opengl/glut? | I'm interested in making the mouse cursor invisible while using opengl + glut, how can I do this? | opengl | glut | null | null | null | null | open | How can I make the mouse cursor disappear in opengl/glut?
===
I'm interested in making the mouse cursor invisible while using opengl + glut, how can I do this? | 0 |
11,262,995 | 06/29/2012 13:49:04 | 1,034,137 | 11/07/2011 16:48:37 | 1 | 0 | IE 9 Javascript Window Variable is null.. Works on IE 8 | at some point in my code, I access a javascript variable this way:
var DASHBOARD = document.parentWindow.parent.Dashboard;
Where parent's value is {object Window} and its type is DispHTMLWindow2.
It works OK on IE8 or in IE9 compatibility view but when I cannot make it work on IE9.
On IE9, the value of document.parentWindow.parent.Dashboard is undefined and its type Undefined. I also noticed that parent's value is {...} and its type is [Object, Window] on IE 9.
Is there a different way of accessing the variable Dashboard in IE 9? | javascript | internet-explorer-8 | internet-explorer-9 | null | null | null | open | IE 9 Javascript Window Variable is null.. Works on IE 8
===
at some point in my code, I access a javascript variable this way:
var DASHBOARD = document.parentWindow.parent.Dashboard;
Where parent's value is {object Window} and its type is DispHTMLWindow2.
It works OK on IE8 or in IE9 compatibility view but when I cannot make it work on IE9.
On IE9, the value of document.parentWindow.parent.Dashboard is undefined and its type Undefined. I also noticed that parent's value is {...} and its type is [Object, Window] on IE 9.
Is there a different way of accessing the variable Dashboard in IE 9? | 0 |
3,423,711 | 08/06/2010 12:26:50 | 413,024 | 08/06/2010 12:26:50 | 1 | 0 | css hack for mac safari or safari 4 | I am looking forward for css hack only for safari 4 ..that should not also work for safari 5.
or else some css specific to mac safari.
Please let me know as soon as possible..
thank you ... | css | null | null | null | null | 04/18/2012 19:39:22 | not a real question | css hack for mac safari or safari 4
===
I am looking forward for css hack only for safari 4 ..that should not also work for safari 5.
or else some css specific to mac safari.
Please let me know as soon as possible..
thank you ... | 1 |
7,066,425 | 08/15/2011 14:53:16 | 854,086 | 07/20/2011 13:56:08 | 13 | 0 | Get common free time based on busy times Inputted by user | I am working on this Java swing-based project wherein the user can enter their weekly schedules as seen below. The input must take the schedule that represents their busy times. Program must also ask for the ff. inputs:<br/>
.....a. Name of User<br/>
.....b. Earliest Time Possible to arrive at school (ETP)<br/>
.....c. Latest Time Possible to arrive at school (LTP)<br/>
> _Name_ : __Jesse__<br/>
> _ETP_ : 8:00am<br/>
> _LTP_ : 8:00pm<br/>
>
> _Monday_ : ........9:40am to 2:30pm<br/>
> _Tuesday_ : .......8:00am to 9:30am<br/>
> _Wednesday_ : ..2:00pm to 4:00pm<br/>
> _Thursday_ : ......9:40am to 2:30pm<br/>
> _Friday_ : ...........1:00pm to 4:10pm<br/>
> _Saturday_ : .......free all day
.
> _Name_ : __Les__<br/>
> _ETP_ : 9:00am<br/>
> _LTP_ : 10:00pm<br/>
> _Monday_ : .........2:40pm to 4:10pm<br/>
> _Tuesday_ : ........4:10pm to 5:50pm<br/>
> _Wednesday_ : ...free all day<br/>
> _Thursday_ : .......1:00pm to 2:30pm<br/>
> _Friday_ : ............4:10pm to 5:50pm<br />
> _Saturday_ : ........9:00am to 12:00pm
==========================================================
> The Program creates a detailed schedule of their common free
> time.<br/> The following are the list of computations that the program
> must do:<br/> .....a. Summarize the time periods that are available.<br />
> .....b. Round __up__ to either --:30 or --:00 periods.<br /> .....c. Calculate
> the duration (in hours and minutes).<br />
===========================================================
Output:
> **Free Time for Jesse and Les**
>
> ..................._Day_............................_Time_............................._Duration_<br/><br/>
> ................_Monday_.............9:00am to
> 9:30am...................(30 mins)<br/>
> ..........................................4:30pm to
> 8:00pm...........(3 hours and 30 mins)</br><br/><br/>
> ................_Tuesday_............9:30am to 4:00pm...........(6
> hours and 30 mins)<br/><br/> ............._Wednesday_..........9:00am
> to 2:00pm...................(7 hours)<br/>
> ..........................................4:00pm to
> 8:00pm...................(4 hours)<br/><br/>
> ..............._Thursday_............9:00am to
> 9:30am...................(30 mins)<br/>
> ..........................................2:30pm to
> 8:00pm...........(5 hours and 30 mins)<br/><br/>
> ................_Friday_................9:00am to
> 1:00pm...................(4 hours)<br/>
> ..........................................6:00pm to
> 8:00pm...................(1 hours)<br/><br/>
> .............._Saturday_............12:00pm to
> 8:00pm...................(8 hours)<br/><br/>
===========================================================
> *Details to take note of:*
>
> 1. Minimum of 2 persons/users and Maximum of 4
> 2. 12noon is 12pm, 12midnight is 12am
> 3. The program displays the hours in 12-hour format (JSpinners, user-input), but the int values that the code get to retrieved from those components are in 24-hour format.
> 4. No Sundays
> 5. Users need not enter a time range for each day (Which basically means no classes for that day)
===========================================================
> As of now, <br/> <br/> I have the gui in place which make use of
> JSpinner(s) that takes time ranges from the user.<br/><br/>From there I
> am able to retrieve the the int values of all the time fields (all
> hours and minutes values of ETP, LTP, and all the days).<br/><br/> Now
> my idea is store those values in ArrayList(s) and loop through those
> values and compare them against each other to come-up with the vacant
> time schedule.<br/><br/> The
> store-all-mins-and-hours-then-loop-through-them was my first idea of
> approach -- I'd be glad to provide you guys with my algorithm for
> comparing these values but I simply do not have any as of the
> moment.<br />
>
> I think the 4-user requirement made this project quite a task for me
> to handle on my own.<br/> It would be great to hear from you guys.
> Thanks! | java | swing | date | time | timer | 08/15/2011 15:27:07 | not a real question | Get common free time based on busy times Inputted by user
===
I am working on this Java swing-based project wherein the user can enter their weekly schedules as seen below. The input must take the schedule that represents their busy times. Program must also ask for the ff. inputs:<br/>
.....a. Name of User<br/>
.....b. Earliest Time Possible to arrive at school (ETP)<br/>
.....c. Latest Time Possible to arrive at school (LTP)<br/>
> _Name_ : __Jesse__<br/>
> _ETP_ : 8:00am<br/>
> _LTP_ : 8:00pm<br/>
>
> _Monday_ : ........9:40am to 2:30pm<br/>
> _Tuesday_ : .......8:00am to 9:30am<br/>
> _Wednesday_ : ..2:00pm to 4:00pm<br/>
> _Thursday_ : ......9:40am to 2:30pm<br/>
> _Friday_ : ...........1:00pm to 4:10pm<br/>
> _Saturday_ : .......free all day
.
> _Name_ : __Les__<br/>
> _ETP_ : 9:00am<br/>
> _LTP_ : 10:00pm<br/>
> _Monday_ : .........2:40pm to 4:10pm<br/>
> _Tuesday_ : ........4:10pm to 5:50pm<br/>
> _Wednesday_ : ...free all day<br/>
> _Thursday_ : .......1:00pm to 2:30pm<br/>
> _Friday_ : ............4:10pm to 5:50pm<br />
> _Saturday_ : ........9:00am to 12:00pm
==========================================================
> The Program creates a detailed schedule of their common free
> time.<br/> The following are the list of computations that the program
> must do:<br/> .....a. Summarize the time periods that are available.<br />
> .....b. Round __up__ to either --:30 or --:00 periods.<br /> .....c. Calculate
> the duration (in hours and minutes).<br />
===========================================================
Output:
> **Free Time for Jesse and Les**
>
> ..................._Day_............................_Time_............................._Duration_<br/><br/>
> ................_Monday_.............9:00am to
> 9:30am...................(30 mins)<br/>
> ..........................................4:30pm to
> 8:00pm...........(3 hours and 30 mins)</br><br/><br/>
> ................_Tuesday_............9:30am to 4:00pm...........(6
> hours and 30 mins)<br/><br/> ............._Wednesday_..........9:00am
> to 2:00pm...................(7 hours)<br/>
> ..........................................4:00pm to
> 8:00pm...................(4 hours)<br/><br/>
> ..............._Thursday_............9:00am to
> 9:30am...................(30 mins)<br/>
> ..........................................2:30pm to
> 8:00pm...........(5 hours and 30 mins)<br/><br/>
> ................_Friday_................9:00am to
> 1:00pm...................(4 hours)<br/>
> ..........................................6:00pm to
> 8:00pm...................(1 hours)<br/><br/>
> .............._Saturday_............12:00pm to
> 8:00pm...................(8 hours)<br/><br/>
===========================================================
> *Details to take note of:*
>
> 1. Minimum of 2 persons/users and Maximum of 4
> 2. 12noon is 12pm, 12midnight is 12am
> 3. The program displays the hours in 12-hour format (JSpinners, user-input), but the int values that the code get to retrieved from those components are in 24-hour format.
> 4. No Sundays
> 5. Users need not enter a time range for each day (Which basically means no classes for that day)
===========================================================
> As of now, <br/> <br/> I have the gui in place which make use of
> JSpinner(s) that takes time ranges from the user.<br/><br/>From there I
> am able to retrieve the the int values of all the time fields (all
> hours and minutes values of ETP, LTP, and all the days).<br/><br/> Now
> my idea is store those values in ArrayList(s) and loop through those
> values and compare them against each other to come-up with the vacant
> time schedule.<br/><br/> The
> store-all-mins-and-hours-then-loop-through-them was my first idea of
> approach -- I'd be glad to provide you guys with my algorithm for
> comparing these values but I simply do not have any as of the
> moment.<br />
>
> I think the 4-user requirement made this project quite a task for me
> to handle on my own.<br/> It would be great to hear from you guys.
> Thanks! | 1 |
11,484,591 | 07/14/2012 14:37:19 | 751,902 | 05/13/2011 06:55:53 | 145 | 3 | CMS with rental modules | I want to create a website to rent books. Ive looked at several options (joomla, dotnetnuke, sirefinity and some others) but none seem to have free modules for rentals, specially books. there are some joomla modules for car rental, but those are not commercial. I dont think im the first person on earth thinking about using some CMS for rentals and am wanting to avoid developing such a module. Any pointers? | php | asp.net | content-management-system | null | null | 07/15/2012 08:48:29 | not a real question | CMS with rental modules
===
I want to create a website to rent books. Ive looked at several options (joomla, dotnetnuke, sirefinity and some others) but none seem to have free modules for rentals, specially books. there are some joomla modules for car rental, but those are not commercial. I dont think im the first person on earth thinking about using some CMS for rentals and am wanting to avoid developing such a module. Any pointers? | 1 |
2,610,861 | 04/09/2010 20:57:18 | 16,241 | 09/17/2008 15:38:49 | 2,134 | 92 | New TFS 2010 Features | Does anyone know where I can go to get a list of the new TFS 2010 features.
NOTE: I need **TFS** 2010 features. ***Not*** **Visual Studio** 2010.
My boss is wondering why not just upgrade to Visual Studio 2010 and not worry about updating TFS from 2008 to 2010. (VS2010 is compatable with TFS 2008.)
Any input would be nice. | tfs2010 | features | null | null | null | 10/14/2011 14:52:56 | too localized | New TFS 2010 Features
===
Does anyone know where I can go to get a list of the new TFS 2010 features.
NOTE: I need **TFS** 2010 features. ***Not*** **Visual Studio** 2010.
My boss is wondering why not just upgrade to Visual Studio 2010 and not worry about updating TFS from 2008 to 2010. (VS2010 is compatable with TFS 2008.)
Any input would be nice. | 3 |
2,756,524 | 05/03/2010 06:49:04 | 253,793 | 01/19/2010 07:09:16 | 32 | 5 | Linking jQuery UI to the ASP.NET MVC 2 project | What I am trying to accomplish is using jQuery UI dialog method from my own JavaScript source code file. I have this kind of links in the Site.Master
<script src="/Scripts/jquery-1.4.2.js" type="text/javascript"></script>
<script src="/Scripts/jquery.validate.js" type="text/javascript"></script>
<script src="/Scripts/jquery-ui.js" type="text/javascript"></script>
<script src="/Scripts/Common.js" type="text/javascript"></script>
Common.js is my own helper file. jQuery works fine there, but when I try to call for example:
$(document).ready(function() {
$("#dialog").dialog();
});
I'll get "Microsoft JScript runtime error: Object doesn't support this property or method"
Any ideas why this happens? jQuery Works fine, but jQuery UI doesn't. | jquery | jquery-ui | asp.net-mvc | null | null | null | open | Linking jQuery UI to the ASP.NET MVC 2 project
===
What I am trying to accomplish is using jQuery UI dialog method from my own JavaScript source code file. I have this kind of links in the Site.Master
<script src="/Scripts/jquery-1.4.2.js" type="text/javascript"></script>
<script src="/Scripts/jquery.validate.js" type="text/javascript"></script>
<script src="/Scripts/jquery-ui.js" type="text/javascript"></script>
<script src="/Scripts/Common.js" type="text/javascript"></script>
Common.js is my own helper file. jQuery works fine there, but when I try to call for example:
$(document).ready(function() {
$("#dialog").dialog();
});
I'll get "Microsoft JScript runtime error: Object doesn't support this property or method"
Any ideas why this happens? jQuery Works fine, but jQuery UI doesn't. | 0 |
6,636,712 | 07/09/2011 18:37:01 | 836,973 | 07/09/2011 18:37:01 | 1 | 0 | redirect subdomain to php file with get | How can i redirect subdomain to php file with $_GET using htaccess?
For example
en.domain.com => domain.com/index.php?lang=en
| .htaccess | null | null | null | null | null | open | redirect subdomain to php file with get
===
How can i redirect subdomain to php file with $_GET using htaccess?
For example
en.domain.com => domain.com/index.php?lang=en
| 0 |
8,802,089 | 01/10/2012 10:53:12 | 1,140,622 | 01/10/2012 10:25:24 | 1 | 0 | Iwant java code for find spicific format/value from text file | Iwant java code for find spicific format/value from text file
my text file contain follow the text format.
~KL*1**20*1~NM1*PR*2*BLUE CROSS OF CONNECTICUT*****PI*00060~KL*2*1*21*1~NM1*1P*1*TOM*MATHEW****XX*2865321477~KL*3*2*22*1~TRN*1*163610204*1352091203~NM1*IL*1*CRISS*DONALD~KL*4*3*23*0~NM1*03*1*TOM*JACOB~DMG*D8*19700208~INS*N*34~HI*BK:4168*BF:2859*BF:25060~DTP*291*D8*20100506~EQ*5^32~KL*5*2*22*0~TRN*1*163610204*1352091203~NM1*IL*1*CRISS*DONALD~DMG*D8*19600208~HI*BK:3572*BF:45981~DTP*291*D8*20100506~EQ*5^32~SE*24*324679238
so hear ~kL contains some values like*1**20*1 and other ~kL contains *2*1*21 and other ~kl ...so on
now i want code for find/output for
all ~KL but that containcontains *22
example: ~KL*5*2*22*0
| java | null | null | null | null | 01/10/2012 17:13:05 | not a real question | Iwant java code for find spicific format/value from text file
===
Iwant java code for find spicific format/value from text file
my text file contain follow the text format.
~KL*1**20*1~NM1*PR*2*BLUE CROSS OF CONNECTICUT*****PI*00060~KL*2*1*21*1~NM1*1P*1*TOM*MATHEW****XX*2865321477~KL*3*2*22*1~TRN*1*163610204*1352091203~NM1*IL*1*CRISS*DONALD~KL*4*3*23*0~NM1*03*1*TOM*JACOB~DMG*D8*19700208~INS*N*34~HI*BK:4168*BF:2859*BF:25060~DTP*291*D8*20100506~EQ*5^32~KL*5*2*22*0~TRN*1*163610204*1352091203~NM1*IL*1*CRISS*DONALD~DMG*D8*19600208~HI*BK:3572*BF:45981~DTP*291*D8*20100506~EQ*5^32~SE*24*324679238
so hear ~kL contains some values like*1**20*1 and other ~kL contains *2*1*21 and other ~kl ...so on
now i want code for find/output for
all ~KL but that containcontains *22
example: ~KL*5*2*22*0
| 1 |
11,111,240 | 06/20/2012 00:17:01 | 468,807 | 10/07/2010 07:26:20 | 66 | 2 | foreach over array and get values with php | using jquery's .post i send do my php code an object that with `var_dump` i get this result:
array(6) {
[0]=>
array(1) {
["00176 "]=>
string(1) "2"
}
[1]=>
array(1) {
["00171 "]=>
string(1) "5"
}
[2]=>
array(1) {
["00173 "]=>
string(1) "1"
}
[3]=>
array(1) {
["00177 "]=>
string(1) "4"
}
[4]=>
array(1) {
["00183 "]=>
string(1) "2"
}
[5]=>
array(1) {
["00149 "]=>
string(1) "1"
}
}
how can i get values from this array? i would like to
foreach{
echo $key . '__ ' . $value //would give for [0]: '00176 __ 2'
}
how can i achieve that? | php | arrays | null | null | null | 06/20/2012 12:06:37 | not a real question | foreach over array and get values with php
===
using jquery's .post i send do my php code an object that with `var_dump` i get this result:
array(6) {
[0]=>
array(1) {
["00176 "]=>
string(1) "2"
}
[1]=>
array(1) {
["00171 "]=>
string(1) "5"
}
[2]=>
array(1) {
["00173 "]=>
string(1) "1"
}
[3]=>
array(1) {
["00177 "]=>
string(1) "4"
}
[4]=>
array(1) {
["00183 "]=>
string(1) "2"
}
[5]=>
array(1) {
["00149 "]=>
string(1) "1"
}
}
how can i get values from this array? i would like to
foreach{
echo $key . '__ ' . $value //would give for [0]: '00176 __ 2'
}
how can i achieve that? | 1 |
1,893,866 | 12/12/2009 16:17:44 | 174,349 | 09/16/2009 13:43:11 | 77 | 10 | null object reference in master pages | I have some controls inside my master page, and i want to acces them from its related c# clas..
For instance i have:
<asp:DropDownList ID="ddlSearch" runat="server"
onselectedindexchanged="ddlSearch_SelectedIndexChanged"
AutoPostBack="True">
</asp:DropDownList>
and i can acces it when writing code, so "it sees its properties ok".
But at runtime i received
> Object reference not set to an instance of an object.
Do u know why?
I also tried to find it like:
ContentPlaceHolder mpContentPlaceHolder =
(ContentPlaceHolder)Master.FindControl("ContentHead");
if (mpContentPlaceHolder != null)
{
DropDownList ddlSearch =
(DropDownList)mpContentPlaceHolder.FindControl("ddlSearch");
if (!Page.IsPostBack)
utils.fillDDLSearch(ddlSearch);
}
but now it gives null to the Master....which is really strange...
Does anybody know the problem?
| asp.net | null | null | null | null | null | open | null object reference in master pages
===
I have some controls inside my master page, and i want to acces them from its related c# clas..
For instance i have:
<asp:DropDownList ID="ddlSearch" runat="server"
onselectedindexchanged="ddlSearch_SelectedIndexChanged"
AutoPostBack="True">
</asp:DropDownList>
and i can acces it when writing code, so "it sees its properties ok".
But at runtime i received
> Object reference not set to an instance of an object.
Do u know why?
I also tried to find it like:
ContentPlaceHolder mpContentPlaceHolder =
(ContentPlaceHolder)Master.FindControl("ContentHead");
if (mpContentPlaceHolder != null)
{
DropDownList ddlSearch =
(DropDownList)mpContentPlaceHolder.FindControl("ddlSearch");
if (!Page.IsPostBack)
utils.fillDDLSearch(ddlSearch);
}
but now it gives null to the Master....which is really strange...
Does anybody know the problem?
| 0 |
10,691,478 | 05/21/2012 19:37:13 | 1,404,986 | 05/19/2012 11:10:22 | 1 | 0 | genetic algorithm objective function | Is any one familiar with this objective function.
I did not understood the concept.
If any one seen this type of objective function please help me it will be a great help.
f = ∑ Wk ek ( k = 1,2 .. 6 ) | java | homework | genetic-algorithm | null | null | 05/22/2012 08:38:02 | off topic | genetic algorithm objective function
===
Is any one familiar with this objective function.
I did not understood the concept.
If any one seen this type of objective function please help me it will be a great help.
f = ∑ Wk ek ( k = 1,2 .. 6 ) | 2 |
3,520,859 | 08/19/2010 10:30:52 | 126,998 | 06/22/2009 15:05:19 | 2,211 | 118 | trapping and logging "bugfoot" javascript exceptions in a meaningful way | We have had some reports of problems with our checkout whereby customers get js exceptions (we assume) so they cannot checkout.
No matter how many testbenches we use, we have failed to recreate the issues but that's the point of the exercise.
I have setup a simple error trapping function which works based around:
window.onerror = function(message, url, line, chr) {
new Request({
url: "/errorTrap.php",
data: {
m: message,
u: url,
l: line,
c: chr
},
method: "get",
onComplete: function() {
// perhaps save the rendered html source via a second POST request?
alert("done");
}
}).send();
return true;
};
Sure enough, in a single week I have now received 8 emails of trapped exceptions.
Regretfully, the checkout page is very dynamic. It contains SOME inline javascript, a lot of it is external .js files and classes and some is evaluated js through ajax responses. The length of the page differs dependent on items in the shopping basket, shipping options, address book info and so forth.
This is why seeing an exception 'Object expected' on line 253 means very little as it does not help me understand which function has triggered the exception or supply the context of the script block / source code that goes with it.
I have been thinking of doing a second XHR request that can drop the innerHTML of document.body to a ajax handler and thus supply a relative line numbering and content that may have caused the problem.
Is this the only improvement in tracing I can do? Are there any solutions for this "out there"?
Here is the jsfiddle that demos the exception handling http://www.jsfiddle.net/dimitar/8hqrY/ | javascript | exception-handling | null | null | null | null | open | trapping and logging "bugfoot" javascript exceptions in a meaningful way
===
We have had some reports of problems with our checkout whereby customers get js exceptions (we assume) so they cannot checkout.
No matter how many testbenches we use, we have failed to recreate the issues but that's the point of the exercise.
I have setup a simple error trapping function which works based around:
window.onerror = function(message, url, line, chr) {
new Request({
url: "/errorTrap.php",
data: {
m: message,
u: url,
l: line,
c: chr
},
method: "get",
onComplete: function() {
// perhaps save the rendered html source via a second POST request?
alert("done");
}
}).send();
return true;
};
Sure enough, in a single week I have now received 8 emails of trapped exceptions.
Regretfully, the checkout page is very dynamic. It contains SOME inline javascript, a lot of it is external .js files and classes and some is evaluated js through ajax responses. The length of the page differs dependent on items in the shopping basket, shipping options, address book info and so forth.
This is why seeing an exception 'Object expected' on line 253 means very little as it does not help me understand which function has triggered the exception or supply the context of the script block / source code that goes with it.
I have been thinking of doing a second XHR request that can drop the innerHTML of document.body to a ajax handler and thus supply a relative line numbering and content that may have caused the problem.
Is this the only improvement in tracing I can do? Are there any solutions for this "out there"?
Here is the jsfiddle that demos the exception handling http://www.jsfiddle.net/dimitar/8hqrY/ | 0 |
4,290,032 | 11/27/2010 03:49:42 | 521,987 | 11/27/2010 03:49:42 | 1 | 0 | c++ rational class program | // it gives me an error saying there is no default constructor
i tried fixing it
class object=class();
but still didnt fix....
can someone fix it for me plz thanks alot
#include <iostream>
using namespace std;
// Class Definitions
class RationalNumber
{
public:
RationalNumber(int, int, int, int);
RationalNumber operator+(RationalNumber);
RationalNumber operator-(RationalNumber);
RationalNumber operator*(RationalNumber);
RationalNumber operator/(RationalNumber);
RationalNumber operator<(RationalNumber);
RationalNumber operator>(RationalNumber);
RationalNumber operator<=(RationalNumber);
RationalNumber operator>=(RationalNumber);
RationalNumber operator==(RationalNumber);
RationalNumber operator!=(RationalNumber);
private:
int numerator;
int denominator;
int numerator2;
int denominator2;
}; // end RationalNumber class
// RationalNumber class member-function definitions
RationalNumber::RationalNumber(int num, int denom, int num2, int denom2)
{
numerator = num;
denominator = denom;
numerator2 = num2;
denominator2 = denom2;
//for first fraction
if (denominator == 0 || denominator < 0)
cout << "ERROR:Denominator can not be zero or less than zero." << "\n";
else
//Reduces the fraction to lowest terms.
{
int i = numerator > denominator ? numerator : denominator;
while(i > 1)
{
if(numerator % i == 0 && denominator % i == 0)
{
numerator /= i;
denominator /= i;
}
--i;
}
}
cout << "Simplified fraction one is: " << numerator << " / "
<< denominator << "\n";
//For second fraction
if (denominator2 == 0 || denominator2 < 0)
cout << "ERROR:Denominator can not be zero or less than zero" << "\n";
else
//Reduces the fraction to lowest terms.
{
int j = numerator2 > denominator2 ? numerator2 : denominator2;
while(j > 1)
{
if(numerator2 % j == 0 && denominator2 % j == 0)
{
numerator2 /= j;
denominator2 /= j;
}
--j;
}
}
cout << "Simplified fraction two is: " << numerator2 << " / "
<< denominator2 << "\n";
}
// addition operator
RationalNumber RationalNumber::operator+(RationalNumber a)
{
RationalNumber temp;
temp.numerator = numerator + a.numerator;
temp.denominator = denominator + a.denominator;
temp.numerator2 = numerator2 + a.numerator2;
temp.denominator2 = denominator2 + a.denominator2;
return temp;
}
// subtraction operator
RationalNumber RationalNumber::operator-(RationalNumber a)
{
RationalNumber temp;
temp.numerator = numerator - a.numerator;
temp.denominator = denominator - a.denominator;
temp.numerator2 = numerator2 - a.numerator2;
temp.denominator2 = denominator2 - a.denominator2;
return temp;
}
// multiplication operator
RationalNumber RationalNumber::operator*(RationalNumber a)
{
RationalNumber temp;
temp.numerator = numerator * a.numerator;
temp.denominator = denominator * a.denominator;
temp.numerator2 = numerator2 * a.numerator2;
temp.denominator2 = denominator2 * a.denominator2;
return temp;
}
// division operator
RationalNumber RationalNumber::operator/(RationalNumber a)
{
RationalNumber temp=RationalNumber();
temp.numerator = numerator / a.numerator;
temp.denominator = denominator / a.denominator;
temp.numerator2 = numerator2 / a.numerator2;
temp.denominator2 = denominator2 / a.denominator2;
return temp;
}
int main()
{
int top;
int bot;
int top2;
int bot2;
cout << "Please enter the Numerator for fraction one: \n";
cin >> top;
cout << "Please enter the Denominator for fraction one: \n";
cin >> bot;
cout << "Please enter the Numerator for fraction two: \n";
cin >> top2;
cout << "Please enter the Denominator for fraction two: \n";
cin >> bot2;
RationalNumber A(top, bot, top2, bot2);
return 0;
}
| c++ | null | null | null | null | null | open | c++ rational class program
===
// it gives me an error saying there is no default constructor
i tried fixing it
class object=class();
but still didnt fix....
can someone fix it for me plz thanks alot
#include <iostream>
using namespace std;
// Class Definitions
class RationalNumber
{
public:
RationalNumber(int, int, int, int);
RationalNumber operator+(RationalNumber);
RationalNumber operator-(RationalNumber);
RationalNumber operator*(RationalNumber);
RationalNumber operator/(RationalNumber);
RationalNumber operator<(RationalNumber);
RationalNumber operator>(RationalNumber);
RationalNumber operator<=(RationalNumber);
RationalNumber operator>=(RationalNumber);
RationalNumber operator==(RationalNumber);
RationalNumber operator!=(RationalNumber);
private:
int numerator;
int denominator;
int numerator2;
int denominator2;
}; // end RationalNumber class
// RationalNumber class member-function definitions
RationalNumber::RationalNumber(int num, int denom, int num2, int denom2)
{
numerator = num;
denominator = denom;
numerator2 = num2;
denominator2 = denom2;
//for first fraction
if (denominator == 0 || denominator < 0)
cout << "ERROR:Denominator can not be zero or less than zero." << "\n";
else
//Reduces the fraction to lowest terms.
{
int i = numerator > denominator ? numerator : denominator;
while(i > 1)
{
if(numerator % i == 0 && denominator % i == 0)
{
numerator /= i;
denominator /= i;
}
--i;
}
}
cout << "Simplified fraction one is: " << numerator << " / "
<< denominator << "\n";
//For second fraction
if (denominator2 == 0 || denominator2 < 0)
cout << "ERROR:Denominator can not be zero or less than zero" << "\n";
else
//Reduces the fraction to lowest terms.
{
int j = numerator2 > denominator2 ? numerator2 : denominator2;
while(j > 1)
{
if(numerator2 % j == 0 && denominator2 % j == 0)
{
numerator2 /= j;
denominator2 /= j;
}
--j;
}
}
cout << "Simplified fraction two is: " << numerator2 << " / "
<< denominator2 << "\n";
}
// addition operator
RationalNumber RationalNumber::operator+(RationalNumber a)
{
RationalNumber temp;
temp.numerator = numerator + a.numerator;
temp.denominator = denominator + a.denominator;
temp.numerator2 = numerator2 + a.numerator2;
temp.denominator2 = denominator2 + a.denominator2;
return temp;
}
// subtraction operator
RationalNumber RationalNumber::operator-(RationalNumber a)
{
RationalNumber temp;
temp.numerator = numerator - a.numerator;
temp.denominator = denominator - a.denominator;
temp.numerator2 = numerator2 - a.numerator2;
temp.denominator2 = denominator2 - a.denominator2;
return temp;
}
// multiplication operator
RationalNumber RationalNumber::operator*(RationalNumber a)
{
RationalNumber temp;
temp.numerator = numerator * a.numerator;
temp.denominator = denominator * a.denominator;
temp.numerator2 = numerator2 * a.numerator2;
temp.denominator2 = denominator2 * a.denominator2;
return temp;
}
// division operator
RationalNumber RationalNumber::operator/(RationalNumber a)
{
RationalNumber temp=RationalNumber();
temp.numerator = numerator / a.numerator;
temp.denominator = denominator / a.denominator;
temp.numerator2 = numerator2 / a.numerator2;
temp.denominator2 = denominator2 / a.denominator2;
return temp;
}
int main()
{
int top;
int bot;
int top2;
int bot2;
cout << "Please enter the Numerator for fraction one: \n";
cin >> top;
cout << "Please enter the Denominator for fraction one: \n";
cin >> bot;
cout << "Please enter the Numerator for fraction two: \n";
cin >> top2;
cout << "Please enter the Denominator for fraction two: \n";
cin >> bot2;
RationalNumber A(top, bot, top2, bot2);
return 0;
}
| 0 |
2,747,009 | 04/30/2010 19:12:00 | 329,820 | 04/30/2010 14:30:44 | 16 | 0 | what's wrong with this code? | this is my code which will not work correctly ! what is wrong with its data type :( thanks
CREATE TABLE T1 (A INTEGER NOT NULL);
CREATE TABLE T3 (A SMALLINT NOT NULL);
INSERT T1 VALUES (32768.5);
SELECT * FROM T1;
INSERT T3 SELECT * FROM T1;
SELECT * FROM T3; | database | mysql | null | null | null | 09/03/2011 01:44:39 | too localized | what's wrong with this code?
===
this is my code which will not work correctly ! what is wrong with its data type :( thanks
CREATE TABLE T1 (A INTEGER NOT NULL);
CREATE TABLE T3 (A SMALLINT NOT NULL);
INSERT T1 VALUES (32768.5);
SELECT * FROM T1;
INSERT T3 SELECT * FROM T1;
SELECT * FROM T3; | 3 |
5,267,854 | 03/11/2011 00:58:35 | 64,718 | 02/10/2009 19:18:36 | 177 | 9 | WPF ListBox ItemsSource with DataTemplate | I have a ListBox with an ItemsSource pointing to a static variable, and a DataTemplate for the ListBox's ItemTemplate that should be displaying the Description property of the variable the ItemsSource points to
<ListBox x:Name="classificationTypeListBox"
ItemsSource="{x:Static h:AmbientHighlightingStyleRegistry.Instance}"
SelectedIndex="0" Foreground="Black">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=(Description)}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
I can put a break point on my application and view the ListBox. The ItemsSource does point to the variable I want and it looks like the ListBox is trying to display all the values because I can click and scroll down the it. However, no text is getting displayed so you can't actually tell what you're clicking. Also, while the break point is on, it says that the list box contains 0 items, maybe it should because I'm binding it, not sure. Any suggestions? | wpf | listbox | datatemplate | itemssource | null | null | open | WPF ListBox ItemsSource with DataTemplate
===
I have a ListBox with an ItemsSource pointing to a static variable, and a DataTemplate for the ListBox's ItemTemplate that should be displaying the Description property of the variable the ItemsSource points to
<ListBox x:Name="classificationTypeListBox"
ItemsSource="{x:Static h:AmbientHighlightingStyleRegistry.Instance}"
SelectedIndex="0" Foreground="Black">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=(Description)}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
I can put a break point on my application and view the ListBox. The ItemsSource does point to the variable I want and it looks like the ListBox is trying to display all the values because I can click and scroll down the it. However, no text is getting displayed so you can't actually tell what you're clicking. Also, while the break point is on, it says that the list box contains 0 items, maybe it should because I'm binding it, not sure. Any suggestions? | 0 |
8,825,430 | 01/11/2012 19:28:56 | 815,150 | 06/25/2011 08:43:38 | 67 | 1 | How do you leave a team when a member of multiple teams on iPhone Developer Program | I'm a member of multiple developer teams on my iPhone developer account, some of them are old contracting arrangements that are no longer relevant. I haven't been kicked off, and I can't find a way to leave. How do you quit a team? | iphone | team | iphone-developer-program | quit | null | 01/12/2012 02:51:25 | off topic | How do you leave a team when a member of multiple teams on iPhone Developer Program
===
I'm a member of multiple developer teams on my iPhone developer account, some of them are old contracting arrangements that are no longer relevant. I haven't been kicked off, and I can't find a way to leave. How do you quit a team? | 2 |
7,173,845 | 08/24/2011 10:19:46 | 496,934 | 11/04/2010 08:35:25 | 199 | 2 | Question on expect perl | I am new in expect perl programming and have to write some scripts to automate some tasks. Basically I need to telnet to a unix machine, issue some unix commands and check some outputs.
I have written a small script to telnet but I have a doubt on how to check the status of the unix commands.
#!/usr/bin/perl
use Expect;
$timeout=10;
my $exp = Expect->spawn("telnet test-b -l regress")
or die "Cannot spawn telnet: $!\n";;
my $spawn_ok;
$foo1=$exp->expect($timeout, 'Password:');
print "######Received Password prompt\n";
$exp->send("MaRtInI\n");
print "######Sent password\n";
$foo1=$exp->expect($timeout, '%');
print "######Received root prompt\n";
$exp->send("cd /var/tmp");
I have doubt here on how to check whether the cd command is actually successful, because instead of cd /var/tmp if I give cd /var/temp12 (which does-not exist), I am seeing the same result. How can I check whether to unix command which I have sent through cd is actually successful ? | perl | expect | null | null | null | null | open | Question on expect perl
===
I am new in expect perl programming and have to write some scripts to automate some tasks. Basically I need to telnet to a unix machine, issue some unix commands and check some outputs.
I have written a small script to telnet but I have a doubt on how to check the status of the unix commands.
#!/usr/bin/perl
use Expect;
$timeout=10;
my $exp = Expect->spawn("telnet test-b -l regress")
or die "Cannot spawn telnet: $!\n";;
my $spawn_ok;
$foo1=$exp->expect($timeout, 'Password:');
print "######Received Password prompt\n";
$exp->send("MaRtInI\n");
print "######Sent password\n";
$foo1=$exp->expect($timeout, '%');
print "######Received root prompt\n";
$exp->send("cd /var/tmp");
I have doubt here on how to check whether the cd command is actually successful, because instead of cd /var/tmp if I give cd /var/temp12 (which does-not exist), I am seeing the same result. How can I check whether to unix command which I have sent through cd is actually successful ? | 0 |
8,231,059 | 11/22/2011 17:30:23 | 1,054,435 | 11/18/2011 18:51:04 | 1 | 0 | android can't find class from external jar | I am trying to create a simple test app that basically extends the Android Hello World tutorial app by invoking some simple functionality from an external JAR. However, when I run the app, it can't find the class from the JAR. What am I doing wrong?
Here's entire source of the JAR:
package com.mytests.pow;
public class power2 {
private double d;
public power2()
{
d = 0.0;
}
public String stp2(double dd)
{
d = dd*dd;
return String.format("%e", d);
}
}
And here's the "Hello World ++" source:
package com.myLuceneTests.namespace;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import com.mytests.pow.*;
public class AndroidSimpleSIH_EclipseActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
power2 pp = new power2();
String iout = pp.stp2(12.0);
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText(iout);
setContentView(tv);
}
}
When I run the app, I get this in logcat:
11-22 12:24:52.697 2963 2963 E dalvikvm: Could not find class 'com.mytests.pow.power2', referenced from method com.myLuceneTests.namespace
.AndroidSimpleSIH_EclipseActivity.onCreate
and then
11-22 12:24:52.713 2963 2963 E AndroidRuntime: java.lang.NoClassDefFoundError: com.mytests.pow.power2
What am I doing wrong? Thanks!
By the way, my actual goal is to use a real JAR (rather than this toy one) in an Android app. I might have access to the code for that JAR and might be able to rebuild it but it's a big piece of Java code and I am likely to encounter problems when rebuilding it so I am trying to use the pre-built JAR.
| android | jar | external | null | null | null | open | android can't find class from external jar
===
I am trying to create a simple test app that basically extends the Android Hello World tutorial app by invoking some simple functionality from an external JAR. However, when I run the app, it can't find the class from the JAR. What am I doing wrong?
Here's entire source of the JAR:
package com.mytests.pow;
public class power2 {
private double d;
public power2()
{
d = 0.0;
}
public String stp2(double dd)
{
d = dd*dd;
return String.format("%e", d);
}
}
And here's the "Hello World ++" source:
package com.myLuceneTests.namespace;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import com.mytests.pow.*;
public class AndroidSimpleSIH_EclipseActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
power2 pp = new power2();
String iout = pp.stp2(12.0);
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText(iout);
setContentView(tv);
}
}
When I run the app, I get this in logcat:
11-22 12:24:52.697 2963 2963 E dalvikvm: Could not find class 'com.mytests.pow.power2', referenced from method com.myLuceneTests.namespace
.AndroidSimpleSIH_EclipseActivity.onCreate
and then
11-22 12:24:52.713 2963 2963 E AndroidRuntime: java.lang.NoClassDefFoundError: com.mytests.pow.power2
What am I doing wrong? Thanks!
By the way, my actual goal is to use a real JAR (rather than this toy one) in an Android app. I might have access to the code for that JAR and might be able to rebuild it but it's a big piece of Java code and I am likely to encounter problems when rebuilding it so I am trying to use the pre-built JAR.
| 0 |
6,315,566 | 06/11/2011 11:16:50 | 51,167 | 01/03/2009 15:30:00 | 2,419 | 129 | should I eliminate TCHAR from Windows code? | I am revising some very old (10 years) C code. The code compiles on Unix/Mac with GCC and cross-compiles for Windows with MinGW. Currently there are TCHAR strings throughout. I'd like to get rid of the TCHAR and use a C++ string instead. Is it still necessary to use the Windows wide functions, or can I do everything now with Unicode and UTF-8?
| unicode | tchar | null | null | null | null | open | should I eliminate TCHAR from Windows code?
===
I am revising some very old (10 years) C code. The code compiles on Unix/Mac with GCC and cross-compiles for Windows with MinGW. Currently there are TCHAR strings throughout. I'd like to get rid of the TCHAR and use a C++ string instead. Is it still necessary to use the Windows wide functions, or can I do everything now with Unicode and UTF-8?
| 0 |
10,954,994 | 06/08/2012 19:31:01 | 237,109 | 12/22/2009 19:18:34 | 1,748 | 139 | SQL: Specified cast is not valid | I have a program that is connected to a sql 2008 database and I have inline sql that runs that has ints and strings returned and it works fine. But I have been asked to switch to a 2000 database and now everything is coming back as a string and I am getting a specified cast is not valid from C# where when I am connected to sql 2008 it does not say this. This is a inline sql statement so the sql statement is not changing and the table schema of the database is the same. Its doing this on int primary keys Anyone have any ideas ? | c# | sql | null | null | null | null | open | SQL: Specified cast is not valid
===
I have a program that is connected to a sql 2008 database and I have inline sql that runs that has ints and strings returned and it works fine. But I have been asked to switch to a 2000 database and now everything is coming back as a string and I am getting a specified cast is not valid from C# where when I am connected to sql 2008 it does not say this. This is a inline sql statement so the sql statement is not changing and the table schema of the database is the same. Its doing this on int primary keys Anyone have any ideas ? | 0 |
8,229,104 | 11/22/2011 15:14:17 | 804,969 | 06/19/2011 00:28:22 | 57 | 2 | CSS - no scrollbars in ipad | I have a stylesheet and use overflow:scroll; in my css to blend in scrollbars. It works in Firefox but not on my iPad in the safari browser. There, no scrollbars are shown but it is possible to scroll with two fingers.
Now, is that normal that iPad doesn't show scrollbars? That would be stupid somehow.
Thanks in advance,
enne | css | null | null | null | null | null | open | CSS - no scrollbars in ipad
===
I have a stylesheet and use overflow:scroll; in my css to blend in scrollbars. It works in Firefox but not on my iPad in the safari browser. There, no scrollbars are shown but it is possible to scroll with two fingers.
Now, is that normal that iPad doesn't show scrollbars? That would be stupid somehow.
Thanks in advance,
enne | 0 |
11,204,751 | 06/26/2012 09:51:25 | 465,752 | 10/04/2010 10:17:48 | 35 | 1 | How to get last 3 records from table | I have a table with next fields:
uid, message, created
and some records like
uid message created
1 text1 1305244929
2 text2 1305244930
3 text3 1305244931
1 text4 1305244932
1 text5 1305244933
3 text6 1305244934
2 text7 1305244945
1 text8 1305244956
3 text9 1305244947
1 text10 1305244948
2 text11 1305244967
1 text12 1305244968
3 text13 1305244969
1 text14 1305244970
2 text15 1305244971
3 text16 1305244972
3 text17 1305244973
How to get last 3 records for each uid ordered DESC by created
| mysql | null | null | null | null | null | open | How to get last 3 records from table
===
I have a table with next fields:
uid, message, created
and some records like
uid message created
1 text1 1305244929
2 text2 1305244930
3 text3 1305244931
1 text4 1305244932
1 text5 1305244933
3 text6 1305244934
2 text7 1305244945
1 text8 1305244956
3 text9 1305244947
1 text10 1305244948
2 text11 1305244967
1 text12 1305244968
3 text13 1305244969
1 text14 1305244970
2 text15 1305244971
3 text16 1305244972
3 text17 1305244973
How to get last 3 records for each uid ordered DESC by created
| 0 |
11,712,993 | 07/29/2012 21:11:17 | 1,354,514 | 04/24/2012 18:43:08 | 68 | 1 | where can I get a simple singly linked list implementation with example in javascript? | I just want to be able to add elements, enumerate the list and delete elements. | javascript | html | null | null | null | 07/29/2012 21:14:32 | not constructive | where can I get a simple singly linked list implementation with example in javascript?
===
I just want to be able to add elements, enumerate the list and delete elements. | 4 |
7,933,234 | 10/28/2011 18:20:44 | 982,442 | 10/06/2011 15:10:04 | 1 | 0 | X-Cart Payment Gateway development | someone has information on how to develop Payment Gateways on X-Cart?
| php | x-cart | null | null | null | 11/11/2011 10:55:37 | not a real question | X-Cart Payment Gateway development
===
someone has information on how to develop Payment Gateways on X-Cart?
| 1 |
11,600,718 | 07/22/2012 13:36:17 | 1,152,500 | 01/16/2012 19:01:59 | 125 | 2 | spring junit testing with JMock | I have a Spring maven project and we are going to use JMock to test service/business/DAO layers of my project as suggested by client.
Can somebody please provide me the good link going through which I can understand and implement it?
Also I have heard of other mocking frameworks like Mockito or EasyMock. Is JMock better than those? or Which one is better to use even? This is just for knowledge sake as I will be using JMock only since it is suggested by the client | spring | junit | mocking | jmock | null | 07/22/2012 15:06:24 | not constructive | spring junit testing with JMock
===
I have a Spring maven project and we are going to use JMock to test service/business/DAO layers of my project as suggested by client.
Can somebody please provide me the good link going through which I can understand and implement it?
Also I have heard of other mocking frameworks like Mockito or EasyMock. Is JMock better than those? or Which one is better to use even? This is just for knowledge sake as I will be using JMock only since it is suggested by the client | 4 |
10,045,460 | 04/06/2012 15:16:57 | 121,176 | 06/11/2009 08:56:37 | 25 | 4 | mongoid where on has_many association | Since mongo isn't relational I'm wondering how to find a particular type on a has_many polymorphic association.
I have 3 models, [Place, City, & Country] all 3 can have reviews (polymorphic)
How can I return all reviews with a particular model association? I know how to do it on a simple has_many association but not on a polymorphic one?
Normally I would do something like this:
@user = User.where(username: params[:user]).first
@user ? @reviews = @reviews.where(user_id: @user.id) : @reviews = nil
But for a polymorphic association I'm lost?
#@reviews = params[:review_type].constantize if params[:review_type].present? #@reviews.reviewable.where(review_type: params[:review_type])
@reviews = Review.order_by([:updated_at, :desc]).page(params[:page])#.order(sort_column + " " + sort_direction)
| ruby-on-rails | ruby-on-rails-3 | mongodb | mongoid | polymorphic-associations | null | open | mongoid where on has_many association
===
Since mongo isn't relational I'm wondering how to find a particular type on a has_many polymorphic association.
I have 3 models, [Place, City, & Country] all 3 can have reviews (polymorphic)
How can I return all reviews with a particular model association? I know how to do it on a simple has_many association but not on a polymorphic one?
Normally I would do something like this:
@user = User.where(username: params[:user]).first
@user ? @reviews = @reviews.where(user_id: @user.id) : @reviews = nil
But for a polymorphic association I'm lost?
#@reviews = params[:review_type].constantize if params[:review_type].present? #@reviews.reviewable.where(review_type: params[:review_type])
@reviews = Review.order_by([:updated_at, :desc]).page(params[:page])#.order(sort_column + " " + sort_direction)
| 0 |
5,997,286 | 05/13/2011 20:16:09 | 598,531 | 02/01/2011 14:29:19 | 138 | 14 | If an iPhone is secure enough for enterprise use, while is it so easy to jailbreak? | I have a client that is considering making iPhones a huge part of his organization but was worried about how secure it was. I've [read][1] a lot about the security features possible on the iPhone and I'm wondering, if after setting in place all these features, can an iPhone still just as easily be jailbroken? Is there anyway of preventing an iPhone from being jailbroken?
[1]: http://images.apple.com/iphone/business/docs/iPhone_Security.pdf | iphone | security | null | null | null | 05/13/2011 20:27:10 | off topic | If an iPhone is secure enough for enterprise use, while is it so easy to jailbreak?
===
I have a client that is considering making iPhones a huge part of his organization but was worried about how secure it was. I've [read][1] a lot about the security features possible on the iPhone and I'm wondering, if after setting in place all these features, can an iPhone still just as easily be jailbroken? Is there anyway of preventing an iPhone from being jailbroken?
[1]: http://images.apple.com/iphone/business/docs/iPhone_Security.pdf | 2 |
2,929,772 | 05/28/2010 14:15:58 | 208,827 | 11/11/2009 16:28:55 | 744 | 1 | Grouping content by category - Drupal | is there a good way of grouping content up by category.
I wish I could have a CCK category field. | drupal | content-type | drupal-views | cck | category | null | open | Grouping content by category - Drupal
===
is there a good way of grouping content up by category.
I wish I could have a CCK category field. | 0 |
4,964,887 | 02/11/2011 01:55:35 | 263,004 | 01/31/2010 17:46:21 | 10,363 | 394 | Why doesn't C# have package private? | I'm learning C# and coming from a Java world, I was a little confused to see that C# doesn't have a "package private". Most comments I've seen regarding this amount to "You cannot do it; the language wasn't designed this way". I also saw some workarounds that involve `internal` and `partial` along with comments that said these workarounds go against the language's design.
Why was C# designed this way? Also, how would I do something like the following: I have a `Product` class and a `ProductInstance` class. The only way I want a `ProductInstance` to be created is via a factory method in the `ProductClass`. In Java, I would put `ProductInstance` in the same package as `Product`, but make its constructor `package private` so that only `Product` would have access to it. This way, anyone who wants to create a `ProductInstance` can only do so via the factory method in the `Product` class. How would I accomplish the same thing in C#? | c# | java | package-private | null | null | null | open | Why doesn't C# have package private?
===
I'm learning C# and coming from a Java world, I was a little confused to see that C# doesn't have a "package private". Most comments I've seen regarding this amount to "You cannot do it; the language wasn't designed this way". I also saw some workarounds that involve `internal` and `partial` along with comments that said these workarounds go against the language's design.
Why was C# designed this way? Also, how would I do something like the following: I have a `Product` class and a `ProductInstance` class. The only way I want a `ProductInstance` to be created is via a factory method in the `ProductClass`. In Java, I would put `ProductInstance` in the same package as `Product`, but make its constructor `package private` so that only `Product` would have access to it. This way, anyone who wants to create a `ProductInstance` can only do so via the factory method in the `Product` class. How would I accomplish the same thing in C#? | 0 |
8,117,522 | 11/14/2011 04:59:58 | 995,394 | 10/14/2011 12:27:42 | 36 | 2 | Can I redo/undo in ipython shell? | A feature in bpython called rewind.
Is there some similar key binds? | python | shell | ipython | null | null | 11/14/2011 15:37:35 | not a real question | Can I redo/undo in ipython shell?
===
A feature in bpython called rewind.
Is there some similar key binds? | 1 |
1,896,080 | 12/13/2009 10:14:37 | 24,218 | 10/01/2008 16:53:04 | 120 | 8 | Select first element that doesn't have a specific class | I want to write a selector that targets the first element that doesn't have a specific class.
<ul>
<li class="someClass">item 1</li>
<li>item 2</li> <-- I want to select this
<li class="someClass">item 3</li>
<li>item 4</li>
</ul>
I know how to select all elements that doesn't have "someClass":
$('li not:(.someClass)').dostuff();
But I don't know how to only select the first element that doesn't have "someClass".
Anyone knows how to do this? | jquery | javascript | null | null | null | null | open | Select first element that doesn't have a specific class
===
I want to write a selector that targets the first element that doesn't have a specific class.
<ul>
<li class="someClass">item 1</li>
<li>item 2</li> <-- I want to select this
<li class="someClass">item 3</li>
<li>item 4</li>
</ul>
I know how to select all elements that doesn't have "someClass":
$('li not:(.someClass)').dostuff();
But I don't know how to only select the first element that doesn't have "someClass".
Anyone knows how to do this? | 0 |
5,886,244 | 05/04/2011 15:51:03 | 738,151 | 05/04/2011 13:59:21 | 1 | 0 | Android: Resizing custom views. Parent is resized but width/height changes not passed down to child view | This is my first post on SO. I don't normally post on Q and A sites as I find with enough digging I get my answer but this problem is providing me with a fair amount of trouble.
I am currently trying to make a game based on the old school battleship board game using android. I am kinda just messing around at the moment trying to get a feel for it and for the components that I may need to make the game.
Basically what I have at the moment in my layout xml file is the following:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<org.greene.battleship.BoardView
android:id="@+id/board_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<org.greene.battleship.ShipView
android:id="@+id/ships_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true" />
</RelativeLayout>
</RelativeLayout>
I want the BoardView to only take up a certain portion of the screen i.e. the view should be size of the content that I want to create in this view. Which in this case is a 2D board. This is done by overriding the onMeasure() method from extending View. The view's width is kept the same but the height is given the same value as the width giving a perfect square.
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec){
int parent_width = MeasureSpec.getSize(widthMeasureSpec);
this.setMeasuredDimension(parent_width, parent_width);
Log.d("BOARD_VIEW", "BoardView.onMeasure : width = " + this.getMeasuredWidth() + ", height = "
+ this.getMeasuredHeight());
}
I check to see if the views dimensions have changed by overriding the views onSizeChanged() function and checking the values there.
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh){
Log.d("BOARD_VIEW", "BoardView.onSizeChanged : width = " + w + ", height = " + h);
board = new Board(w, h, game_activity);
super.onSizeChanged(w, h, oldw, oldh);
}
As can be seen from the layout file, I then have a RelativeLayout view group that holds another custom view called ShipView as a child. And ideally what I want to have happen is when I go to measure its dimensions, its dimensions have been confined to what has been set in onMeasure. I check the dimensions of the ShipView via its onMeasure() method in a similar way.
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec){
int parent_width = MeasureSpec.getSize(widthMeasureSpec);
int parent_height = MeasureSpec.getSize(heightMeasureSpec);
Log.d("SHIP_VIEW", "ShipView.onMeasure : width = " + parent_width + ", height = " + parent_height);
this.setMeasuredDimension(parent_width, parent_height);
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
The log files show me the following (the onMeasure() method seems to get called more than once but all the values are the same so I wont bother showing the multiple logs as the values are all the same) :
05-04 16:36:19.428: DEBUG/BOARD_VIEW(405): BoardView.onMeasure : width = 320, height = 320
05-04 16:36:19.939: DEBUG/BOARD_VIEW(405): BoardView.onSizeChanged : width = 320, height = 320
05-04 16:36:20.429: DEBUG/SHIP_VIEW(405): ShipView.onMeasure : width = 320, height = 430
It seems that when I get the dimensions via the ShipViews onMeasure() nothing has changed and ignores the dimension restrictions I have set. I am not sure whether it has something to do with the RelativeLayout of the ShipView. Do I have to set the LayoutParams for that since they have changed? I thought that if you change the views dimension of the parent it would have been passed down to the children.
Whether this is the right way to go about doing this for a game of this sort is definitely up for discussion but either way I would like to know how it can be done (I presume it can..?). Any help would be much appreciated.
Thanks
| android | parent-child | dimensions | custom-view | null | null | open | Android: Resizing custom views. Parent is resized but width/height changes not passed down to child view
===
This is my first post on SO. I don't normally post on Q and A sites as I find with enough digging I get my answer but this problem is providing me with a fair amount of trouble.
I am currently trying to make a game based on the old school battleship board game using android. I am kinda just messing around at the moment trying to get a feel for it and for the components that I may need to make the game.
Basically what I have at the moment in my layout xml file is the following:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<org.greene.battleship.BoardView
android:id="@+id/board_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<org.greene.battleship.ShipView
android:id="@+id/ships_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true" />
</RelativeLayout>
</RelativeLayout>
I want the BoardView to only take up a certain portion of the screen i.e. the view should be size of the content that I want to create in this view. Which in this case is a 2D board. This is done by overriding the onMeasure() method from extending View. The view's width is kept the same but the height is given the same value as the width giving a perfect square.
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec){
int parent_width = MeasureSpec.getSize(widthMeasureSpec);
this.setMeasuredDimension(parent_width, parent_width);
Log.d("BOARD_VIEW", "BoardView.onMeasure : width = " + this.getMeasuredWidth() + ", height = "
+ this.getMeasuredHeight());
}
I check to see if the views dimensions have changed by overriding the views onSizeChanged() function and checking the values there.
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh){
Log.d("BOARD_VIEW", "BoardView.onSizeChanged : width = " + w + ", height = " + h);
board = new Board(w, h, game_activity);
super.onSizeChanged(w, h, oldw, oldh);
}
As can be seen from the layout file, I then have a RelativeLayout view group that holds another custom view called ShipView as a child. And ideally what I want to have happen is when I go to measure its dimensions, its dimensions have been confined to what has been set in onMeasure. I check the dimensions of the ShipView via its onMeasure() method in a similar way.
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec){
int parent_width = MeasureSpec.getSize(widthMeasureSpec);
int parent_height = MeasureSpec.getSize(heightMeasureSpec);
Log.d("SHIP_VIEW", "ShipView.onMeasure : width = " + parent_width + ", height = " + parent_height);
this.setMeasuredDimension(parent_width, parent_height);
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
The log files show me the following (the onMeasure() method seems to get called more than once but all the values are the same so I wont bother showing the multiple logs as the values are all the same) :
05-04 16:36:19.428: DEBUG/BOARD_VIEW(405): BoardView.onMeasure : width = 320, height = 320
05-04 16:36:19.939: DEBUG/BOARD_VIEW(405): BoardView.onSizeChanged : width = 320, height = 320
05-04 16:36:20.429: DEBUG/SHIP_VIEW(405): ShipView.onMeasure : width = 320, height = 430
It seems that when I get the dimensions via the ShipViews onMeasure() nothing has changed and ignores the dimension restrictions I have set. I am not sure whether it has something to do with the RelativeLayout of the ShipView. Do I have to set the LayoutParams for that since they have changed? I thought that if you change the views dimension of the parent it would have been passed down to the children.
Whether this is the right way to go about doing this for a game of this sort is definitely up for discussion but either way I would like to know how it can be done (I presume it can..?). Any help would be much appreciated.
Thanks
| 0 |
1,604,979 | 10/22/2009 04:11:05 | 10,086 | 09/15/2008 21:08:52 | 229 | 14 | Possible issues with upgrading to Snow Leopard / XCode 3.2? | I'm one of a pair of programmers working together on iPhone / iPod applications. I'd like to upgrade to the new version of XCode (3.2) and Snow Leopard, but chances are my partner won't. Can anyone highlight any problems we might have sharing code? Are there incompatibilities between the old and new, or should we be able to share code / projects happily?
Any help / warnings would be appreciated. | iphone | xcode | snow | leopard | null | null | open | Possible issues with upgrading to Snow Leopard / XCode 3.2?
===
I'm one of a pair of programmers working together on iPhone / iPod applications. I'd like to upgrade to the new version of XCode (3.2) and Snow Leopard, but chances are my partner won't. Can anyone highlight any problems we might have sharing code? Are there incompatibilities between the old and new, or should we be able to share code / projects happily?
Any help / warnings would be appreciated. | 0 |
3,642,556 | 09/04/2010 13:52:32 | 439,595 | 09/04/2010 12:11:16 | 8 | 0 | jquery will not work for me! | It's weird! I was working on my CSS and jquery just stopped working! checked in firefox/chrome and the jquery just stopped working! I have no idea what happen.
I have 2 functions going on. First part animates the header image and the second part generates random numbers when it is click. I pasted my whole code at pastebin, please help me out!
http://pastebin.com/ZYXNbYZA | jquery | error | null | null | null | 09/08/2010 00:47:08 | not a real question | jquery will not work for me!
===
It's weird! I was working on my CSS and jquery just stopped working! checked in firefox/chrome and the jquery just stopped working! I have no idea what happen.
I have 2 functions going on. First part animates the header image and the second part generates random numbers when it is click. I pasted my whole code at pastebin, please help me out!
http://pastebin.com/ZYXNbYZA | 1 |
1,960,866 | 12/25/2009 09:29:21 | 238,529 | 12/25/2009 09:29:21 | 1 | 0 | Getting a sql server error when tryin to access the wesite using the remote URL rather than the localhost. | Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.
This is the error that I am getting. If I try to access the web site using the localhost it works fine. But, when I am usinfg it through the remote URL it throws this error.
I feel there is some thing wrong woth my web.config file.
The connection string I am using
<connectionStrings>
<add
name="LocalSqlServer"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|Thesis_Database.mdf;User Instance=true"
providerName="System.Data.SqlClient"
/>
</connectionStrings>
In the C# code.....
SqlConnection conn = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Thesis_Database.mdf;Integrated Security=True;User Instance=True");
Please Help....
SqlDataReader rdr = null; | asp.net | c# | web.config | null | null | null | open | Getting a sql server error when tryin to access the wesite using the remote URL rather than the localhost.
===
Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.
This is the error that I am getting. If I try to access the web site using the localhost it works fine. But, when I am usinfg it through the remote URL it throws this error.
I feel there is some thing wrong woth my web.config file.
The connection string I am using
<connectionStrings>
<add
name="LocalSqlServer"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|Thesis_Database.mdf;User Instance=true"
providerName="System.Data.SqlClient"
/>
</connectionStrings>
In the C# code.....
SqlConnection conn = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Thesis_Database.mdf;Integrated Security=True;User Instance=True");
Please Help....
SqlDataReader rdr = null; | 0 |
1,488,530 | 09/28/2009 18:13:39 | 2,701 | 08/24/2008 15:51:24 | 1,753 | 61 | Any point in writing integration tests for a repository w/ NHibernate? | I recently spent a great deal of time pulling out a stored procedure back-end and replaced it with a NHiberante base repository. One test per repository was nice in the stored procedure version because I could verify my stored procedures worked and the class that mapped the returned data to my objects did it's job.
But after I got this up and running with NHibernate I thought to myself "is this really needed?". After all, NHibernate has unit tests all its own to make sure the session knows how to do dirty tracking/mapping work/etc
Am I missing something here or should I toss these tests that offer no real value?
(sample of a repository I would exercise during this integration test)
public class UserRepository : NHibernateRepository<User>, IUserRepository
{
public UserRepository() : base()
{
}
public void DeleteUser(User User)
{
base.Delete(User);
}
public User GetUserById(int id)
{
return base.Retrieve(id);
}
public IQueryable<User> GetUserCollection()
{
return base.RetrieveAll();
}
public void SaveUser(User User)
{
base.Save(User);
}
} | nhibernate | integration-testing | null | null | null | null | open | Any point in writing integration tests for a repository w/ NHibernate?
===
I recently spent a great deal of time pulling out a stored procedure back-end and replaced it with a NHiberante base repository. One test per repository was nice in the stored procedure version because I could verify my stored procedures worked and the class that mapped the returned data to my objects did it's job.
But after I got this up and running with NHibernate I thought to myself "is this really needed?". After all, NHibernate has unit tests all its own to make sure the session knows how to do dirty tracking/mapping work/etc
Am I missing something here or should I toss these tests that offer no real value?
(sample of a repository I would exercise during this integration test)
public class UserRepository : NHibernateRepository<User>, IUserRepository
{
public UserRepository() : base()
{
}
public void DeleteUser(User User)
{
base.Delete(User);
}
public User GetUserById(int id)
{
return base.Retrieve(id);
}
public IQueryable<User> GetUserCollection()
{
return base.RetrieveAll();
}
public void SaveUser(User User)
{
base.Save(User);
}
} | 0 |
4,801,366 | 01/26/2011 04:15:03 | 515,502 | 11/22/2010 00:32:16 | 13 | 0 | Convert RGB values into integer pixel | So in a BufferedImage, you receive a single integer that has the rgb values represented in it. So far i use the following to get the RGB values from it:
int r = (int)((Math.pow(256,3)+rgbs[k]) / 65536);
int g = (int) (((Math.pow(256,3)+rgbs[k]) / 256 ) % 256 );
int b = (int) ((Math.pow(256,3)+rgbs[k])%256);
And so far, it works. What I need to do is figure out how to get an integer so i can use bufferedimage.setRGB(), because that takes the same type of data it gave me. | java | bufferedimage | null | null | null | null | open | Convert RGB values into integer pixel
===
So in a BufferedImage, you receive a single integer that has the rgb values represented in it. So far i use the following to get the RGB values from it:
int r = (int)((Math.pow(256,3)+rgbs[k]) / 65536);
int g = (int) (((Math.pow(256,3)+rgbs[k]) / 256 ) % 256 );
int b = (int) ((Math.pow(256,3)+rgbs[k])%256);
And so far, it works. What I need to do is figure out how to get an integer so i can use bufferedimage.setRGB(), because that takes the same type of data it gave me. | 0 |
7,749,630 | 10/13/2011 04:58:52 | 927,290 | 09/04/2011 05:55:30 | 28 | 0 | What happens if two individual developers have the same name, in the iOS or Mac developer programs? | For example, if there are two developers names "John Smith". Each of them creates an application, and submits it to the app store. According to the apple documentation, if they have both joined as individuals, then their name will be listed as the "Seller".
So how can customers distinguish between the two? Also, if one clicks on "More applications by this developer", will the app store show only applications by that developer, or by all developers names "John Smith".
Does this mean, that the only way to protect your "brand" (if you are an individual developer) , is to not be an individual developer ? XD ie. to register a company and trademark the name instead? | ios | app-store | name | conflict | individual | 10/14/2011 02:36:11 | off topic | What happens if two individual developers have the same name, in the iOS or Mac developer programs?
===
For example, if there are two developers names "John Smith". Each of them creates an application, and submits it to the app store. According to the apple documentation, if they have both joined as individuals, then their name will be listed as the "Seller".
So how can customers distinguish between the two? Also, if one clicks on "More applications by this developer", will the app store show only applications by that developer, or by all developers names "John Smith".
Does this mean, that the only way to protect your "brand" (if you are an individual developer) , is to not be an individual developer ? XD ie. to register a company and trademark the name instead? | 2 |
9,780,737 | 03/20/2012 02:45:49 | 765,081 | 05/22/2011 18:46:11 | 42 | 1 | Set firstHour in day view based on eventclick in month view | I have been able to implement fullcalendar eventClick such that when the user clicks on an event
in the month view, it brings up the day view for that event. I am using gotodate function to do this.
The problem I am facing now is, If for example the event starts late in the evening, say, at 9 PM,
the event is hidden down at the bottom of the day view requiring the user to scroll down.
The documentation says there is an option called firstHour that determines the first hour that will be
visible in the day view scroll pane.
Does gotodate have provision to pass firstHour as an argument to position the hour of clicked event
at the top of the day view? Or is there a possible solution to achieve this effect?
Thanks for any suggestion! | jquery | null | null | null | null | 03/20/2012 17:17:24 | not a real question | Set firstHour in day view based on eventclick in month view
===
I have been able to implement fullcalendar eventClick such that when the user clicks on an event
in the month view, it brings up the day view for that event. I am using gotodate function to do this.
The problem I am facing now is, If for example the event starts late in the evening, say, at 9 PM,
the event is hidden down at the bottom of the day view requiring the user to scroll down.
The documentation says there is an option called firstHour that determines the first hour that will be
visible in the day view scroll pane.
Does gotodate have provision to pass firstHour as an argument to position the hour of clicked event
at the top of the day view? Or is there a possible solution to achieve this effect?
Thanks for any suggestion! | 1 |
6,524,309 | 06/29/2011 16:49:03 | 821,562 | 06/29/2011 16:49:03 | 1 | 0 | Wordpress garbled output (PHP) | This shouldn't be a wordpress problem, but I can't rule out anything. My code:
print "span onclick=\"replyForm(this,";
print get_the_ID();
print ",\"";
print get_comment_author();
print "\", ";
print get_comment_ID();
print ")>Reply ►/span";
It should output:
span onclick="replyForm(this,1,"name with space", 6)Reply ►/span
But instead it outputs:
span 6)="" ,="" gamer="" innate="" onclick="replyForm(this,1,">Reply ►/span
Even if they are separate print statements it still manages to garble it up. Any idea why this happens and how to fix it? | php | wordpress | null | null | null | 06/30/2011 14:11:39 | not a real question | Wordpress garbled output (PHP)
===
This shouldn't be a wordpress problem, but I can't rule out anything. My code:
print "span onclick=\"replyForm(this,";
print get_the_ID();
print ",\"";
print get_comment_author();
print "\", ";
print get_comment_ID();
print ")>Reply ►/span";
It should output:
span onclick="replyForm(this,1,"name with space", 6)Reply ►/span
But instead it outputs:
span 6)="" ,="" gamer="" innate="" onclick="replyForm(this,1,">Reply ►/span
Even if they are separate print statements it still manages to garble it up. Any idea why this happens and how to fix it? | 1 |
4,958,096 | 02/10/2011 14:08:18 | 386,167 | 07/06/2010 16:49:25 | 266 | 8 | Does a .NET developer lose value when working with PHP? | I am a .NET developer and my employer asked me to work on WordPress blogs that require little to none PHP skills.
I explained my employer that .NET is a much complex framework than a simple language such as PHP. In addition, Microsoft launches new technologies, new product versions, new best practices, etc. in a very regular basis, making it tough to compete in the job market. That is -everytime I am working on a WordPress blog, I am missing the opportunity to cope with the latest Microsoft releases, and eventually losing value in the job market.
This is only my personal opinion based on what I read about PHP and other LAMP technologies. What do you think? Am I wrong? Could you point me to facts or articles that talk further about this? Thank you. | php | .net | null | null | null | 02/10/2011 14:11:03 | not constructive | Does a .NET developer lose value when working with PHP?
===
I am a .NET developer and my employer asked me to work on WordPress blogs that require little to none PHP skills.
I explained my employer that .NET is a much complex framework than a simple language such as PHP. In addition, Microsoft launches new technologies, new product versions, new best practices, etc. in a very regular basis, making it tough to compete in the job market. That is -everytime I am working on a WordPress blog, I am missing the opportunity to cope with the latest Microsoft releases, and eventually losing value in the job market.
This is only my personal opinion based on what I read about PHP and other LAMP technologies. What do you think? Am I wrong? Could you point me to facts or articles that talk further about this? Thank you. | 4 |
11,163,584 | 06/22/2012 20:23:27 | 1,475,841 | 06/22/2012 20:06:24 | 1 | 0 | My google apps primary account is a subdomain. So how do I define the MX records or is it TXT? | When I signed up for Google apps the domain was a sub-domain in other words the format of the Google domain was mysub.domain.org.
I use GoDaddy as my registrar but it does not handle my DNS that is handled by my shared hosting provider. At that provider I have DNS records for the domain.org and also DNS records for mysub.domain.org.
I don't want to have all the emails at domain.org to go to google I only want the emails sent to mysub.domain.org to be handled by Google apps. e.g. anybody@mysub.domain.org
I have added MX records to the DNS under mysub.domain.org but that didn't work. Then I saw something about adding a TXT record under the domain.org DNS. There was some unique reference that I had to generate via a Google site and post it into the TXT data field. I did that to no avail.
Does anyone know the best way to do this? I can't seem to find any post that are dealing with this situation. As you can tell I am not very swift when it comes to DNS.
Thanks in advance
| google | apps | null | null | null | 06/24/2012 02:35:02 | off topic | My google apps primary account is a subdomain. So how do I define the MX records or is it TXT?
===
When I signed up for Google apps the domain was a sub-domain in other words the format of the Google domain was mysub.domain.org.
I use GoDaddy as my registrar but it does not handle my DNS that is handled by my shared hosting provider. At that provider I have DNS records for the domain.org and also DNS records for mysub.domain.org.
I don't want to have all the emails at domain.org to go to google I only want the emails sent to mysub.domain.org to be handled by Google apps. e.g. anybody@mysub.domain.org
I have added MX records to the DNS under mysub.domain.org but that didn't work. Then I saw something about adding a TXT record under the domain.org DNS. There was some unique reference that I had to generate via a Google site and post it into the TXT data field. I did that to no avail.
Does anyone know the best way to do this? I can't seem to find any post that are dealing with this situation. As you can tell I am not very swift when it comes to DNS.
Thanks in advance
| 2 |
10,211,850 | 04/18/2012 14:43:40 | 1,060,128 | 11/22/2011 15:49:25 | 1 | 2 | Is it possible, that INSERTS are delayed when executed from PHP (using ZEND)? | When I have a loop like this:
foreach(...) {
$r1 = $zend_db->fetchRow("SELECT ... ");
$zend_table->insert($data_array, $where);
}
... running a few thousand times. Is it possible, that $r1 doesn't contain a record inserted in the previous loop?
At http://dev.mysql.com/doc/refman/5.1/en/query-cache.html they write "The query cache does not return stale data. When tables are modified, any relevant entries in the query cache are flushed." But maybe ZEND does some unexpected caching for SELECT or INSERT?
Do I need to use transactions to solve this?
I had an issue with double records and no other explination where they came from. But I can't reproduce it, cause it happened two month ago, importing csv-data that no longer exists. | php | mysql | zend-framework | caching | zend-db | null | open | Is it possible, that INSERTS are delayed when executed from PHP (using ZEND)?
===
When I have a loop like this:
foreach(...) {
$r1 = $zend_db->fetchRow("SELECT ... ");
$zend_table->insert($data_array, $where);
}
... running a few thousand times. Is it possible, that $r1 doesn't contain a record inserted in the previous loop?
At http://dev.mysql.com/doc/refman/5.1/en/query-cache.html they write "The query cache does not return stale data. When tables are modified, any relevant entries in the query cache are flushed." But maybe ZEND does some unexpected caching for SELECT or INSERT?
Do I need to use transactions to solve this?
I had an issue with double records and no other explination where they came from. But I can't reproduce it, cause it happened two month ago, importing csv-data that no longer exists. | 0 |
8,834,281 | 01/12/2012 11:26:02 | 582,966 | 12/28/2010 09:57:04 | 21 | 0 | How do i nkow whehter the app is purchased or not in AppStore | Is there any way to find whether the application is purchased in AppStore.
I know that we can do In app purchase but i want to know whether the app is purchased or not. | ios | ios4 | ios5 | ios-sdk-4.3 | null | 01/12/2012 12:20:33 | not a real question | How do i nkow whehter the app is purchased or not in AppStore
===
Is there any way to find whether the application is purchased in AppStore.
I know that we can do In app purchase but i want to know whether the app is purchased or not. | 1 |
2,098,634 | 01/20/2010 02:15:17 | 254,542 | 01/20/2010 02:15:17 | 1 | 0 | Is it possible to encrypt/decrypt voice calls in Android? | I want to know if I can create an application in android that encrypts your voice in a normal phone call and sends it to the destination where it can then be decrypted... | android | voice | encryption | null | null | 07/22/2012 15:44:31 | not constructive | Is it possible to encrypt/decrypt voice calls in Android?
===
I want to know if I can create an application in android that encrypts your voice in a normal phone call and sends it to the destination where it can then be decrypted... | 4 |
1,718,472 | 11/11/2009 22:20:06 | 25,645 | 10/06/2008 22:10:23 | 417 | 3 | You need to select at least one radio button / checkbox | What would be the JavaScript code to check if the user has selected at least one radio button, knowing that the radio buttons all have the same "name" attribute?
Same question for checkboxes.
I do not use any fancy javascript frameworks such as JQuery and others ...
| javascript | html | dom | null | null | null | open | You need to select at least one radio button / checkbox
===
What would be the JavaScript code to check if the user has selected at least one radio button, knowing that the radio buttons all have the same "name" attribute?
Same question for checkboxes.
I do not use any fancy javascript frameworks such as JQuery and others ...
| 0 |
10,190,435 | 04/17/2012 11:35:12 | 793,725 | 06/11/2011 06:03:46 | 1 | 0 | Fancyhdr footer not working on pages where a chapter does not begin | Im using fancyhdr to put a text and page number on every page
\usepackage{fancyheadings}
\fancypagestyle{plain}{
\fancyhf{}
\lhead{section \bfseries \thesection}
\chead{CS04-708 Main Project, 2011}
\cfoot[{\vspace*{0.2cm}Department of Production Engineering, GEC - Thrissur \\ \thepage }]{\vspace*{0.2cm}Department of Production Engineering, GEC - Thrissur \\ \thepage }
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.5pt}
}
Im getting the Right footer only on pages where a chapter has begun rest of the pages have just the number (i'm guessing its the default style). I've been hunting google a fix, but no avail.
| latex | null | null | null | null | 04/17/2012 15:26:08 | off topic | Fancyhdr footer not working on pages where a chapter does not begin
===
Im using fancyhdr to put a text and page number on every page
\usepackage{fancyheadings}
\fancypagestyle{plain}{
\fancyhf{}
\lhead{section \bfseries \thesection}
\chead{CS04-708 Main Project, 2011}
\cfoot[{\vspace*{0.2cm}Department of Production Engineering, GEC - Thrissur \\ \thepage }]{\vspace*{0.2cm}Department of Production Engineering, GEC - Thrissur \\ \thepage }
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.5pt}
}
Im getting the Right footer only on pages where a chapter has begun rest of the pages have just the number (i'm guessing its the default style). I've been hunting google a fix, but no avail.
| 2 |
4,076,974 | 11/02/2010 10:57:06 | 318,393 | 04/16/2010 10:27:00 | 120 | 0 | Can a static object be fully-cached for HTTPS? (encrypted) | If I have a static object (file), which being requested by clients via HTTPS - is it possible to cache the file after encryption took place? (for the purpose of saving the processing time of encrypting for each and every client upon request)
Note: I'm not asking how to do it, but rather if it's even possible. | encryption | https | null | null | null | null | open | Can a static object be fully-cached for HTTPS? (encrypted)
===
If I have a static object (file), which being requested by clients via HTTPS - is it possible to cache the file after encryption took place? (for the purpose of saving the processing time of encrypting for each and every client upon request)
Note: I'm not asking how to do it, but rather if it's even possible. | 0 |
8,484,447 | 12/13/2011 04:44:52 | 1,095,006 | 12/13/2011 04:23:17 | 1 | 0 | How do I create form_for for namespaced nested resources in Rails 3.1.3 and Mongoid? | I am new to Rails and am trying to create an Api for a mobile app. Although the Api will generate json responses, I also need a web interface to create the data. My routes look like this:
Appone::Application.routes.draw do
namespace :api1 do
resources :reldates do
resources :movies
end
end
end
The release_date model:
class Api1::Reldate
include Mongoid::Document
include Mongoid::MultiParameterAttributes
include Mongoid::Timestamps
field :release_date, :type => Date
embeds_many :api1_movies
validates_associated :movie
accepts_nested_attributes_for :movie
end
The Movie Model:
class Api1::Movie
include Mongoid::Document
include Mongoid::MultiParameterAttributes
include Mongoid::Timestamps
field :title, :type => String
field :release_type, :type => String
field :release_number, :type => Integer
embedded_in :api1_reldate, :inverse_of => :api1_movies
end
and the reldate show.html.erb:
<p id="notice"><%= notice %></p>
<p>
<b>Release date:</b>
<%= @api1_reldate.release_date %>
</p>
<% if @api1_reldate.api1_movies.size > 0 %>
<h2>Movies</h2>
<% for api1_movie in @api1_reldate.api1_movies %>
<h3><%= api1_movie.title %></h3>
<p><%= api1_movie.release_type %></p>
<p><%= api1_movie.release_number %></p>
<% end %>
<% end %>
<h2>New Movies</h2>
<% form_for([:api1], :url => { :action => :create ,:id => @reldate.movie}) do |form| %>
<p><%= f.label :title %> <%= f.text_field :title %></p>
<p><%= f.label :release_type %> <%= f.text_field :release_type %></p>
<p><%= f.label :release_number %> <%= f.number_field :release_number %></p>
<p><%= f.submit %></p>
<% end %>
<%= link_to 'Edit', edit_api1_reldate_path(@api1_reldate) %> |
<%= link_to 'Back', api1_reldates_path %>
I am unable to get this to work. I can get the reldate page working but after I click on submit, I get an error like this:
undefined method `movie' for nil:NilClass
Extracted source (around line #18):
15: <% end %>
16:
17: <h2>New Movies</h2>
18: <% form_for([:api1], :url => { :action => :create ,:id => @reldate.movie}) do |form| %>
19: <p><%= f.label :title %> <%= f.text_field :title %></p>
20: <p><%= f.label :release_type %> <%= f.text_field :release_type %></p>
21: <p><%= f.label :release_number %> <%= f.number_field :release_number %></p>
How can I get this to work? I have tried every possible solution available, but it keeps failing.
Also, I am using Ryan Bates [Railcast][1]
[1]: http://railscasts.com/episodes/238-mongoid
Thanks in advance. | ruby-on-rails-3 | mongoid | null | null | null | null | open | How do I create form_for for namespaced nested resources in Rails 3.1.3 and Mongoid?
===
I am new to Rails and am trying to create an Api for a mobile app. Although the Api will generate json responses, I also need a web interface to create the data. My routes look like this:
Appone::Application.routes.draw do
namespace :api1 do
resources :reldates do
resources :movies
end
end
end
The release_date model:
class Api1::Reldate
include Mongoid::Document
include Mongoid::MultiParameterAttributes
include Mongoid::Timestamps
field :release_date, :type => Date
embeds_many :api1_movies
validates_associated :movie
accepts_nested_attributes_for :movie
end
The Movie Model:
class Api1::Movie
include Mongoid::Document
include Mongoid::MultiParameterAttributes
include Mongoid::Timestamps
field :title, :type => String
field :release_type, :type => String
field :release_number, :type => Integer
embedded_in :api1_reldate, :inverse_of => :api1_movies
end
and the reldate show.html.erb:
<p id="notice"><%= notice %></p>
<p>
<b>Release date:</b>
<%= @api1_reldate.release_date %>
</p>
<% if @api1_reldate.api1_movies.size > 0 %>
<h2>Movies</h2>
<% for api1_movie in @api1_reldate.api1_movies %>
<h3><%= api1_movie.title %></h3>
<p><%= api1_movie.release_type %></p>
<p><%= api1_movie.release_number %></p>
<% end %>
<% end %>
<h2>New Movies</h2>
<% form_for([:api1], :url => { :action => :create ,:id => @reldate.movie}) do |form| %>
<p><%= f.label :title %> <%= f.text_field :title %></p>
<p><%= f.label :release_type %> <%= f.text_field :release_type %></p>
<p><%= f.label :release_number %> <%= f.number_field :release_number %></p>
<p><%= f.submit %></p>
<% end %>
<%= link_to 'Edit', edit_api1_reldate_path(@api1_reldate) %> |
<%= link_to 'Back', api1_reldates_path %>
I am unable to get this to work. I can get the reldate page working but after I click on submit, I get an error like this:
undefined method `movie' for nil:NilClass
Extracted source (around line #18):
15: <% end %>
16:
17: <h2>New Movies</h2>
18: <% form_for([:api1], :url => { :action => :create ,:id => @reldate.movie}) do |form| %>
19: <p><%= f.label :title %> <%= f.text_field :title %></p>
20: <p><%= f.label :release_type %> <%= f.text_field :release_type %></p>
21: <p><%= f.label :release_number %> <%= f.number_field :release_number %></p>
How can I get this to work? I have tried every possible solution available, but it keeps failing.
Also, I am using Ryan Bates [Railcast][1]
[1]: http://railscasts.com/episodes/238-mongoid
Thanks in advance. | 0 |
11,287,565 | 07/02/2012 03:45:10 | 1,301,593 | 03/29/2012 18:23:45 | 13 | 0 | Biblatex induced headache: Bibliography bst style not found | I'm new to LaTex and have been trying to get my document to use a specified .bst bibliography style file, but to no avail. I downloaded my preferred .bst file (amnat.bst) from [here][1] into the same folder as my document. I've fruitlessly tried various combinations to try to get it to work (including \bibliographystyle{amnat}). I'm not sure if it's a matter of different libraries clashing or what, but I'm incredibly frustrated. I've also tried just setting the bibstyle to equal "plain" and it still doesn't work (Also \bibliographystyle{plain}).
When I run:
pdflatex myTexDocument
I get the error message: "! Package biblatex Error: Style 'amnat' not found."
Also, "\RequireBibliographyStyle{\blx@bbxfile}"
And (after pressing the Return key): "!Package biblatex Error: No driver found."
When I run the document without the extra "bibstyle=amnat" parameter for biblatex, I do not run into any errors.
Here is an abridged version of myTexDocument.tex:
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear,sorting=none,natbib=true,bibstyle=amnat]{biblatex}
\usepackage[pagebackref=false,hidelinks]{hyperref} %For cross-referencing papers to biliography
\usepackage[pdftex]{graphicx} %Add images
\usepackage{setspace} %Set line-spacing
\usepackage[hmargin=2cm,vmargin=2.25cm]{geometry} %Set document margins
\usepackage{amsmath} %For mathematic formulas
\usepackage{appendix}
\usepackage{pdflscape} %For configuring page orientation
\usepackage{varwidth,array,ragged2e} %To adjust table row heights accordingly
\usepackage{multirow}
\usepackage{mathptmx} %Set font so compatible with math font too
\usepackage{titlesec} %For adjusting section headings
\usepackage{paralist} %For lists
\addbibresource{../../../../Bibtex/library.bib} %Load bibiliography
\titleformat{\section}[block]
{\normalfont\bfseries\large}
{}{0em}{}
\titleformat{\subsection}[runin]
{\normalfont\itshape}
{}{0em}{}[--- ]
\titlespacing{\subsection}{0pt}{*2}{0pt}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\begin{document}
\input{titlePage} %My title page document
\raggedright %Left Justify document
\setlength{\parindent}{0.6cm} %Set paragraph indent
\doublespacing
\renewcommand{\abstractname}{Summary}
\begin{abstract}
Blahblah \autocite{Webb2002,Graham2008}
\end{abstract}
\section{Conclusion}
Blah blah
\phantomsection %Create a hyperlink to the References section in Table of Contents
\addcontentsline{toc}{section}{References}
\printbibliography
\input{tables} %This is just a document with tables
\end{document}
[1]: https://sites.google.com/site/esalatex/files-for-download | latex | biblatex | null | null | null | 07/02/2012 15:28:56 | off topic | Biblatex induced headache: Bibliography bst style not found
===
I'm new to LaTex and have been trying to get my document to use a specified .bst bibliography style file, but to no avail. I downloaded my preferred .bst file (amnat.bst) from [here][1] into the same folder as my document. I've fruitlessly tried various combinations to try to get it to work (including \bibliographystyle{amnat}). I'm not sure if it's a matter of different libraries clashing or what, but I'm incredibly frustrated. I've also tried just setting the bibstyle to equal "plain" and it still doesn't work (Also \bibliographystyle{plain}).
When I run:
pdflatex myTexDocument
I get the error message: "! Package biblatex Error: Style 'amnat' not found."
Also, "\RequireBibliographyStyle{\blx@bbxfile}"
And (after pressing the Return key): "!Package biblatex Error: No driver found."
When I run the document without the extra "bibstyle=amnat" parameter for biblatex, I do not run into any errors.
Here is an abridged version of myTexDocument.tex:
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear,sorting=none,natbib=true,bibstyle=amnat]{biblatex}
\usepackage[pagebackref=false,hidelinks]{hyperref} %For cross-referencing papers to biliography
\usepackage[pdftex]{graphicx} %Add images
\usepackage{setspace} %Set line-spacing
\usepackage[hmargin=2cm,vmargin=2.25cm]{geometry} %Set document margins
\usepackage{amsmath} %For mathematic formulas
\usepackage{appendix}
\usepackage{pdflscape} %For configuring page orientation
\usepackage{varwidth,array,ragged2e} %To adjust table row heights accordingly
\usepackage{multirow}
\usepackage{mathptmx} %Set font so compatible with math font too
\usepackage{titlesec} %For adjusting section headings
\usepackage{paralist} %For lists
\addbibresource{../../../../Bibtex/library.bib} %Load bibiliography
\titleformat{\section}[block]
{\normalfont\bfseries\large}
{}{0em}{}
\titleformat{\subsection}[runin]
{\normalfont\itshape}
{}{0em}{}[--- ]
\titlespacing{\subsection}{0pt}{*2}{0pt}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\begin{document}
\input{titlePage} %My title page document
\raggedright %Left Justify document
\setlength{\parindent}{0.6cm} %Set paragraph indent
\doublespacing
\renewcommand{\abstractname}{Summary}
\begin{abstract}
Blahblah \autocite{Webb2002,Graham2008}
\end{abstract}
\section{Conclusion}
Blah blah
\phantomsection %Create a hyperlink to the References section in Table of Contents
\addcontentsline{toc}{section}{References}
\printbibliography
\input{tables} %This is just a document with tables
\end{document}
[1]: https://sites.google.com/site/esalatex/files-for-download | 2 |
7,712,817 | 10/10/2011 12:34:28 | 429,377 | 05/18/2010 13:03:58 | 974 | 30 | What's better ERD Eclipse plugin to use | i need to use an ERD tool in eclipse, to make ERD diagrams for my database tables
please suggest me a good tool that can be plugged in eclipse
following link suggest ERMaster plugin
http://blog.javachap.com/index.php/eclipse-er-modelling-plugin-ermaster/
what do you think ? | java | eclipse | eclipse-plugin | uml | null | 11/17/2011 23:30:11 | not constructive | What's better ERD Eclipse plugin to use
===
i need to use an ERD tool in eclipse, to make ERD diagrams for my database tables
please suggest me a good tool that can be plugged in eclipse
following link suggest ERMaster plugin
http://blog.javachap.com/index.php/eclipse-er-modelling-plugin-ermaster/
what do you think ? | 4 |
8,200,854 | 11/20/2011 10:15:56 | 1,007,437 | 10/21/2011 15:39:13 | 1 | 0 | simple program not executing in c | #include<stdio.h>
main()
{
int i, int a[5]={1,2,48,3,88};
for(i=0;i<4;i++)
{
if (a[i]<a[i+1])
{
printf("%d",a[i]);
}
else
{
printf("can't print");
}
}
}
The program is not executing at all, my aim was to print the no if a current no is lesser than its next , it should print or else it will print can't print. | c | runtime | syntax-error | null | null | 11/20/2011 11:32:14 | not a real question | simple program not executing in c
===
#include<stdio.h>
main()
{
int i, int a[5]={1,2,48,3,88};
for(i=0;i<4;i++)
{
if (a[i]<a[i+1])
{
printf("%d",a[i]);
}
else
{
printf("can't print");
}
}
}
The program is not executing at all, my aim was to print the no if a current no is lesser than its next , it should print or else it will print can't print. | 1 |
11,444,318 | 07/12/2012 02:37:44 | 1,481,392 | 06/26/2012 00:46:49 | 1 | 0 | How to create new web browser software like Firefox, IE, Chrome, Safari? What are the languages we need to use | ->How to create new web browser software like Firefox, IE, Chrome, Safari?
->What are the languages we need to use. | java | javascript | null | null | null | 07/12/2012 03:13:13 | not constructive | How to create new web browser software like Firefox, IE, Chrome, Safari? What are the languages we need to use
===
->How to create new web browser software like Firefox, IE, Chrome, Safari?
->What are the languages we need to use. | 4 |
11,741,269 | 07/31/2012 13:30:21 | 379,235 | 06/29/2010 16:45:28 | 2,122 | 44 | hadoop-streaming: map running good in pesudo-distributed mode, but reducer doesn't seem to work correctly | My `Map` looks like
import sys
index = int(sys.argv[1])
max = 0
for line in sys.stdin:
fields = line.strip().split(",")
if fields[index].isdigit():
val = int(fields[index])
if (val > max):
max = val
else:
print max
My `Reducer` looks like
import sys
for line in sys.stdin:
print line
- I run just map task with flag `D mapred.reduce.tasks=0` and get 4 output files as result of each map, which looks good
- Then I add a reducer with flag option `D mapred.reduce.tasks=1` and `-reduce <reduce_filepath>` but then things start to change, the status stays as
> > 12/07/31 06:15:41 INFO streaming.StreamJob: map 0% reduce 0%
> > 12/07/31 06:15:57 INFO streaming.StreamJob: map 49% reduce 0%
> > 12/07/31 06:16:01 INFO streaming.StreamJob: map 50% reduce 0%
> > 12/07/31 06:16:07 INFO streaming.StreamJob: map 69% reduce 0%
> > 12/07/31 06:16:10 INFO streaming.StreamJob: map 100% reduce 0%
I go back and check in logs, I see in `attempt_201207301615_0006_r_000000_0/syslog` as
2012-07-31 06:23:00,178 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Need another 4 map output(s) where 1 is already in progress
2012-07-31 06:23:00,178 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Scheduled 0 outputs (0 slow hosts and3 dup hosts)
2012-07-31 06:24:00,179 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Need another 4 map output(s) where 1 is already in progress
2012-07-31 06:24:00,180 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Scheduled 0 outputs (0 slow hosts and3 dup hosts)
2012-07-31 06:25:00,180 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Need another 4 map output(s) where 1 is already in progress
2012-07-31 06:25:00,180 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Scheduled 0 outputs (0 slow hosts and3 dup hosts)
2012-07-31 06:25:40,789 WARN org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 copy failed: attempt_201207301615_0006_m_000000_0 from 10.1.71.253
2012-07-31 06:25:40,791 WARN org.apache.hadoop.mapred.ReduceTask: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
at java.net.Socket.connect(Socket.java:529)
at sun.net.NetworkClient.doConnect(NetworkClient.java:158)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:227)
at sun.net.www.http.HttpClient.New(HttpClient.java:300)
at sun.net.www.http.HttpClient.New(HttpClient.java:317)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getInputStream(ReduceTask.java:1618)
at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.setupSecureConnection(ReduceTask.java:1575)
at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getMapOutput(ReduceTask.java:1483)
at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.copyOutput(ReduceTask.java:1394)
at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.run(ReduceTask.java:1326)
2012-07-31 06:25:40,791 INFO org.apache.hadoop.mapred.ReduceTask: Task attempt_201207301615_0006_r_000000_0: Failed fetch #3 from attempt_201207301615_0006_m_000000_0
2012-07-31 06:25:40,791 WARN org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 adding host 10.1.71.253 to penalty box, next contact in 21 seconds
2012-07-31 06:25:40,791 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0: Got 1 map-outputs from previous failures
2012-07-31 06:26:00,797 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Need another 4 map output(s) where 0 is already in progress
2012-07-31 06:26:00,798 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Scheduled 0 outputs (1 slow hosts and0 dup hosts)
2012-07-31 06:26:00,798 INFO org.apache.hadoop.mapred.ReduceTask: Penalized(slow) Hosts:
2012-07-31 06:26:00,798 INFO org.apache.hadoop.mapred.ReduceTask: 10.1.71.253 Will be considered after: 1 seconds.
2012-07-31 06:26:05,800 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Scheduled 1 outputs (0 slow hosts and0 dup hosts)
2012-07-31 06:27:00,798 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Need another 4 map output(s) where 1 is already in progress
2012-07-31 06:27:00,798 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Scheduled 0 outputs (0 slow hosts and3 dup hosts)
What is causing this? I am running job in `pseudo-distributed` mode
How can I fix this? | hadoop | mapreduce | hadoop-streaming | null | null | 07/31/2012 17:11:21 | too localized | hadoop-streaming: map running good in pesudo-distributed mode, but reducer doesn't seem to work correctly
===
My `Map` looks like
import sys
index = int(sys.argv[1])
max = 0
for line in sys.stdin:
fields = line.strip().split(",")
if fields[index].isdigit():
val = int(fields[index])
if (val > max):
max = val
else:
print max
My `Reducer` looks like
import sys
for line in sys.stdin:
print line
- I run just map task with flag `D mapred.reduce.tasks=0` and get 4 output files as result of each map, which looks good
- Then I add a reducer with flag option `D mapred.reduce.tasks=1` and `-reduce <reduce_filepath>` but then things start to change, the status stays as
> > 12/07/31 06:15:41 INFO streaming.StreamJob: map 0% reduce 0%
> > 12/07/31 06:15:57 INFO streaming.StreamJob: map 49% reduce 0%
> > 12/07/31 06:16:01 INFO streaming.StreamJob: map 50% reduce 0%
> > 12/07/31 06:16:07 INFO streaming.StreamJob: map 69% reduce 0%
> > 12/07/31 06:16:10 INFO streaming.StreamJob: map 100% reduce 0%
I go back and check in logs, I see in `attempt_201207301615_0006_r_000000_0/syslog` as
2012-07-31 06:23:00,178 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Need another 4 map output(s) where 1 is already in progress
2012-07-31 06:23:00,178 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Scheduled 0 outputs (0 slow hosts and3 dup hosts)
2012-07-31 06:24:00,179 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Need another 4 map output(s) where 1 is already in progress
2012-07-31 06:24:00,180 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Scheduled 0 outputs (0 slow hosts and3 dup hosts)
2012-07-31 06:25:00,180 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Need another 4 map output(s) where 1 is already in progress
2012-07-31 06:25:00,180 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Scheduled 0 outputs (0 slow hosts and3 dup hosts)
2012-07-31 06:25:40,789 WARN org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 copy failed: attempt_201207301615_0006_m_000000_0 from 10.1.71.253
2012-07-31 06:25:40,791 WARN org.apache.hadoop.mapred.ReduceTask: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
at java.net.Socket.connect(Socket.java:529)
at sun.net.NetworkClient.doConnect(NetworkClient.java:158)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:227)
at sun.net.www.http.HttpClient.New(HttpClient.java:300)
at sun.net.www.http.HttpClient.New(HttpClient.java:317)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getInputStream(ReduceTask.java:1618)
at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.setupSecureConnection(ReduceTask.java:1575)
at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getMapOutput(ReduceTask.java:1483)
at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.copyOutput(ReduceTask.java:1394)
at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.run(ReduceTask.java:1326)
2012-07-31 06:25:40,791 INFO org.apache.hadoop.mapred.ReduceTask: Task attempt_201207301615_0006_r_000000_0: Failed fetch #3 from attempt_201207301615_0006_m_000000_0
2012-07-31 06:25:40,791 WARN org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 adding host 10.1.71.253 to penalty box, next contact in 21 seconds
2012-07-31 06:25:40,791 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0: Got 1 map-outputs from previous failures
2012-07-31 06:26:00,797 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Need another 4 map output(s) where 0 is already in progress
2012-07-31 06:26:00,798 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Scheduled 0 outputs (1 slow hosts and0 dup hosts)
2012-07-31 06:26:00,798 INFO org.apache.hadoop.mapred.ReduceTask: Penalized(slow) Hosts:
2012-07-31 06:26:00,798 INFO org.apache.hadoop.mapred.ReduceTask: 10.1.71.253 Will be considered after: 1 seconds.
2012-07-31 06:26:05,800 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Scheduled 1 outputs (0 slow hosts and0 dup hosts)
2012-07-31 06:27:00,798 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Need another 4 map output(s) where 1 is already in progress
2012-07-31 06:27:00,798 INFO org.apache.hadoop.mapred.ReduceTask: attempt_201207301615_0006_r_000000_0 Scheduled 0 outputs (0 slow hosts and3 dup hosts)
What is causing this? I am running job in `pseudo-distributed` mode
How can I fix this? | 3 |
10,013,910 | 04/04/2012 15:06:32 | 948,357 | 09/16/2011 07:53:40 | 66 | 6 | Get the direction in which the user is scrolling on tochmove event | I have following scenario:
I have a code, binded to the mousewheel event
$('#main').bind("mousewheel",function(ev, delta) {
ev.preventDefault();
if(delta == '-1'){
alert("The user is trying to scroll upwards");
} else {
alert("The user is trying to scroll down");
}
});
I then included this [Plugin][1] which provides the use of Iphone/Ipad touch events.
Look at following code:
$('#main').bind('touchmove', function(event) {
ev.preventDefault();
});
I want to alert the direction in which the user is scrolling. How can I do this?
Thanks in advance!
[1]: http://furf.com/exp/touch-punch/ | jquery | jquery-plugins | touch | jquery-event-binding | null | null | open | Get the direction in which the user is scrolling on tochmove event
===
I have following scenario:
I have a code, binded to the mousewheel event
$('#main').bind("mousewheel",function(ev, delta) {
ev.preventDefault();
if(delta == '-1'){
alert("The user is trying to scroll upwards");
} else {
alert("The user is trying to scroll down");
}
});
I then included this [Plugin][1] which provides the use of Iphone/Ipad touch events.
Look at following code:
$('#main').bind('touchmove', function(event) {
ev.preventDefault();
});
I want to alert the direction in which the user is scrolling. How can I do this?
Thanks in advance!
[1]: http://furf.com/exp/touch-punch/ | 0 |
9,873,827 | 03/26/2012 14:16:43 | 1,293,226 | 03/26/2012 14:08:22 | 1 | 0 | Symfony: correct YAML syntax for default value of numeric field | Good day.
That is a piece from my schema.yml:
ProductTags:
columns:
product_id: { type: integer, notnull: true }
tag_id: { type: integer, notnull: true }
discount: { type: numeric, size:'3', scale:'1', notnull: true }
but when the sql gets generated, discount field comes out with the default keyword, but no default value after it. How can I get the right result? | postgresql | symfony | doctrine | yaml | null | null | open | Symfony: correct YAML syntax for default value of numeric field
===
Good day.
That is a piece from my schema.yml:
ProductTags:
columns:
product_id: { type: integer, notnull: true }
tag_id: { type: integer, notnull: true }
discount: { type: numeric, size:'3', scale:'1', notnull: true }
but when the sql gets generated, discount field comes out with the default keyword, but no default value after it. How can I get the right result? | 0 |
2,133,627 | 01/25/2010 16:12:37 | 64,157 | 02/09/2009 12:36:09 | 25 | 0 | Using django.db.connection.queries ... | I've got a Python/Django application which runs quite a lot of SQL statements. For debugging purposes, I thought I should create a simple view for me which just lists all the SQL statements that have been run.
According to the documentation, this code should be enough to do that:
from django.db import connection
connection.queries
as long as DEBUG is True.
However, this is not giving me anything. DEBUG is most certainly set to True. In what context is this connection.queries stored? I'm mean, I should be able to execute one page which executes a lot of SQL statements, and then just switch over to the http://myserver/sql view I created and see those SQL statements there, right? Using the same browser session of course ...
I did check if db.reset_queries() was being run anywhere in the code, appears it's not.
Any ideas why connection.queries is always empty? | django | connection | django-queries | null | null | null | open | Using django.db.connection.queries ...
===
I've got a Python/Django application which runs quite a lot of SQL statements. For debugging purposes, I thought I should create a simple view for me which just lists all the SQL statements that have been run.
According to the documentation, this code should be enough to do that:
from django.db import connection
connection.queries
as long as DEBUG is True.
However, this is not giving me anything. DEBUG is most certainly set to True. In what context is this connection.queries stored? I'm mean, I should be able to execute one page which executes a lot of SQL statements, and then just switch over to the http://myserver/sql view I created and see those SQL statements there, right? Using the same browser session of course ...
I did check if db.reset_queries() was being run anywhere in the code, appears it's not.
Any ideas why connection.queries is always empty? | 0 |
2,146,499 | 01/27/2010 11:39:56 | 259,994 | 01/27/2010 11:18:59 | 1 | 0 | What are the most popular dbms system? | i need to know the most popular dbms system which is available | dbms | rdbms | null | null | null | 01/27/2010 11:44:51 | not constructive | What are the most popular dbms system?
===
i need to know the most popular dbms system which is available | 4 |
8,972,844 | 01/23/2012 14:03:47 | 1,165,024 | 01/23/2012 13:31:26 | 1 | 0 | Need to generate a payload for particular Regular Expression (PCRE) | I need some command line tool in Linux that will generate a payload of say 1 MB for me that will have a few matches for a particular Regular Expression.
Something like if I give a particular PCRE to the tool it will generate a random payload for me with a few matches in it.
Or do you have any suggestions or ideas how I should go about with it. I know about "nping" tool that will generate a random payload for me. But I need a match in it so that I can verify that my NFA-DFA engine is working correctly for different payload sizes and with different graph sizes that are generated from the Regular expression.
Thanks in Advance.
-Michael | regex | pcre | dfa | nfa | payload | 01/23/2012 21:07:07 | not a real question | Need to generate a payload for particular Regular Expression (PCRE)
===
I need some command line tool in Linux that will generate a payload of say 1 MB for me that will have a few matches for a particular Regular Expression.
Something like if I give a particular PCRE to the tool it will generate a random payload for me with a few matches in it.
Or do you have any suggestions or ideas how I should go about with it. I know about "nping" tool that will generate a random payload for me. But I need a match in it so that I can verify that my NFA-DFA engine is working correctly for different payload sizes and with different graph sizes that are generated from the Regular expression.
Thanks in Advance.
-Michael | 1 |
8,756,930 | 01/06/2012 11:10:16 | 1,134,149 | 01/06/2012 11:04:18 | 1 | 0 | Dynamically change the URL of a Facebook Send Button | I am trying to dynamically change the URL of a Facebook Send button with Javascript, but I have had no success so far.
I have a page set up with a few inputs, and I would like the URL of the send button to take the fields value as parameters before it sends it. The problem is when I add the send button to the page, it generates the iframe code inside and even if I modify the href parameter later on, the iframe still keeps the original link in. I guess the solution would be to refresh the content of the send button somehow or add it after page load, once the fields have been completed, but I couldn't figure it out.
Thanks for your help. | javascript | facebook | send | null | null | null | open | Dynamically change the URL of a Facebook Send Button
===
I am trying to dynamically change the URL of a Facebook Send button with Javascript, but I have had no success so far.
I have a page set up with a few inputs, and I would like the URL of the send button to take the fields value as parameters before it sends it. The problem is when I add the send button to the page, it generates the iframe code inside and even if I modify the href parameter later on, the iframe still keeps the original link in. I guess the solution would be to refresh the content of the send button somehow or add it after page load, once the fields have been completed, but I couldn't figure it out.
Thanks for your help. | 0 |
6,667,210 | 07/12/2011 15:55:14 | 240,474 | 12/29/2009 21:06:25 | 45 | 0 | Django - Models + A list of dictionaries | I have a data structure that looks like this
[{'name': 'sfsdf sdfsdf', 'id': '621205528'}, {'name': 'test name', 'id': '32324234234'}, {'name': 'another name', 'id': '3434535342221'}]
Now I have a model called Profile where the id in the dictionary maps to the uid field in the model.
I'd like to remove every entry in the list that exists in the database. Is there a elegant way of doing this, right now I have a bunch of for loops that have multiple calls to the db but that may not be the best way to do it. | python | django | django-models | null | null | null | open | Django - Models + A list of dictionaries
===
I have a data structure that looks like this
[{'name': 'sfsdf sdfsdf', 'id': '621205528'}, {'name': 'test name', 'id': '32324234234'}, {'name': 'another name', 'id': '3434535342221'}]
Now I have a model called Profile where the id in the dictionary maps to the uid field in the model.
I'd like to remove every entry in the list that exists in the database. Is there a elegant way of doing this, right now I have a bunch of for loops that have multiple calls to the db but that may not be the best way to do it. | 0 |
6,770,265 | 07/21/2011 01:03:08 | 173,520 | 09/15/2009 05:18:28 | 3,483 | 39 | sample Rails Application that includes email support page with captcha | What's the quickest / easiest starting point for a simple Rails application that has a main page, and an email "contact us" page, with captcha support? Is there a popular base Rails app that I could download that would already have this functionality as a starting point?
(e.g. for just a basic informational type web site, but with the abily for the user to send support requests back to support, but via a web page with captcha)
thanks
| ruby-on-rails | captcha | null | null | null | null | open | sample Rails Application that includes email support page with captcha
===
What's the quickest / easiest starting point for a simple Rails application that has a main page, and an email "contact us" page, with captcha support? Is there a popular base Rails app that I could download that would already have this functionality as a starting point?
(e.g. for just a basic informational type web site, but with the abily for the user to send support requests back to support, but via a web page with captcha)
thanks
| 0 |
3,892,220 | 10/08/2010 15:51:44 | 32,826 | 10/30/2008 16:40:25 | 1,725 | 83 | Genericising one class to handle multiple types | I have a series of about 30 lookup tables in my database schema, all with the same layout (and I would prefer to keep them as separate tables rather than one lookup table), and thus my Linq2SQL context has 30 entities for these lookup tables.
I have a standard class that I would use for CRUD operations on each of these 30 entites, for example:
public class ExampleAttributes : IAttributeList
{
#region IAttributeList Members
public bool AddItem(string Item, int SortOrder)
{
MyDataContext context = ContextHelper.GetContext();
ExampleAttribute a = new ExampleAttribute();
a.Name = Item;
a.SortOrder = SortOrder;
context.ExampleAttributes.InsertOnSubmit(a);
try
{
context.SubmitChanges();
return true;
}
catch
{
return false;
}
}
public bool DeleteItem(int Id)
{
MyDataContext context = ContextHelper.GetContext();
ExampleAttribute a = (from m in context.ExampleAttributes
where m.Id == Id
select m).FirstOrDefault();
if (a == null)
return true;
// Make sure nothing is using it
int Count = (from m in context.Businesses
where m.ExampleAttributeId == a.Id
select m).Count();
if (Count > 0)
return false;
// Delete the item
context.ExampleAttributes.DeleteOnSubmit(a);
try
{
context.SubmitChanges();
return true;
}
catch
{
return false;
}
}
public bool UpdateItem(int Id, string Item, int SortOrder)
{
MyDataContext context = ContextHelper.GetContext();
ExampleAttribute a = (from m in context.ExampleAttributes
where m.Id == Id
select m).FirstOrDefault();
a.Name = Item;
a.SortOrder = SortOrder;
try
{
context.SubmitChanges();
return true;
}
catch
{
return false;
}
}
public String GetItem(int Id)
{
MyDataContext context = ContextHelper.GetContext();
var Attribute = (from a in context.ExampleAttributes
where a.Id == Id
select a).FirstOrDefault();
return Attribute.Name;
}
public Dictionary<int, string> GetItems()
{
Dictionary<int, string> Attributes = new Dictionary<int, string>();
MyDataContext context = ContextHelper.GetContext();
context.ObjectTrackingEnabled = false;
Attributes = (from o in context.ExampleAttributes orderby o.Name select new { o.Id, o.Name }).AsEnumerable().ToDictionary(k => k.Id, v => v.Name);
return Attributes;
}
#endregion
}
I could replicate this class 30 times with very minor changes for each lookup entity, but that seems messy somehow - so can this class be genericised so I can also pass it the type I want, and have it handle internally the type differences in the linq queries? That way, I have one class to make additions to, one class to bug fix et al - seems the way that it should be done.
Cheers
Moo | c# | null | null | null | null | null | open | Genericising one class to handle multiple types
===
I have a series of about 30 lookup tables in my database schema, all with the same layout (and I would prefer to keep them as separate tables rather than one lookup table), and thus my Linq2SQL context has 30 entities for these lookup tables.
I have a standard class that I would use for CRUD operations on each of these 30 entites, for example:
public class ExampleAttributes : IAttributeList
{
#region IAttributeList Members
public bool AddItem(string Item, int SortOrder)
{
MyDataContext context = ContextHelper.GetContext();
ExampleAttribute a = new ExampleAttribute();
a.Name = Item;
a.SortOrder = SortOrder;
context.ExampleAttributes.InsertOnSubmit(a);
try
{
context.SubmitChanges();
return true;
}
catch
{
return false;
}
}
public bool DeleteItem(int Id)
{
MyDataContext context = ContextHelper.GetContext();
ExampleAttribute a = (from m in context.ExampleAttributes
where m.Id == Id
select m).FirstOrDefault();
if (a == null)
return true;
// Make sure nothing is using it
int Count = (from m in context.Businesses
where m.ExampleAttributeId == a.Id
select m).Count();
if (Count > 0)
return false;
// Delete the item
context.ExampleAttributes.DeleteOnSubmit(a);
try
{
context.SubmitChanges();
return true;
}
catch
{
return false;
}
}
public bool UpdateItem(int Id, string Item, int SortOrder)
{
MyDataContext context = ContextHelper.GetContext();
ExampleAttribute a = (from m in context.ExampleAttributes
where m.Id == Id
select m).FirstOrDefault();
a.Name = Item;
a.SortOrder = SortOrder;
try
{
context.SubmitChanges();
return true;
}
catch
{
return false;
}
}
public String GetItem(int Id)
{
MyDataContext context = ContextHelper.GetContext();
var Attribute = (from a in context.ExampleAttributes
where a.Id == Id
select a).FirstOrDefault();
return Attribute.Name;
}
public Dictionary<int, string> GetItems()
{
Dictionary<int, string> Attributes = new Dictionary<int, string>();
MyDataContext context = ContextHelper.GetContext();
context.ObjectTrackingEnabled = false;
Attributes = (from o in context.ExampleAttributes orderby o.Name select new { o.Id, o.Name }).AsEnumerable().ToDictionary(k => k.Id, v => v.Name);
return Attributes;
}
#endregion
}
I could replicate this class 30 times with very minor changes for each lookup entity, but that seems messy somehow - so can this class be genericised so I can also pass it the type I want, and have it handle internally the type differences in the linq queries? That way, I have one class to make additions to, one class to bug fix et al - seems the way that it should be done.
Cheers
Moo | 0 |
6,061,528 | 05/19/2011 16:05:11 | 761,413 | 05/19/2011 16:05:11 | 1 | 0 | Plain English Calculator | I need to write a program that takes in a string of a mathematical equation and convert it into plain english. The program only accepts single digit numbers and uses addition, subtraction, multiplication, division, exponents, or the modulus function. there is a space between the 1st variable and then the operator and then a space and then the 2nd var.
ex. user inputs (5 * 8)
output ("five multiplied by eight is 40")
I also need to set up catches so if the input would be 6 / 0, then the output says you cannot divide by 0. | java | string | calculator | switch-case | null | 05/19/2011 17:13:07 | not a real question | Plain English Calculator
===
I need to write a program that takes in a string of a mathematical equation and convert it into plain english. The program only accepts single digit numbers and uses addition, subtraction, multiplication, division, exponents, or the modulus function. there is a space between the 1st variable and then the operator and then a space and then the 2nd var.
ex. user inputs (5 * 8)
output ("five multiplied by eight is 40")
I also need to set up catches so if the input would be 6 / 0, then the output says you cannot divide by 0. | 1 |
3,310,551 | 07/22/2010 15:26:08 | 238,134 | 12/24/2009 08:49:35 | 1,975 | 68 | How to test whether a browser accepts cookies with JavaScript? | I want to test with JavaScript whether the browser supports cookies or not. The following [code][1] works with Internet Explorer 8 and Firefox 3.6 but not with Google Chrome 5.
function areCookiesEnabled() {
document.cookie = "__verify=1";
var supportsCookies = document.cookie.length > 1 &&
document.cookie.indexOf("__verify=1") > -1;
var thePast = new Date(1976, 8, 16);
document.cookie = "__verify=1;expires=" + thePast.toUTCString();
return supportsCookies;
}
if(!areCookiesEnabled())
document.write("<p>Activate cookies!</p>");
else
document.write("<p>cookies ok</p>");
Chrome displays the message "Activate cookies!" regardless of my cookie settings. But if I disallow cookies, Chrome tells me that a cookie could not be set.
Any idea how to test cookie availability with JavaScript in Chrome?
[1]: http://stackoverflow.com/questions/703761/ | javascript | cookies | google-chrome | null | null | null | open | How to test whether a browser accepts cookies with JavaScript?
===
I want to test with JavaScript whether the browser supports cookies or not. The following [code][1] works with Internet Explorer 8 and Firefox 3.6 but not with Google Chrome 5.
function areCookiesEnabled() {
document.cookie = "__verify=1";
var supportsCookies = document.cookie.length > 1 &&
document.cookie.indexOf("__verify=1") > -1;
var thePast = new Date(1976, 8, 16);
document.cookie = "__verify=1;expires=" + thePast.toUTCString();
return supportsCookies;
}
if(!areCookiesEnabled())
document.write("<p>Activate cookies!</p>");
else
document.write("<p>cookies ok</p>");
Chrome displays the message "Activate cookies!" regardless of my cookie settings. But if I disallow cookies, Chrome tells me that a cookie could not be set.
Any idea how to test cookie availability with JavaScript in Chrome?
[1]: http://stackoverflow.com/questions/703761/ | 0 |
8,424,300 | 12/07/2011 23:43:53 | 983,667 | 10/07/2011 08:59:17 | 37 | 1 | retrieve data from database which contain more than one data | I want to retrieve data from sqlite. user can have more than 1 score and i want to display it. it can show if user just have only one score, but it shows blank screen if user have more than one score.
These are my code
ScoreDetailActivity.java
public class ScoreDetailActivity extends Activity {
protected TextView userName;
protected TextView score;
protected int user_Id;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.scoredetail);
user_Id = getIntent().getIntExtra("USER_ID", 0);
SQLiteDatabase db = (new DatabaseUsername(this)).getWritableDatabase();
Cursor cursor = db.rawQuery("SELECT alm._id, alm.nama, alm.jekel, sc._id, sc.score, sc.userId FROM almag alm LEFT OUTER JOIN score sc ON alm._id = sc.userId WHERE alm._id = ?",
new String[]{""+user_Id});
if (cursor.getCount() == 1)
{
cursor.moveToFirst();
userName = (TextView) findViewById(R.id.userName);
userName.setText(cursor.getString(cursor.getColumnIndex("nama")));
score = (TextView) findViewById(R.id.score);
score.setText(cursor.getString(cursor.getColumnIndex("score")));
}
}}
scoredetail.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/userName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
I hope someone can help. Thank you | android | database | sqlite | cursor | null | null | open | retrieve data from database which contain more than one data
===
I want to retrieve data from sqlite. user can have more than 1 score and i want to display it. it can show if user just have only one score, but it shows blank screen if user have more than one score.
These are my code
ScoreDetailActivity.java
public class ScoreDetailActivity extends Activity {
protected TextView userName;
protected TextView score;
protected int user_Id;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.scoredetail);
user_Id = getIntent().getIntExtra("USER_ID", 0);
SQLiteDatabase db = (new DatabaseUsername(this)).getWritableDatabase();
Cursor cursor = db.rawQuery("SELECT alm._id, alm.nama, alm.jekel, sc._id, sc.score, sc.userId FROM almag alm LEFT OUTER JOIN score sc ON alm._id = sc.userId WHERE alm._id = ?",
new String[]{""+user_Id});
if (cursor.getCount() == 1)
{
cursor.moveToFirst();
userName = (TextView) findViewById(R.id.userName);
userName.setText(cursor.getString(cursor.getColumnIndex("nama")));
score = (TextView) findViewById(R.id.score);
score.setText(cursor.getString(cursor.getColumnIndex("score")));
}
}}
scoredetail.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/userName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
I hope someone can help. Thank you | 0 |
9,426,528 | 02/24/2012 06:42:37 | 225,264 | 12/05/2009 04:30:46 | 150 | 1 | HTML selected="selected" not working | Hi can somebody tell me what is the wrong in the below code?
Selected="selected" not working for me.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<select id="tstselect" name="tstselect">
<option value="0" >0</option>
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" selected="selected">3</option>
</select>
Thanks in advance
| html | select | null | null | null | 02/24/2012 18:53:52 | too localized | HTML selected="selected" not working
===
Hi can somebody tell me what is the wrong in the below code?
Selected="selected" not working for me.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<select id="tstselect" name="tstselect">
<option value="0" >0</option>
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" selected="selected">3</option>
</select>
Thanks in advance
| 3 |
4,166,621 | 11/12/2010 16:12:48 | 412,168 | 08/05/2010 16:12:58 | 52 | 0 | Error occured during build the source code of Android 2.2 | A fatal error occured while making build of Android 2.2 source code.
The error occured can be found in this link: http://pastie.org/1292955 | android | null | null | null | null | 12/19/2011 15:17:47 | not a real question | Error occured during build the source code of Android 2.2
===
A fatal error occured while making build of Android 2.2 source code.
The error occured can be found in this link: http://pastie.org/1292955 | 1 |
5,916,829 | 05/06/2011 20:45:24 | 44,732 | 12/09/2008 20:14:37 | 148 | 17 | Redirect apache commons logging to Eclipse's logging mechanism? | I'm trying to use the `org.apache.commons.httpclient` plugin in a Eclipse RCP application I'm writing.
For some reason the logging from the httpclient plugin is going to stderr (via apache commons logging, I think).
Does anyone know if there is a way to redirect the logging from the httpclient plugin to the standard Eclipse logging mechanism?
Thanks! | eclipse | apache | logging | httpclient | apache-commons | null | open | Redirect apache commons logging to Eclipse's logging mechanism?
===
I'm trying to use the `org.apache.commons.httpclient` plugin in a Eclipse RCP application I'm writing.
For some reason the logging from the httpclient plugin is going to stderr (via apache commons logging, I think).
Does anyone know if there is a way to redirect the logging from the httpclient plugin to the standard Eclipse logging mechanism?
Thanks! | 0 |
6,775,647 | 07/21/2011 11:58:26 | 523,811 | 11/29/2010 11:02:50 | 294 | 23 | rails 3 pagination with kaminari on mongoid embedded documents | When I call paginate with kaminari on a collection of embedded documents I get the following error:
(Access to the collection for Document is not allowed since it is an embedded document, please access a collection from the root document.):
Any idea on how I can fix that ? I have installed kaminari as a gem.
Alex | ruby-on-rails-3 | embedded | mongoid | kaminari | null | null | open | rails 3 pagination with kaminari on mongoid embedded documents
===
When I call paginate with kaminari on a collection of embedded documents I get the following error:
(Access to the collection for Document is not allowed since it is an embedded document, please access a collection from the root document.):
Any idea on how I can fix that ? I have installed kaminari as a gem.
Alex | 0 |
9,978,336 | 04/02/2012 14:33:33 | 923,613 | 04/22/2010 11:32:05 | 163 | 15 | IOS NSString return statement | There is some code that I am using written by someone else that I have a question....
NSString *c = @"test"; // "Local" string
NSString *d = [NSString alloc]initWithString:@"test"]; // "Heap" string
const char *c = "test";
return [NSString stringWithUTF8String:c]; // ??
I am not sure what the return statement in this case is returning. I would have written it something like...
return [NSString alloc]initWithUTF8String:c];
or
return [NSString alloc]initWithUTF8String:c]autorelease];
Why would the return statement be written like above?
| ios | cocoa | nsstring | null | null | null | open | IOS NSString return statement
===
There is some code that I am using written by someone else that I have a question....
NSString *c = @"test"; // "Local" string
NSString *d = [NSString alloc]initWithString:@"test"]; // "Heap" string
const char *c = "test";
return [NSString stringWithUTF8String:c]; // ??
I am not sure what the return statement in this case is returning. I would have written it something like...
return [NSString alloc]initWithUTF8String:c];
or
return [NSString alloc]initWithUTF8String:c]autorelease];
Why would the return statement be written like above?
| 0 |
10,769,850 | 05/26/2012 21:17:09 | 1,327,540 | 04/11/2012 20:07:28 | 1 | 0 | How do I get started with FMJ in Eclipse? | I am planning to build a program that deals with Streaming of audio over a network.
For this project, I choose to use FMJ. However, I can't manage to even start. I haven't imported many libraries before, and there is practically no information available for FMJ. I simply cannot get my project to use FMJ. | java | media | fmj | null | null | null | open | How do I get started with FMJ in Eclipse?
===
I am planning to build a program that deals with Streaming of audio over a network.
For this project, I choose to use FMJ. However, I can't manage to even start. I haven't imported many libraries before, and there is practically no information available for FMJ. I simply cannot get my project to use FMJ. | 0 |
4,673,411 | 01/12/2011 19:59:59 | 409,333 | 08/03/2010 06:18:41 | 86 | 0 | Creating a language interpreter | Can anybody give me tutorial on Creating a language interpreter?
i want to change for example syntax of for,.. | c++ | c | null | null | null | 01/12/2011 20:54:09 | not a real question | Creating a language interpreter
===
Can anybody give me tutorial on Creating a language interpreter?
i want to change for example syntax of for,.. | 1 |
11,608,163 | 07/23/2012 07:34:20 | 1,262,131 | 03/11/2012 10:37:46 | 17 | 0 | Need to create pdf files dynamically for each patient in asp.net c# | I need to create seprate pdf file for each n number of patients all together. So if anyone selects that patient in the gridview it should open that individual patient pdf.
Please someone tell me how to approach for this. | c# | asp.net | pdf-generation | null | null | 07/24/2012 01:23:58 | not constructive | Need to create pdf files dynamically for each patient in asp.net c#
===
I need to create seprate pdf file for each n number of patients all together. So if anyone selects that patient in the gridview it should open that individual patient pdf.
Please someone tell me how to approach for this. | 4 |
438,446 | 01/13/2009 09:30:54 | 52,025 | 01/06/2009 12:42:25 | 11 | 2 | xcopy at logon | Our client are having problems when logging in on their WinXP (fully updated) computers. We run a batch script that copies files and folders using xcopy.
No files are copied, but folders are created.
If I run the xcopy manually then there is no problems.
One of the source folders have non-english characters in its name. After I removed those, both batch and manually worked fine.
So this must be a case of character-set issue. Any idea how do fix it so we can keep the non-english characters in folder name ? | xcopy | windows | batch | null | null | 01/13/2009 09:33:12 | off topic | xcopy at logon
===
Our client are having problems when logging in on their WinXP (fully updated) computers. We run a batch script that copies files and folders using xcopy.
No files are copied, but folders are created.
If I run the xcopy manually then there is no problems.
One of the source folders have non-english characters in its name. After I removed those, both batch and manually worked fine.
So this must be a case of character-set issue. Any idea how do fix it so we can keep the non-english characters in folder name ? | 2 |
2,450,913 | 03/15/2010 22:29:22 | 234,944 | 12/19/2009 01:33:27 | 572 | 27 | Upcasting without any added data fields. | In my project I have a generic `Packet` class. I would like to be able to upcast to other classes (like `LoginPacket` or `MovePacket`).
The base class contains a command and arguments (greatly simplified):
public class Packet
{
public String Command;
public String[] Arguments;
}
I would like to have be able to convert from Packet to LoginPacket (or any other) based on a check if `Packet.Command == "LOGIN"`. The login packet would not contain any new data members, but only methods for accessing specific arguments. For example:
public class LoginPacket : Packet
{
public String Username
{
get { return Arguments[0]; }
set { Arguments[0] == value; }
}
public String Password
{
get { return Arguments[1]; }
set { Arguments[1] == value; }
}
}
It would be great if I could run a simple code that would cast from `Packet` to `LoginPacket` with something like `LoginPacket _Login = (LoginPacket)_Packet;`, but that throws a `System.InvalidCastException`.
It seems like this would be an easy task, as no new data is included, but I can't figure out any other way than copying everything from the `Packet` class to a new `LoginPacket` class. | c# | casting | class | types | null | null | open | Upcasting without any added data fields.
===
In my project I have a generic `Packet` class. I would like to be able to upcast to other classes (like `LoginPacket` or `MovePacket`).
The base class contains a command and arguments (greatly simplified):
public class Packet
{
public String Command;
public String[] Arguments;
}
I would like to have be able to convert from Packet to LoginPacket (or any other) based on a check if `Packet.Command == "LOGIN"`. The login packet would not contain any new data members, but only methods for accessing specific arguments. For example:
public class LoginPacket : Packet
{
public String Username
{
get { return Arguments[0]; }
set { Arguments[0] == value; }
}
public String Password
{
get { return Arguments[1]; }
set { Arguments[1] == value; }
}
}
It would be great if I could run a simple code that would cast from `Packet` to `LoginPacket` with something like `LoginPacket _Login = (LoginPacket)_Packet;`, but that throws a `System.InvalidCastException`.
It seems like this would be an easy task, as no new data is included, but I can't figure out any other way than copying everything from the `Packet` class to a new `LoginPacket` class. | 0 |
2,276,124 | 02/16/2010 20:34:31 | 164,299 | 08/27/2009 15:30:18 | 1,421 | 39 | What is the difference between Registry and Repositry from SOA point of view ? | - What is difference between Registry
and Repositry from SOA point of view
?
- Which one should be used ? What are pros and cons of one over other and vice-versa ? | soa | registry | repository | architecture | design-patterns | null | open | What is the difference between Registry and Repositry from SOA point of view ?
===
- What is difference between Registry
and Repositry from SOA point of view
?
- Which one should be used ? What are pros and cons of one over other and vice-versa ? | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.