PostId int64 13 11.8M | PostCreationDate stringlengths 19 19 | OwnerUserId int64 3 1.57M | OwnerCreationDate stringlengths 10 19 | ReputationAtPostCreation int64 -33 210k | OwnerUndeletedAnswerCountAtPostTime int64 0 5.77k | Title stringlengths 10 250 | BodyMarkdown stringlengths 12 30k | Tag1 stringlengths 1 25 ⌀ | Tag2 stringlengths 1 25 ⌀ | Tag3 stringlengths 1 25 ⌀ | Tag4 stringlengths 1 25 ⌀ | Tag5 stringlengths 1 25 ⌀ | PostClosedDate stringlengths 19 19 ⌀ | OpenStatus stringclasses 5 values | unified_texts stringlengths 47 30.1k | OpenStatus_id int64 0 4 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,627,317 | 09/02/2010 13:01:00 | 434,533 | 08/30/2010 01:26:46 | 13 | 0 | How to change output filename if it originally is something else. | I have two files with different names. I have a for-loop to see if one file is there.. if it is then it will change a file.
My first tought where to make a list on all the files and what it's counterpart is. That would not look nice and i can't cover all possibilities in the script. If this is the only way.. how would i do it best?
The script will find if a program has an icon on the desktop. If it has then my script will change the size of that with imagemagick. My problem is that the name of the program not always is the same as the icon-file. So i am not sure what the best action would be... | bash | change | filenames | null | null | null | open | How to change output filename if it originally is something else.
===
I have two files with different names. I have a for-loop to see if one file is there.. if it is then it will change a file.
My first tought where to make a list on all the files and what it's counterpart is. That would not look nice and i can't cover all possibilities in the script. If this is the only way.. how would i do it best?
The script will find if a program has an icon on the desktop. If it has then my script will change the size of that with imagemagick. My problem is that the name of the program not always is the same as the icon-file. So i am not sure what the best action would be... | 0 |
5,752,112 | 04/22/2011 03:50:12 | 108,207 | 05/16/2009 17:51:55 | 790 | 119 | How to reduce blank space in html? | Hi my desired output is:![enter image description here][1]
My de facto output has too much blank space:
![enter image description here][2]
[1]: http://i.stack.imgur.com/fnNdo.png
[2]: http://i.stack.imgur.com/fulQF.png
The code is
<div id="tabarea"><ul id="tabnav"><li class="tab_all"><strong>All</strong></li><li class="tab_private"><a title="Display only info from privates" href="?t=&f=p" >Private<span class="tab_right_links"></span></a></li><li class="tab_company"><a title="Show only info from companies" href="?t=&f=c" >Company<span class="tab_right_links"></span></a></li></ul></div><table><tr><td><table class="listingWithImages" border="0px"><tr><td>4 hours, 3 minutes</td><td><img src="http://localhost:8080/_ah/img/8oUwXdeweiQmEq_ESy33RQ===s100"></td><td><a href="/servead/105">Test2</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYaQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 14 minutes</td><td><img src="http://localhost:8080/_ah/img/HmoH2SsmUcoPOKiJZM-gVw===s100"></td><td><a href="/servead/102">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYZgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 15 minutes</td><td><img src="http://localhost:8080/_ah/img/zrBsUrSO6T_g48xvf_3GDQ===s100"></td><td><a href="/servead/100">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYZAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 16 minutes</td><td><img src="http://localhost:8080/_ah/img/mTQP6dGy9OJqChqujxL6PA===s100"></td><td><a href="/servead/98">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYYgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 17 minutes</td><td><img src="http://localhost:8080/_ah/img/KVMHyBo32fWE_ruH8a7zjQ===s100"></td><td><a href="/servead/96">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYYAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 19 minutes</td><td></td><td><a href="/94/test">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYXgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 22 minutes</td><td><img src="/images/93.png" alt="Test"/></td><td><a href="/90/test">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYWgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 days, 15 hours</td><td></td><td><a href="/72/computer-services">Computer services</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYSAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 days, 22 hours</td><td></td><td><a href="/68/test">Test</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYRAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 days, 22 hours</td><td></td><td><a href="/67/test">Test</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYQww" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 days, 22 hours</td><td></td><td><a href="/64/test">Test</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYQAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 17 hours</td><td></td><td><a href="/63/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYPww" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 18 hours</td><td></td><td><a href="/57/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYOQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 20 hours</td><td></td><td><a href="/52/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYNAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 21 hours</td><td><img src="http://localhost:8080/_ah/img/hFT-PUQJfOX1jh_P5Zl80A===s100"></td><td><a href="/servead/50">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYMgw" style="margin:0; padding:0 display:inline"></span></td><td></td></tr><tr><td>5 days, 22 hours</td><td><img src="http://localhost:8080/_ah/img/SnoEEZiYDBbWNauTqvKhTg===s100"></td><td><a href="/servead/46">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYLgw" style="margin:0; padding:0 display:inline"></span></td><td></td></tr><tr><td>5 days, 22 hours</td><td></td><td><a href="/42/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYKgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 22 hours</td><td></td><td><a href="/40/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYKAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 22 hours</td><td></td><td><a href="/39/frankwin-international-educatoin-and-immigration">Frankwin International, Educatoin and Immigration</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYJww" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 22 hours</td><td></td><td><a href="/36/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYJAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 2 hours</td><td></td><td><a href="/34/"></a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYIgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 3 hours</td><td></td><td><a href="/33/"></a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYIQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 3 hours</td><td></td><td><a href="/29/computer-services">Computer services</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYHQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 3 hours</td><td></td><td><a href="/28/computer-services">Computer services</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYHAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 3 hours</td><td></td><td><a href="/25/computer-services">Computer services</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYGQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>1 week</td><td></td><td><a href="/22/test">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYFgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>1 week</td><td></td><td><a href="/21/"></a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYFQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>1 week</td><td></td><td><a href="/18/"></a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYEgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>1 week, 6 days</td><td><img src="/images/6.png" alt="Computer ..."/></td><td><a href="/3/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYAww" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr></table></td><td><script type="text/javascript"><!--
google_ad_client = "ca-pub-7211665888260307";
/* rektanglar i lista */
google_ad_slot = "7024728308";
google_ad_width = 336;
google_ad_height = 280;
//--></script><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br><script type="text/javascript"><!--
google_ad_client = "ca-pub-7211665888260307";
/* rektanglar i lista */
google_ad_slot = "7024728308";
google_ad_width = 336;
google_ad_height = 280;
//--></script><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></td></tr></table></div>
Can you see how I should do to reduce to blank space I get? Thank you | html | css | table | adsense | null | 10/01/2011 22:09:20 | too localized | How to reduce blank space in html?
===
Hi my desired output is:![enter image description here][1]
My de facto output has too much blank space:
![enter image description here][2]
[1]: http://i.stack.imgur.com/fnNdo.png
[2]: http://i.stack.imgur.com/fulQF.png
The code is
<div id="tabarea"><ul id="tabnav"><li class="tab_all"><strong>All</strong></li><li class="tab_private"><a title="Display only info from privates" href="?t=&f=p" >Private<span class="tab_right_links"></span></a></li><li class="tab_company"><a title="Show only info from companies" href="?t=&f=c" >Company<span class="tab_right_links"></span></a></li></ul></div><table><tr><td><table class="listingWithImages" border="0px"><tr><td>4 hours, 3 minutes</td><td><img src="http://localhost:8080/_ah/img/8oUwXdeweiQmEq_ESy33RQ===s100"></td><td><a href="/servead/105">Test2</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYaQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 14 minutes</td><td><img src="http://localhost:8080/_ah/img/HmoH2SsmUcoPOKiJZM-gVw===s100"></td><td><a href="/servead/102">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYZgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 15 minutes</td><td><img src="http://localhost:8080/_ah/img/zrBsUrSO6T_g48xvf_3GDQ===s100"></td><td><a href="/servead/100">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYZAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 16 minutes</td><td><img src="http://localhost:8080/_ah/img/mTQP6dGy9OJqChqujxL6PA===s100"></td><td><a href="/servead/98">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYYgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 17 minutes</td><td><img src="http://localhost:8080/_ah/img/KVMHyBo32fWE_ruH8a7zjQ===s100"></td><td><a href="/servead/96">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYYAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 19 minutes</td><td></td><td><a href="/94/test">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYXgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 22 minutes</td><td><img src="/images/93.png" alt="Test"/></td><td><a href="/90/test">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYWgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 days, 15 hours</td><td></td><td><a href="/72/computer-services">Computer services</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYSAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 days, 22 hours</td><td></td><td><a href="/68/test">Test</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYRAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 days, 22 hours</td><td></td><td><a href="/67/test">Test</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYQww" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 days, 22 hours</td><td></td><td><a href="/64/test">Test</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYQAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 17 hours</td><td></td><td><a href="/63/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYPww" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 18 hours</td><td></td><td><a href="/57/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYOQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 20 hours</td><td></td><td><a href="/52/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYNAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 21 hours</td><td><img src="http://localhost:8080/_ah/img/hFT-PUQJfOX1jh_P5Zl80A===s100"></td><td><a href="/servead/50">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYMgw" style="margin:0; padding:0 display:inline"></span></td><td></td></tr><tr><td>5 days, 22 hours</td><td><img src="http://localhost:8080/_ah/img/SnoEEZiYDBbWNauTqvKhTg===s100"></td><td><a href="/servead/46">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYLgw" style="margin:0; padding:0 display:inline"></span></td><td></td></tr><tr><td>5 days, 22 hours</td><td></td><td><a href="/42/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYKgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 22 hours</td><td></td><td><a href="/40/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYKAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 22 hours</td><td></td><td><a href="/39/frankwin-international-educatoin-and-immigration">Frankwin International, Educatoin and Immigration</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYJww" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 22 hours</td><td></td><td><a href="/36/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYJAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 2 hours</td><td></td><td><a href="/34/"></a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYIgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 3 hours</td><td></td><td><a href="/33/"></a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYIQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 3 hours</td><td></td><td><a href="/29/computer-services">Computer services</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYHQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 3 hours</td><td></td><td><a href="/28/computer-services">Computer services</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYHAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 3 hours</td><td></td><td><a href="/25/computer-services">Computer services</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYGQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>1 week</td><td></td><td><a href="/22/test">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYFgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>1 week</td><td></td><td><a href="/21/"></a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYFQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>1 week</td><td></td><td><a href="/18/"></a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYEgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>1 week, 6 days</td><td><img src="/images/6.png" alt="Computer ..."/></td><td><a href="/3/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYAww" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr></table></td><td><script type="text/javascript"><!--
google_ad_client = "ca-pub-7211665888260307";
/* rektanglar i lista */
google_ad_slot = "7024728308";
google_ad_width = 336;
google_ad_height = 280;
//--></script><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br><script type="text/javascript"><!--
google_ad_client = "ca-pub-7211665888260307";
/* rektanglar i lista */
google_ad_slot = "7024728308";
google_ad_width = 336;
google_ad_height = 280;
//--></script><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></td></tr></table></div>
Can you see how I should do to reduce to blank space I get? Thank you | 3 |
8,266,983 | 11/25/2011 09:25:56 | 681,808 | 03/29/2011 09:53:28 | 39 | 0 | Min requirement to run java class file? | Please tell me the minimum things required for me to run the java class file in windows server 2008 R2 | java | null | null | null | null | 11/25/2011 11:09:39 | not a real question | Min requirement to run java class file?
===
Please tell me the minimum things required for me to run the java class file in windows server 2008 R2 | 1 |
4,336,755 | 12/02/2010 15:41:52 | 475,353 | 10/14/2010 05:20:48 | 317 | 16 | What exactly is .Net? | Like dont get me wrong, i've read about it.
But I dont exactly understand what it is. In a previous thread I talked about wanting to learn more GUI based stuff. C# and (WPF or w/e it's called) seemed to be the best option for a newbie. But then people mentioned .net......is that like a new language.
Like how exactly does it integrate with C# and WPF and such?
Also completely off topic. Is C# even being used much anymore? or has it kinda been going downhill? | c# | .net | null | null | null | 12/03/2010 15:54:58 | not constructive | What exactly is .Net?
===
Like dont get me wrong, i've read about it.
But I dont exactly understand what it is. In a previous thread I talked about wanting to learn more GUI based stuff. C# and (WPF or w/e it's called) seemed to be the best option for a newbie. But then people mentioned .net......is that like a new language.
Like how exactly does it integrate with C# and WPF and such?
Also completely off topic. Is C# even being used much anymore? or has it kinda been going downhill? | 4 |
11,261,903 | 06/29/2012 12:36:39 | 935,394 | 09/08/2011 17:24:56 | 182 | 4 | The pros and cons of a mobile web app vs a ios native app | I'm trying to compile a list of the pros and cons of a mobile web app vs a native app.
I find that native apps are a lot smoother when it comes to animations. I've also found that moving from page to page on a native app is a lot faster because most of the UI is on the device so the amount downloaded is a lot smaller.
The path app has some beautiful animations and the UX is very nice. I'm not sure this app would be as good if it wasn't a native one.
I havn't come across any really nice mobile web apps. There are some good frameworks out there. I have used jQuery mobile and while it seems good, I think it still has some work to be done to get it really useful.
So my question is:
**What do you think the main pros/cons of a mobile web app are compared to a native ios app?** | ios | html5 | web-applications | mobile | null | 06/30/2012 05:54:06 | not constructive | The pros and cons of a mobile web app vs a ios native app
===
I'm trying to compile a list of the pros and cons of a mobile web app vs a native app.
I find that native apps are a lot smoother when it comes to animations. I've also found that moving from page to page on a native app is a lot faster because most of the UI is on the device so the amount downloaded is a lot smaller.
The path app has some beautiful animations and the UX is very nice. I'm not sure this app would be as good if it wasn't a native one.
I havn't come across any really nice mobile web apps. There are some good frameworks out there. I have used jQuery mobile and while it seems good, I think it still has some work to be done to get it really useful.
So my question is:
**What do you think the main pros/cons of a mobile web app are compared to a native ios app?** | 4 |
7,426,701 | 09/15/2011 06:25:41 | 855,171 | 07/21/2011 04:23:24 | 92 | 2 | mapping many-to-one in django and playframework | I need to model a Customer and an Address for applications in django as well as in Play!.I believe that two Customers can have the same address.
So a Many to One relation between Customer and Address
class Customer extends play.db.jpa.Model{
@ManyToOne
public Address address;
..
}
In django ,does this python code below give similar mapping?
class Address(models.Model):
customer= models.ForeignKey(Customer)
What will be the tables created like?I am slightly confused here..
| java | django | playframework | many-to-one | null | null | open | mapping many-to-one in django and playframework
===
I need to model a Customer and an Address for applications in django as well as in Play!.I believe that two Customers can have the same address.
So a Many to One relation between Customer and Address
class Customer extends play.db.jpa.Model{
@ManyToOne
public Address address;
..
}
In django ,does this python code below give similar mapping?
class Address(models.Model):
customer= models.ForeignKey(Customer)
What will be the tables created like?I am slightly confused here..
| 0 |
8,971,405 | 01/23/2012 12:14:08 | 930,777 | 09/06/2011 13:34:25 | 4 | 0 | Remote Synchronized Virtual Desktop | wikipedia --> Remote Synchronized virtual desktops
*"Remote VDI instances takes the concept of a centralized VDI image that is maintained by an IT department, and adds the ability to work while disconnected from a central server or internet.
An image is copied to a local system, where it may run without requiring a network connection. Images are "checked out" for a period of time, and typically need to be refreshed periodically. The local system typically runs an operating system, along with a hypervisor, which in turn runs the VDI instance. Thus, this model requires more local CPU, memory and disk space than alternative forms of VDI. Additionally, security and other issues can be of greater concern for this model. However, this model enables traveling and other highly mobile users to utilize virtual desktops without network connectivity restraints."*
Can we run the operating system if we have the VDI only, which tools we need to run VDI in different system. | synchronization | virtualization | null | null | null | 01/23/2012 20:42:00 | off topic | Remote Synchronized Virtual Desktop
===
wikipedia --> Remote Synchronized virtual desktops
*"Remote VDI instances takes the concept of a centralized VDI image that is maintained by an IT department, and adds the ability to work while disconnected from a central server or internet.
An image is copied to a local system, where it may run without requiring a network connection. Images are "checked out" for a period of time, and typically need to be refreshed periodically. The local system typically runs an operating system, along with a hypervisor, which in turn runs the VDI instance. Thus, this model requires more local CPU, memory and disk space than alternative forms of VDI. Additionally, security and other issues can be of greater concern for this model. However, this model enables traveling and other highly mobile users to utilize virtual desktops without network connectivity restraints."*
Can we run the operating system if we have the VDI only, which tools we need to run VDI in different system. | 2 |
10,140,458 | 04/13/2012 12:04:39 | 1,306,207 | 04/01/2012 11:20:51 | 58 | 0 | Java - Recursion to Iterative method | I've wrote a recursive method and and trying to convert it into an iterative solution. However I'm having trouble doing it? Any ideas?
public static int recP(int n) {
if (n == 0 || n == 1 || n == 2) {
return 1;
} else {
return (recP(n-3) * recP(n-1)) + 1;
}
} | java | recursion | iteration | null | null | 04/13/2012 12:15:10 | too localized | Java - Recursion to Iterative method
===
I've wrote a recursive method and and trying to convert it into an iterative solution. However I'm having trouble doing it? Any ideas?
public static int recP(int n) {
if (n == 0 || n == 1 || n == 2) {
return 1;
} else {
return (recP(n-3) * recP(n-1)) + 1;
}
} | 3 |
8,238,612 | 11/23/2011 07:32:15 | 1,024,302 | 11/01/2011 18:44:04 | 1 | 0 | how to filter sharepoint list on the basis of logged in users group in sharepoint 2010 | I have a sharepoint list which consist of one lookup column as company. I have created sharepoint group by adding event reciever to the company list. so company name is group in my sharepoint site. So when user logged-in, he must have seen the items related to his sharepoint group.
Is it possible to do? How? | visual-studio-2010 | sharepoint | sharepoint2010 | sharepoint-designer | null | 11/23/2011 07:44:48 | off topic | how to filter sharepoint list on the basis of logged in users group in sharepoint 2010
===
I have a sharepoint list which consist of one lookup column as company. I have created sharepoint group by adding event reciever to the company list. so company name is group in my sharepoint site. So when user logged-in, he must have seen the items related to his sharepoint group.
Is it possible to do? How? | 2 |
9,815,942 | 03/22/2012 03:15:37 | 1,227,296 | 02/23/2012 01:54:39 | 8 | 1 | XCODE: relative coordinate calculation in custom map | Im currently working on a mapping app for iPhone. I've created some custom maps of various sizes, but Ive run into an issue:
I would like to implement the ability for users' locations to be checked automatically, but since Im not using a MapView this is much more dificult. (see below)
image: http://i.stack.imgur.com/508wV.png
given the different coordinate systems, I would like to receive a geolocation (green dot) and translate it into a pixel location on a custom map.
Ive got the geolocations for the 4 corners, but the rect is askew. Ive calculated the angle of rotation, but Im just generally confused.
note: the size of the maps arent big enough for the spherical nature of the earth to come into calculation.
Any help is appreciated! | iphone | map | geolocation | maps | trigonometry | null | open | XCODE: relative coordinate calculation in custom map
===
Im currently working on a mapping app for iPhone. I've created some custom maps of various sizes, but Ive run into an issue:
I would like to implement the ability for users' locations to be checked automatically, but since Im not using a MapView this is much more dificult. (see below)
image: http://i.stack.imgur.com/508wV.png
given the different coordinate systems, I would like to receive a geolocation (green dot) and translate it into a pixel location on a custom map.
Ive got the geolocations for the 4 corners, but the rect is askew. Ive calculated the angle of rotation, but Im just generally confused.
note: the size of the maps arent big enough for the spherical nature of the earth to come into calculation.
Any help is appreciated! | 0 |
3,932,777 | 10/14/2010 11:51:44 | 294,900 | 03/16/2010 15:42:50 | 1 | 2 | Problem with iTunes and change a resource file on an app without compile again with xcode | I have a scenario to fill for a client: he want to have an ad-hoc app, were he can
change a file (in this case an .xml file) when he want, without using xcode (because they dont
have any mac). I created this file, but when I change something inside, copy to itunes again
and I try to install, it says that the resources has been modified and it stops.
Is any solution or the client must have xcode, compile every time this file change and reinstall?
thanks guys! | xcode | resources | application | itunes | modify | null | open | Problem with iTunes and change a resource file on an app without compile again with xcode
===
I have a scenario to fill for a client: he want to have an ad-hoc app, were he can
change a file (in this case an .xml file) when he want, without using xcode (because they dont
have any mac). I created this file, but when I change something inside, copy to itunes again
and I try to install, it says that the resources has been modified and it stops.
Is any solution or the client must have xcode, compile every time this file change and reinstall?
thanks guys! | 0 |
6,718,754 | 07/16/2011 16:35:03 | 767,244 | 05/24/2011 06:54:17 | 391 | 0 | Are there any plugins or modules like django flatpages for java in spring | Current i use django and pyton for web development.
I know java spring hibernate but not to advanced level.
MY main aim to build website with user registration and some static pages.
Now in django the flat pages modules are best for static pages and this is most commonly used.
I want to know that is there anything like that which i can use in java with spring. so that i don't have to code. becaus ei find it very hard to code the whole admin section for simple websites | java | django | spring | null | null | null | open | Are there any plugins or modules like django flatpages for java in spring
===
Current i use django and pyton for web development.
I know java spring hibernate but not to advanced level.
MY main aim to build website with user registration and some static pages.
Now in django the flat pages modules are best for static pages and this is most commonly used.
I want to know that is there anything like that which i can use in java with spring. so that i don't have to code. becaus ei find it very hard to code the whole admin section for simple websites | 0 |
2,739,815 | 04/29/2010 18:34:30 | 229,993 | 12/11/2009 21:55:37 | 3 | 0 | Data binding of itemscontrol in Silverlight 3.0 | I am trying to define an itemscontrol and data bind it to a List<T> and the code is as below.
**XAML**
<ItemsControl x:Name="ic" >
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding val}" TextWrapping="Wrap" Width="195" />
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Item Class
public class Item
{
public string val;
}
XAML.cs
public MainPage()
{
InitializeComponent();
List<Item> items = new List<Item>();
Item item1 = new Item();
item1.val = "iasl;fdj1";
items.Add(item1);
Item item2 = new Item();
item2.val = "iasfdkasdkljf2";
items.Add(item2);
ic.ItemsSource = items;
}
The items are displayed when I run this. Am I missing something? | silverlight-3.0 | itemscontrol | null | null | null | null | open | Data binding of itemscontrol in Silverlight 3.0
===
I am trying to define an itemscontrol and data bind it to a List<T> and the code is as below.
**XAML**
<ItemsControl x:Name="ic" >
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding val}" TextWrapping="Wrap" Width="195" />
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Item Class
public class Item
{
public string val;
}
XAML.cs
public MainPage()
{
InitializeComponent();
List<Item> items = new List<Item>();
Item item1 = new Item();
item1.val = "iasl;fdj1";
items.Add(item1);
Item item2 = new Item();
item2.val = "iasfdkasdkljf2";
items.Add(item2);
ic.ItemsSource = items;
}
The items are displayed when I run this. Am I missing something? | 0 |
8,119,428 | 11/14/2011 09:19:55 | 831,022 | 07/06/2011 06:56:29 | 98 | 1 | JQuery var myFunction = function() {}; vs fuction myFunction() {}; | what do you think which one is the better, faster, nicer solution to declair a function.
First:
(var) myFunction = function(){
//Stuff to do
};
or Second:
function myFunction() {
//Stuff to do
};
Both will work in JavaScript and JQuery. But what do you think is better?
Regards | javascript | jquery | null | null | null | 11/14/2011 13:54:25 | not a real question | JQuery var myFunction = function() {}; vs fuction myFunction() {};
===
what do you think which one is the better, faster, nicer solution to declair a function.
First:
(var) myFunction = function(){
//Stuff to do
};
or Second:
function myFunction() {
//Stuff to do
};
Both will work in JavaScript and JQuery. But what do you think is better?
Regards | 1 |
11,291,832 | 07/02/2012 10:24:39 | 1,129,530 | 01/04/2012 08:53:47 | 68 | 3 | get pics and coments from facebook | i'm currently working on a project which is going to upload pictures to facebook account from camera(already_done) and then user can see comments on that picture posted by facebook users.
So the question is how can i get picture and comments from facebook?
I would be pleased if someone could point me in the right direction. | java | android | facebook | null | null | 07/03/2012 02:46:10 | not a real question | get pics and coments from facebook
===
i'm currently working on a project which is going to upload pictures to facebook account from camera(already_done) and then user can see comments on that picture posted by facebook users.
So the question is how can i get picture and comments from facebook?
I would be pleased if someone could point me in the right direction. | 1 |
11,382,089 | 07/08/2012 09:34:15 | 1,464,139 | 06/18/2012 15:44:14 | 82 | 0 | I am trying to use a set in a class but it's not working | I have coded the following in my class:
public bool SetModified(DateTime date, string user)
{
set {
this.Content.Created = DateTime.Now;
this.Content.ModifiedBy = user;
}
}
It gives me an error just after "set {" saying ";" expected. Am I doing something wrong. I just can't see why I get the error. | c# | null | null | null | null | null | open | I am trying to use a set in a class but it's not working
===
I have coded the following in my class:
public bool SetModified(DateTime date, string user)
{
set {
this.Content.Created = DateTime.Now;
this.Content.ModifiedBy = user;
}
}
It gives me an error just after "set {" saying ";" expected. Am I doing something wrong. I just can't see why I get the error. | 0 |
2,677,262 | 04/20/2010 17:29:03 | 266,720 | 02/05/2010 01:55:36 | 68 | 8 | How can I "interconnect" two sockets in Linux? | There are two connected sockets. How can I interconnect them?
1. Data appeared on the one socket should be written to the other.
2. EOF/FIN should propogate well. If one is half-closed, the other should also be half-closed.
<pre>
int client = get_connected_client_socket();
int proxy = get_connected_proxy_socket();
negotiate_with_proxy(proxy);
iterconnect(client, proxy);
// Now forgot about both client and proxy.
// System should handle IO/shutdown/close.
// Ideally even without any support of the user-space process.
</pre>
Can Linux do it? Can it be done by tricking connection tracking to change tracking status of existing connection?
@related <http://stackoverflow.com/questions/2673975/determine-how-much-can-i-write-into-a-filehandle-copying-data-from-one-fh-to-the>
| linux | sockets | networking | null | null | null | open | How can I "interconnect" two sockets in Linux?
===
There are two connected sockets. How can I interconnect them?
1. Data appeared on the one socket should be written to the other.
2. EOF/FIN should propogate well. If one is half-closed, the other should also be half-closed.
<pre>
int client = get_connected_client_socket();
int proxy = get_connected_proxy_socket();
negotiate_with_proxy(proxy);
iterconnect(client, proxy);
// Now forgot about both client and proxy.
// System should handle IO/shutdown/close.
// Ideally even without any support of the user-space process.
</pre>
Can Linux do it? Can it be done by tricking connection tracking to change tracking status of existing connection?
@related <http://stackoverflow.com/questions/2673975/determine-how-much-can-i-write-into-a-filehandle-copying-data-from-one-fh-to-the>
| 0 |
7,418,263 | 09/14/2011 14:44:17 | 911,894 | 08/25/2011 11:04:51 | 18 | 0 | Nested text view in android,with dynamic content | I want to display a recursive or nested text view at depth of 3 in Android.The text to be displayed is, **dynamic** coming from web service.
for example:
If I Click on Help(Level 1)
it'll show topics under Help
If I Click on Help_Topic_1(Level 2)
it'll show questions under Help_Topic_1
If I click on this question, say HT_Question_1(Level 3)
it'll show Answer of that question(Level 3)
how to accomplish with this? please guide me. | android | android-listview | android-textview | null | null | null | open | Nested text view in android,with dynamic content
===
I want to display a recursive or nested text view at depth of 3 in Android.The text to be displayed is, **dynamic** coming from web service.
for example:
If I Click on Help(Level 1)
it'll show topics under Help
If I Click on Help_Topic_1(Level 2)
it'll show questions under Help_Topic_1
If I click on this question, say HT_Question_1(Level 3)
it'll show Answer of that question(Level 3)
how to accomplish with this? please guide me. | 0 |
10,347,417 | 04/27/2012 08:36:20 | 606,562 | 02/07/2011 14:24:16 | 1,190 | 45 | C++ OpenGL ES 2.0 Matrix Transforms - Newbie | I am trying to work out OpenGL ES 2.0 and I am pretty much an OpenGL newbie. I have a simple program that at the moment just draws a red square at the origin and I want to use a matrix to move it from the origin to the centre of the screen. I believe I have done everything correctly so far but I must be missing something as when I apply the matrix to the shader I just get a blank screen.
Shader:
const char vShaderStr[] = "attribute vec4 a_position; \n"
"attribute vec4 a_colour; \n"
"varying vec4 v_colour; \n"
"uniform mat4 u_transformation; \n"
"void main() \n"
"{ \n"
" v_colour = a_colour; \n"
" gl_Position = u_transformation * a_position; \n"
"} \n";
const char fShaderStr[] = "varying vec4 v_colour; \n"
"void main() \n"
"{ \n"
" gl_FragColor = v_colour; \n"
"} \n";
Create matrix and send to shader:
transformationMatrix = glGetUniformLocation(programObject, "u_transformation");
...
GLfloat vMatrix[] = {
0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f,
-0.5f, -0.5f, 0.0f, 1.0f,
};
glUniformMatrix4fv(transformationMatrix, 1, GL_FALSE, vMatrix);
Do I have to do some maths with this matrix before it is sent to the shader? If so how? I feel I am missing something glaringly obvious to most people here. | c++ | opengl | matrix | opengl-es-2.0 | null | null | open | C++ OpenGL ES 2.0 Matrix Transforms - Newbie
===
I am trying to work out OpenGL ES 2.0 and I am pretty much an OpenGL newbie. I have a simple program that at the moment just draws a red square at the origin and I want to use a matrix to move it from the origin to the centre of the screen. I believe I have done everything correctly so far but I must be missing something as when I apply the matrix to the shader I just get a blank screen.
Shader:
const char vShaderStr[] = "attribute vec4 a_position; \n"
"attribute vec4 a_colour; \n"
"varying vec4 v_colour; \n"
"uniform mat4 u_transformation; \n"
"void main() \n"
"{ \n"
" v_colour = a_colour; \n"
" gl_Position = u_transformation * a_position; \n"
"} \n";
const char fShaderStr[] = "varying vec4 v_colour; \n"
"void main() \n"
"{ \n"
" gl_FragColor = v_colour; \n"
"} \n";
Create matrix and send to shader:
transformationMatrix = glGetUniformLocation(programObject, "u_transformation");
...
GLfloat vMatrix[] = {
0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f,
-0.5f, -0.5f, 0.0f, 1.0f,
};
glUniformMatrix4fv(transformationMatrix, 1, GL_FALSE, vMatrix);
Do I have to do some maths with this matrix before it is sent to the shader? If so how? I feel I am missing something glaringly obvious to most people here. | 0 |
8,125,631 | 11/14/2011 17:34:43 | 1,041,864 | 11/11/2011 14:34:40 | 15 | 0 | iOS Developer Program - Number of development application and limitation of devices | With the iOS Developer Program can I development more than one application?
With the iOS Developer Program there is a limitation for 100 devices. How this limitation works? Do I have to generate a certificate to test on with device? If I uninstall the application counts?
If I can development for more than one application, how the limitation works? 100 devices for each application?
| ios | null | null | null | null | 11/15/2011 10:23:20 | off topic | iOS Developer Program - Number of development application and limitation of devices
===
With the iOS Developer Program can I development more than one application?
With the iOS Developer Program there is a limitation for 100 devices. How this limitation works? Do I have to generate a certificate to test on with device? If I uninstall the application counts?
If I can development for more than one application, how the limitation works? 100 devices for each application?
| 2 |
8,868,764 | 01/15/2012 09:38:10 | 658,984 | 03/14/2011 14:45:38 | 118 | 1 | How do i remove old files so that I keep one for every week, one for every month, etc.? | I do regular backups on my linux server but as it is now I delete all backups older than 14 days. I'd prefer if I could do it as sbackup or deja-dup. There you have the choice to keep all yesterdays backups, one backup per week, one backup per month and one backup per year.
How do I do a script that will delete files in this pattern?
Thanks! | bash | ubuntu | remove | smart | backups | 01/15/2012 14:02:10 | not a real question | How do i remove old files so that I keep one for every week, one for every month, etc.?
===
I do regular backups on my linux server but as it is now I delete all backups older than 14 days. I'd prefer if I could do it as sbackup or deja-dup. There you have the choice to keep all yesterdays backups, one backup per week, one backup per month and one backup per year.
How do I do a script that will delete files in this pattern?
Thanks! | 1 |
10,397,992 | 05/01/2012 13:03:26 | 342,272 | 05/16/2010 08:12:52 | 121 | 1 | VMware workstation vs Oracle vm virtualbox? | I have a Win7 running on my host machine and I want to do some web development using Linux platforms and test some apps on iOS. <br>
What are the main pros and cons of those to programs. I guess performance wise they should be about the same but maybe one has some functions that other lacks. In short what are the main differences between VMware workstation vs Oracle vm virtualbox? | virtualbox | vmware-workstation | null | null | null | 05/01/2012 18:43:49 | off topic | VMware workstation vs Oracle vm virtualbox?
===
I have a Win7 running on my host machine and I want to do some web development using Linux platforms and test some apps on iOS. <br>
What are the main pros and cons of those to programs. I guess performance wise they should be about the same but maybe one has some functions that other lacks. In short what are the main differences between VMware workstation vs Oracle vm virtualbox? | 2 |
4,167,878 | 11/12/2010 18:31:47 | 217,234 | 11/23/2009 18:31:50 | 24 | 3 | Changing webkit transition duration from javascript for Ipad | So I am using web-kit transitions in an Ipad app. They work great. But I was wondering what I would do to change the values of my transition from javascript.
#container {
-webkit-transition-property: -webkit-transform;
-webkit-transition-duration: 1s;
-webkit-transition-timing-function: ease-out;
}
What I would like to do
<script>
function func() {
document.getElemeentById('container').transition.duration = 500;
}
Is this possible?
</script> | javascript | ipad | webkit | transition | null | null | open | Changing webkit transition duration from javascript for Ipad
===
So I am using web-kit transitions in an Ipad app. They work great. But I was wondering what I would do to change the values of my transition from javascript.
#container {
-webkit-transition-property: -webkit-transform;
-webkit-transition-duration: 1s;
-webkit-transition-timing-function: ease-out;
}
What I would like to do
<script>
function func() {
document.getElemeentById('container').transition.duration = 500;
}
Is this possible?
</script> | 0 |
4,477,787 | 12/18/2010 11:11:33 | 444,742 | 09/10/2010 20:51:48 | 16 | 0 | why are there not a lot of c++ libraries like in java and javascript | I am just revisiting C++ and I'm already missing all the java libraries like hibernate and JAXB.
So why are there not a lot of open source libraries as there are in java? | java | c++ | qt | null | null | 12/19/2010 01:48:04 | not constructive | why are there not a lot of c++ libraries like in java and javascript
===
I am just revisiting C++ and I'm already missing all the java libraries like hibernate and JAXB.
So why are there not a lot of open source libraries as there are in java? | 4 |
7,498,742 | 09/21/2011 11:09:46 | 956,780 | 09/21/2011 11:09:46 | 1 | 0 | How to save the all the contacts in the sd card android | Hi i need to retrive all the contacts data and store into the sd card.Please help me. | android | contacts | null | null | null | 09/21/2011 11:13:06 | not a real question | How to save the all the contacts in the sd card android
===
Hi i need to retrive all the contacts data and store into the sd card.Please help me. | 1 |
6,255,807 | 06/06/2011 17:34:30 | 490,305 | 10/28/2010 15:50:45 | 22 | 2 | Upload video to YouTube as unlisted | So, I am able to upload a video to YouTube (direct upload) using the PHP client library and set it to private, but is it possible to set it as unlisted? | php | zend-framework | null | null | null | 06/07/2011 02:38:42 | not a real question | Upload video to YouTube as unlisted
===
So, I am able to upload a video to YouTube (direct upload) using the PHP client library and set it to private, but is it possible to set it as unlisted? | 1 |
8,429,354 | 12/08/2011 10:16:54 | 104,002 | 05/09/2009 08:53:55 | 381 | 19 | What are your experiences with selenium? | I am developing asp.Net MVC3 sites with quite a lot of javascript and coming from a windows forms / C# background I am missing the compiler warning me when I break something. It seems the whole setup is very brittle and changes usually have to be done 3 places :
1 Html
2 ServerSide (controllers + services)
3 Javascript
I really would like to be covering my functionality with tests.
My question :
**What are your experiences with Selenium (web browser automation)? Does it help in keeping the application functional or does the maintenance of selenium tests costs too much.**
| selenium | null | null | null | null | 12/08/2011 10:28:18 | not constructive | What are your experiences with selenium?
===
I am developing asp.Net MVC3 sites with quite a lot of javascript and coming from a windows forms / C# background I am missing the compiler warning me when I break something. It seems the whole setup is very brittle and changes usually have to be done 3 places :
1 Html
2 ServerSide (controllers + services)
3 Javascript
I really would like to be covering my functionality with tests.
My question :
**What are your experiences with Selenium (web browser automation)? Does it help in keeping the application functional or does the maintenance of selenium tests costs too much.**
| 4 |
9,961,454 | 04/01/2012 02:29:57 | 1,304,328 | 03/30/2012 23:46:02 | 1 | 0 | How to fix this jquery below | I want to INSERT VALUES after user has clicked OK on the confirmation box. Now the confirmation box works well. The only problem I can see is that when the user clicks 'OK' I want the INSERT VALUES to happen on a seperate page (insertQuestion.php) but I do not want the form to be navigated to that page. I want the form to navigate the way it is doing which is either submit to its own page or submit to create_session2.php depending on the situation.
So how can I INSERT VALUES into the database without navigating the user to that page (insertquestion.php) after the user has clicked 'OK' in the confirmation box?
I have tried using Jquery to perform an AJAX request but this has failed (Code of Jquery is at the bottom)
below is the javascript code where the confirmation box appears and if confirmation is 'OK', it submits the form:
function showConfirm(){
var confirmMsg=confirm("Do you want to Proceed" + "\n" );
if (confirmMsg==true)
{
submitform();
}
}
function submitform()
{
var QandAO = document.getElementById("QandA");
QandAO.submit();
}
Below is the INSERT VALUES code (already connected to DB and is on insertQuestion.php page wile the values posted are from the previous page):
$insertquestion = array();
for ($i = 1, $n = $_POST['sessionNum']; $i <= $n; ++$i)
{
$insertquestion[] = "' ". mysql_real_escape_string( $_POST['id'] ) . ($n == 1 ? '' : $i) . "'";
}
$questionsql = "INSERT INTO Question (SessionId)
VALUES (" . implode('), (', $insertquestion) . ")";
mysql_query($questionsql);
</script>
My Attempt on Jquery which has failed (doesn't show alert so it doesn't reach insertQuestion.php page meaning values are not inserted into DB):
$("#submitBtn").click(function() {
var fieldvalue = $("#QandA").val(); //grab the form value
$.post("insertQuestion.php", //send it to yourpage.php
{
field1: fieldvalue
}, function(data) {
alert("Your Questions has been submitted");
}
);
});
somebody provided an example jquery above which i modified to meet my spec but I don't know what field1 or function(data) is? | jquery | ajax | null | null | null | null | open | How to fix this jquery below
===
I want to INSERT VALUES after user has clicked OK on the confirmation box. Now the confirmation box works well. The only problem I can see is that when the user clicks 'OK' I want the INSERT VALUES to happen on a seperate page (insertQuestion.php) but I do not want the form to be navigated to that page. I want the form to navigate the way it is doing which is either submit to its own page or submit to create_session2.php depending on the situation.
So how can I INSERT VALUES into the database without navigating the user to that page (insertquestion.php) after the user has clicked 'OK' in the confirmation box?
I have tried using Jquery to perform an AJAX request but this has failed (Code of Jquery is at the bottom)
below is the javascript code where the confirmation box appears and if confirmation is 'OK', it submits the form:
function showConfirm(){
var confirmMsg=confirm("Do you want to Proceed" + "\n" );
if (confirmMsg==true)
{
submitform();
}
}
function submitform()
{
var QandAO = document.getElementById("QandA");
QandAO.submit();
}
Below is the INSERT VALUES code (already connected to DB and is on insertQuestion.php page wile the values posted are from the previous page):
$insertquestion = array();
for ($i = 1, $n = $_POST['sessionNum']; $i <= $n; ++$i)
{
$insertquestion[] = "' ". mysql_real_escape_string( $_POST['id'] ) . ($n == 1 ? '' : $i) . "'";
}
$questionsql = "INSERT INTO Question (SessionId)
VALUES (" . implode('), (', $insertquestion) . ")";
mysql_query($questionsql);
</script>
My Attempt on Jquery which has failed (doesn't show alert so it doesn't reach insertQuestion.php page meaning values are not inserted into DB):
$("#submitBtn").click(function() {
var fieldvalue = $("#QandA").val(); //grab the form value
$.post("insertQuestion.php", //send it to yourpage.php
{
field1: fieldvalue
}, function(data) {
alert("Your Questions has been submitted");
}
);
});
somebody provided an example jquery above which i modified to meet my spec but I don't know what field1 or function(data) is? | 0 |
6,588,868 | 07/05/2011 21:06:21 | 807,584 | 06/21/2011 00:38:59 | 1 | 0 | Android:Are tegra's ready for more game emulators (psp) (ps2) etc. | With androids dual and quad core processors running at least 1.5 ghz and psp ps2 xbox and gamecube run at no more than 400ghz, why aren't there any of these systems being emulated for android. The devices can probably handle it and 3.1 works with joysticks. | android | device-emulation | null | null | null | 07/05/2011 23:24:43 | off topic | Android:Are tegra's ready for more game emulators (psp) (ps2) etc.
===
With androids dual and quad core processors running at least 1.5 ghz and psp ps2 xbox and gamecube run at no more than 400ghz, why aren't there any of these systems being emulated for android. The devices can probably handle it and 3.1 works with joysticks. | 2 |
11,280,560 | 07/01/2012 08:27:15 | 743,727 | 05/08/2011 08:35:45 | 74 | 5 | Program stopped working | I'm running into the problem "Modikator stopped working" each time I start the application Modikator
Here is the details of the program.
Problem signature:<br />
Problem Event Name: CLR20r3<br />
Problem Signature 01: gdiplus.exe<br />
Problem Signature 02: 1.0.0.0<br />
Problem Signature 03: 4f2abe52<br />
Problem Signature 04: Modikator<br />
Problem Signature 05: 1.0.0.0<br />
Problem Signature 06: 4f2abe52<br />
Problem Signature 07: 1e<br />
Problem Signature 08: c<br />
Problem Signature 09: System.NullReferenceException<br />
OS Version: 6.1.7600.2.0.0.256.1<br />
Locale ID: 1065<br />
Additional Information 1: 0a9e<br />
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789<br />
Additional Information 3: 0a9e<br />
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789<br />
I have no idea of what to do,
any help would be highly appreciated.
| error-message | clr | gdi+ | nullreferenceexception | null | 07/02/2012 09:21:16 | off topic | Program stopped working
===
I'm running into the problem "Modikator stopped working" each time I start the application Modikator
Here is the details of the program.
Problem signature:<br />
Problem Event Name: CLR20r3<br />
Problem Signature 01: gdiplus.exe<br />
Problem Signature 02: 1.0.0.0<br />
Problem Signature 03: 4f2abe52<br />
Problem Signature 04: Modikator<br />
Problem Signature 05: 1.0.0.0<br />
Problem Signature 06: 4f2abe52<br />
Problem Signature 07: 1e<br />
Problem Signature 08: c<br />
Problem Signature 09: System.NullReferenceException<br />
OS Version: 6.1.7600.2.0.0.256.1<br />
Locale ID: 1065<br />
Additional Information 1: 0a9e<br />
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789<br />
Additional Information 3: 0a9e<br />
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789<br />
I have no idea of what to do,
any help would be highly appreciated.
| 2 |
9,128,192 | 02/03/2012 11:48:20 | 670,388 | 03/22/2011 00:51:15 | 388 | 22 | Joomla, registration pages requires login | I am running Joomla! version 1.7. I've set up a registration page in the menu manager, however, when I click the link, it says I need to be logged in to register.
Not sure what I going. Can anyone help please?
Thanks! | joomla | registration | joomla1.7 | null | null | null | open | Joomla, registration pages requires login
===
I am running Joomla! version 1.7. I've set up a registration page in the menu manager, however, when I click the link, it says I need to be logged in to register.
Not sure what I going. Can anyone help please?
Thanks! | 0 |
11,018,961 | 06/13/2012 16:06:37 | 1,395,965 | 05/15/2012 11:09:54 | 1 | 0 | Block Applications | <blink>I need to make an application to block other applications on the phone. i tried [app lock][1] this code but got different errors like no setp() or getp() functions and many other can anyone tell me steps to implement this code in a service step by step?? .help will be appreciated </blink>
[1]: http://stackoverflow.com/questions/7248080/android-lock-apps | android | null | null | null | null | 06/13/2012 17:32:02 | not a real question | Block Applications
===
<blink>I need to make an application to block other applications on the phone. i tried [app lock][1] this code but got different errors like no setp() or getp() functions and many other can anyone tell me steps to implement this code in a service step by step?? .help will be appreciated </blink>
[1]: http://stackoverflow.com/questions/7248080/android-lock-apps | 1 |
3,569,313 | 08/25/2010 19:02:01 | 425,183 | 08/19/2010 12:09:09 | 36 | 4 | Can't install APK hosted my own apache server | I've exported an apk from eclipse. I am able to install it without any problem if I copy it to the phone's sd card.
When trying to download via phone's (Galaxy S) browser I get:
"Download unsuccessful".
I have set mime type application/vnd.android.package-archive in the mime.types, restarted apache, still same result.
Also tried :
<a href="downloads/my_apk.apk" type="application/vnd.android.package-archive">Download App</a>
Still no luck.
I am able to download and install applications from android market. I suspect that apache is not sending the mime type but this is just a shot in the dark.
| android | null | null | null | null | null | open | Can't install APK hosted my own apache server
===
I've exported an apk from eclipse. I am able to install it without any problem if I copy it to the phone's sd card.
When trying to download via phone's (Galaxy S) browser I get:
"Download unsuccessful".
I have set mime type application/vnd.android.package-archive in the mime.types, restarted apache, still same result.
Also tried :
<a href="downloads/my_apk.apk" type="application/vnd.android.package-archive">Download App</a>
Still no luck.
I am able to download and install applications from android market. I suspect that apache is not sending the mime type but this is just a shot in the dark.
| 0 |
6,150,184 | 05/27/2011 09:16:34 | 156,869 | 08/15/2009 09:26:04 | 2,057 | 133 | Nokia S40 Ovi Browser Web App Tips & Trick | Now that [Nokia open it's Ovi Store for S40 Web Apps][1], I think we need to start to creating tips & trick in developing with those platform.
[1]: http://blogs.forum.nokia.com/blog/nokia-developer-news/2011/05/26/ovi-store-open-for-series-40-web-apps | tips-and-tricks | web-applications | series-40 | ovistore | null | 05/27/2011 11:19:20 | off topic | Nokia S40 Ovi Browser Web App Tips & Trick
===
Now that [Nokia open it's Ovi Store for S40 Web Apps][1], I think we need to start to creating tips & trick in developing with those platform.
[1]: http://blogs.forum.nokia.com/blog/nokia-developer-news/2011/05/26/ovi-store-open-for-series-40-web-apps | 2 |
7,420,677 | 09/14/2011 17:46:15 | 945,228 | 09/14/2011 17:46:15 | 1 | 0 | How Can I Use the Utility Application Template targeted for iPad? | I've been trying to use the Utility Application Template to create an iPad app. However there is not an option to set the device family to iPad. All the nib files are formated for iPhone. Is there any way to change this to target to iPad? Or would i be better off creating a standard view application and adding in the flipview?
I've been googling this and have not found a good explanation.
thanks! | iphone | objective-c | xcode | ipad | null | null | open | How Can I Use the Utility Application Template targeted for iPad?
===
I've been trying to use the Utility Application Template to create an iPad app. However there is not an option to set the device family to iPad. All the nib files are formated for iPhone. Is there any way to change this to target to iPad? Or would i be better off creating a standard view application and adding in the flipview?
I've been googling this and have not found a good explanation.
thanks! | 0 |
4,231,719 | 11/20/2010 07:33:32 | 509,101 | 11/16/2010 05:07:38 | 1 | 0 | database in delphi | can someone help me on how to Write a program - a database of students. Requirements for the program: 1) to store in memory a list of students using one-way dynamic list
2) Required fields: surname, name, date of birth, number of students
3) To display a list of students to use the component TListBox. | delphi | null | null | null | null | 04/20/2012 12:16:36 | not a real question | database in delphi
===
can someone help me on how to Write a program - a database of students. Requirements for the program: 1) to store in memory a list of students using one-way dynamic list
2) Required fields: surname, name, date of birth, number of students
3) To display a list of students to use the component TListBox. | 1 |
6,886,361 | 07/30/2011 22:29:32 | 657,708 | 03/13/2011 17:20:29 | 33 | 2 | Jquery clearInterval isnt working | I have a div that is above something I want to showcase, and I have the setinterval working, but the clearinterval isnt firing when it reaches 2 loops.
I have this:
window.setInterval(play_ani_clickthese, 3000);
var fade_count = 0;
function play_ani_clickthese() {
$("#click_these").fadeIn(1000).delay(1000).fadeOut(1000);
fade_count+=parseInt('1');
if(fade_count == 2){window.clearInterval(play_ani_clickthese);}
}
But when the 'fade_count' reaches 2, it just keeps going.
Any pointers to what I'm doing wrong? | jquery | setinterval | clearinterval | null | null | null | open | Jquery clearInterval isnt working
===
I have a div that is above something I want to showcase, and I have the setinterval working, but the clearinterval isnt firing when it reaches 2 loops.
I have this:
window.setInterval(play_ani_clickthese, 3000);
var fade_count = 0;
function play_ani_clickthese() {
$("#click_these").fadeIn(1000).delay(1000).fadeOut(1000);
fade_count+=parseInt('1');
if(fade_count == 2){window.clearInterval(play_ani_clickthese);}
}
But when the 'fade_count' reaches 2, it just keeps going.
Any pointers to what I'm doing wrong? | 0 |
7,172,099 | 08/24/2011 07:46:20 | 889,774 | 08/11/2011 11:14:20 | 6 | 0 | Delegate Definition in iPhone SDK | Can anyone explain the DELEGATE definition in iphone sdk with real time scenario.
Sorry for my poor question here.
Thanks in advance. | iphone | objective-c | oop | iphone-sdk-4.0 | null | 08/24/2011 09:03:34 | not constructive | Delegate Definition in iPhone SDK
===
Can anyone explain the DELEGATE definition in iphone sdk with real time scenario.
Sorry for my poor question here.
Thanks in advance. | 4 |
7,475,279 | 09/19/2011 18:04:39 | 58,245 | 08/28/2008 08:55:26 | 1,058 | 21 | Javascript fails to execute in headless Firefox | I've setup a Ubuntu Server install with Firefox 3.6.22 and got a headless test environment using the headless and watir-webdriver gems. When testing in browser all seems to work but in the headless Firefox version the javascript just stops dead. Normal javascript pages work and load correctly, any idea what's happening? | ruby | firefox | watir | headless | null | 09/20/2011 01:16:58 | not a real question | Javascript fails to execute in headless Firefox
===
I've setup a Ubuntu Server install with Firefox 3.6.22 and got a headless test environment using the headless and watir-webdriver gems. When testing in browser all seems to work but in the headless Firefox version the javascript just stops dead. Normal javascript pages work and load correctly, any idea what's happening? | 1 |
11,737,403 | 07/31/2012 09:50:20 | 1,237,103 | 02/28/2012 04:42:07 | 6 | 0 | JSF2.0 - Spring language change not working on server | I am using JSF 2.0 and Spring 3.0.2 and tomcat 7.0.14.0 as server. I have an issue with changing language of my site. All the codes are working well in my local server. But when I deploy on server, Language changes does not effect. Its automatically select Italy as a default language. when I click on another language,nothing is changes.
Here is my bean code:
@ManagedBean(name="language")
@SessionScoped
public class LanguageBean implements Serializable{
private static final long serialVersionUID = 1L;
private String localeCode;
private static Map<String,Object> countries;
static{
countries = new LinkedHashMap<String,Object>();
countries.put("English", Locale.ENGLISH); //label, value
countries.put("Italian", Locale.ITALIAN);
}
public LanguageBean() {
countries = new LinkedHashMap<String,Object>();
countries.put("English", Locale.ENGLISH); //label, value
countries.put("Italian", Locale.ITALIAN);
}
And this is the config.xml::
<locale-config>
<default-locale>en</default-locale>
</locale-config>
<resource-bundle>
<base-name>com.mad_u.welcome</base-name>
<var>msg</var>
</resource-bundle>
Please give me some idea. Thanks in advance.
| spring | jsf | tomcat | internationalization | null | null | open | JSF2.0 - Spring language change not working on server
===
I am using JSF 2.0 and Spring 3.0.2 and tomcat 7.0.14.0 as server. I have an issue with changing language of my site. All the codes are working well in my local server. But when I deploy on server, Language changes does not effect. Its automatically select Italy as a default language. when I click on another language,nothing is changes.
Here is my bean code:
@ManagedBean(name="language")
@SessionScoped
public class LanguageBean implements Serializable{
private static final long serialVersionUID = 1L;
private String localeCode;
private static Map<String,Object> countries;
static{
countries = new LinkedHashMap<String,Object>();
countries.put("English", Locale.ENGLISH); //label, value
countries.put("Italian", Locale.ITALIAN);
}
public LanguageBean() {
countries = new LinkedHashMap<String,Object>();
countries.put("English", Locale.ENGLISH); //label, value
countries.put("Italian", Locale.ITALIAN);
}
And this is the config.xml::
<locale-config>
<default-locale>en</default-locale>
</locale-config>
<resource-bundle>
<base-name>com.mad_u.welcome</base-name>
<var>msg</var>
</resource-bundle>
Please give me some idea. Thanks in advance.
| 0 |
2,968,656 | 06/03/2010 18:20:00 | 192,077 | 10/18/2009 17:46:14 | 60 | 6 | Reading MP3 files | I want to read MP3 files in C++ and I prefer to write my own code for this. Basically to learn how the filetype works. I want to read all the bits of hex data of a MP3 file and have my speakers play it. :) I have no idea where to start since I don't yet know how data is actually stored into a MP3 file.
Thanks for your help | c++ | mp3 | scratch | null | null | 01/21/2012 17:12:38 | not a real question | Reading MP3 files
===
I want to read MP3 files in C++ and I prefer to write my own code for this. Basically to learn how the filetype works. I want to read all the bits of hex data of a MP3 file and have my speakers play it. :) I have no idea where to start since I don't yet know how data is actually stored into a MP3 file.
Thanks for your help | 1 |
1,831,247 | 12/02/2009 07:43:01 | 222,706 | 12/02/2009 07:40:17 | 1 | 0 | how to create back office file(update file)after creating a website in asp.net | i have created a website in asp.net.after posting into the web i want to upadate it.how to create updatable files. | asp.net | null | null | null | null | 06/26/2012 20:02:06 | not a real question | how to create back office file(update file)after creating a website in asp.net
===
i have created a website in asp.net.after posting into the web i want to upadate it.how to create updatable files. | 1 |
10,963,144 | 06/09/2012 17:38:38 | 1,446,469 | 06/09/2012 17:25:23 | 1 | 0 | Group a list weekly to a new list and sum one of its feild? | i have two classes :
class Entry {
long amount;
long date; //date is stored in millis
long id;
//getter and setters
}
class GroupedEntryByWeek {
long amount;
long startDate; // start date of week
long endDate; // end date of week
long id;
}
now i want to "`List<Entry> entries`" to generate new list "`List<GroupedEntryByWeek> groupedEntries`"
| java | null | null | null | null | 06/09/2012 17:55:27 | not a real question | Group a list weekly to a new list and sum one of its feild?
===
i have two classes :
class Entry {
long amount;
long date; //date is stored in millis
long id;
//getter and setters
}
class GroupedEntryByWeek {
long amount;
long startDate; // start date of week
long endDate; // end date of week
long id;
}
now i want to "`List<Entry> entries`" to generate new list "`List<GroupedEntryByWeek> groupedEntries`"
| 1 |
10,760,048 | 05/25/2012 19:05:00 | 1,418,074 | 05/25/2012 18:41:38 | 1 | 0 | iSpeech API Popup | I can not figure out how to make use of the iSpeech API. I use TTS and the API actually speaks, but I would like to know how to get rid of the pop-up box that comes up when doing the Speech Synthesis, As I need other UI working while this is going on. I read online that you would need to use the REST API, but that is unsupported on mobile devices. I need a way to hide the dialog box. Any help would be nice. | objective-c | ios | popupwindow | ispeech | null | 05/31/2012 00:37:17 | too localized | iSpeech API Popup
===
I can not figure out how to make use of the iSpeech API. I use TTS and the API actually speaks, but I would like to know how to get rid of the pop-up box that comes up when doing the Speech Synthesis, As I need other UI working while this is going on. I read online that you would need to use the REST API, but that is unsupported on mobile devices. I need a way to hide the dialog box. Any help would be nice. | 3 |
6,237,276 | 06/04/2011 14:25:02 | 781,937 | 06/02/2011 22:42:24 | 9 | 0 | insert date into database using jsf | I want to insert a date from a jsf page but it does not work any error message that appears
but when I look at my table in Oracle DB
I can not find my data that I inserted from the jsf page
in my bean
enter code here
java.util.Date daterecep;
// getter and setter
public void setdaterecep( java.util.Date daterecep){
this.daterecep=daterecep;
}
public java.util.Date getdaterecep()
{
return daterecep;
}
and
enter code here
nt val=0;
try {
val = st.executeUpdate("insert into tabdate (date) values('"+daterecep+"')" );
} catch (SQLException ex) {
Logger.getLogger(Insertdate.class.getName()).log(Level.SEVERE, null, ex);
}
System.out.println(val);
return resultat;
}
It used PreparedStatement but it did not worked I just tried to execute the Java code without going through the JSF page is to show that i gives
with putting
enter code here
val = st.executeUpdate("insert into tabdate(date) values('12/12/2004')");
and add
enter code here
public static void main (String args[]) throws SQLException{
Insertdate B= new Insertdate();
B.connexionBD();
B.insert();//function for the insertion
}
and it works but I can not from the jsf page
page jsf
<h:inputText value="#{Insertdate.daterecep}" size="10" />
can you help me please
thanks
| java | jsf | null | null | null | null | open | insert date into database using jsf
===
I want to insert a date from a jsf page but it does not work any error message that appears
but when I look at my table in Oracle DB
I can not find my data that I inserted from the jsf page
in my bean
enter code here
java.util.Date daterecep;
// getter and setter
public void setdaterecep( java.util.Date daterecep){
this.daterecep=daterecep;
}
public java.util.Date getdaterecep()
{
return daterecep;
}
and
enter code here
nt val=0;
try {
val = st.executeUpdate("insert into tabdate (date) values('"+daterecep+"')" );
} catch (SQLException ex) {
Logger.getLogger(Insertdate.class.getName()).log(Level.SEVERE, null, ex);
}
System.out.println(val);
return resultat;
}
It used PreparedStatement but it did not worked I just tried to execute the Java code without going through the JSF page is to show that i gives
with putting
enter code here
val = st.executeUpdate("insert into tabdate(date) values('12/12/2004')");
and add
enter code here
public static void main (String args[]) throws SQLException{
Insertdate B= new Insertdate();
B.connexionBD();
B.insert();//function for the insertion
}
and it works but I can not from the jsf page
page jsf
<h:inputText value="#{Insertdate.daterecep}" size="10" />
can you help me please
thanks
| 0 |
8,046,626 | 11/08/2011 06:13:18 | 1,035,045 | 11/08/2011 06:02:02 | 1 | 0 | iOS application compiling issue related to architecture i386 | I am using the latest stable released xcode 4.2 and try to compile and build my old app which was build by xcode 4.1 and older. I keep getting the follow error:
ld: duplicate symbol _OBJC_IVAR_$_CMPopTipView.pointDirection in /Users/matthewwang/Library/Developer/Xcode/DerivedData/Learnosity-ecmgqdxwjjbfywdnrvttmkbozxoo/Build/Products/Debug-iphonesimulator/libLearnosity.a(CMPopTipView.o) and /Users/matthewwang/Library/Developer/Xcode/DerivedData/Learnosity-ecmgqdxwjjbfywdnrvttmkbozxoo/Build/Intermediates/Learnosity.build/Debug-iphonesimulator/Learnosity.build/Objects-normal/i386/CMPopTipView.o for architecture i386
any one met this error before and know the solution to clean this error?
thanks
Matt
| ios | null | null | null | null | 11/09/2011 02:42:02 | not a real question | iOS application compiling issue related to architecture i386
===
I am using the latest stable released xcode 4.2 and try to compile and build my old app which was build by xcode 4.1 and older. I keep getting the follow error:
ld: duplicate symbol _OBJC_IVAR_$_CMPopTipView.pointDirection in /Users/matthewwang/Library/Developer/Xcode/DerivedData/Learnosity-ecmgqdxwjjbfywdnrvttmkbozxoo/Build/Products/Debug-iphonesimulator/libLearnosity.a(CMPopTipView.o) and /Users/matthewwang/Library/Developer/Xcode/DerivedData/Learnosity-ecmgqdxwjjbfywdnrvttmkbozxoo/Build/Intermediates/Learnosity.build/Debug-iphonesimulator/Learnosity.build/Objects-normal/i386/CMPopTipView.o for architecture i386
any one met this error before and know the solution to clean this error?
thanks
Matt
| 1 |
3,736,827 | 09/17/2010 15:43:56 | 355,434 | 06/01/2010 13:15:39 | 9 | 1 | Can't remove object from NSMutableArray | i am trying to remove objects from my NSMutableArray but i keep getting bad_access error.
I used "removeAllObjects" and "removeObjectAtIndex" but none of these work.
If i add objects to this array , everything is fine.
What i want to do is to clear my array before filling it again.
I didnt release the array before trying to fill.
Thx for the help.
Bye | objective-c | xcode | object | remove | nsmutablearray | null | open | Can't remove object from NSMutableArray
===
i am trying to remove objects from my NSMutableArray but i keep getting bad_access error.
I used "removeAllObjects" and "removeObjectAtIndex" but none of these work.
If i add objects to this array , everything is fine.
What i want to do is to clear my array before filling it again.
I didnt release the array before trying to fill.
Thx for the help.
Bye | 0 |
11,288,276 | 07/02/2012 05:42:22 | 1,495,210 | 07/02/2012 05:39:28 | 1 | 0 | What is Minimization of Drive Test in LTE Release-10? | 3GPP has add a new feature named MDT in release 10. Can someone please provide me the brief overview on MDT? | wireless | null | null | null | null | 07/02/2012 09:23:26 | not a real question | What is Minimization of Drive Test in LTE Release-10?
===
3GPP has add a new feature named MDT in release 10. Can someone please provide me the brief overview on MDT? | 1 |
7,721,218 | 10/11/2011 03:55:16 | 819,581 | 06/28/2011 16:40:50 | 95 | 1 | Android:About Android 3.x source code | I wanna know if Google will open the source code of Android3.x or NOT?
Is anywhere I can download or check this version source code?
Thanks in advance! | android | null | null | null | null | 10/11/2011 07:06:29 | not constructive | Android:About Android 3.x source code
===
I wanna know if Google will open the source code of Android3.x or NOT?
Is anywhere I can download or check this version source code?
Thanks in advance! | 4 |
11,028,179 | 06/14/2012 07:00:23 | 1,279,526 | 03/19/2012 20:56:03 | 37 | 0 | jquery ajax file upload, success doesn't get called | I'm using jquery to upload images to a joomla site, but have problems with the file ajaxfileupload.js. The images upload just fine, but the function in "success" doesn't get called. And I need it to work to show a confirmation that the upload is finished. I have tried using "complete" instead of "success" and then the code works, but it refreshes the page over and over agian. How can I make it work like it should? Here's the code..
upload: function (a) {
if (jQuery("#Filedata-" + a).val() == "") {
jQuery("#photoupload-" + a).remove();
joms.uploader.upload();
if (jQuery("#photoupload").next().length == 0) {
joms.uploader.addNewUpload()
}
jQuery("#upload-photos-button").show();
return
}
var c = (jQuery("#photoupload-" + a + " :input:checked").val() == "1") ? "&defaultphoto=1" : "";
var b = jQuery("#photoupload-" + a).next().find(".elementIndex").val();
b = (b != "") ? "&nextupload=" + b : "";
jQuery("#photoupload-" + a).children().each(function () {
jQuery(this).css("display", "none")
});
jQuery("#photoupload-" + a).append('<div id="photoupload-loading-' + a + '"><span class="loading" style="display:block;float: none;margin: 0px;"></span><span>' + joms.uploader.uploadText + "</span></div>");
jQuery.ajaxFileUpload({
url: this.postUrl + c + b,
secureuri: false,
fileElementId: "Filedata-" + a,
dataType: "json",
success: function (e, d) {
jQuery("#photoupload-loading-" + a).remove();
if (typeof (e.error) != "undefined" && e.error == "true") {
jQuery("#photoupload-" + a).css("background", "#ffeded");
jQuery("#photoupload-" + a).append('<span class="error">' + e.msg + "</span>")
} else {
jQuery("#photoupload-" + a).css("background", "#edfff3");
jQuery("#photoupload-" + a).append('<span class="success">' + e.msg + "</span>")
}
jQuery("#photoupload-" + a).fadeOut(4500, function () {
jQuery("#photoupload-" + a).remove();
if (jQuery("#photoupload").next().length == 0) {
joms.uploader.addNewUpload()
}
});
jQuery("#photoupload-" + a + " .remove").css("display", "block");
if (e.nextupload != "undefined") {
joms.uploader.upload(e.nextupload);
return
} else {
jQuery("#upload-photos-button").show()
}
},
error: function (f, d, g) {}
});
return false
} | jquery | ajax | jquery-ajax | file-upload | success | null | open | jquery ajax file upload, success doesn't get called
===
I'm using jquery to upload images to a joomla site, but have problems with the file ajaxfileupload.js. The images upload just fine, but the function in "success" doesn't get called. And I need it to work to show a confirmation that the upload is finished. I have tried using "complete" instead of "success" and then the code works, but it refreshes the page over and over agian. How can I make it work like it should? Here's the code..
upload: function (a) {
if (jQuery("#Filedata-" + a).val() == "") {
jQuery("#photoupload-" + a).remove();
joms.uploader.upload();
if (jQuery("#photoupload").next().length == 0) {
joms.uploader.addNewUpload()
}
jQuery("#upload-photos-button").show();
return
}
var c = (jQuery("#photoupload-" + a + " :input:checked").val() == "1") ? "&defaultphoto=1" : "";
var b = jQuery("#photoupload-" + a).next().find(".elementIndex").val();
b = (b != "") ? "&nextupload=" + b : "";
jQuery("#photoupload-" + a).children().each(function () {
jQuery(this).css("display", "none")
});
jQuery("#photoupload-" + a).append('<div id="photoupload-loading-' + a + '"><span class="loading" style="display:block;float: none;margin: 0px;"></span><span>' + joms.uploader.uploadText + "</span></div>");
jQuery.ajaxFileUpload({
url: this.postUrl + c + b,
secureuri: false,
fileElementId: "Filedata-" + a,
dataType: "json",
success: function (e, d) {
jQuery("#photoupload-loading-" + a).remove();
if (typeof (e.error) != "undefined" && e.error == "true") {
jQuery("#photoupload-" + a).css("background", "#ffeded");
jQuery("#photoupload-" + a).append('<span class="error">' + e.msg + "</span>")
} else {
jQuery("#photoupload-" + a).css("background", "#edfff3");
jQuery("#photoupload-" + a).append('<span class="success">' + e.msg + "</span>")
}
jQuery("#photoupload-" + a).fadeOut(4500, function () {
jQuery("#photoupload-" + a).remove();
if (jQuery("#photoupload").next().length == 0) {
joms.uploader.addNewUpload()
}
});
jQuery("#photoupload-" + a + " .remove").css("display", "block");
if (e.nextupload != "undefined") {
joms.uploader.upload(e.nextupload);
return
} else {
jQuery("#upload-photos-button").show()
}
},
error: function (f, d, g) {}
});
return false
} | 0 |
4,571,496 | 12/31/2010 17:45:56 | 80,901 | 03/21/2009 17:12:22 | 4,206 | 307 | Indy 11 - What feature do you want to see? | If you could suggest only one new (or enhanced) feature for the Internet Direct (Indy) version 11, which one would it be?
A new installer is already mentioned in http://stackoverflow.com/questions/3204601/step-by-step-upgrade-of-indy-10-in-delphi-2009 | delphi | features | null | null | null | 01/01/2011 19:46:57 | off topic | Indy 11 - What feature do you want to see?
===
If you could suggest only one new (or enhanced) feature for the Internet Direct (Indy) version 11, which one would it be?
A new installer is already mentioned in http://stackoverflow.com/questions/3204601/step-by-step-upgrade-of-indy-10-in-delphi-2009 | 2 |
11,585,673 | 07/20/2012 19:19:19 | 514,249 | 11/20/2010 05:54:42 | 61 | 2 | How to start/stop PostgreSQL 9.1 on MacOSX by pgAdminIII? | I installed PostgreSQL 9.1 into MacOSX (10.6) with dmg package file.
I started pgAdminIII after installation finished, but I can't stop DB server by pgAdminIII
because 'Start Service' and 'Stop Service' menu are not selectable (gray out).
See screenshot image for detail.

Could you advice me? | osx | postgresql | pgadmin | null | null | 07/24/2012 02:46:58 | off topic | How to start/stop PostgreSQL 9.1 on MacOSX by pgAdminIII?
===
I installed PostgreSQL 9.1 into MacOSX (10.6) with dmg package file.
I started pgAdminIII after installation finished, but I can't stop DB server by pgAdminIII
because 'Start Service' and 'Stop Service' menu are not selectable (gray out).
See screenshot image for detail.

Could you advice me? | 2 |
7,610,328 | 09/30/2011 12:25:34 | 702,264 | 04/11/2011 13:40:51 | 96 | 0 | connecting DB using HTML5 is possible? | is it possible to connect database which is in webserver through HTML5 only without
using ASP.NET,JSP etc. | asp.net | html | html5 | null | null | 09/30/2011 13:53:14 | not a real question | connecting DB using HTML5 is possible?
===
is it possible to connect database which is in webserver through HTML5 only without
using ASP.NET,JSP etc. | 1 |
9,485,544 | 02/28/2012 16:13:04 | 1,034,761 | 11/08/2011 01:12:08 | 3 | 0 | div sticking out from "grandparent" element | In my design I have three divs nested one in another. So far if I wanted to child stick out from parent element I was using negative margin. However this time I want to drag out corners of div outside both parent and parent of parent ( grandparent ) element. Using negative margin allows to get to the border between parent and grandfather. What is the best approach to solve this problem ?
<div id="grandparent">
<div id="parent" margin-left="10" width="400" float="left">
<div id="annoyingchild" float="left" margin-left="-30px">
</div>
</div>
</div>
| html | css | null | null | null | 04/14/2012 02:42:42 | not a real question | div sticking out from "grandparent" element
===
In my design I have three divs nested one in another. So far if I wanted to child stick out from parent element I was using negative margin. However this time I want to drag out corners of div outside both parent and parent of parent ( grandparent ) element. Using negative margin allows to get to the border between parent and grandfather. What is the best approach to solve this problem ?
<div id="grandparent">
<div id="parent" margin-left="10" width="400" float="left">
<div id="annoyingchild" float="left" margin-left="-30px">
</div>
</div>
</div>
| 1 |
10,608,480 | 05/15/2012 20:33:47 | 1,165,586 | 01/23/2012 18:53:25 | 1 | 0 | Batch to compare two files with different modifications dates | I'm looking for batch to compare two the same files but in a different directories.
I have first directory with first file - c:\Working\job.accdb (this file is sometimes modificated) and second directory with file - c:\User\job.accdb (this file became from c:\Working and isn't modificated). I need a batch to compare this files by modification date. If this file (date of modification) c:\User\job.accdb is older than c:\Working\job.accdb I need a copy this file from c:\Working\ to c:\User\ with window communicate "Updating" and if this files are the same (the same dates of modification) I need to open c:\User\job.accdb with communicate "Update not needed".
Thanks. | date | batch | copy | compare | null | 05/18/2012 11:23:52 | not a real question | Batch to compare two files with different modifications dates
===
I'm looking for batch to compare two the same files but in a different directories.
I have first directory with first file - c:\Working\job.accdb (this file is sometimes modificated) and second directory with file - c:\User\job.accdb (this file became from c:\Working and isn't modificated). I need a batch to compare this files by modification date. If this file (date of modification) c:\User\job.accdb is older than c:\Working\job.accdb I need a copy this file from c:\Working\ to c:\User\ with window communicate "Updating" and if this files are the same (the same dates of modification) I need to open c:\User\job.accdb with communicate "Update not needed".
Thanks. | 1 |
4,411,368 | 12/10/2010 17:03:23 | 341,443 | 05/14/2010 16:45:37 | 119 | 7 | How to merge branch to trunk folder using svn in eclipse | How to merge all changes in branch to trunk folder using svn in eclipse.
Please let me know
Thanks in advance | eclipse | svn | null | null | null | null | open | How to merge branch to trunk folder using svn in eclipse
===
How to merge all changes in branch to trunk folder using svn in eclipse.
Please let me know
Thanks in advance | 0 |
9,094,129 | 02/01/2012 10:18:21 | 1,014,234 | 10/26/2011 09:00:45 | 92 | 5 | SQLiteDatabase warning Android | Since I update my sdk and eclipsa I started to get warning:
sqlite returned: error code = 17, msg = prepared statement aborts at 21: [SELECT * FROM user]
What does it means? | android | sqlite | null | null | null | null | open | SQLiteDatabase warning Android
===
Since I update my sdk and eclipsa I started to get warning:
sqlite returned: error code = 17, msg = prepared statement aborts at 21: [SELECT * FROM user]
What does it means? | 0 |
10,627,286 | 05/16/2012 21:53:25 | 832,821 | 07/07/2011 04:31:04 | 33 | 0 | Mac OS X Lion: every time I shutdown or restart my lap…chrome and textmate open? | Every time I turn on or restart Mac OS X Lion...chrome and textmate open. Even if I uncheck "Reopen windows when logging back in" before shutdown or restart. Chrome and textmate do not appear on loggin items on Users & Groups from System Preferences so I can't uncheck them. Is very weird and I don't really know what to do. Some good ideas? Thanks!
I also delete textmate and chrome files from ~/Library/Saved Application State. But it didn't work. Thanks! | osx | startup | startup-error | null | null | 05/17/2012 22:39:06 | off topic | Mac OS X Lion: every time I shutdown or restart my lap…chrome and textmate open?
===
Every time I turn on or restart Mac OS X Lion...chrome and textmate open. Even if I uncheck "Reopen windows when logging back in" before shutdown or restart. Chrome and textmate do not appear on loggin items on Users & Groups from System Preferences so I can't uncheck them. Is very weird and I don't really know what to do. Some good ideas? Thanks!
I also delete textmate and chrome files from ~/Library/Saved Application State. But it didn't work. Thanks! | 2 |
1,844,351 | 12/04/2009 01:39:18 | 48,523 | 12/23/2008 00:36:38 | 1,005 | 30 | How to disable click with jQuery/JavaScript? | I have a link that I would like to present with a confirmation. I am using the javascript `confirm()` method. But the only way for me to get the link to not work when the user clicks 'cancel' is to use `return false;`. Is that the correct way to do it (cross-browser)?
$('a.confirm').click(function() {
if(confirm('Are you sure? This cannot be undone.')) {
return true;
}
return false;
}); | javascript | jquery | null | null | null | null | open | How to disable click with jQuery/JavaScript?
===
I have a link that I would like to present with a confirmation. I am using the javascript `confirm()` method. But the only way for me to get the link to not work when the user clicks 'cancel' is to use `return false;`. Is that the correct way to do it (cross-browser)?
$('a.confirm').click(function() {
if(confirm('Are you sure? This cannot be undone.')) {
return true;
}
return false;
}); | 0 |
9,755,950 | 03/18/2012 04:14:15 | 1,276,514 | 03/18/2012 04:10:48 | 1 | 0 | Java Repeat String Unless Stop is entered | I just started using Java, and I'm having trouble with loops. I have to make a program where a user enters a string, and unless they hit stop, they will be asked to enter another string. However, if the user enters string, it will output how many strings were odd(length), how many strings were even(length) and how many strings contained the word dog. Can somebody here give me the basics on how I go about this? Thanks! | java | string | homework | loops | null | 05/04/2012 13:28:03 | not a real question | Java Repeat String Unless Stop is entered
===
I just started using Java, and I'm having trouble with loops. I have to make a program where a user enters a string, and unless they hit stop, they will be asked to enter another string. However, if the user enters string, it will output how many strings were odd(length), how many strings were even(length) and how many strings contained the word dog. Can somebody here give me the basics on how I go about this? Thanks! | 1 |
8,073,347 | 11/09/2011 23:49:17 | 1,019,786 | 10/29/2011 12:58:58 | 1 | 0 | MySQL query cache causing null values | I have several functions in a PHP class, and when I execute a function in the class with the MySQL cache turned off, everything works. However, when I turn the MySQL cache on, certain functions in the class return null values and everything slows down, no matter where I set the size of the cache. Any ideas? | php | mysql | parsing | caching | null | 11/11/2011 10:55:49 | not a real question | MySQL query cache causing null values
===
I have several functions in a PHP class, and when I execute a function in the class with the MySQL cache turned off, everything works. However, when I turn the MySQL cache on, certain functions in the class return null values and everything slows down, no matter where I set the size of the cache. Any ideas? | 1 |
7,800,767 | 10/17/2011 23:20:29 | 967,484 | 09/27/2011 16:09:09 | 147 | 2 | iPhone Objective-C what are the benefits of functions vs instance methods? | I found this article on how to read a file line by line, and it **uses a function** to read each line: [http://stackoverflow.com/questions/1044334/objective-c-reading-a-file-line-by-line][1]
[1]: http://stackoverflow.com/questions/1044334/objective-c-reading-a-file-line-by-line
I'd like to increase my code reuse and put more code into smaller reusable pieces. Should I use Objective-C methods or functions? I'm talking about code that would be executed hundreds of times a minute.
Thank you!
| iphone | objective-c | function | methods | ios5 | null | open | iPhone Objective-C what are the benefits of functions vs instance methods?
===
I found this article on how to read a file line by line, and it **uses a function** to read each line: [http://stackoverflow.com/questions/1044334/objective-c-reading-a-file-line-by-line][1]
[1]: http://stackoverflow.com/questions/1044334/objective-c-reading-a-file-line-by-line
I'd like to increase my code reuse and put more code into smaller reusable pieces. Should I use Objective-C methods or functions? I'm talking about code that would be executed hundreds of times a minute.
Thank you!
| 0 |
9,924,651 | 03/29/2012 11:42:43 | 1,286,650 | 03/22/2012 18:04:25 | 5 | 0 | Search criteria stored in array | I have a search form:
<input type="text" name="srchby" />
<input type radio name="crit" value="a" />
<input type radio name="crit" value="b" />
<input type="submit" value="proceed" name="proceed"/>
I have an array which stores and gives search criteria whether the user chooses radio "a" or "b".
$crit=mysql_real....($_POST["crit"]);
$srchby=....
$crar=array("a"=>array("a","b","c"),"b"=>array("d","e","f"));
mysql_query("SELECT FROM '$crar[$crit][0]' WHERE ...");
Is that a good & fast option or not? Do you have any better ideas?
Thanks | php | mysql | null | null | null | 04/18/2012 05:59:21 | not constructive | Search criteria stored in array
===
I have a search form:
<input type="text" name="srchby" />
<input type radio name="crit" value="a" />
<input type radio name="crit" value="b" />
<input type="submit" value="proceed" name="proceed"/>
I have an array which stores and gives search criteria whether the user chooses radio "a" or "b".
$crit=mysql_real....($_POST["crit"]);
$srchby=....
$crar=array("a"=>array("a","b","c"),"b"=>array("d","e","f"));
mysql_query("SELECT FROM '$crar[$crit][0]' WHERE ...");
Is that a good & fast option or not? Do you have any better ideas?
Thanks | 4 |
7,666,899 | 10/05/2011 19:50:46 | 929,701 | 09/05/2011 23:42:08 | 1 | 0 | scatter plot using Raphael JS | I am looking for a javascript library for client side charting. I mainly want to produce scatter plots and interact with them. Also, I need axes to be logarithmic(That is the reason why I throwed away highcharts). I was looking at Raphael. Can somebody give me nice example of scatter plot using Raphael JS. You may also suggest alternative ways of drawing scatter plots except highcharts.
Thanks in Advanced.
HP | javascript | raphael | scatter-plot | null | null | null | open | scatter plot using Raphael JS
===
I am looking for a javascript library for client side charting. I mainly want to produce scatter plots and interact with them. Also, I need axes to be logarithmic(That is the reason why I throwed away highcharts). I was looking at Raphael. Can somebody give me nice example of scatter plot using Raphael JS. You may also suggest alternative ways of drawing scatter plots except highcharts.
Thanks in Advanced.
HP | 0 |
646,518 | 03/14/2009 19:10:14 | 6,266 | 09/13/2008 12:51:36 | 1,202 | 48 | Python: How to detect debug interpreter | How can I detect in my python script if its being run by the debug interpreter (ie python_d.exe rather than python.exe)? I need to change the paths to some dlls that I pass to an extension.
eg Id like to do something like this at the start of my python script:
#get paths to graphics dlls
if debug_build:
d3d9Path = "bin\\debug\\direct3d9.dll"
d3d10Path = "bin\\debug\\direct3d10.dll"
openGLPath = "bin\\debug\\openGL2.dll"
else:
d3d9Path = "bin\\direct3d9.dll"
d3d10Path = "bin\\direct3d10.dll"
openGLPath = "bin\\openGL2.dll"
I thought about adding an "IsDebug()" method to the extension which would return true if it is the debug build (ie was built with "#define DEBUG") and false otherwise. But this seems a bit of a hack for somthing Im sure I can get python to tell me... | python | debugging | null | null | null | null | open | Python: How to detect debug interpreter
===
How can I detect in my python script if its being run by the debug interpreter (ie python_d.exe rather than python.exe)? I need to change the paths to some dlls that I pass to an extension.
eg Id like to do something like this at the start of my python script:
#get paths to graphics dlls
if debug_build:
d3d9Path = "bin\\debug\\direct3d9.dll"
d3d10Path = "bin\\debug\\direct3d10.dll"
openGLPath = "bin\\debug\\openGL2.dll"
else:
d3d9Path = "bin\\direct3d9.dll"
d3d10Path = "bin\\direct3d10.dll"
openGLPath = "bin\\openGL2.dll"
I thought about adding an "IsDebug()" method to the extension which would return true if it is the debug build (ie was built with "#define DEBUG") and false otherwise. But this seems a bit of a hack for somthing Im sure I can get python to tell me... | 0 |
8,050,636 | 11/08/2011 12:51:17 | 685,711 | 03/31/2011 12:33:00 | 1,430 | 76 | is there an ExecuteScalar in Dapper | it looks like there was an ExecuteScalar in Dapper...
http://code.google.com/p/dapper-dot-net/issues/attachmentText?id=22&aid=220000000&name=ExecuteScalar.cs&token=9e2fd8899022f507b140ffb883c60e34
Was ExecuteScalar renamed or removed?
Can this now be achieved with .Query or .Query<T>? | c# | dapper | null | null | null | 11/09/2011 02:43:18 | not a real question | is there an ExecuteScalar in Dapper
===
it looks like there was an ExecuteScalar in Dapper...
http://code.google.com/p/dapper-dot-net/issues/attachmentText?id=22&aid=220000000&name=ExecuteScalar.cs&token=9e2fd8899022f507b140ffb883c60e34
Was ExecuteScalar renamed or removed?
Can this now be achieved with .Query or .Query<T>? | 1 |
368,967 | 12/15/2008 16:42:33 | 43,076 | 12/04/2008 03:09:11 | 8 | 1 | Writing AVI files in OpenCV | There example on the net and code given in Learn OpenCv,Orielly.
After many attempts the out.avi file is written with 0 bytes.
I wonder where i went wrong.
The following are the code i used...
int main(int argc, char* argv[]) {
CvCapture* input = cvCaptureFromFile(argv[1]);
IplImage* image = cvRetrieveFrame(input);
if (!image) {
printf("Unable to read input");
return 0;
}
CvSize imgSize;
imgSize.width = image->width;
imgSize.height = image->height;
double fps = cvGetCaptureProperty(
input,
CV_CAP_PROP_FPS
);
CvVideoWriter *writer = cvCreateVideoWriter(
"out.avi",
CV_FOURCC('M', 'J', 'P', 'G'),
fps,
imgSize
);
IplImage* colourImage;
//Keep processing frames...
for (;;) {
//Get a frame from the input video.
colourImage = cvQueryFrame(input);
cvWriteFrame(writer, colourImage);
}
cvReleaseVideoWriter(&writer);
cvReleaseCapture(&input);
} | opencv | avi | video | null | null | null | open | Writing AVI files in OpenCV
===
There example on the net and code given in Learn OpenCv,Orielly.
After many attempts the out.avi file is written with 0 bytes.
I wonder where i went wrong.
The following are the code i used...
int main(int argc, char* argv[]) {
CvCapture* input = cvCaptureFromFile(argv[1]);
IplImage* image = cvRetrieveFrame(input);
if (!image) {
printf("Unable to read input");
return 0;
}
CvSize imgSize;
imgSize.width = image->width;
imgSize.height = image->height;
double fps = cvGetCaptureProperty(
input,
CV_CAP_PROP_FPS
);
CvVideoWriter *writer = cvCreateVideoWriter(
"out.avi",
CV_FOURCC('M', 'J', 'P', 'G'),
fps,
imgSize
);
IplImage* colourImage;
//Keep processing frames...
for (;;) {
//Get a frame from the input video.
colourImage = cvQueryFrame(input);
cvWriteFrame(writer, colourImage);
}
cvReleaseVideoWriter(&writer);
cvReleaseCapture(&input);
} | 0 |
2,190,471 | 02/03/2010 08:01:56 | 1,145,208 | 06/01/2009 02:27:39 | 59 | 4 | Rails: checking modified fields | First, I've generated scaffold called 'item'
I'd like to check which fields of the item are modified. and I've tried two possible attempts, those're not work tho.
First Attempt!
def edit
@item = Item.find(params[:id])
@item_before_update = @item.dup
end
def update
@item = Item.find(params[:id])
# compare @item_before_update and @item here, but @item_before_update is NIL !!!
end
Second Attempt!
I looked for the way passing data from view to controller and I couldn't.
*edit.html.erb*
<% @item_before_update = @item.dup %> # I thought @item_before_update can be read in update method of item controller. But NO.
<% params[:item_before_update] = @item.dup %> # And I also thought params[:item_before_update] can be read in update mothod of item controller. But AGAIN NO
<% form_for(@item) do |f| %>
# omitted
<% end %>
Please let me know how to solve this problem :( | ruby-on-rails | null | null | null | null | null | open | Rails: checking modified fields
===
First, I've generated scaffold called 'item'
I'd like to check which fields of the item are modified. and I've tried two possible attempts, those're not work tho.
First Attempt!
def edit
@item = Item.find(params[:id])
@item_before_update = @item.dup
end
def update
@item = Item.find(params[:id])
# compare @item_before_update and @item here, but @item_before_update is NIL !!!
end
Second Attempt!
I looked for the way passing data from view to controller and I couldn't.
*edit.html.erb*
<% @item_before_update = @item.dup %> # I thought @item_before_update can be read in update method of item controller. But NO.
<% params[:item_before_update] = @item.dup %> # And I also thought params[:item_before_update] can be read in update mothod of item controller. But AGAIN NO
<% form_for(@item) do |f| %>
# omitted
<% end %>
Please let me know how to solve this problem :( | 0 |
10,370,622 | 04/29/2012 08:00:58 | 61,158 | 02/01/2009 09:02:53 | 5,762 | 231 | Graphics2D multi-composite of an isometric tile map | I'm working on a game which uses isometric tile-based maps for planetary surfaces ([example][1]). Each of the tile cell is a small BufferedImage element. Day and night cicles are implemented by modifying the pixels of these images (darkening and blue shifting), then a window-light map (another static BufferedImage) is rendered over each building. The proper Z-order is kept by going in top-right-bottom-left order and only strips of the tiles are drawn. Unfortunately, this approach practically destroys the acceleration of the images and the rendering becomes very slow if the day-night transition happens on very fast game speed. The current solution is to cache a number of shades for each tile at the cost of huge memory increase.
Can the Java [composition modes][2] of Graphics2D used for this purpose, e.g, draw the normal colored tile, draw a darkened surface over it, then apply the light-map? How can I ensure that only the pixels of the normal tile are affected by the recoloring?
[1]: http://open-ig.googlecode.com/svn/trunk/open-ig/doc/message_history_screen_menu.png
[2]: http://docs.oracle.com/javase/tutorial/2d/advanced/compositing.html | java | bufferedimage | graphics2d | null | null | null | open | Graphics2D multi-composite of an isometric tile map
===
I'm working on a game which uses isometric tile-based maps for planetary surfaces ([example][1]). Each of the tile cell is a small BufferedImage element. Day and night cicles are implemented by modifying the pixels of these images (darkening and blue shifting), then a window-light map (another static BufferedImage) is rendered over each building. The proper Z-order is kept by going in top-right-bottom-left order and only strips of the tiles are drawn. Unfortunately, this approach practically destroys the acceleration of the images and the rendering becomes very slow if the day-night transition happens on very fast game speed. The current solution is to cache a number of shades for each tile at the cost of huge memory increase.
Can the Java [composition modes][2] of Graphics2D used for this purpose, e.g, draw the normal colored tile, draw a darkened surface over it, then apply the light-map? How can I ensure that only the pixels of the normal tile are affected by the recoloring?
[1]: http://open-ig.googlecode.com/svn/trunk/open-ig/doc/message_history_screen_menu.png
[2]: http://docs.oracle.com/javase/tutorial/2d/advanced/compositing.html | 0 |
3,846,393 | 10/02/2010 15:36:44 | 251,931 | 01/15/2010 23:16:56 | 484 | 10 | Does VB is developed on the same scale as C# ? | I know VB is still very popular, but does Microsoft puts same efforts in developing VB, as they do for C#? Does VB eventually will fade away? | c# | vb.net | null | null | null | 10/02/2010 16:05:38 | not constructive | Does VB is developed on the same scale as C# ?
===
I know VB is still very popular, but does Microsoft puts same efforts in developing VB, as they do for C#? Does VB eventually will fade away? | 4 |
4,621,828 | 01/07/2011 01:46:50 | 329,320 | 04/29/2010 22:52:05 | 48 | 5 | Dynamically duplicating an array key in php for function recursion? | Im working on creating a modular CMS system in codeigniter and Im having trouble figuring out how to, and whether I can, dynamically add array keys within a function, based on the current depth of the array. For instance, I have data that looks like the following --
[header] => Array (
[blocks] => Array (
[utilitynav] => Array (
[name] => utilitynav [module] => admin [helper] => [model] => [data] =>
)
[topnav] => Array (
[name] => topnav [module] => admin [helper] => topnav [model] => Db_Sitepages [data] =>
)
[subhead] => Array (
[name] => subhead [module] => admin [helper] => [model] => [data] => [hasChildren] => 1
[blocks] => Array (
[testchild] => Array ( [name] => testchild [module] => admin [helper] => [model] => [data] => [parent] => subhead
)
)
)
)
)
-- Basically, Blocks have children which are wrapped within the parent block. Im trying to figure out an effective way to manage the levels as right now I am using a separate function to output the children blocks, and if I wanted to be able to go 3 levels deep, I would have to create yet another function. So I am trying to do it recursively, by dynamically adding an array key to my for each statement each time the function reiterates.
For example, this is the function I am using to output the blocks --
function outputChildBlocks($view_name)
{
if(isset($this->view_data[$view_name]['blocks']))
{
$html='<div class="blockWrapper">';
foreach($this->view_data[$view_name]['blocks'] as $block)
{
$html.= '<div class="block '.$block['name'].'">';
$module = $block['module'];
$name = $block['name'];
$data['block'] = $block;
if($block['helper'] != null)
{
$this->load->helper($module.'/'.$block['helper']);
}
if($block['model'] != null)
{
$data['model'] = new $block['model']();
}
$html .= $this->load->view($module.'/blocks/'.$name, $data, true);
if(isset($block['hasChildren']))
{
$html .= $this->outputChildChildBlocks($view_name, $name);
}
$html.= '</div>';
}
$html .= '</div>';
return $html;
}
}
As you can see, at the bottom I am checking if parent has children, and if it does, I call a completely seperate function to output the child blocks (outputChildChildBlocks) -- So, instead, I would like to have the function recognize the depth of the current location, and when it gets to the if statement at bottom, if it does have children, run itself again, add a counter for each level, and then instead of
foreach($this->view_data[$view_name]['blocks'] as $block)
have it go
foreach($this->view_data[$view_name]['blocks'][$name]['blocks'] as $block)
for the 2nd level, then go
foreach($this->view_data[$view_name]['blocks'][$name]['blocks'][$name]['blocks'] as $block)
for the 3rd level, so on and so forth.
Anyways I am not sure how to dynamically add the ['blocks'] key on to the array, for every iteration of the function that has been run for that main block... (obviously I have a [footer] and a [content] block and what not as well with their own sets of blocks)
Anyways sorry if I over explained or complicated the question I have a tendency to do that but I am trying to be as clear as possible and I will be eternally indebted to you if you can show me the best way of making this function recursive!
| php | arrays | php5 | codeigniter | multidimensional-array | null | open | Dynamically duplicating an array key in php for function recursion?
===
Im working on creating a modular CMS system in codeigniter and Im having trouble figuring out how to, and whether I can, dynamically add array keys within a function, based on the current depth of the array. For instance, I have data that looks like the following --
[header] => Array (
[blocks] => Array (
[utilitynav] => Array (
[name] => utilitynav [module] => admin [helper] => [model] => [data] =>
)
[topnav] => Array (
[name] => topnav [module] => admin [helper] => topnav [model] => Db_Sitepages [data] =>
)
[subhead] => Array (
[name] => subhead [module] => admin [helper] => [model] => [data] => [hasChildren] => 1
[blocks] => Array (
[testchild] => Array ( [name] => testchild [module] => admin [helper] => [model] => [data] => [parent] => subhead
)
)
)
)
)
-- Basically, Blocks have children which are wrapped within the parent block. Im trying to figure out an effective way to manage the levels as right now I am using a separate function to output the children blocks, and if I wanted to be able to go 3 levels deep, I would have to create yet another function. So I am trying to do it recursively, by dynamically adding an array key to my for each statement each time the function reiterates.
For example, this is the function I am using to output the blocks --
function outputChildBlocks($view_name)
{
if(isset($this->view_data[$view_name]['blocks']))
{
$html='<div class="blockWrapper">';
foreach($this->view_data[$view_name]['blocks'] as $block)
{
$html.= '<div class="block '.$block['name'].'">';
$module = $block['module'];
$name = $block['name'];
$data['block'] = $block;
if($block['helper'] != null)
{
$this->load->helper($module.'/'.$block['helper']);
}
if($block['model'] != null)
{
$data['model'] = new $block['model']();
}
$html .= $this->load->view($module.'/blocks/'.$name, $data, true);
if(isset($block['hasChildren']))
{
$html .= $this->outputChildChildBlocks($view_name, $name);
}
$html.= '</div>';
}
$html .= '</div>';
return $html;
}
}
As you can see, at the bottom I am checking if parent has children, and if it does, I call a completely seperate function to output the child blocks (outputChildChildBlocks) -- So, instead, I would like to have the function recognize the depth of the current location, and when it gets to the if statement at bottom, if it does have children, run itself again, add a counter for each level, and then instead of
foreach($this->view_data[$view_name]['blocks'] as $block)
have it go
foreach($this->view_data[$view_name]['blocks'][$name]['blocks'] as $block)
for the 2nd level, then go
foreach($this->view_data[$view_name]['blocks'][$name]['blocks'][$name]['blocks'] as $block)
for the 3rd level, so on and so forth.
Anyways I am not sure how to dynamically add the ['blocks'] key on to the array, for every iteration of the function that has been run for that main block... (obviously I have a [footer] and a [content] block and what not as well with their own sets of blocks)
Anyways sorry if I over explained or complicated the question I have a tendency to do that but I am trying to be as clear as possible and I will be eternally indebted to you if you can show me the best way of making this function recursive!
| 0 |
44,370 | 09/04/2008 18:12:29 | 3,556 | 08/29/2008 04:58:15 | 31 | 1 | Best Language for an AJAX-driven "Reputation Index" | I'd like to produce a fun AJAX-driven "Reputation Index" taking from Cory Doctorow's book "Down an Out in the Magic Kingdom" where "Whuffie" is a measurement of reputation/currency.
I'd like to allow people to create accounts, login, see other people and assign positive or negative amounts of "whuffie" to them. There would then be an "overview" of sorts, or the actual "index" (like a stock market) that would list the whuffie scores sorted by whatever means.
Obviously I'll need a database, and I have easy access to mySQL (as I lease a dedicated server used for webhosting).
I'm curious as to what everyone thinks would be a better language for this. It's web-based, therefore I'm thinking either PHP or Rails (since I've got books on Rails). Any suggestions? | ajax | fun | null | null | null | 07/22/2011 22:46:52 | not constructive | Best Language for an AJAX-driven "Reputation Index"
===
I'd like to produce a fun AJAX-driven "Reputation Index" taking from Cory Doctorow's book "Down an Out in the Magic Kingdom" where "Whuffie" is a measurement of reputation/currency.
I'd like to allow people to create accounts, login, see other people and assign positive or negative amounts of "whuffie" to them. There would then be an "overview" of sorts, or the actual "index" (like a stock market) that would list the whuffie scores sorted by whatever means.
Obviously I'll need a database, and I have easy access to mySQL (as I lease a dedicated server used for webhosting).
I'm curious as to what everyone thinks would be a better language for this. It's web-based, therefore I'm thinking either PHP or Rails (since I've got books on Rails). Any suggestions? | 4 |
9,781,782 | 03/20/2012 05:31:17 | 985,811 | 10/08/2011 21:06:01 | 28 | 2 | IEnumerable C# Class How-to | Below is my class. I need to make it Enumerable. I have looked online and although I have found alot of documentation I am still lost. This I think is absolutely the first time I am going to ask this but could someone please just make this darn thing Enumerable for me and I will figure it out from there.
I am using C# ASP.Net 4.0
public class ProfilePics
{
public string status { get; set; }
public string filename { get; set; }
public bool mainpic { get; set; }
public string fullurl { get; set; }
} | c#-4.0 | ienumerable | ienumerator | customclasses | null | null | open | IEnumerable C# Class How-to
===
Below is my class. I need to make it Enumerable. I have looked online and although I have found alot of documentation I am still lost. This I think is absolutely the first time I am going to ask this but could someone please just make this darn thing Enumerable for me and I will figure it out from there.
I am using C# ASP.Net 4.0
public class ProfilePics
{
public string status { get; set; }
public string filename { get; set; }
public bool mainpic { get; set; }
public string fullurl { get; set; }
} | 0 |
8,686,106 | 12/31/2011 03:33:45 | 504,363 | 11/11/2010 10:24:06 | 80 | 0 | how get google search results? | I need to pass a search query to google and get search results back into an array using PHP ? (**something like an api and how to useit** ?!)
============= ***Or*** =============
I already tried to download the full google link (provided with query) using **file_get_contents** function , then I handle the search results manually.
I found that all search results links is between **<h3 class="r"><a href="** and **"** but I need a function to get all between these two sub strings.
please help in any of the two ways.
thanks | php | regex | url | google | null | 12/31/2011 06:22:01 | not a real question | how get google search results?
===
I need to pass a search query to google and get search results back into an array using PHP ? (**something like an api and how to useit** ?!)
============= ***Or*** =============
I already tried to download the full google link (provided with query) using **file_get_contents** function , then I handle the search results manually.
I found that all search results links is between **<h3 class="r"><a href="** and **"** but I need a function to get all between these two sub strings.
please help in any of the two ways.
thanks | 1 |
1,043,166 | 06/25/2009 10:33:46 | 50,853 | 01/02/2009 10:51:30 | 263 | 16 | Accessing a Function over Database Link with Different Charsets in Oracle | I have a function in DatabaseA which i want to access in DatabaseB, so i created a DB link in DatabaseB and started accessing the function as
SELECT function_name@dblink ('A0484') FROM DUAL;
Doing this resulted in the following Error
ERROR at line 1:
ORA-12703: this character set conversion is not supported
ORA-06512: at line 1
On digging i found the below info of the databases
DatabaseA:
Version-8i
Charset-US7ASCII
DatabaseB:
Version-10g
Charset-AL32UTF8
direct access to any of the table in DatabaseA from DatabaseB through the DBLink works fines, it is only the function which returns this error.
The function has a signature similar to below
CREATE OR REPLACE FUNCTION TestFunc(p_Number IN VARCHAR2) RETURN VARCHAR2 IS
BEGIN
RETURN 'Some Data';
END;
Any ideas what could be causing the conversion error and what can be done to avoid the error since direct access to the tables seem to work fine.
| oracle | character-encoding | null | null | null | null | open | Accessing a Function over Database Link with Different Charsets in Oracle
===
I have a function in DatabaseA which i want to access in DatabaseB, so i created a DB link in DatabaseB and started accessing the function as
SELECT function_name@dblink ('A0484') FROM DUAL;
Doing this resulted in the following Error
ERROR at line 1:
ORA-12703: this character set conversion is not supported
ORA-06512: at line 1
On digging i found the below info of the databases
DatabaseA:
Version-8i
Charset-US7ASCII
DatabaseB:
Version-10g
Charset-AL32UTF8
direct access to any of the table in DatabaseA from DatabaseB through the DBLink works fines, it is only the function which returns this error.
The function has a signature similar to below
CREATE OR REPLACE FUNCTION TestFunc(p_Number IN VARCHAR2) RETURN VARCHAR2 IS
BEGIN
RETURN 'Some Data';
END;
Any ideas what could be causing the conversion error and what can be done to avoid the error since direct access to the tables seem to work fine.
| 0 |
2,998,570 | 06/08/2010 15:03:17 | 78,579 | 03/16/2009 13:09:16 | 293 | 7 | What is a way to access .accdb files for reading and writing? | I have an Microsoft Access Database (.accdb) that stores information needed in an application.
Is their a way to distribute my application with the access database without having the user have access installed or get the user to go and download and install the office runtime?
The windows form application that uses the access database is developed in VB.net in Visual Studio 2008. | winforms | ms-access | microsoft | null | null | null | open | What is a way to access .accdb files for reading and writing?
===
I have an Microsoft Access Database (.accdb) that stores information needed in an application.
Is their a way to distribute my application with the access database without having the user have access installed or get the user to go and download and install the office runtime?
The windows form application that uses the access database is developed in VB.net in Visual Studio 2008. | 0 |
1,650,901 | 10/30/2009 16:29:36 | 192,729 | 10/19/2009 22:30:00 | 413 | 20 | TagPrefix containing StrongKey | I'm debbuging a web application that has a WebSite and a class library containg web controls. My WebSite, at design-time references the assembly with a Project Reference and Visual Studio automatically populates the Toolbox with the controls found in my class library.
The problem is : When I drag them to the ASPx designer, Visual Studio automatically creates a TagPrefix ignoring the my class library's strong key. This is a problem for me because when I publish this website, this class library will be the Global Assembly Cache and it won't be found if the TagPrefix doesn't properly reference it.
Any idea about how to force visual studio to consider my assembly's strong key when creating the tag prefix?
Thanks. | c# | visual-studio | .net | asp.net | null | null | open | TagPrefix containing StrongKey
===
I'm debbuging a web application that has a WebSite and a class library containg web controls. My WebSite, at design-time references the assembly with a Project Reference and Visual Studio automatically populates the Toolbox with the controls found in my class library.
The problem is : When I drag them to the ASPx designer, Visual Studio automatically creates a TagPrefix ignoring the my class library's strong key. This is a problem for me because when I publish this website, this class library will be the Global Assembly Cache and it won't be found if the TagPrefix doesn't properly reference it.
Any idea about how to force visual studio to consider my assembly's strong key when creating the tag prefix?
Thanks. | 0 |
2,640,255 | 04/14/2010 19:05:11 | 175,051 | 09/17/2009 15:58:26 | 1,060 | 66 | Getting search results from Twitter in php | I'm attempting to put together a little mashup with some twitter APIs. However, the whole area is new to me (I'm more of an embedded developer dabbling). And frustratingly, every tutorial I am trying in Php is either out of date, not doing what it claims to do, it or is broken.
Essentially, I just want a nice bit of example code - say, an HTML file, a connection.js for the JQuery magic, and a php file - 'getsearch' which contains the relevant Curl calls to the API to just return the results for a given search term.
Followed the tutorial to the letter at
http://www.reynoldsftw.com/2009/02/using-jquery-php-ajax-with-the-twitter-api/
and even downloaded the guy's code and chucked it on my webserver, but it just seems to sit there.
I'm relatively competent at php and html, but it's the Curl and the JQuery side of things which is new to me, and would appreciate any thoughts, links, or code suggestions. I've attempted reading the API - but even that seems sparse - and several links are broken to their own tutorials, so that's put me off a bit for now. | twitter | php | curl | jquery | javascript | null | open | Getting search results from Twitter in php
===
I'm attempting to put together a little mashup with some twitter APIs. However, the whole area is new to me (I'm more of an embedded developer dabbling). And frustratingly, every tutorial I am trying in Php is either out of date, not doing what it claims to do, it or is broken.
Essentially, I just want a nice bit of example code - say, an HTML file, a connection.js for the JQuery magic, and a php file - 'getsearch' which contains the relevant Curl calls to the API to just return the results for a given search term.
Followed the tutorial to the letter at
http://www.reynoldsftw.com/2009/02/using-jquery-php-ajax-with-the-twitter-api/
and even downloaded the guy's code and chucked it on my webserver, but it just seems to sit there.
I'm relatively competent at php and html, but it's the Curl and the JQuery side of things which is new to me, and would appreciate any thoughts, links, or code suggestions. I've attempted reading the API - but even that seems sparse - and several links are broken to their own tutorials, so that's put me off a bit for now. | 0 |
10,394,088 | 05/01/2012 05:51:32 | 1,364,687 | 04/29/2012 21:10:50 | 11 | 0 | Android Audio recording application | Am new to android and needed help with an android program which uses the phones built in sound recorder to record sound. Thanx in advance. | android | null | null | null | null | 05/02/2012 12:45:49 | not a real question | Android Audio recording application
===
Am new to android and needed help with an android program which uses the phones built in sound recorder to record sound. Thanx in advance. | 1 |
8,385,913 | 12/05/2011 13:16:40 | 253,377 | 01/18/2010 17:12:26 | 729 | 47 | Rapid frontend development tool for the web | Positioning divs, floating them, adding padding and margins, setting font types etc,etc. Hell, this takes a helluva lot of time - in a text editor - from essential development. Is there any kind of tool, which provides a rapid WYSIWYG development environment for html/css? What I'm looking for is something like a combination of Firebug and Dreamweaver (terrible, bloated ui), where I can append a div with a shortcut/click, then adjust padding/margin with arrows, floating them left/right, select fontgroups etc.
Anything like this exists? | html | css | editor | null | null | 12/05/2011 13:32:18 | off topic | Rapid frontend development tool for the web
===
Positioning divs, floating them, adding padding and margins, setting font types etc,etc. Hell, this takes a helluva lot of time - in a text editor - from essential development. Is there any kind of tool, which provides a rapid WYSIWYG development environment for html/css? What I'm looking for is something like a combination of Firebug and Dreamweaver (terrible, bloated ui), where I can append a div with a shortcut/click, then adjust padding/margin with arrows, floating them left/right, select fontgroups etc.
Anything like this exists? | 2 |
7,975,801 | 11/02/2011 04:23:33 | 870,147 | 07/29/2011 22:41:55 | 29 | 0 | C# program causes bluescreen? | This is only the important stuff that the bluescreen shows. I'm on Windows 7 x64.
**"A problem has been detected and Windows has been shut down to prevent damage
to your computer.**
**PROCESS_HAS_LOCKED_PAGES**
***** STOP: 0x00000076 (0x0000000000000000, 0xfffffa8009dcd060, 0x0000000000000011,
0x0000000000000000)**"
I can't work on it now because every time I close it I get a bluescreen!
The program doesn't do anything yet except run the background worker below. It pings all addresses that could be part of the user's home network and attempts to connect to a certain port that another program will be listening on.
private void NetworkScanner_DoWork(object sender, DoWorkEventArgs e)
{
bool ExceptionEncountered = false;
int IPsProcessed = 0;
NetworkSearcherOutput = "Starting network scanner...";
NetworkSearcher.ReportProgress(0);
Thread.Sleep(1000);
foreach (IPAddress IP in Dns.GetHostAddresses(Dns.GetHostName()))
{
if (IP.AddressFamily == AddressFamily.InterNetwork)
{
string[] Octets = IP.ToString().Split('.');
Octets[3] = "0";
IPAddress CurrentAddressIteration = StringArrayToIP(Octets);
while (GetLastOctet(CurrentAddressIteration) != 255)
{
PingReply Reply = new Ping().Send(CurrentAddressIteration, 5);
if (Reply.Status == IPStatus.Success)
{
NetworkSearcherOutput = CurrentAddressIteration.ToString() + " sent response.";
NetworkSearcher.ReportProgress(0);
Thread.Sleep(500);
InClient Client = new InClient(CurrentAddressIteration);
try
{
Client.Connect();
SnapshotBox.Image = Client.Receive(typeof(Image));
NetworkSearcherOutput = CurrentAddressIteration.ToString() + " is running program.";
NetworkSearcher.ReportProgress(0);
Thread.Sleep(1000);
}
catch (Exception E)
{
// A socket exception is expected when the client is not running the program.
if (E is SocketException)
{
Client.Close();
NetworkSearcherOutput = CurrentAddressIteration.ToString() + " is not running program.";
NetworkSearcher.ReportProgress(0);
Thread.Sleep(1000);
}
//Unhandled exception. Show messagebox and close.
else
{
MessageBox.Show("Network scanner encountered an unhandled exception.\n\n" + E.GetType().ToString() + ": " + E.Message, "Unhandled Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
ExceptionEncountered = true;
break;
}
}
}
else
{
NetworkSearcherOutput = CurrentAddressIteration.ToString() + " did not respond.";
NetworkSearcher.ReportProgress(0);
}
IPsProcessed++;
if (IPsProcessed == 5)
{
NetworkSearcher.ReportProgress(2);
IPsProcessed = 0;
}
Octets = CurrentAddressIteration.ToString().Split('.');
Octets[3] = (Int32.Parse(Octets[3]) + 1).ToString();
CurrentAddressIteration = StringArrayToIP(Octets);
}
}
}
if (!ExceptionEncountered)
{
NetworkSearcherOutput = "Network scanning complete.";
NetworkSearcher.ReportProgress(0);
NetworkSearcher.ReportProgress(100);
}
else
{
NetworkSearcherOutput = "Network scanning encountered an error.";
NetworkSearcher.ReportProgress(-1);
}
I thought C# programs were supposed to never cause bluescreens? | c# | sockets | thread-safety | null | null | null | open | C# program causes bluescreen?
===
This is only the important stuff that the bluescreen shows. I'm on Windows 7 x64.
**"A problem has been detected and Windows has been shut down to prevent damage
to your computer.**
**PROCESS_HAS_LOCKED_PAGES**
***** STOP: 0x00000076 (0x0000000000000000, 0xfffffa8009dcd060, 0x0000000000000011,
0x0000000000000000)**"
I can't work on it now because every time I close it I get a bluescreen!
The program doesn't do anything yet except run the background worker below. It pings all addresses that could be part of the user's home network and attempts to connect to a certain port that another program will be listening on.
private void NetworkScanner_DoWork(object sender, DoWorkEventArgs e)
{
bool ExceptionEncountered = false;
int IPsProcessed = 0;
NetworkSearcherOutput = "Starting network scanner...";
NetworkSearcher.ReportProgress(0);
Thread.Sleep(1000);
foreach (IPAddress IP in Dns.GetHostAddresses(Dns.GetHostName()))
{
if (IP.AddressFamily == AddressFamily.InterNetwork)
{
string[] Octets = IP.ToString().Split('.');
Octets[3] = "0";
IPAddress CurrentAddressIteration = StringArrayToIP(Octets);
while (GetLastOctet(CurrentAddressIteration) != 255)
{
PingReply Reply = new Ping().Send(CurrentAddressIteration, 5);
if (Reply.Status == IPStatus.Success)
{
NetworkSearcherOutput = CurrentAddressIteration.ToString() + " sent response.";
NetworkSearcher.ReportProgress(0);
Thread.Sleep(500);
InClient Client = new InClient(CurrentAddressIteration);
try
{
Client.Connect();
SnapshotBox.Image = Client.Receive(typeof(Image));
NetworkSearcherOutput = CurrentAddressIteration.ToString() + " is running program.";
NetworkSearcher.ReportProgress(0);
Thread.Sleep(1000);
}
catch (Exception E)
{
// A socket exception is expected when the client is not running the program.
if (E is SocketException)
{
Client.Close();
NetworkSearcherOutput = CurrentAddressIteration.ToString() + " is not running program.";
NetworkSearcher.ReportProgress(0);
Thread.Sleep(1000);
}
//Unhandled exception. Show messagebox and close.
else
{
MessageBox.Show("Network scanner encountered an unhandled exception.\n\n" + E.GetType().ToString() + ": " + E.Message, "Unhandled Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
ExceptionEncountered = true;
break;
}
}
}
else
{
NetworkSearcherOutput = CurrentAddressIteration.ToString() + " did not respond.";
NetworkSearcher.ReportProgress(0);
}
IPsProcessed++;
if (IPsProcessed == 5)
{
NetworkSearcher.ReportProgress(2);
IPsProcessed = 0;
}
Octets = CurrentAddressIteration.ToString().Split('.');
Octets[3] = (Int32.Parse(Octets[3]) + 1).ToString();
CurrentAddressIteration = StringArrayToIP(Octets);
}
}
}
if (!ExceptionEncountered)
{
NetworkSearcherOutput = "Network scanning complete.";
NetworkSearcher.ReportProgress(0);
NetworkSearcher.ReportProgress(100);
}
else
{
NetworkSearcherOutput = "Network scanning encountered an error.";
NetworkSearcher.ReportProgress(-1);
}
I thought C# programs were supposed to never cause bluescreens? | 0 |
11,042,317 | 06/14/2012 22:40:17 | 1,214,858 | 02/16/2012 21:13:27 | 19 | 0 | Data sorting PHP | I am trying to sort my images by layout and sort order. I have kind of done it but not exactly how I want it to look.
<div id="sortableImages">
<ul>
<?php
$galleryID = $_SESSION['newGalleryId'];
$query = "SELECT *
FROM galleryimage
WHERE galleryId = $galleryID
ORDER BY sort
AND layout
ASC";
$result = mysql_query($query);
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$sortImageName = $row['OrgImageName'];
$sortPath = "../data/gallery/" . $_GET['edit'] . "/images/album/" . $sortImageName;
?>
<li class="sortPhotos" id="recordsArray_<?php echo $row['id']; ?>">
<img src="<?php echo $sortPath ?>" />
</li>
<?php } ?>
</ul>
</div>
This gives me an output of
<ul class="ui-sortable">
<li class="sortPhotos" id="recordsArray_1392">
<img src="../data/gallery/208/images/album/front_cover.jpg" />
</li>
<li class="sortPhotos" id="recordsArray_1393">
<img src="../data/gallery/208/images/album/007.jpg" />
</li>
<li class="sortPhotos" id="recordsArray_1394">
<img src="../data/gallery/208/images/album/009.jpg" />
</li>
</ul>
I would like to be able to get it to look like
<h2>Layout 1</h2>
<ul class="ui-sortable">
<li class="sortPhotos" id="recordsArray_1392">
<img src="../data/gallery/208/images/album/front_cover.jpg" />
</li>
</ul>
<h2>Layout 2</h2>
<ul>
<li class="sortPhotos" id="recordsArray_1393">
<img src="../data/gallery/208/images/album/007.jpg" />
</li>
<li class="sortPhotos" id="recordsArray_1394">
<img src="../data/gallery/208/images/album/009.jpg" />
</li>
</ul>
I need a little help figuring out how to nest the loops correctly in PHP. Any help would be a great help.
Thanks | php | null | null | null | null | 06/15/2012 01:36:58 | too localized | Data sorting PHP
===
I am trying to sort my images by layout and sort order. I have kind of done it but not exactly how I want it to look.
<div id="sortableImages">
<ul>
<?php
$galleryID = $_SESSION['newGalleryId'];
$query = "SELECT *
FROM galleryimage
WHERE galleryId = $galleryID
ORDER BY sort
AND layout
ASC";
$result = mysql_query($query);
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$sortImageName = $row['OrgImageName'];
$sortPath = "../data/gallery/" . $_GET['edit'] . "/images/album/" . $sortImageName;
?>
<li class="sortPhotos" id="recordsArray_<?php echo $row['id']; ?>">
<img src="<?php echo $sortPath ?>" />
</li>
<?php } ?>
</ul>
</div>
This gives me an output of
<ul class="ui-sortable">
<li class="sortPhotos" id="recordsArray_1392">
<img src="../data/gallery/208/images/album/front_cover.jpg" />
</li>
<li class="sortPhotos" id="recordsArray_1393">
<img src="../data/gallery/208/images/album/007.jpg" />
</li>
<li class="sortPhotos" id="recordsArray_1394">
<img src="../data/gallery/208/images/album/009.jpg" />
</li>
</ul>
I would like to be able to get it to look like
<h2>Layout 1</h2>
<ul class="ui-sortable">
<li class="sortPhotos" id="recordsArray_1392">
<img src="../data/gallery/208/images/album/front_cover.jpg" />
</li>
</ul>
<h2>Layout 2</h2>
<ul>
<li class="sortPhotos" id="recordsArray_1393">
<img src="../data/gallery/208/images/album/007.jpg" />
</li>
<li class="sortPhotos" id="recordsArray_1394">
<img src="../data/gallery/208/images/album/009.jpg" />
</li>
</ul>
I need a little help figuring out how to nest the loops correctly in PHP. Any help would be a great help.
Thanks | 3 |
5,287,783 | 03/13/2011 05:55:27 | 501,557 | 11/09/2010 07:08:36 | 16,775 | 623 | Terminology for an equivalence relation derived from a strict weak ordering? | (This may be better off on the math site, but I figured that since it's programming-related I'd ask here first).
In some libraries, such as C++'s STL, algorithms or data structures that need to perform comparisons between elements require only a strict weak ordering < since all six relational operators can be derived from the strict weak ordering:
x < y iff x < y
x <= y iff !(y < x)
x == y iff !(x < y || y < x)
x != y iff x < y || y < x
x >= y iff !(x < y)
x > y iff y < x
I've seen this used extensively, and while I know the term "strict weak ordering" for the < operator, I'm never quite sure what to call the equivalence relation
x == y iff !(x < y || y < x)
that you can derive from it. Is there a term for this equivalence relation?
Thanks so much! | math | terminology | null | null | null | 07/31/2012 02:24:24 | off topic | Terminology for an equivalence relation derived from a strict weak ordering?
===
(This may be better off on the math site, but I figured that since it's programming-related I'd ask here first).
In some libraries, such as C++'s STL, algorithms or data structures that need to perform comparisons between elements require only a strict weak ordering < since all six relational operators can be derived from the strict weak ordering:
x < y iff x < y
x <= y iff !(y < x)
x == y iff !(x < y || y < x)
x != y iff x < y || y < x
x >= y iff !(x < y)
x > y iff y < x
I've seen this used extensively, and while I know the term "strict weak ordering" for the < operator, I'm never quite sure what to call the equivalence relation
x == y iff !(x < y || y < x)
that you can derive from it. Is there a term for this equivalence relation?
Thanks so much! | 2 |
8,308,599 | 11/29/2011 09:41:13 | 256,465 | 01/22/2010 06:01:30 | 643 | 22 | Django: templatetags pass variable value | I want to pass value of a variable from template to a templatetag but in the token list I get `picture.uri` as a string `[u'thumbnail', u'picture.uri']`
{% thumbnail picture.uri %}
Templatetag code:
from django.template import Library
register = Library()
@register.tag()
def thumbnail(parser, token):
...
...
How to pass variable value to a templatetag?
Sultan | python | django | django-templates | django-template-tags | null | null | open | Django: templatetags pass variable value
===
I want to pass value of a variable from template to a templatetag but in the token list I get `picture.uri` as a string `[u'thumbnail', u'picture.uri']`
{% thumbnail picture.uri %}
Templatetag code:
from django.template import Library
register = Library()
@register.tag()
def thumbnail(parser, token):
...
...
How to pass variable value to a templatetag?
Sultan | 0 |
6,875,520 | 07/29/2011 15:34:48 | 1,083 | 08/12/2008 11:00:58 | 910 | 24 | jQuery Mobile layout in ASP.NET MVC app | Short:
Do you put the data-role portions (header|content|footer) in your layout/master page or in each view in ASP.NET MVC?
Long:
Trying to find the 'best practice' with handling jQuery mobile layout. The docs (and some others) show:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
...
</head>
<body>
<div data-role="page">
<div data-role="header">...</div>
<div data-role="content">@RenderBody()</div>
<div data-role="footer">...</div>
</div>
</body>
</html>
However I have seen this too :
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
...
</head>
<body>
<div data-role="page">
@RenderBody()
</div>
</body>
</html>
With each view having:
<div data-role="page">
<div data-role="header">...</div>
<div data-role="content">...</div>
<div data-role="footer">...</div>
</div>
So, do you define the header|content|footer in each 'view' in ASP.NET or in the layout/master? Is one better? Does it matter at all? | asp.net-mvc | jquery-mobile | null | null | null | null | open | jQuery Mobile layout in ASP.NET MVC app
===
Short:
Do you put the data-role portions (header|content|footer) in your layout/master page or in each view in ASP.NET MVC?
Long:
Trying to find the 'best practice' with handling jQuery mobile layout. The docs (and some others) show:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
...
</head>
<body>
<div data-role="page">
<div data-role="header">...</div>
<div data-role="content">@RenderBody()</div>
<div data-role="footer">...</div>
</div>
</body>
</html>
However I have seen this too :
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
...
</head>
<body>
<div data-role="page">
@RenderBody()
</div>
</body>
</html>
With each view having:
<div data-role="page">
<div data-role="header">...</div>
<div data-role="content">...</div>
<div data-role="footer">...</div>
</div>
So, do you define the header|content|footer in each 'view' in ASP.NET or in the layout/master? Is one better? Does it matter at all? | 0 |
9,993,146 | 04/03/2012 12:21:35 | 908,128 | 08/23/2011 16:33:00 | 1 | 0 | In every website I make, I have some page width problems | Basically, I'm having this happen: http://i.imgur.com/BhXVi.png
I can scroll over to farther than I want the page to go. There's nothing in the code specifying a page width, so is there anything I can add? Maybe to the body{} tag in the CSS? Or Metadata? | html | css | page | width | null | 04/03/2012 12:25:23 | not a real question | In every website I make, I have some page width problems
===
Basically, I'm having this happen: http://i.imgur.com/BhXVi.png
I can scroll over to farther than I want the page to go. There's nothing in the code specifying a page width, so is there anything I can add? Maybe to the body{} tag in the CSS? Or Metadata? | 1 |
7,566,132 | 09/27/2011 08:22:53 | 919,778 | 08/30/2011 13:22:31 | 1 | 0 | Why would Openlayers always render over other divs? | I'm having trouble getting an Openlayers div to allow other divs to appear above it.
Having tried [the solution proposed here](http://stackoverflow.com/questions/7011143/openlayers-html-div-overlay) as well as [the more classy-looking one here](http://www.anjalytics.com/www/openlayers-z-index-css-hack), I haven't had any luck yet. Openlayers always orders itself over other divs. I've also set the z-index for my other div (which I want on top) as high as it goes, still no effect.
Is there somewhere it could be getting overridden? Or some setting that needs an extra trick to get rid of? | css | openlayers | null | null | null | null | open | Why would Openlayers always render over other divs?
===
I'm having trouble getting an Openlayers div to allow other divs to appear above it.
Having tried [the solution proposed here](http://stackoverflow.com/questions/7011143/openlayers-html-div-overlay) as well as [the more classy-looking one here](http://www.anjalytics.com/www/openlayers-z-index-css-hack), I haven't had any luck yet. Openlayers always orders itself over other divs. I've also set the z-index for my other div (which I want on top) as high as it goes, still no effect.
Is there somewhere it could be getting overridden? Or some setting that needs an extra trick to get rid of? | 0 |
11,437,659 | 07/11/2012 16:57:28 | 1,245,262 | 03/02/2012 14:23:50 | 384 | 5 | Am I misunderstanding pointer ref/deref, pointer arithmetic or do leading 0's really make a difference in C's ability to detect equality? | I've been trying to understand an error I get with the following code
bytes2bits(p,q,pixels)
u_char *p, *q;
register u_int pixels;
{
register u_char *r, a;
register u_long *l;
...
switch (*l++) {
case 0x00000000: a = 0x00; break;
case 0x00000001: a = 0x10; break;
case 0x00000100: a = 0x20; break;
case 0x00000101: a = 0x30; break;
case 0x00010000: a = 0x40; break;
case 0x00010001: a = 0x50; break;
case 0x00010100: a = 0x60; break;
case 0x00010101: a = 0x70; break;
case 0x01000000: a = 0x80; break;
case 0x01000001: a = 0x90; break;
case 0x01000100: a = 0xa0; break;
case 0x01000101: a = 0xb0; break;
case 0x01010000: a = 0xc0; break;
case 0x01010001: a = 0xd0; break;
case 0x01010100: a = 0xe0; break;
case 0x01010101: a = 0xf0; break;
default:
printf ("Decimal Rep: %d\n",(int)(*--l));l++;//Need to restore l
(void) fprintf(stderr,"bytes2bits: bad value %x\n",*--l);
exit(1);
}
......
}
My problem lies in the fact that this block of code exits with the error message
Decimal Rep: 16843008
bytes2bits: bad value 1010100
I would've thought that 0x01001010 == 1010100 (Note: the fprintf is using %x as output format, so I am looking at a hexadecimal number. Also, when I test and use a printf with %d output format, I see the value 16843008 (= 16^6 + 16^4 + 16^2), which is the equivalent decimal representation of 0x01010100. The 'bad value' 1010100 output is not affected by the presence of my printf checking statement).
How can I make sense of the fact that the switch statement does not recognize 1010100 as the next to last case (i.e.case 0x01010100: a = 0xe0)?
| c | pointers | hex | hexadecimal-notation | null | null | open | Am I misunderstanding pointer ref/deref, pointer arithmetic or do leading 0's really make a difference in C's ability to detect equality?
===
I've been trying to understand an error I get with the following code
bytes2bits(p,q,pixels)
u_char *p, *q;
register u_int pixels;
{
register u_char *r, a;
register u_long *l;
...
switch (*l++) {
case 0x00000000: a = 0x00; break;
case 0x00000001: a = 0x10; break;
case 0x00000100: a = 0x20; break;
case 0x00000101: a = 0x30; break;
case 0x00010000: a = 0x40; break;
case 0x00010001: a = 0x50; break;
case 0x00010100: a = 0x60; break;
case 0x00010101: a = 0x70; break;
case 0x01000000: a = 0x80; break;
case 0x01000001: a = 0x90; break;
case 0x01000100: a = 0xa0; break;
case 0x01000101: a = 0xb0; break;
case 0x01010000: a = 0xc0; break;
case 0x01010001: a = 0xd0; break;
case 0x01010100: a = 0xe0; break;
case 0x01010101: a = 0xf0; break;
default:
printf ("Decimal Rep: %d\n",(int)(*--l));l++;//Need to restore l
(void) fprintf(stderr,"bytes2bits: bad value %x\n",*--l);
exit(1);
}
......
}
My problem lies in the fact that this block of code exits with the error message
Decimal Rep: 16843008
bytes2bits: bad value 1010100
I would've thought that 0x01001010 == 1010100 (Note: the fprintf is using %x as output format, so I am looking at a hexadecimal number. Also, when I test and use a printf with %d output format, I see the value 16843008 (= 16^6 + 16^4 + 16^2), which is the equivalent decimal representation of 0x01010100. The 'bad value' 1010100 output is not affected by the presence of my printf checking statement).
How can I make sense of the fact that the switch statement does not recognize 1010100 as the next to last case (i.e.case 0x01010100: a = 0xe0)?
| 0 |
3,780,493 | 09/23/2010 16:28:09 | 380,331 | 06/30/2010 17:05:23 | 471 | 43 | map points between two triangles in 3D space | ![alt text][1]
I have two triangles in 3D space. Given that i know (x,y,z) of point in first triangle and i know vectors V1,V2,V3. I need to find point (x',y',z'). What transformation i should do to point (x,y,z) with vectors V1,V2,V3 to get that transformed point in the second triangle ?
Sorry for such lame question, but my math knowledge is gradually fading ...
Thanks for help !!!
[1]: http://i.stack.imgur.com/uDlay.png | math | geometry | computational-geometry | triangle | null | null | open | map points between two triangles in 3D space
===
![alt text][1]
I have two triangles in 3D space. Given that i know (x,y,z) of point in first triangle and i know vectors V1,V2,V3. I need to find point (x',y',z'). What transformation i should do to point (x,y,z) with vectors V1,V2,V3 to get that transformed point in the second triangle ?
Sorry for such lame question, but my math knowledge is gradually fading ...
Thanks for help !!!
[1]: http://i.stack.imgur.com/uDlay.png | 0 |
8,278,276 | 11/26/2011 12:02:34 | 672,248 | 03/23/2011 01:29:57 | 112 | 1 | Webserver Stress-Testing? | could you webserver admins out there tell me about the tools you use for stress-testing and monitoring resource usage?
I'm trying to discover the limits of my webserver to see if I need to upgrade it. | webserver | stress-testing | null | null | null | 11/27/2011 22:18:33 | not constructive | Webserver Stress-Testing?
===
could you webserver admins out there tell me about the tools you use for stress-testing and monitoring resource usage?
I'm trying to discover the limits of my webserver to see if I need to upgrade it. | 4 |
5,843,704 | 04/30/2011 18:11:08 | 298,479 | 03/21/2010 15:14:01 | 22,703 | 1,039 | SQLAlchemy circular dependency - how to solve it? | I have two tables, `News` and `Files`:
# unrelated columns removed
class News(db.Model):
id = db.Column(db.Integer, primary_key=True)
file_id_logo = db.Column(db.Integer, db.ForeignKey('files.id'))
logo = db.relationship('File', lazy=False)
class File(db.Model):
id = db.Column(db.Integer, primary_key=True)
news_id = db.Column(db.Integer, db.ForeignKey('news.id'))
news = db.relationship('News', lazy=False, backref=db.backref('files'))
After adding the `logo` relation, SQLalchemy raised a CircularDependencyError.
I've already tried `post_update=True` in the `logo` relation, but it did not change anything.
What's the proper way to solve this?
The following cases are possible (in case it matters):
* A File has no or exactly one News assigned.
* If a File has no News, there's also no News with this file referenced as its logo.
* There can be multiple Files for a single News, but only one of these Files can be its `logo`.
* So if a News has a `logo`, the referenced File also has this news as its `news`. | sqlalchemy | circular-dependency | null | null | null | null | open | SQLAlchemy circular dependency - how to solve it?
===
I have two tables, `News` and `Files`:
# unrelated columns removed
class News(db.Model):
id = db.Column(db.Integer, primary_key=True)
file_id_logo = db.Column(db.Integer, db.ForeignKey('files.id'))
logo = db.relationship('File', lazy=False)
class File(db.Model):
id = db.Column(db.Integer, primary_key=True)
news_id = db.Column(db.Integer, db.ForeignKey('news.id'))
news = db.relationship('News', lazy=False, backref=db.backref('files'))
After adding the `logo` relation, SQLalchemy raised a CircularDependencyError.
I've already tried `post_update=True` in the `logo` relation, but it did not change anything.
What's the proper way to solve this?
The following cases are possible (in case it matters):
* A File has no or exactly one News assigned.
* If a File has no News, there's also no News with this file referenced as its logo.
* There can be multiple Files for a single News, but only one of these Files can be its `logo`.
* So if a News has a `logo`, the referenced File also has this news as its `news`. | 0 |
10,988,767 | 06/11/2012 23:31:34 | 1,106,578 | 12/19/2011 19:15:20 | 117 | 0 | Product of Two Multivariate Gaussians | Given two multi-variate gaussians, given by mean & covariance, G1(m1,sigma1) & G2(m2,sigma2), what are the formulae to find the product i.e G1 * G2 ?
Any help much appreciated. | c++ | math | product | gaussian | null | 06/12/2012 04:02:01 | off topic | Product of Two Multivariate Gaussians
===
Given two multi-variate gaussians, given by mean & covariance, G1(m1,sigma1) & G2(m2,sigma2), what are the formulae to find the product i.e G1 * G2 ?
Any help much appreciated. | 2 |
10,764,643 | 05/26/2012 08:03:30 | 847,200 | 07/15/2011 21:13:18 | 1,070 | 30 | A good way to learn to use Wireshark | I'm new to wireshark, and I'd like to learn how to use it properly. There was a similar request [here][1], but to me it seems that it went nowhere.
I'm going to use wireshark to reverse-engineer communication protocols of applications, and I'd like to see an applied sample on how to do this.
I've tried to use Wireshark to reverse engeneer communication between zynga pocker client, and the server, and I run into a problem: how can I know, which packets belong to which applications?
Also, can anyone recommend/write a tutorial, which concerns itself with reverse engeneering protocols?
[1]: http://stackoverflow.com/questions/589185/what-are-some-good-wireshark-tutorials | networking | reverse-engineering | wireshark | null | null | 05/26/2012 11:13:36 | off topic | A good way to learn to use Wireshark
===
I'm new to wireshark, and I'd like to learn how to use it properly. There was a similar request [here][1], but to me it seems that it went nowhere.
I'm going to use wireshark to reverse-engineer communication protocols of applications, and I'd like to see an applied sample on how to do this.
I've tried to use Wireshark to reverse engeneer communication between zynga pocker client, and the server, and I run into a problem: how can I know, which packets belong to which applications?
Also, can anyone recommend/write a tutorial, which concerns itself with reverse engeneering protocols?
[1]: http://stackoverflow.com/questions/589185/what-are-some-good-wireshark-tutorials | 2 |
6,373,282 | 06/16/2011 14:10:25 | 623,757 | 02/18/2011 20:25:58 | 18 | 0 | ASP.NET MVC 3 user has access to his own data. | Is there a DRY way of making sure when a user POST data from a form that he actually has access to the data.
IE:
You have 2 users User A and User B
I want to prevent User B from modifying User A's profile.
Thanks, | .net | security | asp.net-mvc-3 | null | null | 06/16/2011 20:42:45 | not a real question | ASP.NET MVC 3 user has access to his own data.
===
Is there a DRY way of making sure when a user POST data from a form that he actually has access to the data.
IE:
You have 2 users User A and User B
I want to prevent User B from modifying User A's profile.
Thanks, | 1 |
2,987,097 | 06/07/2010 04:42:42 | 112,765 | 05/26/2009 21:10:29 | 1,954 | 78 | How do you figure out your peak productivity hours? | In working on side projects, I typically write code best around 7pm-8pm, with a good cup of coffee, and I find that I tend to be more productive than I do at work during this time.
What is the best way to find your peak productive hours? | project-management | project | self-improvement | null | null | 06/08/2010 03:09:38 | off topic | How do you figure out your peak productivity hours?
===
In working on side projects, I typically write code best around 7pm-8pm, with a good cup of coffee, and I find that I tend to be more productive than I do at work during this time.
What is the best way to find your peak productive hours? | 2 |
2,138,209 | 01/26/2010 08:31:54 | 97,577 | 04/29/2009 08:58:30 | 1 | 0 | ANSI C, integer to string without variadic functions | I'm currently working with a SPC that supports ANSI C, but uses its own flavour of the GNU compiler, which doesn't compile any variadic functions and things like itoa. So using sprintf & co. isn't an option for converting integers to strings. Can anyone guide me to a site where a robust, sprintf- free implementation of itoa is listed or post a suitable algorithm here? Thanks in advance. | c | integer | string | itoa | null | null | open | ANSI C, integer to string without variadic functions
===
I'm currently working with a SPC that supports ANSI C, but uses its own flavour of the GNU compiler, which doesn't compile any variadic functions and things like itoa. So using sprintf & co. isn't an option for converting integers to strings. Can anyone guide me to a site where a robust, sprintf- free implementation of itoa is listed or post a suitable algorithm here? Thanks in advance. | 0 |
1,546,981 | 10/10/2009 03:45:54 | 126,039 | 06/20/2009 01:05:50 | 993 | 84 | post increment vs pre increment - Javascript Optimization | I was browsing Google Code when I chanced upon this project called JSpeed - optimization for Javascript.
I noticed one of the optimization was to change `i++` to `++i` in for loop statements.
__Before Optimization__
for (i=0;i<1;i++) {}
for (var i = 0, j = 0; i < 1000000; i++, j++) {
if (i == 4) {
var tmp = i / 2;
}
if ((i % 2) == 0) {
var tmp = i / 2;
i++;
}
}
var arr = new Array(1000000);
for (i = 0; i < arr.length; i++) {}
__After optimization__
for(var i=0;i<1;++i){}
for(var i=0,j=0;i<1000000;++i,++j){if(i==4){var tmp=i>>1;}
if((i&1)==0){var tmp=i>>1;i++;}}
var arr=new Array(1000000);for(var i=0,arr_len=arr.length;i<arr_len;++i){}
I know what pre and post increments do, but any idea how does this speeds the code up? | javascript | increment | optimization | null | null | null | open | post increment vs pre increment - Javascript Optimization
===
I was browsing Google Code when I chanced upon this project called JSpeed - optimization for Javascript.
I noticed one of the optimization was to change `i++` to `++i` in for loop statements.
__Before Optimization__
for (i=0;i<1;i++) {}
for (var i = 0, j = 0; i < 1000000; i++, j++) {
if (i == 4) {
var tmp = i / 2;
}
if ((i % 2) == 0) {
var tmp = i / 2;
i++;
}
}
var arr = new Array(1000000);
for (i = 0; i < arr.length; i++) {}
__After optimization__
for(var i=0;i<1;++i){}
for(var i=0,j=0;i<1000000;++i,++j){if(i==4){var tmp=i>>1;}
if((i&1)==0){var tmp=i>>1;i++;}}
var arr=new Array(1000000);for(var i=0,arr_len=arr.length;i<arr_len;++i){}
I know what pre and post increments do, but any idea how does this speeds the code up? | 0 |
8,702,560 | 01/02/2012 15:31:44 | 407,511 | 07/31/2010 15:25:44 | 417 | 12 | Stress testing of node.js services | I'm building a stress testing framework for node.js services using node.js.
Do you know relevant projects which I can use / look at?
node.js projects that you've used and worked good? (latency, throughput etc..)
Any best practices on that matter?
Thanks! | javascript | node.js | load-testing | stress-testing | null | 01/04/2012 02:33:54 | not constructive | Stress testing of node.js services
===
I'm building a stress testing framework for node.js services using node.js.
Do you know relevant projects which I can use / look at?
node.js projects that you've used and worked good? (latency, throughput etc..)
Any best practices on that matter?
Thanks! | 4 |
6,400,185 | 06/19/2011 02:38:35 | 475,289 | 10/14/2010 03:10:03 | 17 | 0 | Simple Java For Loop Logic, Increments and Decrements | I have here a simple Java Program. I am writing this to walk through the logic of the program step by step and verify why it returns the output that it does. I would appreciate any feedback on the way I'm interpreting this.
I'll display the program first, and then explain how it works afterwards.
public class Test9 {
public static void main (String [] args) {
int x=0;
int y=10;
for (int z=0; z<5; z++) {
if((y-->7) || (++x >2)) {
y--;
}
}
System.out.println(y + "" + x);
}
}
What is the output and why?
In order to know the correct output of this program, it's necessary to keep a running tally of all three int variables, x, y, and z, during the course of the "for" loop.
At the beginning of the loop, z=0, x=0, and y=10.
It then proceeds to the if statement, where it looks to see if the current value of y is greater than 7. It's important to note that y-- means that it will post-decrement y by 1. Which means AFTER the conditional statement has been been decided True or False.
So, since y=10, currently, 10>7, and the statement is True. Since this conditional statement is true and it sees that an OR operator is next, it skips the ++x>2 since it doesn't need to know whether it is TRUE or FALSE. The contents of the loop are now performed, y--, which makes y=8. Decremented once in the conditional statement and once inside the if statement. x remains 0.
The next iteration begins with, z=1, y=8. x=0. The same rules apply, so 8>7, y will be decremented by 2 and x will remain the same.
The third iteration begins with z=2, y=6, x=0. This time around, 6>7 is false, but y is still post decremented. So y=5, and ++x>2, will evaluate as 1>2, since ++x is the prefix version and adds 1 before the operation takes place. Both operations are false, and y will not be decremented a second time.
The forth iteration begins with z=3, y=5, x=1. 5>7 is false, y is decremented to 4. 2>2 is false as well, therefore no 2nd decrement to y.
The fifth iteration begins with z=4, y=4, x=2. 4>7 is false, y is decremented to 3. 3>2 is true! So y will be decremented a 2nd time, to 2.
The ending values are y=2, x=3. Therefore the program output will be:
2 3
It's important to understand when the increments and decrements happen and when they don't, especially when they are inside the conditional statements of an if statement, since it will impact the final output.
If there are terms/jargon, ways of saying things, or flaws in my logic please let me know. I'm trying to understand all the fundamentals of java. Thanks. | java | if-statement | for-loop | increment | null | 06/19/2011 03:59:00 | too localized | Simple Java For Loop Logic, Increments and Decrements
===
I have here a simple Java Program. I am writing this to walk through the logic of the program step by step and verify why it returns the output that it does. I would appreciate any feedback on the way I'm interpreting this.
I'll display the program first, and then explain how it works afterwards.
public class Test9 {
public static void main (String [] args) {
int x=0;
int y=10;
for (int z=0; z<5; z++) {
if((y-->7) || (++x >2)) {
y--;
}
}
System.out.println(y + "" + x);
}
}
What is the output and why?
In order to know the correct output of this program, it's necessary to keep a running tally of all three int variables, x, y, and z, during the course of the "for" loop.
At the beginning of the loop, z=0, x=0, and y=10.
It then proceeds to the if statement, where it looks to see if the current value of y is greater than 7. It's important to note that y-- means that it will post-decrement y by 1. Which means AFTER the conditional statement has been been decided True or False.
So, since y=10, currently, 10>7, and the statement is True. Since this conditional statement is true and it sees that an OR operator is next, it skips the ++x>2 since it doesn't need to know whether it is TRUE or FALSE. The contents of the loop are now performed, y--, which makes y=8. Decremented once in the conditional statement and once inside the if statement. x remains 0.
The next iteration begins with, z=1, y=8. x=0. The same rules apply, so 8>7, y will be decremented by 2 and x will remain the same.
The third iteration begins with z=2, y=6, x=0. This time around, 6>7 is false, but y is still post decremented. So y=5, and ++x>2, will evaluate as 1>2, since ++x is the prefix version and adds 1 before the operation takes place. Both operations are false, and y will not be decremented a second time.
The forth iteration begins with z=3, y=5, x=1. 5>7 is false, y is decremented to 4. 2>2 is false as well, therefore no 2nd decrement to y.
The fifth iteration begins with z=4, y=4, x=2. 4>7 is false, y is decremented to 3. 3>2 is true! So y will be decremented a 2nd time, to 2.
The ending values are y=2, x=3. Therefore the program output will be:
2 3
It's important to understand when the increments and decrements happen and when they don't, especially when they are inside the conditional statements of an if statement, since it will impact the final output.
If there are terms/jargon, ways of saying things, or flaws in my logic please let me know. I'm trying to understand all the fundamentals of java. Thanks. | 3 |
8,816,952 | 01/11/2012 09:32:31 | 1,023,476 | 11/01/2011 10:31:40 | 247 | 5 | How Poco Use in MVC3 with example? | I am new to POCO and all this MVC stufffs.
Reading some articals about POCO on google, but not having exact idea may be lack of my knowledge about it or not proper examples i got.
Can any one please explain me how to use this "POCO" stuffs in my MVC project.
it would be great if any vidoe link for POCO to learn
| asp.net-mvc-3 | entity-framework | poco | null | null | 01/11/2012 10:34:49 | not a real question | How Poco Use in MVC3 with example?
===
I am new to POCO and all this MVC stufffs.
Reading some articals about POCO on google, but not having exact idea may be lack of my knowledge about it or not proper examples i got.
Can any one please explain me how to use this "POCO" stuffs in my MVC project.
it would be great if any vidoe link for POCO to learn
| 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.