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
2,926,692
05/28/2010 04:45:02
145,261
07/26/2009 11:30:12
369
56
NSURLConnection on simulator and iphone performance issues
I'm experiencing a weird problem and i wonder if anybody else has noticed this: I'm using NSURLConnection as it appears in apple's examples to get xml files from a certain server - pretty straight forward. And most of time it works, but sometimes it's just stuck after initialing and don't get into connection's delegate methods. I'm working with WiFi & 3G and the same server all the time. When it comes to didFailWithError i see that mostly it was a timeout error. When I enter same link in Safari it takes a second to bring data. And after another trial I can access the link. What might be the reason for such a weird behavior? How can I improve it? What is the role of cache policy with NSURLConnection? Thanks, Nava
iphone
nsurlconnection
wifi
iphone-3gs
null
null
open
NSURLConnection on simulator and iphone performance issues === I'm experiencing a weird problem and i wonder if anybody else has noticed this: I'm using NSURLConnection as it appears in apple's examples to get xml files from a certain server - pretty straight forward. And most of time it works, but sometimes it's just stuck after initialing and don't get into connection's delegate methods. I'm working with WiFi & 3G and the same server all the time. When it comes to didFailWithError i see that mostly it was a timeout error. When I enter same link in Safari it takes a second to bring data. And after another trial I can access the link. What might be the reason for such a weird behavior? How can I improve it? What is the role of cache policy with NSURLConnection? Thanks, Nava
0
4,491,154
12/20/2010 15:37:39
178,925
09/25/2009 07:44:46
94
1
Galois field computations on Linux
Is there any software on Linux for Galois field calculus ? Thx JCLL
polynomial-math
null
null
null
null
04/06/2011 14:46:27
off topic
Galois field computations on Linux === Is there any software on Linux for Galois field calculus ? Thx JCLL
2
10,788,171
05/28/2012 17:05:13
1,369,931
05/02/2012 11:49:02
1
0
500 server error when trying to access http://developers.facebook.com/tools/comments
I'm trying to moderate comments from the facebook plugin into the blog and I keep on getting a 500 server error with the URL. http://developers.facebook.com/tools/comments Can anyone assist with this? Thanks in advance. Kind regards.
facebook
comments
null
null
null
05/31/2012 01:41:32
off topic
500 server error when trying to access http://developers.facebook.com/tools/comments === I'm trying to moderate comments from the facebook plugin into the blog and I keep on getting a 500 server error with the URL. http://developers.facebook.com/tools/comments Can anyone assist with this? Thanks in advance. Kind regards.
2
840,899
05/08/2009 17:16:47
9,358
09/15/2008 18:32:22
8
0
How can I programmatically click a TreeView TreeNode so it appears highlighted in the list and fires the AfterSelect event?
I have a TreeView control in a Winforms app, and basically the objective is to display a form that contains a TreeView control, and I want to display the form with a node opened (easy - EnsureVisible) and selected. The problem that I'm running into is that when I set the TreeView control's SelectedNode property, the node isn't highlighted and the AfterSelect event isn't firing as I would expect it to. The AfterSelect thing is easy to code around, but the lack of highlighting is annoying.
winforms
treeview
c#
null
null
null
open
How can I programmatically click a TreeView TreeNode so it appears highlighted in the list and fires the AfterSelect event? === I have a TreeView control in a Winforms app, and basically the objective is to display a form that contains a TreeView control, and I want to display the form with a node opened (easy - EnsureVisible) and selected. The problem that I'm running into is that when I set the TreeView control's SelectedNode property, the node isn't highlighted and the AfterSelect event isn't firing as I would expect it to. The AfterSelect thing is easy to code around, but the lack of highlighting is annoying.
0
9,648,737
03/10/2012 17:50:20
1,116,644
12/26/2011 18:34:25
1
0
zork game from bluej adding items and inventory
i am trying to make a zork game with the starter script from bluej.org. i have added a new room and set the extis. now i just need to find out how to ad items and link them to rooms. a good example with the original game starter like "you find a mailbox. OPEN MAILBOX you find a leaflet READ LEAFLET" would be great!
java
null
null
null
null
03/10/2012 18:30:59
not a real question
zork game from bluej adding items and inventory === i am trying to make a zork game with the starter script from bluej.org. i have added a new room and set the extis. now i just need to find out how to ad items and link them to rooms. a good example with the original game starter like "you find a mailbox. OPEN MAILBOX you find a leaflet READ LEAFLET" would be great!
1
9,483,595
02/28/2012 14:19:52
1,238,056
02/28/2012 14:09:45
1
0
Informix Native Driver for Delphi XE2 Professional?
please does exist some native driver for Informix databases for Delphi XE2 Professional ? What are you using? I know that does exist IDAC, now opensource, but these sources are for pre-Unicode Delphi versions and is not easy to change it (at least for me). Thank you very much. Leos
delphi
informix
delphi-xe2
null
null
null
open
Informix Native Driver for Delphi XE2 Professional? === please does exist some native driver for Informix databases for Delphi XE2 Professional ? What are you using? I know that does exist IDAC, now opensource, but these sources are for pre-Unicode Delphi versions and is not easy to change it (at least for me). Thank you very much. Leos
0
10,563,111
05/12/2012 10:59:04
1,390,940
05/12/2012 10:46:29
1
0
Omnicppcomplete for Objective C
I've just started programming in Objective C to make myself some apps for my mac. I've used Vim for some time now to do my python programming and my LaTeX-files, and when you find a good editor it's hard to let go. I would like to continue using Vim to do Objective C and possibly some C++, but Xcode currently has a higher appeal due to it's complete-feature(for my Objc C). Since I don't have much experience I don't know much of the differences between C/C++/Objective C, so my question is this; Can I get the omnicppcomplete plugin for vim and have it complete code in my Ojbective C programming, or is it restricted to C/C++?
objective-c
omnicppcomplete
null
null
null
05/12/2012 21:37:51
off topic
Omnicppcomplete for Objective C === I've just started programming in Objective C to make myself some apps for my mac. I've used Vim for some time now to do my python programming and my LaTeX-files, and when you find a good editor it's hard to let go. I would like to continue using Vim to do Objective C and possibly some C++, but Xcode currently has a higher appeal due to it's complete-feature(for my Objc C). Since I don't have much experience I don't know much of the differences between C/C++/Objective C, so my question is this; Can I get the omnicppcomplete plugin for vim and have it complete code in my Ojbective C programming, or is it restricted to C/C++?
2
3,681,407
09/09/2010 23:54:36
172,247
09/11/2009 20:03:53
8
0
How do I show next result in Mysql on "Onlclick" in Javascript?
I want to show a certain amount of results say 5 results. and make a > < a href="" onclick="< ? php ShowNextResult(); ?>"> and use onlick to show the next 5 results.
php
javascript
mysql
null
null
null
open
How do I show next result in Mysql on "Onlclick" in Javascript? === I want to show a certain amount of results say 5 results. and make a > < a href="" onclick="< ? php ShowNextResult(); ?>"> and use onlick to show the next 5 results.
0
11,285,408
07/01/2012 20:32:07
756,276
05/16/2011 19:57:00
11
1
Multi column dropdown menu
I have a menu with 30+ items, is there already a way to get Bootstrap to show the menu using 3 columns instead of one really tall one or does this require some customization?
twitter-bootstrap
null
null
null
null
07/01/2012 20:34:36
too localized
Multi column dropdown menu === I have a menu with 30+ items, is there already a way to get Bootstrap to show the menu using 3 columns instead of one really tall one or does this require some customization?
3
6,956,305
08/05/2011 12:31:50
880,569
08/05/2011 12:31:50
1
0
Cells counting problem
There is a 3D grid with cells for which we define its value (0 or 1) as <code>F(i,j,k)=F(i-1,j,k)^F(i,j-1,k)^F(i,j,k-1)</code>, base cases are <code>F(0,0,0)=1</code> and <code>F(x,y,z)=0</code> for <code>x < 0 or y < 0 or z < 0</code> (if at least one parameter is negative). We want to count amount of cells with <code>F()=1</code> in the cube with corners <code>(0,0,0)</code> and <code>(N, M, K)</code>. Dimensions are about <code>2^30</code>.
algorithm
null
null
null
null
08/05/2011 13:26:09
not a real question
Cells counting problem === There is a 3D grid with cells for which we define its value (0 or 1) as <code>F(i,j,k)=F(i-1,j,k)^F(i,j-1,k)^F(i,j,k-1)</code>, base cases are <code>F(0,0,0)=1</code> and <code>F(x,y,z)=0</code> for <code>x < 0 or y < 0 or z < 0</code> (if at least one parameter is negative). We want to count amount of cells with <code>F()=1</code> in the cube with corners <code>(0,0,0)</code> and <code>(N, M, K)</code>. Dimensions are about <code>2^30</code>.
1
2,795,760
05/08/2010 21:47:13
12,652
09/16/2008 15:08:04
1,569
98
Using gSoap in Qt/Windows
I followed [the steps][1] on gSoap's page and tried to run the example code in Qt/Windows with Mingw32 Compiler. However, I can't add lgsoap++ to linker, as stated in the documentation, since it is not in [the source package][2] > To complete the build, compile and > link the generated soapC.cpp, > soapcalcProxy.cpp, and the run-time > gSOAP engine -lgsoap++ (or use source > stdsoap2.cpp in case libgsoap++.a is > not installed) with your code. Then I tried adding stdsoap2.cpp to SOURCES and [this is the compile output][3] as a result. So my question is how I will run this example code snippet in Qt with Mingw32 compiler or how I will generate that lgsoap++. Followings are my pro and source files: QT -= gui TARGET = SoapCalc CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp \ ../Console/gsoap/stdsoap2.cpp OTHER_FILES += ../../../../../gsoap/gsoap-2.7/gsoap/calc.nsmap HEADERS += ../../../../../gsoap/gsoap-2.7/gsoap/soapcalcProxy.h #include"C:/gsoap/gsoap-2.7/gsoap/soapcalcProxy.h" #include"C:/gsoap/gsoap-2.7/gsoap/calc.nsmap" int main(int argc, char *argv[]) { calcProxy service; return 0; } [1]: http://www.cs.fsu.edu/~engelen/soap.html [2]: http://sourceforge.net/project/showfiles.php?group_id=52781 [3]: http://pastebin.com/FFe03FZT
gsoap
qt
mingw
null
null
null
open
Using gSoap in Qt/Windows === I followed [the steps][1] on gSoap's page and tried to run the example code in Qt/Windows with Mingw32 Compiler. However, I can't add lgsoap++ to linker, as stated in the documentation, since it is not in [the source package][2] > To complete the build, compile and > link the generated soapC.cpp, > soapcalcProxy.cpp, and the run-time > gSOAP engine -lgsoap++ (or use source > stdsoap2.cpp in case libgsoap++.a is > not installed) with your code. Then I tried adding stdsoap2.cpp to SOURCES and [this is the compile output][3] as a result. So my question is how I will run this example code snippet in Qt with Mingw32 compiler or how I will generate that lgsoap++. Followings are my pro and source files: QT -= gui TARGET = SoapCalc CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp \ ../Console/gsoap/stdsoap2.cpp OTHER_FILES += ../../../../../gsoap/gsoap-2.7/gsoap/calc.nsmap HEADERS += ../../../../../gsoap/gsoap-2.7/gsoap/soapcalcProxy.h #include"C:/gsoap/gsoap-2.7/gsoap/soapcalcProxy.h" #include"C:/gsoap/gsoap-2.7/gsoap/calc.nsmap" int main(int argc, char *argv[]) { calcProxy service; return 0; } [1]: http://www.cs.fsu.edu/~engelen/soap.html [2]: http://sourceforge.net/project/showfiles.php?group_id=52781 [3]: http://pastebin.com/FFe03FZT
0
9,167,180
02/06/2012 20:59:22
1,193,285
02/06/2012 20:55:51
1
0
How can I add values from a TextBox to an Array via an addButton and then display results via a createButton
Here is an image of how the application is supposed to look: http://i.imgur.com/DL0cp.jpg "JM Sales" Public Class MainForm Private Sub exitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitButton.Click Me.Close() End Sub Dim salesPerID(5) As Integer Dim total As Integer Dim sale As Integer Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load 'Loads the ListBox with values and sets index salesIDListBox.Items.Add("101") salesIDListBox.Items.Add("112") salesIDListBox.Items.Add("203") salesIDListBox.Items.Add("301") salesIDListBox.Items.Add("302") salesIDListBox.SelectedIndex = 0 End Sub Private Sub salesIDListBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles salesIDListBox.SelectedIndexChanged sale = salesIDListBox.SelectedIndex salesTextBox.Text = salesPerID(sale).ToString("C0") End Sub Private Sub addButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addButton.Click Integer.TryParse(salesTextBox.Text, total) salesPerID(sale) += total End Sub Private Sub createButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles createButton.Click totalSalesTextBox.Text = salesPerID(0).ToString("C2") totalSalesTextBox.Text = salesPerID(1).ToString("C2") totalSalesTextBox.Text = salesPerID(2).ToString("C2") totalSalesTextBox.Text = salesPerID(3).ToString("C2") totalSalesTextBox.Text = salesPerID(4).ToString("C2") totalSalesTextBox.Text = total.ToString("C2") End Sub End Class
vb
null
null
null
null
02/07/2012 13:21:41
not a real question
How can I add values from a TextBox to an Array via an addButton and then display results via a createButton === Here is an image of how the application is supposed to look: http://i.imgur.com/DL0cp.jpg "JM Sales" Public Class MainForm Private Sub exitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitButton.Click Me.Close() End Sub Dim salesPerID(5) As Integer Dim total As Integer Dim sale As Integer Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load 'Loads the ListBox with values and sets index salesIDListBox.Items.Add("101") salesIDListBox.Items.Add("112") salesIDListBox.Items.Add("203") salesIDListBox.Items.Add("301") salesIDListBox.Items.Add("302") salesIDListBox.SelectedIndex = 0 End Sub Private Sub salesIDListBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles salesIDListBox.SelectedIndexChanged sale = salesIDListBox.SelectedIndex salesTextBox.Text = salesPerID(sale).ToString("C0") End Sub Private Sub addButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addButton.Click Integer.TryParse(salesTextBox.Text, total) salesPerID(sale) += total End Sub Private Sub createButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles createButton.Click totalSalesTextBox.Text = salesPerID(0).ToString("C2") totalSalesTextBox.Text = salesPerID(1).ToString("C2") totalSalesTextBox.Text = salesPerID(2).ToString("C2") totalSalesTextBox.Text = salesPerID(3).ToString("C2") totalSalesTextBox.Text = salesPerID(4).ToString("C2") totalSalesTextBox.Text = total.ToString("C2") End Sub End Class
1
9,873,625
03/26/2012 14:05:26
1,108,631
12/20/2011 20:25:25
40
5
Cache the execution of a javascript file
As far as i know it's impossible to achieve the following, but only an expert can confirm this: I've got page number 1 that request for some user and application data as soon as the page loads, page number 2 uses the same script and it would be wasteful to request for the same info. I know that the browsers caches the script, my question is if it caches the execution (data) as well. The pages don't share the same layout, so it is not possible to make page number 2 be reloaded via ajax.
javascript
ajax
caching
null
null
null
open
Cache the execution of a javascript file === As far as i know it's impossible to achieve the following, but only an expert can confirm this: I've got page number 1 that request for some user and application data as soon as the page loads, page number 2 uses the same script and it would be wasteful to request for the same info. I know that the browsers caches the script, my question is if it caches the execution (data) as well. The pages don't share the same layout, so it is not possible to make page number 2 be reloaded via ajax.
0
3,326,322
07/24/2010 18:30:14
325,661
04/26/2010 02:47:16
417
11
How can i sort fields, properties, methods in Visual Studio ?
I know that for clarity in codes, i have to write first fields then constroctor and then methods etc. But how can i automate it in Visual studio ?
visual
studio
null
null
null
null
open
How can i sort fields, properties, methods in Visual Studio ? === I know that for clarity in codes, i have to write first fields then constroctor and then methods etc. But how can i automate it in Visual studio ?
0
8,464,228
12/11/2011 13:14:24
1,092,171
12/11/2011 11:42:33
1
0
Not able to execute php files after fresh nginx (LEMP) installation
I have successfully installed(locally) Nginx PHP-FPM And MySQL Support On Ubuntu 11.10. For test I placed a phpinfo.php file in /usr/share/nginx/www/ & tried to access phpinfo.php using my browser http://localhost/phpinfo.php but nothing is happening and its showing > The page you are looking for is temporarily unavailable. Please try > again later. So I checked error log file and I got this 2011/12/11 05:05:56 [error] 11164#0: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost" Can anyone tell me what is wrong Any help would be greatly appreciated
php5
nginx
localhost
fastcgi
php-fpm
null
open
Not able to execute php files after fresh nginx (LEMP) installation === I have successfully installed(locally) Nginx PHP-FPM And MySQL Support On Ubuntu 11.10. For test I placed a phpinfo.php file in /usr/share/nginx/www/ & tried to access phpinfo.php using my browser http://localhost/phpinfo.php but nothing is happening and its showing > The page you are looking for is temporarily unavailable. Please try > again later. So I checked error log file and I got this 2011/12/11 05:05:56 [error] 11164#0: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost" Can anyone tell me what is wrong Any help would be greatly appreciated
0
8,399,188
12/06/2011 11:29:10
675,065
03/24/2011 14:24:51
1,808
121
A good team of version control, project management and hosting for an open-source Java project
I want to release a Java project as open-source, but i am unsure about the right platform and version control system. **There are three considerations to be thought of:** 1. Which version control software? 2. Which project mangement library? 3. Hosted or on my own server? Version Control - Currently i am using **SVN**, and i planned to migrate to **GIT**. But there are also other possibilities like **Mercurial** or **Bazaar**. GIT and Mercurial seem to be very similar and i didn't understand the pro's and con's of both yet. Also, i'd like to know if there are also any other good alternatives. Project Management - Currently, i use **Maven** to manage the Java library dependencies and to carry out the releases. There are also other tools like **Hudson** or **Apache Ivy** and many others. They should be able to handle library dependencies and be able to include currently released versions. Deployment automation is also a plus. To host or not to host? - Currently i use an own server to host my SVN code and Maven releases. There are so many hosted solutions out there, and i think one of them would be nice to make it easier for people to join my project if they are interested. Some of the platforms i heard about or used are for example **Github**, **Bitbucket**, **Google Code** or **Sourceforge**. They should be able to easily integrate support for the selected version control and project management software. Additional stuff for developers like a bugtracker and a wiki are good too and need to be considered useful. The best team - So, which combination would you recommend? I'd like to gather all information and create an overview so that people can decide for themselves which setup meets their needs at best.
java
version-control
open-source
project-management
null
12/07/2011 13:41:20
off topic
A good team of version control, project management and hosting for an open-source Java project === I want to release a Java project as open-source, but i am unsure about the right platform and version control system. **There are three considerations to be thought of:** 1. Which version control software? 2. Which project mangement library? 3. Hosted or on my own server? Version Control - Currently i am using **SVN**, and i planned to migrate to **GIT**. But there are also other possibilities like **Mercurial** or **Bazaar**. GIT and Mercurial seem to be very similar and i didn't understand the pro's and con's of both yet. Also, i'd like to know if there are also any other good alternatives. Project Management - Currently, i use **Maven** to manage the Java library dependencies and to carry out the releases. There are also other tools like **Hudson** or **Apache Ivy** and many others. They should be able to handle library dependencies and be able to include currently released versions. Deployment automation is also a plus. To host or not to host? - Currently i use an own server to host my SVN code and Maven releases. There are so many hosted solutions out there, and i think one of them would be nice to make it easier for people to join my project if they are interested. Some of the platforms i heard about or used are for example **Github**, **Bitbucket**, **Google Code** or **Sourceforge**. They should be able to easily integrate support for the selected version control and project management software. Additional stuff for developers like a bugtracker and a wiki are good too and need to be considered useful. The best team - So, which combination would you recommend? I'd like to gather all information and create an overview so that people can decide for themselves which setup meets their needs at best.
2
6,860,865
07/28/2011 14:42:37
812,909
06/23/2011 19:04:39
68
1
Detecting a Computer
I have an application that has to run on 3 machines at the same time. I'm also using some MySQL statements in the program. Should I create a field in a table and have it look for a specific number in the field that would match that specific computer? I'm just having trouble on thinking through this problem so any advice would help. I could be over thinking this a lot too.
mysql
visual-studio
vb
null
null
07/30/2011 10:05:00
not a real question
Detecting a Computer === I have an application that has to run on 3 machines at the same time. I'm also using some MySQL statements in the program. Should I create a field in a table and have it look for a specific number in the field that would match that specific computer? I'm just having trouble on thinking through this problem so any advice would help. I could be over thinking this a lot too.
1
11,380,434
07/08/2012 03:27:09
1,509,529
07/08/2012 03:25:06
1
0
schedule tasks to run
I have 5 console applications I would like to run in 5 different daytime. I can add them all in the task scheduler but I wish to make a script schedule them instead. Could someone help me please ?
c#
vbscript
null
null
null
null
open
schedule tasks to run === I have 5 console applications I would like to run in 5 different daytime. I can add them all in the task scheduler but I wish to make a script schedule them instead. Could someone help me please ?
0
8,061,134
11/09/2011 06:21:02
1,037,018
11/09/2011 06:11:41
1
0
Having Multiple Rotating Images in a View
I have overridden OnDraw experimenting with rotating images. My goal is to have an image of an Android, where the user can rotate the arms and legs on touch. I've found that canvasses have a rotate method. Also, I am using regions so that the user can better manipulate the image later. If this is a problem, let me know, but that's just my reasoning as I know someone will be confused by it. Is there any other way to go about doing this? So far I have something like this (and it doesn't work): public void onDraw(Canvas canvas) { super.onDraw(canvas); paint.setColor(Color.rgb(250, 250, 250)); paint.setStyle(Paint.Style.FILL); canvas.drawPaint(paint); // BODY paint.setColor(Color.rgb(164, 202, 55)); RectF b = new RectF(100,150,325,375); RectF b2 = new RectF(100f,350f,325f,400f); bodyPath.addRect(b, Path.Direction.CW); bodyPath.addRoundRect(b2,50f,50f,Path.Direction.CW); body.clipPath(bodyPath); //Adding all the paths to it's own canvas? // HEAD RectF h = new RectF(100f, 50f, 325f, 240f); headPath.addArc(h, 0, -180); head.clipPath(headPath); // L-ARM RectF la = new RectF(45f, 150f, 95f, 325f); leftArmPath.addRoundRect(la, 50f, 25f, Path.Direction.CW); leftArm.clipPath(leftArmPath); // R-ARM RectF ra = new RectF(330f, 150f, 380f, 325f); rightArmPath.addRoundRect(ra, 50f, 25f, Path.Direction.CW); rightArm.clipPath(rightArmPath); // L-LEG RectF ll = new RectF(); leftLegPath.addRoundRect(ll, 50f, 25f, Path.Direction.CW); leftLeg.clipPath(leftArmPath); // R-LEG RectF rl = new RectF(); rightLegPath.addRoundRect(rl, 50f, 25f, Path.Direction.CW); rightLeg.clipPath(rightLegPath); } By the way I am very well aware that creating a new object each time this method is called is extremely inefficient, but this is just for my learning, so please ignore that if you can! Thanks.
java
android
view
rotate
ondraw
null
open
Having Multiple Rotating Images in a View === I have overridden OnDraw experimenting with rotating images. My goal is to have an image of an Android, where the user can rotate the arms and legs on touch. I've found that canvasses have a rotate method. Also, I am using regions so that the user can better manipulate the image later. If this is a problem, let me know, but that's just my reasoning as I know someone will be confused by it. Is there any other way to go about doing this? So far I have something like this (and it doesn't work): public void onDraw(Canvas canvas) { super.onDraw(canvas); paint.setColor(Color.rgb(250, 250, 250)); paint.setStyle(Paint.Style.FILL); canvas.drawPaint(paint); // BODY paint.setColor(Color.rgb(164, 202, 55)); RectF b = new RectF(100,150,325,375); RectF b2 = new RectF(100f,350f,325f,400f); bodyPath.addRect(b, Path.Direction.CW); bodyPath.addRoundRect(b2,50f,50f,Path.Direction.CW); body.clipPath(bodyPath); //Adding all the paths to it's own canvas? // HEAD RectF h = new RectF(100f, 50f, 325f, 240f); headPath.addArc(h, 0, -180); head.clipPath(headPath); // L-ARM RectF la = new RectF(45f, 150f, 95f, 325f); leftArmPath.addRoundRect(la, 50f, 25f, Path.Direction.CW); leftArm.clipPath(leftArmPath); // R-ARM RectF ra = new RectF(330f, 150f, 380f, 325f); rightArmPath.addRoundRect(ra, 50f, 25f, Path.Direction.CW); rightArm.clipPath(rightArmPath); // L-LEG RectF ll = new RectF(); leftLegPath.addRoundRect(ll, 50f, 25f, Path.Direction.CW); leftLeg.clipPath(leftArmPath); // R-LEG RectF rl = new RectF(); rightLegPath.addRoundRect(rl, 50f, 25f, Path.Direction.CW); rightLeg.clipPath(rightLegPath); } By the way I am very well aware that creating a new object each time this method is called is extremely inefficient, but this is just for my learning, so please ignore that if you can! Thanks.
0
1,337,155
08/26/2009 20:07:08
99,013
04/30/2009 22:26:05
68
5
Branching optimization
What is the best implementation, from a performance view, to do a branched function calls? In the naive case we have a rather large switch statement that interprets bytecode and does a function call depending on code. In the normal case we have computed gotos and labels that does the same thing. What is the absolute best way to do this?
c
branch
optimization
null
null
null
open
Branching optimization === What is the best implementation, from a performance view, to do a branched function calls? In the naive case we have a rather large switch statement that interprets bytecode and does a function call depending on code. In the normal case we have computed gotos and labels that does the same thing. What is the absolute best way to do this?
0
10,391,600
04/30/2012 22:54:58
830,545
07/05/2011 22:27:49
137
2
Is there anything that can mimic the apache module's mod_suexec behavior with nginx?
I want to have each virtual host ran as a different owner. I was told that in apache you can have mod_suexec configured to run each site folder as the owner of the folder. Is there anything that can do something like that or something even close for nginx? I'm running Arch Linux with NginX 1.0.15.
nginx
null
null
null
null
05/02/2012 13:19:12
off topic
Is there anything that can mimic the apache module's mod_suexec behavior with nginx? === I want to have each virtual host ran as a different owner. I was told that in apache you can have mod_suexec configured to run each site folder as the owner of the folder. Is there anything that can do something like that or something even close for nginx? I'm running Arch Linux with NginX 1.0.15.
2
10,399,461
05/01/2012 14:53:15
615,315
02/13/2011 18:53:34
518
2
When is an element guaranteed to be focussable?
If a dom element is :visible, will it always be focussable?
javascript
jquery
dom
null
null
null
open
When is an element guaranteed to be focussable? === If a dom element is :visible, will it always be focussable?
0
11,555,095
07/19/2012 06:30:00
1,505,996
07/06/2012 07:00:46
3
0
WPF- Binding Visibility of the progressbar
I need a code for Progressbar that the visibility is binded. .Please show understandable code for the binded visibility of progressbar. .Thanks in advance
wpf
null
null
null
null
07/19/2012 08:52:08
not a real question
WPF- Binding Visibility of the progressbar === I need a code for Progressbar that the visibility is binded. .Please show understandable code for the binded visibility of progressbar. .Thanks in advance
1
9,538,097
03/02/2012 17:58:14
1,168,658
01/25/2012 07:17:13
12
0
Iterative Analysis
What is the exact probability that RAND-SELECT(A,1,n,r) compares the ith smallest and jth smallest elements in the input array? The correct answer is a simple function of i, j, and r. (Hint: consider using the idea of the “first element in a range chosen as pivot” If I get A array not sorted Ai = i-th element in sorted orser Pr [ Ai is compared to Ai] i----j need to compare pivot with other things , and comparison are with pivots. so I am wondering what prevent i , j to be compared? and what is the first pivot chesen?? compares Bi and N j if and only if the first pivot chosen from the set {Bi , Bi+1 , . . . , B j } is either Bi or B j from the algorithm Since the set {Bi , Bi+1 , . . . , B j } contains j − i + 1 bolts, each of which is `equally likely to be chosen first, we immediately have [Xi j]= 2 \ j-i+1 for all i <j Is that correct?
algorithm
null
null
null
null
03/02/2012 22:19:47
not a real question
Iterative Analysis === What is the exact probability that RAND-SELECT(A,1,n,r) compares the ith smallest and jth smallest elements in the input array? The correct answer is a simple function of i, j, and r. (Hint: consider using the idea of the “first element in a range chosen as pivot” If I get A array not sorted Ai = i-th element in sorted orser Pr [ Ai is compared to Ai] i----j need to compare pivot with other things , and comparison are with pivots. so I am wondering what prevent i , j to be compared? and what is the first pivot chesen?? compares Bi and N j if and only if the first pivot chosen from the set {Bi , Bi+1 , . . . , B j } is either Bi or B j from the algorithm Since the set {Bi , Bi+1 , . . . , B j } contains j − i + 1 bolts, each of which is `equally likely to be chosen first, we immediately have [Xi j]= 2 \ j-i+1 for all i <j Is that correct?
1
11,254,560
06/29/2012 00:06:14
375,799
06/25/2010 00:13:20
2,393
86
How does SQL Server choose an index key for a foreign key reference?
I am working with a legacy database that was imported from MS Access. There are about twenty tables with non-clustered, unique primary keys that were created during the MS Access > SQL Server upgrade. Many of these tables also have unique, non-clustered indexes that are duplicates of the primary key. I am attempting to clean this up. But what I have found is after I recreate the primary keys as clustered indexes, and then try to rebuild the foreign key, the foreign key is referencing the old, duplicate index (which was unique). I know this because it won't let me drop the duplicate indexes. I would think SQL Server would always choose a primary key if one existed. Does SQL Server have a method of choosing between a unique index and a primary key? Or is this a bug? To duplicate the problem (on SQL Server 2008 R2): IF EXISTS (SELECT * FROM sys.tables WHERE name = 'Child') DROP TABLE Child GO IF EXISTS (SELECT * FROM sys.tables WHERE name = 'Parent') DROP TABLE Parent GO -- Create the parent table CREATE TABLE Parent (ParentID INT NOT NULL IDENTITY(1,1)) -- Make the parent table a heap ALTER TABLE Parent ADD CONSTRAINT PK_Parent PRIMARY KEY NONCLUSTERED (ParentID) -- Create the duplicate index on the parent table CREATE UNIQUE NONCLUSTERED INDEX IX_Parent ON Parent (ParentID) -- Create the child table CREATE TABLE Child (ChildID INT NOT NULL IDENTITY(1,1), ParentID INT NOT NULL ) -- Give the child table a normal PKey ALTER TABLE Child ADD CONSTRAINT PK_Child PRIMARY KEY CLUSTERED (ChildID) -- Create a foreign key relationship with the Parent table on ParentID ALTER TABLE Child ADD CONSTRAINT FK_Child FOREIGN KEY (ParentID) REFERENCES Parent (ParentID) ON DELETE CASCADE NOT FOR REPLICATION -- Try to clean this up -- Drop the foreign key constraint on the Child table ALTER TABLE Child DROP CONSTRAINT FK_Child -- Drop the primary key constraint on the Parent table ALTER TABLE Parent DROP CONSTRAINT PK_Parent -- Recreate the primary key on Parent as a clustered index ALTER TABLE Parent ADD CONSTRAINT PK_Parent PRIMARY KEY CLUSTERED (ParentID) -- Recreate the foreign key in Child pointing to parent ID ALTER TABLE Child ADD CONSTRAINT FK_Child FOREIGN KEY (ParentID) REFERENCES Parent (ParentID) ON DELETE CASCADE NOT FOR REPLICATION -- Try to drop the duplicate index on Parent DROP INDEX IX_Parent ON Parent Error msg: > Msg 3723, Level 16, State 6, Line 36 An explicit DROP INDEX is not > allowed on index 'Parent.IX_Parent'. It is being used for FOREIGN KEY > constraint enforcement.
sql-server
index
foreign-keys
sql-server-2008-r2
primary-key
06/29/2012 16:38:36
off topic
How does SQL Server choose an index key for a foreign key reference? === I am working with a legacy database that was imported from MS Access. There are about twenty tables with non-clustered, unique primary keys that were created during the MS Access > SQL Server upgrade. Many of these tables also have unique, non-clustered indexes that are duplicates of the primary key. I am attempting to clean this up. But what I have found is after I recreate the primary keys as clustered indexes, and then try to rebuild the foreign key, the foreign key is referencing the old, duplicate index (which was unique). I know this because it won't let me drop the duplicate indexes. I would think SQL Server would always choose a primary key if one existed. Does SQL Server have a method of choosing between a unique index and a primary key? Or is this a bug? To duplicate the problem (on SQL Server 2008 R2): IF EXISTS (SELECT * FROM sys.tables WHERE name = 'Child') DROP TABLE Child GO IF EXISTS (SELECT * FROM sys.tables WHERE name = 'Parent') DROP TABLE Parent GO -- Create the parent table CREATE TABLE Parent (ParentID INT NOT NULL IDENTITY(1,1)) -- Make the parent table a heap ALTER TABLE Parent ADD CONSTRAINT PK_Parent PRIMARY KEY NONCLUSTERED (ParentID) -- Create the duplicate index on the parent table CREATE UNIQUE NONCLUSTERED INDEX IX_Parent ON Parent (ParentID) -- Create the child table CREATE TABLE Child (ChildID INT NOT NULL IDENTITY(1,1), ParentID INT NOT NULL ) -- Give the child table a normal PKey ALTER TABLE Child ADD CONSTRAINT PK_Child PRIMARY KEY CLUSTERED (ChildID) -- Create a foreign key relationship with the Parent table on ParentID ALTER TABLE Child ADD CONSTRAINT FK_Child FOREIGN KEY (ParentID) REFERENCES Parent (ParentID) ON DELETE CASCADE NOT FOR REPLICATION -- Try to clean this up -- Drop the foreign key constraint on the Child table ALTER TABLE Child DROP CONSTRAINT FK_Child -- Drop the primary key constraint on the Parent table ALTER TABLE Parent DROP CONSTRAINT PK_Parent -- Recreate the primary key on Parent as a clustered index ALTER TABLE Parent ADD CONSTRAINT PK_Parent PRIMARY KEY CLUSTERED (ParentID) -- Recreate the foreign key in Child pointing to parent ID ALTER TABLE Child ADD CONSTRAINT FK_Child FOREIGN KEY (ParentID) REFERENCES Parent (ParentID) ON DELETE CASCADE NOT FOR REPLICATION -- Try to drop the duplicate index on Parent DROP INDEX IX_Parent ON Parent Error msg: > Msg 3723, Level 16, State 6, Line 36 An explicit DROP INDEX is not > allowed on index 'Parent.IX_Parent'. It is being used for FOREIGN KEY > constraint enforcement.
2
8,771,130
01/07/2012 16:23:52
630,905
02/23/2011 19:08:14
45
0
php thumbnail generator not working
I've come to this site many times for help with jquery and css. This is the 1st for php. I am completely new to php. I'm trying to implement a thumbnail generator that will upload to my cliens server. I have no clue what I'm doing. I keep getting errors. This seems to be the code to point things where they need to go. Can anybody who knows let me know what they think? thanks in advance $upload_image_limit = 20; // How many images you want to upload at once? $upload_dir = ""; // default script location, use relative or absolute path $enable_thumbnails = 1 ; // set 0 to disable thumbnail creation $max_image_size = 1024000 ; // max image size in bytes, default 1MB
php
thumbnails
null
null
null
01/08/2012 23:35:24
not a real question
php thumbnail generator not working === I've come to this site many times for help with jquery and css. This is the 1st for php. I am completely new to php. I'm trying to implement a thumbnail generator that will upload to my cliens server. I have no clue what I'm doing. I keep getting errors. This seems to be the code to point things where they need to go. Can anybody who knows let me know what they think? thanks in advance $upload_image_limit = 20; // How many images you want to upload at once? $upload_dir = ""; // default script location, use relative or absolute path $enable_thumbnails = 1 ; // set 0 to disable thumbnail creation $max_image_size = 1024000 ; // max image size in bytes, default 1MB
1
933,613
06/01/2009 05:01:53
114,916
05/30/2009 21:42:40
145
8
C#: How do I use Assert (Unit Testing) to verify that an exception has been thrown?
The title says it all - how do I use Assert (or other Test class?) do verify that an exception has been thrown? Thanks :)
assert
test-class
unit-testing
null
null
null
open
C#: How do I use Assert (Unit Testing) to verify that an exception has been thrown? === The title says it all - how do I use Assert (or other Test class?) do verify that an exception has been thrown? Thanks :)
0
10,187,762
04/17/2012 08:32:30
1,211,465
02/15/2012 13:46:07
146
2
Sending an SMS to a web page?
I want to send an SMS text message to my website so that the posts show up on a page. What services are available that can store the messages or send them to a website as CSV or something?
android
asp.net
windows-phone-7
sms
null
04/19/2012 02:42:17
not a real question
Sending an SMS to a web page? === I want to send an SMS text message to my website so that the posts show up on a page. What services are available that can store the messages or send them to a website as CSV or something?
1
8,439,813
12/09/2011 00:56:26
403,658
07/27/2010 16:57:36
605
31
how do I get the multiple inputs on the same line using the Form class
I have the following code: <?php echo $form->create('User', array('url' => array('controller' => 'users', 'action' =>'login'))); echo $form->input('User.username'); echo $form->input('User.password'); echo $form->end('Login'); ?> and that creates a form that looks similar to this: username [TextBox] password [TextBox] and I want it to look like this: username [TextBox] password [TextBox] Is there an option or something I can use to do this?
cakephp
null
null
null
null
null
open
how do I get the multiple inputs on the same line using the Form class === I have the following code: <?php echo $form->create('User', array('url' => array('controller' => 'users', 'action' =>'login'))); echo $form->input('User.username'); echo $form->input('User.password'); echo $form->end('Login'); ?> and that creates a form that looks similar to this: username [TextBox] password [TextBox] and I want it to look like this: username [TextBox] password [TextBox] Is there an option or something I can use to do this?
0
1,912,434
12/16/2009 05:09:24
175,836
09/19/2009 02:54:38
144
0
easiest way to parse xml in python
I have many rows in a database that contain xml and I'm trying to write a python script that will go through those rows and count how many instances of a particular node attribute show up. for instance, my tree looks like: <foo> <bar> <type foobar="1"/> <type foobar="2"/> </bar> </foo> I'm looking for the easiest way for me to access the attributes 1 and 2 in the XML above.
python
xml
null
null
null
06/01/2012 11:03:53
not constructive
easiest way to parse xml in python === I have many rows in a database that contain xml and I'm trying to write a python script that will go through those rows and count how many instances of a particular node attribute show up. for instance, my tree looks like: <foo> <bar> <type foobar="1"/> <type foobar="2"/> </bar> </foo> I'm looking for the easiest way for me to access the attributes 1 and 2 in the XML above.
4
2,493,764
03/22/2010 16:04:51
64,586
02/10/2009 14:32:53
1,098
72
How to create a split region with autoheights in ExtJS
I would have thought this would be quite simple... alas it seems nothing about ExtJS is simple. I need to split the 'center' region of a border layout and have both the top and bottom pannels fill the center region when the page resizes. As it stands, I can only figure out how to set absolute sizes for the panels. Here's the code generated using [ExtJS Gui Builder][1] /* This file is created or modified with * Ext.ux.guid.plugin.GuiDesigner (v2.1.0) */ { layout : "border", items : [ { region : "center", title : "map", items : [ { xtype : "panel", title : "Panel", autoHeight : true, split : true, height : 100 }, { xtype : "panel", title : "Panel", autoHeight : true, split : true, height : 300 }] }, { region : "north", split : true, height : 100 }, { region : "west", width : 300, split : true, collapsible : true, title : "Gazetter Explorer" }] } [1]: http://www.projectspace.nl/
extjs
null
null
null
null
null
open
How to create a split region with autoheights in ExtJS === I would have thought this would be quite simple... alas it seems nothing about ExtJS is simple. I need to split the 'center' region of a border layout and have both the top and bottom pannels fill the center region when the page resizes. As it stands, I can only figure out how to set absolute sizes for the panels. Here's the code generated using [ExtJS Gui Builder][1] /* This file is created or modified with * Ext.ux.guid.plugin.GuiDesigner (v2.1.0) */ { layout : "border", items : [ { region : "center", title : "map", items : [ { xtype : "panel", title : "Panel", autoHeight : true, split : true, height : 100 }, { xtype : "panel", title : "Panel", autoHeight : true, split : true, height : 300 }] }, { region : "north", split : true, height : 100 }, { region : "west", width : 300, split : true, collapsible : true, title : "Gazetter Explorer" }] } [1]: http://www.projectspace.nl/
0
10,510,624
05/09/2012 06:05:48
1,381,265
05/08/2012 05:43:04
1
0
PHPMYSQL display multi ids data?
I need help to solve this query...? i have a friends table as user_id | friends and the 2nd table is comments as user_id| comments i want to display data of all ids inserted in friends form comments table (ii) also want to count comments by user_id..? plz help thanks
php
null
null
null
null
05/09/2012 12:07:23
not a real question
PHPMYSQL display multi ids data? === I need help to solve this query...? i have a friends table as user_id | friends and the 2nd table is comments as user_id| comments i want to display data of all ids inserted in friends form comments table (ii) also want to count comments by user_id..? plz help thanks
1
9,378,320
02/21/2012 13:19:05
1,223,448
02/21/2012 13:17:49
1
0
magento it wont show pics frontend or upload backend
I'm having a problem with my magento ver 1.2.1. it wont show any products on my frontend and i'm unable to upload any products on the backend? any solutions pleeease Optional Information: Computer OS: Windows Vista Already Tried: clearing cache and increased memory on the server
magento
null
null
null
null
02/22/2012 05:16:39
not a real question
magento it wont show pics frontend or upload backend === I'm having a problem with my magento ver 1.2.1. it wont show any products on my frontend and i'm unable to upload any products on the backend? any solutions pleeease Optional Information: Computer OS: Windows Vista Already Tried: clearing cache and increased memory on the server
1
9,446,578
02/25/2012 18:06:05
261,952
01/29/2010 16:06:27
628
24
how to replace audio track in mkv file (on Ubuntu 11.10)
I have - a mkv file with webm video and ogg audio - an ogg audio file I want to replace the audio in the mkv file with the audio from the ogg file. How can I do that on Ubuntu 11.10 with programs available from default repositories? The resulting file may also have another format (e.g. avi), but I would prefer mkv. Btw. doesn't ffmpeg have an mkv muxer? My test with param *-f mkv* resulted in error *Requested output format 'mkv' is not a suitable output format*
ubuntu
ffmpeg
ogg
webm
mkv
02/26/2012 05:37:24
off topic
how to replace audio track in mkv file (on Ubuntu 11.10) === I have - a mkv file with webm video and ogg audio - an ogg audio file I want to replace the audio in the mkv file with the audio from the ogg file. How can I do that on Ubuntu 11.10 with programs available from default repositories? The resulting file may also have another format (e.g. avi), but I would prefer mkv. Btw. doesn't ffmpeg have an mkv muxer? My test with param *-f mkv* resulted in error *Requested output format 'mkv' is not a suitable output format*
2
10,012,227
04/04/2012 13:34:24
1,006,830
10/21/2011 09:45:38
6
0
Perl with array formation
I have a txt file like this.. **Heading1** Configparameter1 Configparameter2 .. ConfigparameterN Input variable1 Input variable2 .. Input variableN Output variable1 . . Output variableN **Heading2** Configparameter1 Configparameter2 .. ConfigparameterN Input variable1 Input variable2 .. Input variableN Output variable1 . . Output variableN **HeadingN** Configparameter1 Configparameter2 .. ConfigparameterN Input variable1 Input variable2 .. Input variableN Output variable1 . . Output variableN I don't know how to search for this at Google so I am asking here... please help with perl script to form like below structure.. Thanks a lot ` 'Heading1' => { 'Configparameters' => { Configparameter1 Configparameter2 . . ConfigparameterN }, 'Input variable' => { Input variable1 Input variable2 . . Input variableN }, 'Output variable' => { Output variable1 Output variable2 . . Output variableN }, }, 'Heading2' => { 'Configparameters' => { Configparameter1 Configparameter2 . . ConfigparameterN }, 'Input variable' => { Input variable1 Input variable2 . . Input variableN }, 'Output variable' => { Output variable1 Output variable2 . . Output variableN }, }, 'HeadingN' => { 'Configparameters' => { Configparameter1 Configparameter2 . . ConfigparameterN }, 'Input variable' => { Input variable1 Input variable2 . . Input variableN }, 'Output variable' => { Output variable1 Output variable2 . . Output variableN }, }, `
perl
null
null
null
null
04/05/2012 05:26:45
not a real question
Perl with array formation === I have a txt file like this.. **Heading1** Configparameter1 Configparameter2 .. ConfigparameterN Input variable1 Input variable2 .. Input variableN Output variable1 . . Output variableN **Heading2** Configparameter1 Configparameter2 .. ConfigparameterN Input variable1 Input variable2 .. Input variableN Output variable1 . . Output variableN **HeadingN** Configparameter1 Configparameter2 .. ConfigparameterN Input variable1 Input variable2 .. Input variableN Output variable1 . . Output variableN I don't know how to search for this at Google so I am asking here... please help with perl script to form like below structure.. Thanks a lot ` 'Heading1' => { 'Configparameters' => { Configparameter1 Configparameter2 . . ConfigparameterN }, 'Input variable' => { Input variable1 Input variable2 . . Input variableN }, 'Output variable' => { Output variable1 Output variable2 . . Output variableN }, }, 'Heading2' => { 'Configparameters' => { Configparameter1 Configparameter2 . . ConfigparameterN }, 'Input variable' => { Input variable1 Input variable2 . . Input variableN }, 'Output variable' => { Output variable1 Output variable2 . . Output variableN }, }, 'HeadingN' => { 'Configparameters' => { Configparameter1 Configparameter2 . . ConfigparameterN }, 'Input variable' => { Input variable1 Input variable2 . . Input variableN }, 'Output variable' => { Output variable1 Output variable2 . . Output variableN }, }, `
1
7,626,462
10/02/2011 12:58:22
904,428
08/21/2011 08:37:58
36
3
php replace non matches from two arrays
How do you replace all non matches from one array that are not defined within the other array, i have kind of got working but its not exactly right. as i will show you. the result is, but wrong. - - £ 8 - - - - - - - - The required result should be £ 8 - - this is how my code is $vals_to_keep = array(8, 'y', '£'); $replace_if_not_found = array('£', 8, '#', 't'); // replace if not in above array $result = ''; foreach ($replace_if_not_found as $d) { foreach ($vals_to_keep as $ok) { if(strcmp($d, $ok) == 0){ $result .= $d . " "; }else $result .= str_replace($d, $ok ,'-') . " "; } } echo $result;
php
replace
null
null
null
null
open
php replace non matches from two arrays === How do you replace all non matches from one array that are not defined within the other array, i have kind of got working but its not exactly right. as i will show you. the result is, but wrong. - - £ 8 - - - - - - - - The required result should be £ 8 - - this is how my code is $vals_to_keep = array(8, 'y', '£'); $replace_if_not_found = array('£', 8, '#', 't'); // replace if not in above array $result = ''; foreach ($replace_if_not_found as $d) { foreach ($vals_to_keep as $ok) { if(strcmp($d, $ok) == 0){ $result .= $d . " "; }else $result .= str_replace($d, $ok ,'-') . " "; } } echo $result;
0
6,827,649
07/26/2011 09:02:27
289,246
03/08/2010 23:30:38
1,002
29
asp.net authentication on nokia e5-00
I am tring to login using asp.net authentication in nokia e5-00 device. The login proccess success under explorer, firefox, android device and so on. But in the nokia device the `HttpContext.Current.User.Identity.IsAuthenticated` is false even though the authentication succeeded. Here is my login method: public static void Login(User user) { HttpResponse Response = HttpContext.Current.Response; HttpRequest Request = HttpContext.Current.Request; FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, user.Id.ToString(), DateTime.Now, DateTime.Now.AddHours(12), true, user.Id.ToString()); string data = FormsAuthentication.Encrypt(ticket); HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, data); cookie.Expires = ticket.Expiration; Response.Cookies.Add(cookie); string redirectUrl = UserPages.Home; Response.Redirect(redirectUrl, false); } Later, in the aspx page, when I try to get the user, `HttpContext.Current.User.Identity.IsAuthenticated` is still false. But in all other browsers IsAuthenticated is true and everything is fine. This behavior happens in all nokia devices. After checking, I see the the cookie stored in the nokia but IsAuthenticated is still false. What can cause to this problem? What is wrong with the nokia devices??
.net
asp.net
authentication
mobile
nokia
null
open
asp.net authentication on nokia e5-00 === I am tring to login using asp.net authentication in nokia e5-00 device. The login proccess success under explorer, firefox, android device and so on. But in the nokia device the `HttpContext.Current.User.Identity.IsAuthenticated` is false even though the authentication succeeded. Here is my login method: public static void Login(User user) { HttpResponse Response = HttpContext.Current.Response; HttpRequest Request = HttpContext.Current.Request; FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, user.Id.ToString(), DateTime.Now, DateTime.Now.AddHours(12), true, user.Id.ToString()); string data = FormsAuthentication.Encrypt(ticket); HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, data); cookie.Expires = ticket.Expiration; Response.Cookies.Add(cookie); string redirectUrl = UserPages.Home; Response.Redirect(redirectUrl, false); } Later, in the aspx page, when I try to get the user, `HttpContext.Current.User.Identity.IsAuthenticated` is still false. But in all other browsers IsAuthenticated is true and everything is fine. This behavior happens in all nokia devices. After checking, I see the the cookie stored in the nokia but IsAuthenticated is still false. What can cause to this problem? What is wrong with the nokia devices??
0
6,198,222
06/01/2011 08:21:12
149,008
08/01/2009 16:17:47
4,080
219
Discard changes in one single line
I've noticed that in Tower (Git client for the Mac) the user can discard changes even line by line. I wonder how could this be done using the command line? or maybe is something special of Tower? I frecuently find myself in this case: @@ -391,7 +392,7 @@ extern BOOL validateReceiptAtPath(NSString *path); NSURL *url = [self fileURL]; if (url != nil) { NSRect readFrame = [self _readPreferenceOfFileAtURL:url]; - + for (NSScreen * screen in [NSScreen screens]) { NSRect screenVisibleRect = [screen visibleFrame]; ... See how I have one `+` and one `-` ? I would like to discard it so my commit has the minimum changes (hence less possibilities of conflicts and easier review) :)
git
null
null
null
null
null
open
Discard changes in one single line === I've noticed that in Tower (Git client for the Mac) the user can discard changes even line by line. I wonder how could this be done using the command line? or maybe is something special of Tower? I frecuently find myself in this case: @@ -391,7 +392,7 @@ extern BOOL validateReceiptAtPath(NSString *path); NSURL *url = [self fileURL]; if (url != nil) { NSRect readFrame = [self _readPreferenceOfFileAtURL:url]; - + for (NSScreen * screen in [NSScreen screens]) { NSRect screenVisibleRect = [screen visibleFrame]; ... See how I have one `+` and one `-` ? I would like to discard it so my commit has the minimum changes (hence less possibilities of conflicts and easier review) :)
0
11,685,004
07/27/2012 09:25:29
1,153,172
01/17/2012 04:27:58
30
5
How to access two or more web service in java using Axis2
I want to access two or more web service in java(Eclipse) by using Axix2, now i able to create stub of web service(like temperature conversion url(wsdl) from W3school)and access web services
java
web-services
axis2
null
null
07/27/2012 16:07:55
not a real question
How to access two or more web service in java using Axis2 === I want to access two or more web service in java(Eclipse) by using Axix2, now i able to create stub of web service(like temperature conversion url(wsdl) from W3school)and access web services
1
1,566,595
10/14/2009 14:22:48
167,911
09/03/2009 14:15:36
33
2
Can I use multiple versions of jQuery on the same page?
A project I'm working on requires the use of jQuery on customers' Web pages. Customers will insert a chunk of code that we'll supply which includes a few &lt;script&gt; elements that build a widget in a &lt;script&gt;-created &lt;iframe&gt;. If they aren't already using the latest version of jQuery, this will also include (most likely) a &lt;script&gt; for Google's hosted version of jQuery. The problem is that some customers may already have an older version of jQuery installed. While this may work if it's at least a fairly recent version, our code does rely on some recently introduced functionality in the jQuery library, so there are bound to be instances when a customer's jQuery version is just too old. We can't require that they upgrade to the latest version of jQuery. Is there any way to load a newer version of jQuery to use only wihtin the context of our code, that will not interfere with, or affect, any code on the customer's page? Ideally, maybe we could check for the presence of jQuery, detect the version, and if it's too old, then somehow load the most recent version just to use for our code. I had the idea of loading jQuery in an <iframe> in the customer's domain that also includes our &lt;script&gt;s, which seems like it might be feasible, but I'm hoping there's a more elegant way to do it (not to mention without the performance and complexity penalties of extra &lt;iframe&gt;s_). Thanks in advance for any insight!
jquery
javascript
iframe
version
null
null
open
Can I use multiple versions of jQuery on the same page? === A project I'm working on requires the use of jQuery on customers' Web pages. Customers will insert a chunk of code that we'll supply which includes a few &lt;script&gt; elements that build a widget in a &lt;script&gt;-created &lt;iframe&gt;. If they aren't already using the latest version of jQuery, this will also include (most likely) a &lt;script&gt; for Google's hosted version of jQuery. The problem is that some customers may already have an older version of jQuery installed. While this may work if it's at least a fairly recent version, our code does rely on some recently introduced functionality in the jQuery library, so there are bound to be instances when a customer's jQuery version is just too old. We can't require that they upgrade to the latest version of jQuery. Is there any way to load a newer version of jQuery to use only wihtin the context of our code, that will not interfere with, or affect, any code on the customer's page? Ideally, maybe we could check for the presence of jQuery, detect the version, and if it's too old, then somehow load the most recent version just to use for our code. I had the idea of loading jQuery in an <iframe> in the customer's domain that also includes our &lt;script&gt;s, which seems like it might be feasible, but I'm hoping there's a more elegant way to do it (not to mention without the performance and complexity penalties of extra &lt;iframe&gt;s_). Thanks in advance for any insight!
0
6,471,756
06/24/2011 17:49:46
251,945
01/15/2010 23:48:42
20
0
Toggling the CD (RLSD) signal line on a serial port in Windows C
I am trying to set the Carrier Detect (Receive Line Signal Detect) pin on a serial port being controlled by my Windows application. I am already able to set the RTS line high using this function: EscapeCommFunction(handle, SETRTS); and then subsequently clear it by using: EscapeCommFunction(handle, CLRRTS); I want to be able to do this exact same thing with the CD line, but no such SET/CLR flags exist for the EscapeCommFunction. Thanks in advance for the help
c
windows
serial
signals
null
null
open
Toggling the CD (RLSD) signal line on a serial port in Windows C === I am trying to set the Carrier Detect (Receive Line Signal Detect) pin on a serial port being controlled by my Windows application. I am already able to set the RTS line high using this function: EscapeCommFunction(handle, SETRTS); and then subsequently clear it by using: EscapeCommFunction(handle, CLRRTS); I want to be able to do this exact same thing with the CD line, but no such SET/CLR flags exist for the EscapeCommFunction. Thanks in advance for the help
0
6,966,710
08/06/2011 12:16:03
82,350
03/25/2009 03:01:15
536
53
android building project doesn't continue
This just happened and I don't know what to do now. I tried to import an Android Project in eclipse. After that, it says "android requires compiler compliance level 5.0. please fix project properties". I fixed this one, by right clicking the Project then Android Tools->Fix Project Properties. Somehow, it removed the error. And so I tried to Clean and then Build. And the problem appears. Building Project stops at only 50% and stays there for very very long that I just cancelled building project. What could be the problem here? As of now I really don't know what I need to do. Please somebody help on this..
android
eclipse
performance
build
project
null
open
android building project doesn't continue === This just happened and I don't know what to do now. I tried to import an Android Project in eclipse. After that, it says "android requires compiler compliance level 5.0. please fix project properties". I fixed this one, by right clicking the Project then Android Tools->Fix Project Properties. Somehow, it removed the error. And so I tried to Clean and then Build. And the problem appears. Building Project stops at only 50% and stays there for very very long that I just cancelled building project. What could be the problem here? As of now I really don't know what I need to do. Please somebody help on this..
0
4,141,856
11/10/2010 06:38:50
147,381
07/29/2009 20:02:03
136
3
How can i know if my software will be useful to customers ?
I am a software developer with about 2 years of experience. I create software & sell it online on my website. I have made a mistake when i have created a software that has many competitors, which made it very hard for me to market it. Now i see 5 months of hard work didn't return the investment i thought. So i kept asking myself a question ... If i think of an idea for a software, how can i be sure that people will be happy to buy it, and it will not disappear in the large crowd of other programs ? What am asking about : **Are there techniques i must follow when choosing a software idea ?** **Or websites suggesting nice software ideas missing in the market ?** **Or is there a place where i can suggest my software idea so people can rate it if it will be useful ?** Things like that.
marketing
null
null
null
null
11/10/2010 16:07:23
off topic
How can i know if my software will be useful to customers ? === I am a software developer with about 2 years of experience. I create software & sell it online on my website. I have made a mistake when i have created a software that has many competitors, which made it very hard for me to market it. Now i see 5 months of hard work didn't return the investment i thought. So i kept asking myself a question ... If i think of an idea for a software, how can i be sure that people will be happy to buy it, and it will not disappear in the large crowd of other programs ? What am asking about : **Are there techniques i must follow when choosing a software idea ?** **Or websites suggesting nice software ideas missing in the market ?** **Or is there a place where i can suggest my software idea so people can rate it if it will be useful ?** Things like that.
2
5,335,262
03/17/2011 05:32:52
663,727
03/17/2011 05:18:03
1
0
How to execute shell script in cygwin?
the name.sh already save in C:\Documents and Settings\user, i type sh name.sh sh: testing.sh: No such file or directory any help will be appreciated!
windows
shell
cygwin
null
null
03/17/2011 13:23:21
off topic
How to execute shell script in cygwin? === the name.sh already save in C:\Documents and Settings\user, i type sh name.sh sh: testing.sh: No such file or directory any help will be appreciated!
2
829,322
05/06/2009 12:28:30
9,425
09/15/2008 18:46:39
895
63
Grid with too many columns in fixed width website
I am using Telerik's Radgrid for a website. Often the grid columns exceed the available width, and extend outside the main content area (fixed width). I ave tried So what are my options for presenting very wide grids. horizontal scroll bars just look ugly on my site
asp.net
gridview
radgrid
null
null
null
open
Grid with too many columns in fixed width website === I am using Telerik's Radgrid for a website. Often the grid columns exceed the available width, and extend outside the main content area (fixed width). I ave tried So what are my options for presenting very wide grids. horizontal scroll bars just look ugly on my site
0
6,966,273
08/06/2011 10:45:43
867,148
07/28/2011 09:27:21
1
0
Java application servers market share?
I wonder if there is any recently made (within last year or so) survey or analysis of market shares of various application servers on Java Platform (eg. Tomcat, Jetty, JBoss, Geronimo, WebLogic, WebSphere etc.) in production environment? Thanks for any tips.
java
application
market-share
null
null
08/07/2011 10:58:45
off topic
Java application servers market share? === I wonder if there is any recently made (within last year or so) survey or analysis of market shares of various application servers on Java Platform (eg. Tomcat, Jetty, JBoss, Geronimo, WebLogic, WebSphere etc.) in production environment? Thanks for any tips.
2
9,929,892
03/29/2012 16:54:01
757,600
05/17/2011 14:50:41
1
1
QLPreviewController and UTF8 characters
I have an iPhone app that saves text files with UTF8 characters (umlauts, etc). If I then view the file with the QLPreviewController, the UTF8 characters are not displayed correctly. If I view the same file with other apps (Evernote, for example), or copy them to the desktop and view them with textedit, they appear correct. Is anyone aware of a problem or a workaround for this problem?
ios
utf-8
character-encoding
null
null
null
open
QLPreviewController and UTF8 characters === I have an iPhone app that saves text files with UTF8 characters (umlauts, etc). If I then view the file with the QLPreviewController, the UTF8 characters are not displayed correctly. If I view the same file with other apps (Evernote, for example), or copy them to the desktop and view them with textedit, they appear correct. Is anyone aware of a problem or a workaround for this problem?
0
11,569,556
07/19/2012 21:25:20
1,539,150
07/19/2012 21:10:51
1
0
How do I update a mysql database from a mutliple line form using php
I'm new to PHP and have been struggling with this problem all day. I have a MySQL database containing player details. I want to select them from the database and display in a table in a form, which works fine with the code below. The problem comes when I want to update the rows, maybe to turn a player status from active to not active using a option field. When I press submit I can get the value of each of pdbactive fields OK, but I can't get the PID which is the key to doing an upate into the database. <form name="selected_players" action="" method="POST"> <table border="1"> <th>Player ID</th> <th>Player Name</th> <th>Player Surname</th> <th>Status</th> <th>Primary Team*</th> <?php // Then get the players from the players table who have got same team_name but no team_id yet....which would have be set if they were active $query = "select * from `player2012` where teamid ='$tid' and aru='A';"; $result = mysql_query($query) or die ("Error in query: $query " . mysql_error()); $count = mysql_num_rows($result); echo $count; //echo ("<br />"); while ($row = mysql_fetch_assoc($result)) { $player_id = $row["player_id"]; $player_fname = $row["player_fname"]; $player_sname = $row["player_sname"]; $pactive = $row["active"]; //echo ($pactive); //echo ("<br />"); ?> <tr> <td><input name"pid[]" id="pid[]" type="text" value="<?php echo $player_id ?>" /><?php echo $player_id ?></td> <td><input name"player_fn[]" type="hidden" value="<?php echo $player_fname ?>" /><?php echo $player_fname ?></td> <td><input name"player_sn[]" type="hidden" value="<?php echo $player_sname ?>" /><?php echo $player_sname ?></td> <?php if($pactive=="1"){ ?> <td><select name="pdbactive[]" id="pdbactive[]"> <option value="1" selected="selected">Active</option> <option value="0">Not Active</option> </td> <?php } else { ?> <td><select name="pdbactive[]" id="pdbactive[]"> <option value="1">Active</option> <option value="0" selected="selected">Not Active</option> </td> <?php } ?> <td>&nbsp; </td> </tr> <?php } ?> </table> <p>&nbsp;</p> <p> When you have updated "status" for each of these players, please press submit button <input name="Submit" type="submit" id="Sumbit" value="Submit" /> </p> </form> <?php mysql_free_result($result); //if form has been pressed proccess it if($_POST["Submit"]) { //get data from form $ractive = $_POST['pdbactive']; $rid= $_POST['pid']; for($i=0;$i<$count;$i++){ echo ($i); echo ("<br />"); $stat=($ractive[$i]); $idd=($rid[$i]); $sql_insert="UPDATE 'player2012' SET active='$stat' where id='$idd'"; print($sql_insert); echo ("<br />"); } } ?> At present I just want to create the SQL statements so I know it works before I start updating the database. So all the echo's and print is just me trying to figure the answer HELP!!!!!!!!!!!!!!
php
mysql
html
forms
null
07/21/2012 03:25:54
too localized
How do I update a mysql database from a mutliple line form using php === I'm new to PHP and have been struggling with this problem all day. I have a MySQL database containing player details. I want to select them from the database and display in a table in a form, which works fine with the code below. The problem comes when I want to update the rows, maybe to turn a player status from active to not active using a option field. When I press submit I can get the value of each of pdbactive fields OK, but I can't get the PID which is the key to doing an upate into the database. <form name="selected_players" action="" method="POST"> <table border="1"> <th>Player ID</th> <th>Player Name</th> <th>Player Surname</th> <th>Status</th> <th>Primary Team*</th> <?php // Then get the players from the players table who have got same team_name but no team_id yet....which would have be set if they were active $query = "select * from `player2012` where teamid ='$tid' and aru='A';"; $result = mysql_query($query) or die ("Error in query: $query " . mysql_error()); $count = mysql_num_rows($result); echo $count; //echo ("<br />"); while ($row = mysql_fetch_assoc($result)) { $player_id = $row["player_id"]; $player_fname = $row["player_fname"]; $player_sname = $row["player_sname"]; $pactive = $row["active"]; //echo ($pactive); //echo ("<br />"); ?> <tr> <td><input name"pid[]" id="pid[]" type="text" value="<?php echo $player_id ?>" /><?php echo $player_id ?></td> <td><input name"player_fn[]" type="hidden" value="<?php echo $player_fname ?>" /><?php echo $player_fname ?></td> <td><input name"player_sn[]" type="hidden" value="<?php echo $player_sname ?>" /><?php echo $player_sname ?></td> <?php if($pactive=="1"){ ?> <td><select name="pdbactive[]" id="pdbactive[]"> <option value="1" selected="selected">Active</option> <option value="0">Not Active</option> </td> <?php } else { ?> <td><select name="pdbactive[]" id="pdbactive[]"> <option value="1">Active</option> <option value="0" selected="selected">Not Active</option> </td> <?php } ?> <td>&nbsp; </td> </tr> <?php } ?> </table> <p>&nbsp;</p> <p> When you have updated "status" for each of these players, please press submit button <input name="Submit" type="submit" id="Sumbit" value="Submit" /> </p> </form> <?php mysql_free_result($result); //if form has been pressed proccess it if($_POST["Submit"]) { //get data from form $ractive = $_POST['pdbactive']; $rid= $_POST['pid']; for($i=0;$i<$count;$i++){ echo ($i); echo ("<br />"); $stat=($ractive[$i]); $idd=($rid[$i]); $sql_insert="UPDATE 'player2012' SET active='$stat' where id='$idd'"; print($sql_insert); echo ("<br />"); } } ?> At present I just want to create the SQL statements so I know it works before I start updating the database. So all the echo's and print is just me trying to figure the answer HELP!!!!!!!!!!!!!!
3
2,550,162
03/31/2010 02:49:19
28,586
10/16/2008 13:51:24
416
12
How does Nike's website do this Flash effect when the user selects a choice.
I was wondering how [does Nike website make the change][1] you can see when selecting a color or a sole. At first I thought they were only using images and when the user picked a color you just replaced that part, but when I selected a different sole I noticed it didn't changed like an image it looked a bit more as if it was being rendered. Does anybody happens to know how this is made? Or where can I get further info about making this effect :)? [1]: http://nikeid.nike.com/nikeid/?sitesrc=uslp
flash
swf
website
null
null
null
open
How does Nike's website do this Flash effect when the user selects a choice. === I was wondering how [does Nike website make the change][1] you can see when selecting a color or a sole. At first I thought they were only using images and when the user picked a color you just replaced that part, but when I selected a different sole I noticed it didn't changed like an image it looked a bit more as if it was being rendered. Does anybody happens to know how this is made? Or where can I get further info about making this effect :)? [1]: http://nikeid.nike.com/nikeid/?sitesrc=uslp
0
10,498,876
05/08/2012 12:44:35
1,382,061
05/08/2012 12:34:37
1
0
How can we create video frame with single image,pdf or doc file?
I want to make video frame with different format like .doc,.pdf, and image. is it possible? I found below command. ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg but this will created with multiple images. I need video with single image. Any suggestion.
video
ffmpeg-php
null
null
null
07/30/2012 12:29:00
off topic
How can we create video frame with single image,pdf or doc file? === I want to make video frame with different format like .doc,.pdf, and image. is it possible? I found below command. ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg but this will created with multiple images. I need video with single image. Any suggestion.
2
9,986,904
04/03/2012 03:58:52
1,275,528
03/17/2012 08:58:33
7
0
How to create a folder in c# windows forms
How to create a folder automatically when a solution is installed in the computer i.e( Local Disk:D) using c# windows forms Please help me ......
c#
winforms
null
null
null
04/03/2012 04:09:35
not a real question
How to create a folder in c# windows forms === How to create a folder automatically when a solution is installed in the computer i.e( Local Disk:D) using c# windows forms Please help me ......
1
7,572,454
09/27/2011 16:24:32
967,484
09/27/2011 16:09:09
1
0
iPhone equivalent of Timer and TimerTask for periodic tasks
I'm trying to port an Android app to an iPhone. On Android I could easily process data every 60 seconds by using a Timer class with TimerTasks using scheduleAtFixedRate: **timer.scheduleAtFixedRate(task,15000, epochLengthMs);** Thank you! Is there something similar I can use on iPhone? protected void startTimer(){ if(timerStarted){ //avoid duplicate timers! }else{ running = true; timerStarted = true; if(D)Log.w(TAG,"*Timer Started*"); timer = new Timer(); readyToProcess = true; EpochCounterTask task = new EpochCounterTask(); AutoSaveTask saveTask = new AutoSaveTask(); //give statMagnitude enough time to get values //after 15 sec, every 60 sec timer.scheduleAtFixedRate(task,15000, epochLengthMs); timer.scheduleAtFixedRate(saveTask,645000, 600000); } }
iphone
objective-c
ios4
timertask
null
null
open
iPhone equivalent of Timer and TimerTask for periodic tasks === I'm trying to port an Android app to an iPhone. On Android I could easily process data every 60 seconds by using a Timer class with TimerTasks using scheduleAtFixedRate: **timer.scheduleAtFixedRate(task,15000, epochLengthMs);** Thank you! Is there something similar I can use on iPhone? protected void startTimer(){ if(timerStarted){ //avoid duplicate timers! }else{ running = true; timerStarted = true; if(D)Log.w(TAG,"*Timer Started*"); timer = new Timer(); readyToProcess = true; EpochCounterTask task = new EpochCounterTask(); AutoSaveTask saveTask = new AutoSaveTask(); //give statMagnitude enough time to get values //after 15 sec, every 60 sec timer.scheduleAtFixedRate(task,15000, epochLengthMs); timer.scheduleAtFixedRate(saveTask,645000, 600000); } }
0
9,825,328
03/22/2012 15:23:45
1,277,355
03/18/2012 19:57:17
8
0
how to encrypt passwords on vb2010
any one have a simple encrypt decrypt code for vb2010 ? thnx for any help
visual-studio-2010
encryption
null
null
null
03/22/2012 16:16:29
not a real question
how to encrypt passwords on vb2010 === any one have a simple encrypt decrypt code for vb2010 ? thnx for any help
1
1,770,482
11/20/2009 13:40:12
172,861
09/13/2009 22:45:04
37
0
Set values of LI tag in HTML
I have a Ordered list that I need to set the # values for. Something like: <ol> <li ShowValue=34>apple</li> <li ShowValue=45>pear</li> <li ShowValue=55>car</li> </ol> So that they display with the numbers I assign 34.apple 45.pear 55.car Is there a way to tell the LI what number it should show?
html
ol
li
null
null
null
open
Set values of LI tag in HTML === I have a Ordered list that I need to set the # values for. Something like: <ol> <li ShowValue=34>apple</li> <li ShowValue=45>pear</li> <li ShowValue=55>car</li> </ol> So that they display with the numbers I assign 34.apple 45.pear 55.car Is there a way to tell the LI what number it should show?
0
11,009,645
06/13/2012 06:55:19
1,452,969
06/13/2012 06:44:32
1
0
Issues related to printing a form on Codeigniter
I want to get form printed via codeigniter. The problem i am acing is that i already have a printed form, i want only that data to be printed which was given by user at specific positions. I have made my site using Codeigniter framework. If any knows anything about it, please help me out. Thanks in advance.
php
codeigniter
null
null
null
06/13/2012 13:07:18
not a real question
Issues related to printing a form on Codeigniter === I want to get form printed via codeigniter. The problem i am acing is that i already have a printed form, i want only that data to be printed which was given by user at specific positions. I have made my site using Codeigniter framework. If any knows anything about it, please help me out. Thanks in advance.
1
2,194,212
02/03/2010 18:05:39
210,508
11/13/2009 14:38:36
1
1
Best Practice: Jquery Ajax versus no dependence on javascript
I have a dashboard type of page that contains a bunch of sections, each providing different data. Getting all the data and then sending the page is slow. From a perceived performance standpoint, I'm thinking the best way to do this is to load the page with each of these sections containing nothing, then use jquery ajax to asynchronously get the various pieces of data. However, it has been drilled into my head that I should not depend on javascript to be enabled. Is there any way to detect if javascript is enabled in the requesting browser before sending back the page? Or, maybe a better question is what is the best way to go about this?
jquery
null
null
null
null
null
open
Best Practice: Jquery Ajax versus no dependence on javascript === I have a dashboard type of page that contains a bunch of sections, each providing different data. Getting all the data and then sending the page is slow. From a perceived performance standpoint, I'm thinking the best way to do this is to load the page with each of these sections containing nothing, then use jquery ajax to asynchronously get the various pieces of data. However, it has been drilled into my head that I should not depend on javascript to be enabled. Is there any way to detect if javascript is enabled in the requesting browser before sending back the page? Or, maybe a better question is what is the best way to go about this?
0
5,002,746
02/15/2011 10:53:45
617,625
02/15/2011 10:53:45
1
0
Which Platform is Used for powerpoint and flash ?
I Want To create Animation Project like powerpoint In .net(vb.net).how to do the effects and what are the controls and components needed.
flash
animation
project
powerpoint
platform
06/13/2012 12:22:06
not a real question
Which Platform is Used for powerpoint and flash ? === I Want To create Animation Project like powerpoint In .net(vb.net).how to do the effects and what are the controls and components needed.
1
10,414,542
05/02/2012 13:16:45
371,730
06/20/2010 22:22:14
146
0
Problems with DNS
Good afternoon in my timezone. I am developing a web appp in J2EE. This web app is called and access inside a sharepoint portal. When i enter through the sharepoint portal i can access my application, using chrome developes tools i can see all the HTTP traffic, and i see that the browsers sends a request to the following server that is where my app is running serverprd.enterprisename.com. But when i use the command line in my windows 7 , to ping the machine(server) , for example : ping serverprd.enterprisename.com it returns me the following message: "Ping request could not find host serverprd.enterprisename.com" I am using a proxy. Can anyone tells me why this happening ? Why through the browser i can access the server and the ping command does not find me the server ? With the best regards. Thanks in advance.
http
proxy
dns
ping
null
null
open
Problems with DNS === Good afternoon in my timezone. I am developing a web appp in J2EE. This web app is called and access inside a sharepoint portal. When i enter through the sharepoint portal i can access my application, using chrome developes tools i can see all the HTTP traffic, and i see that the browsers sends a request to the following server that is where my app is running serverprd.enterprisename.com. But when i use the command line in my windows 7 , to ping the machine(server) , for example : ping serverprd.enterprisename.com it returns me the following message: "Ping request could not find host serverprd.enterprisename.com" I am using a proxy. Can anyone tells me why this happening ? Why through the browser i can access the server and the ping command does not find me the server ? With the best regards. Thanks in advance.
0
3,773,781
09/22/2010 21:30:38
193,655
10/21/2009 08:29:52
577
7
Which is the most elegant Design for this simple OOAD problem?
I am trying to get started with OOAD, this problem came to my mind and I am not sure I can find a good solution: (it is a supersimplfied version of a real world case). *A fisherman fishes at a pond with a fishing rod. At every launch of the fishing line there is a likelihood of catching a fish equals to 1/10 when there is sunlight and 1/20 at night.* **Which classes to define?** I would answer: Fisherman, FishingRod, Pond, Day(for modeling night and day). **Which methods?** I would answer: Fisherman.Launch(FishingRod), FIshingRod.TryToFish(Pond) returns boolean **How to model the likelihood?** Who has the responsabiloity of the likelihood? It doesn't belong to the fisherman, or to the pond. In this example there is a relationship only to daylight, in real world it is probably linked also to fisherman, fishingrod and pond. **How to model the external factor (daylight)?** Any comment is welcome. Also code samples.
c#
java
delphi
oop
null
null
open
Which is the most elegant Design for this simple OOAD problem? === I am trying to get started with OOAD, this problem came to my mind and I am not sure I can find a good solution: (it is a supersimplfied version of a real world case). *A fisherman fishes at a pond with a fishing rod. At every launch of the fishing line there is a likelihood of catching a fish equals to 1/10 when there is sunlight and 1/20 at night.* **Which classes to define?** I would answer: Fisherman, FishingRod, Pond, Day(for modeling night and day). **Which methods?** I would answer: Fisherman.Launch(FishingRod), FIshingRod.TryToFish(Pond) returns boolean **How to model the likelihood?** Who has the responsabiloity of the likelihood? It doesn't belong to the fisherman, or to the pond. In this example there is a relationship only to daylight, in real world it is probably linked also to fisherman, fishingrod and pond. **How to model the external factor (daylight)?** Any comment is welcome. Also code samples.
0
7,074,045
08/16/2011 05:45:25
896,049
08/16/2011 05:45:25
1
0
My wrap div is not showing correctly
Here's the link: http://www.whiterootmedia.com/Layout_test/ All the CSS is in the page if you look at the source code. The wrap div stops after the nav bar. I needed it to go all the way down to the end of the page, containing all the divs. I need some help figuring why this isn't working. Thank you, Dusty
html
css
null
null
null
06/13/2012 16:49:52
too localized
My wrap div is not showing correctly === Here's the link: http://www.whiterootmedia.com/Layout_test/ All the CSS is in the page if you look at the source code. The wrap div stops after the nav bar. I needed it to go all the way down to the end of the page, containing all the divs. I need some help figuring why this isn't working. Thank you, Dusty
3
9,815,803
03/22/2012 02:55:43
1,114,032
12/23/2011 21:54:33
3
0
PHP Menu Just Will Not Work As It Should (Part II)
Ok, so, is there any way that I can achieve same thing with "outside" folder path code and normal folder path code? Example: `outside_folder/inside_folder/image.jpg` & `inside_folder/image.jpg` to do the same thing.
php
html
apache
file
jpg
03/22/2012 03:12:32
not a real question
PHP Menu Just Will Not Work As It Should (Part II) === Ok, so, is there any way that I can achieve same thing with "outside" folder path code and normal folder path code? Example: `outside_folder/inside_folder/image.jpg` & `inside_folder/image.jpg` to do the same thing.
1
9,241,091
02/11/2012 14:48:42
285,594
03/03/2010 18:19:03
1,306
39
Stick with PHP or learn Go-lang?
I have learned in my University time Pascal and then C and then to quickly for a job started learning visual basic 6.0 for speed in development etc because with C its like more time and i was not confident to use it for jobs where most of them want project to be done quickly. After that i start using PHP which is also great, because customers demand web projects and they expect Google like applications but also in short time frame. - PHP The syntax is friendly compared to C/Pascal/Python. - I was very happy to learn Python, but its syntax is very much different then C. I have tried to learn Ruby at-least so that i can have the knowledge of Python like syntax but i really skipped Ruby because of 2x time slower then PHP Python i know little bit because i find the syntax more different then C - Now i am thinking to have asset and one tool which has speed and more funcionality and similarity to C Therefore, Is Go-lang is the perfect choice for SPEED vs PHP vs Ruby for Web development + Gtk?
php
python
ruby-on-rails
ruby
go
02/11/2012 14:56:17
not constructive
Stick with PHP or learn Go-lang? === I have learned in my University time Pascal and then C and then to quickly for a job started learning visual basic 6.0 for speed in development etc because with C its like more time and i was not confident to use it for jobs where most of them want project to be done quickly. After that i start using PHP which is also great, because customers demand web projects and they expect Google like applications but also in short time frame. - PHP The syntax is friendly compared to C/Pascal/Python. - I was very happy to learn Python, but its syntax is very much different then C. I have tried to learn Ruby at-least so that i can have the knowledge of Python like syntax but i really skipped Ruby because of 2x time slower then PHP Python i know little bit because i find the syntax more different then C - Now i am thinking to have asset and one tool which has speed and more funcionality and similarity to C Therefore, Is Go-lang is the perfect choice for SPEED vs PHP vs Ruby for Web development + Gtk?
4
2,922,919
05/27/2010 16:26:49
121,646
06/11/2009 21:58:42
332
11
Transitioning to landscape rotation within a uinavigationcontroller
I want to push a landscape view from within a uinaviagtioncontroller... So you click a button, or tableviewcell, and the screen rotates 90° into the new view? How would I manage that? (note: i am not interested in what rotation the user is holding the device)
iphone
objective-c
cocoa-touch
uinavigationcontroller
null
null
open
Transitioning to landscape rotation within a uinavigationcontroller === I want to push a landscape view from within a uinaviagtioncontroller... So you click a button, or tableviewcell, and the screen rotates 90° into the new view? How would I manage that? (note: i am not interested in what rotation the user is holding the device)
0
572,407
02/21/2009 05:34:02
11,397
09/16/2008 07:36:40
2,094
185
How to ban or remove unruly or abusive SO cit.
Clearly there needs to be a way I think ?
troll
voting
null
null
null
02/21/2009 07:51:54
off topic
How to ban or remove unruly or abusive SO cit. === Clearly there needs to be a way I think ?
2
11,733,343
07/31/2012 04:57:22
1,392,980
05/14/2012 04:32:41
1
0
How to show .psd image in phoneGap application?
I need How to show splash image using HTML which lasts 3 to 4 seconds and hide automatically. Give me code
phonegap
null
null
null
null
07/31/2012 12:16:12
not a real question
How to show .psd image in phoneGap application? === I need How to show splash image using HTML which lasts 3 to 4 seconds and hide automatically. Give me code
1
11,577,292
07/20/2012 10:12:30
782,296
06/03/2011 07:00:06
458
20
how to run the freerdp server?
I am currently working on using freerdp webconnect([site][1]) to set my machine as the server and connect two other machines via my machine(recieve input from one and send it to the other). I have configured freerdp on my linux machine(ubuntu 11.10) but the problem is I am not able to start the server.... If anybody has worked on freeRDP webconnect kindly guide me on how to start the server. [1]: http://www.freerdp.com/
ubuntu-11.10
rdp
null
null
null
07/22/2012 02:55:22
off topic
how to run the freerdp server? === I am currently working on using freerdp webconnect([site][1]) to set my machine as the server and connect two other machines via my machine(recieve input from one and send it to the other). I have configured freerdp on my linux machine(ubuntu 11.10) but the problem is I am not able to start the server.... If anybody has worked on freeRDP webconnect kindly guide me on how to start the server. [1]: http://www.freerdp.com/
2
7,991,027
11/03/2011 06:26:55
879,872
08/05/2011 04:41:51
1
0
Suggest a concise book on ASP.NET?
I am taking part in Imagine cup and my idea includes design of a website with a login, search system, pretty much like ebay. Since time is scarce, I need a concise book. I found a book recommended somewhere on msdn but it was a massive 1600 pages book. Please suggest me some good concise book. The official library is cumbersome and I am finding it hard to get hold of it. Any other thing you would like to tell me about Imagine cup(your experience and other sort of things) would also be helpful. *There can be some grammatical mistakes, english is not my native language.
asp.net
books
competitions
null
null
11/03/2011 10:18:31
not constructive
Suggest a concise book on ASP.NET? === I am taking part in Imagine cup and my idea includes design of a website with a login, search system, pretty much like ebay. Since time is scarce, I need a concise book. I found a book recommended somewhere on msdn but it was a massive 1600 pages book. Please suggest me some good concise book. The official library is cumbersome and I am finding it hard to get hold of it. Any other thing you would like to tell me about Imagine cup(your experience and other sort of things) would also be helpful. *There can be some grammatical mistakes, english is not my native language.
4
7,162,027
08/23/2011 13:49:18
707,549
04/14/2011 08:24:07
762
1
the usage of global keyword in TCL
I have a question about `global` in TCL. In one tcl file tclone.tcl, I have a global variable: `global SIGNAL` in another tcl file called tcltwo.tcl, I set the variable SIGNAL as: `set SIGNAL 10` In tclone.tcl, I improted the tcltwo.tcl as following" `package require tcltwo.tcl` will the variable SIGNAL in tclone.tcl will be set as 10 when I execute it? and what is the usage of gloable variable?
tcl
global
null
null
null
null
open
the usage of global keyword in TCL === I have a question about `global` in TCL. In one tcl file tclone.tcl, I have a global variable: `global SIGNAL` in another tcl file called tcltwo.tcl, I set the variable SIGNAL as: `set SIGNAL 10` In tclone.tcl, I improted the tcltwo.tcl as following" `package require tcltwo.tcl` will the variable SIGNAL in tclone.tcl will be set as 10 when I execute it? and what is the usage of gloable variable?
0
3,942,150
10/15/2010 12:20:24
106,261
05/13/2009 12:31:38
511
50
using generics in a slsb with jpa entitymanager
I have an slsb holding my business logic, how do I use generics to change the following three methods into one generic method ? The first two are the same db, the third is a different database. @PersistenceContext(unitName = "db") private EntityManager myEntityManager; @PersistenceContext(unitName = "db2") private EntityManager myDB2EntityManager; public void crud(MyEntity myEntity) throws HRException { myEntityManager.merge(myEntity); } public void crud(DifferentEntity aDifferentEntity) throws HRException { myEntityManager.merge(aDifferentEntity); } public void crud(DB2Entity db2Entity) throws HRException { myDB2EntityManager.merge(db2Entity); } Many thanks in advance. Cheers!
java
generics
jpa
entitymanager
null
null
open
using generics in a slsb with jpa entitymanager === I have an slsb holding my business logic, how do I use generics to change the following three methods into one generic method ? The first two are the same db, the third is a different database. @PersistenceContext(unitName = "db") private EntityManager myEntityManager; @PersistenceContext(unitName = "db2") private EntityManager myDB2EntityManager; public void crud(MyEntity myEntity) throws HRException { myEntityManager.merge(myEntity); } public void crud(DifferentEntity aDifferentEntity) throws HRException { myEntityManager.merge(aDifferentEntity); } public void crud(DB2Entity db2Entity) throws HRException { myDB2EntityManager.merge(db2Entity); } Many thanks in advance. Cheers!
0
6,749,298
07/19/2011 14:59:18
828,689
07/04/2011 20:21:04
1
0
How to use graphic in vc++?
i want to learn graphic in vc++ like programming in a win32 application. but i don't know books useful for win32 application. please give me the way to learn it or introduce ebooks. Best Regard
winapi
visual-c++
null
null
null
07/19/2011 15:07:21
not constructive
How to use graphic in vc++? === i want to learn graphic in vc++ like programming in a win32 application. but i don't know books useful for win32 application. please give me the way to learn it or introduce ebooks. Best Regard
4
8,912,416
01/18/2012 15:08:51
1,128,260
01/03/2012 16:35:08
18
0
Does exist any opencl syntax plugin for codeblocks?
Yes, this is the question. Has anyone developed it? I use vim too, so if you have got any configuration file please share it with us. Thank you so much!
vim
plugins
opencl
vimrc
codeblocks
01/19/2012 21:03:12
not a real question
Does exist any opencl syntax plugin for codeblocks? === Yes, this is the question. Has anyone developed it? I use vim too, so if you have got any configuration file please share it with us. Thank you so much!
1
7,405,946
09/13/2011 17:27:06
141,822
07/21/2009 07:15:13
704
23
rails model errors to json using respond_with
I'm writing a json api in rails and am returning a couple of errors in the controller like this { 'msg' : 'RTFM!!' } but in going the more restful route and allowing my models generate the errors, I'm getting errors in this format when I use respond_with {"image":["No image to upload!"]} Is there a way to change the way the errors are formatted on output?
ruby-on-rails
ruby-on-rails-3
json
null
null
null
open
rails model errors to json using respond_with === I'm writing a json api in rails and am returning a couple of errors in the controller like this { 'msg' : 'RTFM!!' } but in going the more restful route and allowing my models generate the errors, I'm getting errors in this format when I use respond_with {"image":["No image to upload!"]} Is there a way to change the way the errors are formatted on output?
0
3,905,734
10/11/2010 11:24:18
244,413
01/06/2010 02:46:19
947
0
How to send 100.000 emails weekly ??
On my blog, I have 100.000 subscribers and I want to send them an update email weekly. How can I do that with PHP ?
php
email
email-integration
subscription
mailing-list
06/05/2012 15:15:21
not constructive
How to send 100.000 emails weekly ?? === On my blog, I have 100.000 subscribers and I want to send them an update email weekly. How can I do that with PHP ?
4
2,061,841
01/14/2010 02:42:25
160,463
08/21/2009 01:14:01
44
6
jquery multiple load
Is it possible to load multiple items at once through jquery using $.load? For exmaple I may have something like this: <div id="test"> <div id="what"> </div> <div id="when"> </div> <div id="who"> </div> </div> Now say I wanted to load the div with the id of what and the id of when but not the who. is this possible?
jquery
loading
null
null
null
null
open
jquery multiple load === Is it possible to load multiple items at once through jquery using $.load? For exmaple I may have something like this: <div id="test"> <div id="what"> </div> <div id="when"> </div> <div id="who"> </div> </div> Now say I wanted to load the div with the id of what and the id of when but not the who. is this possible?
0
8,825,521
01/11/2012 19:35:55
1,125,873
04/24/2011 09:47:31
12
6
Modern GPU's buffers
What buffers has a modern GPU? I have found [this][1] presentation about modern GPUs. The architecture show frame buffers and texture buffers, but where are all the other buffers, like stencil buffers or z-buffer? Are there any more buffers? [1]: ftp://download.nvidia.com/developer/cuda/seminar/TDCI_Arch.pdf
architecture
hardware
buffer
3d
gpu
01/12/2012 02:51:35
off topic
Modern GPU's buffers === What buffers has a modern GPU? I have found [this][1] presentation about modern GPUs. The architecture show frame buffers and texture buffers, but where are all the other buffers, like stencil buffers or z-buffer? Are there any more buffers? [1]: ftp://download.nvidia.com/developer/cuda/seminar/TDCI_Arch.pdf
2
2,398,883
03/08/2010 01:56:17
230,069
12/12/2009 01:09:06
1
4
How to formally prove that Geometric distribution is the discrete analogous of the Exponential one?
How to formally prove that Geometric distribution is the discrete analogous of the Exponential one?
statistics
probability
null
null
null
03/08/2010 02:38:36
off topic
How to formally prove that Geometric distribution is the discrete analogous of the Exponential one? === How to formally prove that Geometric distribution is the discrete analogous of the Exponential one?
2
10,253,474
04/20/2012 20:59:07
1,200,578
02/09/2012 20:19:23
26
0
Inject a function into a Java .class file using Haskell
I have written a Java bytecode parser using Haskell, and it works just fine. However the next step has me completely stumped. My Haskell program needs to modify the .class file so that, when executed, the Java program prints: <br> "*Entering [method name here]*" before executing a method, and <br> "*Exiting [method name here]*" after executing a method. <br> <br> All I know is that we will need to append the constant pool and method table with calls to System.out.println, but I feel I'm still missing something. <br> <br> - What is the best way to approach this problem? <br> - How do you know how to call System.out.println in bytecode?<br> - How do you store the string with the name of the method, to later be called as an argument of System.out.println? <br> <br> Any help is appreciated!
java
homework
haskell
injection
bytecode
null
open
Inject a function into a Java .class file using Haskell === I have written a Java bytecode parser using Haskell, and it works just fine. However the next step has me completely stumped. My Haskell program needs to modify the .class file so that, when executed, the Java program prints: <br> "*Entering [method name here]*" before executing a method, and <br> "*Exiting [method name here]*" after executing a method. <br> <br> All I know is that we will need to append the constant pool and method table with calls to System.out.println, but I feel I'm still missing something. <br> <br> - What is the best way to approach this problem? <br> - How do you know how to call System.out.println in bytecode?<br> - How do you store the string with the name of the method, to later be called as an argument of System.out.println? <br> <br> Any help is appreciated!
0
11,373,069
07/07/2012 07:14:36
1,293,317
03/26/2012 14:55:34
37
3
Physical memory usage approaching 100%(96%)
Context: - Windows Server 2008 R2; - 32GB RAM; - Application: SQL Server 2008 R2, several Connectors to Write Data into SQL Server(Write Frequency: 0.5HZ); - The Server has not been restart for more than half a year; - About 15G Data per month; - Support Several Applications hosted on other Server(Web Applicaion, Socket Application); - Problem(From the Task Manager): The Memory Usage is **approaching 100%**(96%), while by checking all the running processes, the total usage of memory should be **less than 10%**, the situation has been like this for a long time, causing no big problems temporarily... is there some kind of memory-leak problems here? any related information is appreciated, Dean
windows
sql-server-2008
memory-leaks
null
null
07/08/2012 01:01:55
off topic
Physical memory usage approaching 100%(96%) === Context: - Windows Server 2008 R2; - 32GB RAM; - Application: SQL Server 2008 R2, several Connectors to Write Data into SQL Server(Write Frequency: 0.5HZ); - The Server has not been restart for more than half a year; - About 15G Data per month; - Support Several Applications hosted on other Server(Web Applicaion, Socket Application); - Problem(From the Task Manager): The Memory Usage is **approaching 100%**(96%), while by checking all the running processes, the total usage of memory should be **less than 10%**, the situation has been like this for a long time, causing no big problems temporarily... is there some kind of memory-leak problems here? any related information is appreciated, Dean
2
7,325,052
09/06/2011 19:24:29
403,915
07/27/2010 21:47:50
90
12
Can someone explain to me why the dot (.) command is so useful in VIM?
I use VIM pretty regularly now but I never use the dot (.) command to repeat the previous action. I keep reading about how awesome it is but I never see any real world examples that make sense to me and the way I code in VIM. What are some real world examples that show how awesome the dot (.) command is?
vim
vi
null
null
null
null
open
Can someone explain to me why the dot (.) command is so useful in VIM? === I use VIM pretty regularly now but I never use the dot (.) command to repeat the previous action. I keep reading about how awesome it is but I never see any real world examples that make sense to me and the way I code in VIM. What are some real world examples that show how awesome the dot (.) command is?
0
5,593,422
04/08/2011 09:56:39
563,906
01/05/2011 12:26:02
33
3
problem with C# timers.timer
My app looks like this: I have MDI parent form - form1, form that starts and stops the timer - form 2, and a timerCalls class with all the timer logic. Form1 code: TimerCalls timerCalls = new TimerCalls(); public SMS() { InitializeComponent(); timerCalls.InitializeTimer(); } Form2 code: TimerCalls timerCalls = new TimerCalls(); public Form2() { InitializeComponent(); } private void btnSendOn_Click(object sender, EventArgs e) { timerCalls.sendTimer.Start(); } private void btnSendOff_Click(object sender, EventArgs e) { timerCalls.sendTimer.Stop(); } TimerCalls class code: class TimerCalls { public System.Timers.Timer sendTimer = new System.Timers.Timer(); public System.Timers.Timer recTimer = new System.Timers.Timer(); public void InitializeTimer() { //send timer sendTimer.Elapsed += new ElapsedEventHandler(sendProcessTimerEvent); sendTimer.Interval = 3000; //rec timer recTimer.Elapsed += new ElapsedEventHandler(recProcessTimerEvent); recTimer.Interval = 3000; } private void sendProcessTimerEvent(object sender, EventArgs e) { MessageBox.Show("Send 3 sec"); } private void recProcessTimerEvent(object sender, EventArgs e) { MessageBox.Show("Rec 3 sec"); } } This is the problem: I open form2, start the timer, close form2, open it again and try to stop the timer it doesn't stop it. Once I reopen the form2 all I can do is start and stop a new timer, but the previous one is still running. Everything works fine (timer starting and stopping) until I close form2. If the timer was on when I closed the form I can't stop it once I open the form2 again. Any ideas??
c#
winforms
timer
null
null
null
open
problem with C# timers.timer === My app looks like this: I have MDI parent form - form1, form that starts and stops the timer - form 2, and a timerCalls class with all the timer logic. Form1 code: TimerCalls timerCalls = new TimerCalls(); public SMS() { InitializeComponent(); timerCalls.InitializeTimer(); } Form2 code: TimerCalls timerCalls = new TimerCalls(); public Form2() { InitializeComponent(); } private void btnSendOn_Click(object sender, EventArgs e) { timerCalls.sendTimer.Start(); } private void btnSendOff_Click(object sender, EventArgs e) { timerCalls.sendTimer.Stop(); } TimerCalls class code: class TimerCalls { public System.Timers.Timer sendTimer = new System.Timers.Timer(); public System.Timers.Timer recTimer = new System.Timers.Timer(); public void InitializeTimer() { //send timer sendTimer.Elapsed += new ElapsedEventHandler(sendProcessTimerEvent); sendTimer.Interval = 3000; //rec timer recTimer.Elapsed += new ElapsedEventHandler(recProcessTimerEvent); recTimer.Interval = 3000; } private void sendProcessTimerEvent(object sender, EventArgs e) { MessageBox.Show("Send 3 sec"); } private void recProcessTimerEvent(object sender, EventArgs e) { MessageBox.Show("Rec 3 sec"); } } This is the problem: I open form2, start the timer, close form2, open it again and try to stop the timer it doesn't stop it. Once I reopen the form2 all I can do is start and stop a new timer, but the previous one is still running. Everything works fine (timer starting and stopping) until I close form2. If the timer was on when I closed the form I can't stop it once I open the form2 again. Any ideas??
0
7,971,777
11/01/2011 19:30:05
917,787
08/29/2011 12:14:01
1
0
How to generate Simple graphics in C++
How can I generate simple graphics using C++. I am using Ubuntu 11.10 and G++ Compiler. Thanks.
c++
g++
null
null
null
11/01/2011 19:36:13
not a real question
How to generate Simple graphics in C++ === How can I generate simple graphics using C++. I am using Ubuntu 11.10 and G++ Compiler. Thanks.
1
8,045,478
11/08/2011 03:06:46
1,034,848
11/08/2011 02:44:27
1
0
Phonegap links not working
I am building a phonegap app for iOS which works perfectly and beautifully except for the links. Neither internal nor external links are functioning. I made internal links work by using jquery animations, but for the life of me, I cannot figure out how to get the external links working. I thought it might be a problem with my code, so I created a new phonegap app and tried to use the external link in the default code, but that link also didn't work. I assume, then, that it's a problem with phonegap, but that doesn't tell me at all how to fix it. Any ideas? Here's a zip of all my app's code. http://cl.ly/0K0g1d3A0s2e2M0o0E34 I've tried triggering the link in a variety of different ways with jquery, but to no avail.
jquery
ios
phonegap
null
null
null
open
Phonegap links not working === I am building a phonegap app for iOS which works perfectly and beautifully except for the links. Neither internal nor external links are functioning. I made internal links work by using jquery animations, but for the life of me, I cannot figure out how to get the external links working. I thought it might be a problem with my code, so I created a new phonegap app and tried to use the external link in the default code, but that link also didn't work. I assume, then, that it's a problem with phonegap, but that doesn't tell me at all how to fix it. Any ideas? Here's a zip of all my app's code. http://cl.ly/0K0g1d3A0s2e2M0o0E34 I've tried triggering the link in a variety of different ways with jquery, but to no avail.
0
9,793,562
03/20/2012 19:27:20
1,071,585
11/29/2011 15:25:03
96
0
A few advantages of mvc over webform
I read about both, and I tried both.. I know this site was built on mvc. Mvc has got unit testing and friendly url. But in my opinion it is much much faster to develop in webform.. Why do people say that asp.net mvc wil be the furute and webforms will have more role in intranet applications? Also is it true that dot.net website applications are much more secure than other applications which are built, for example, on php (which is more hackable?). I need to know what other advantages mvc has got so I can securily set myself developing on asp.net webforms :)
asp.net
mvc
webforms
null
null
03/20/2012 19:33:16
not constructive
A few advantages of mvc over webform === I read about both, and I tried both.. I know this site was built on mvc. Mvc has got unit testing and friendly url. But in my opinion it is much much faster to develop in webform.. Why do people say that asp.net mvc wil be the furute and webforms will have more role in intranet applications? Also is it true that dot.net website applications are much more secure than other applications which are built, for example, on php (which is more hackable?). I need to know what other advantages mvc has got so I can securily set myself developing on asp.net webforms :)
4
3,982,111
10/20/2010 20:42:06
387,989
07/09/2010 17:41:28
244
25
Hg post-merge commit message, best practice?
I find myself doing the following a lot: C:\Code>hg pull pulling from http://server/FogBugz/kiln/Repo/Project/Rebuild/trunk searching for changes adding changesets adding manifests adding file changes added 2 changesets with 4 changes to 4 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) C:\Code>hg merge 4 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, dont forget to commit) C:\Code>hg commit -m "Merged" C:\Code>hg push pushing to http://server/FogBugz/kiln/Repo/Project/Rebuild/trunk searching for changes remote: kiln: successfully pushed 2 changesets My question is, what is a better/more useful commit message to use after merging a pull from the repository. Are there any best practices that people use in distributed version control systems for this sort of thing?
mercurial
null
null
null
null
null
open
Hg post-merge commit message, best practice? === I find myself doing the following a lot: C:\Code>hg pull pulling from http://server/FogBugz/kiln/Repo/Project/Rebuild/trunk searching for changes adding changesets adding manifests adding file changes added 2 changesets with 4 changes to 4 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) C:\Code>hg merge 4 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, dont forget to commit) C:\Code>hg commit -m "Merged" C:\Code>hg push pushing to http://server/FogBugz/kiln/Repo/Project/Rebuild/trunk searching for changes remote: kiln: successfully pushed 2 changesets My question is, what is a better/more useful commit message to use after merging a pull from the repository. Are there any best practices that people use in distributed version control systems for this sort of thing?
0
5,129,906
02/26/2011 21:36:41
224,200
12/03/2009 19:40:16
32
1
div height 100%
I know this has been asked a million times, but I haven't had much luck making it work.I'm working on a Posterous layout, and I'm trying to get my may content to flow to the bottom. Here is a link to the [layout so far][1] [1]: http://rockettree.com/indeex.html You can see that the content is held within center_col, so I basically need this column to stretch to the bottom of the page/window regardless of how much content is in there. Here is the current HTML: <!DOCTYPE html> <html> <head> <title>{Title}</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> * {margin:0;padding:0}/* mac hide \*/ html { height: 100%;} * html #wrap {height: 100%;}/* end hide */ body { background: #FFFFFF; color: #fff; height:100%; min-width:800px;} #inner { position:relative; width:100% } #wrap { min-height: 100%; margin-left:50%; position:relative; background:#F9F9F9; color:#000; z-index:1 } #center_col { float: left; width: 800px; height: auto; margin-left:-380px;/* drag it central on the page*/ position:relative; display:inline;/* ie double margin bug*/ background:#FFFFFF; } #sidebar { width:204px; height: 100%; padding-right:26px; float:left; min-height:234px; position:relative; background: #FFFFFF; } #content { width:570px; height: 100%; min-height: 100%; position:relative; float:left; background: #F9F9F9 url('http://www.rockettree.com/images/bg-content.png') left top repeat-y; padding-top:21px; padding-bottom:48px; } .postunit { width: 500px; margin-left: 30px; padding: 10px 5px 20px 5px; background: #FFFFFF; border: 1px solid #F9F9F9; } .sidebar { border: 1px solid #000000; background-color: #FFFFFF; margin-top: 50px; padding-left: 10px; float: left; height: auto; width:200px; -moz-border-radius: 10px; border-radius: 10px; } p{ padding:5px; margin-bottom:1em; } </style> <!--[if IE]><style type="text/css">body {width:expression( documentElement.clientWidth < 802 ? (documentElement.clientWidth == 0 ? (body.clientWidth < 802 ? "802" : "auto") : "802px") : "auto" );}</style><![endif]--> </head> <body> <div id="wrap"> <div id="inner"> <div id="center_col"> <div id="sidebar"> <div class="header"> <h1>{Title}</h1> <p>{Description}</p> </div> {block:ListSidebar} <div class="profile"> <a href="{ProfileLink}"> <img src="{PortraitURL-45}" width='75' height='75'> </a> <p>{Profile}</p> </div> {/block:ListSidebar} </div> <div id="content"> <div class="posts"> {block:Posts} <div id="postunit_{PostID}" class="postunit"> {block:EditBox/} <div class="post"> <h3><a class="posttitle" href="{Permalink}">{Title}</a></h3> <a class="button" href="{Permalink}">Posted {TimeAgo}</a> {Body} </div> {block:Responses} {block:ResponsesList} {/block:ResponsesList} {block:Sharing} {block:Tweet /}&nbsp;{block:FbLike /} {/block:Sharing} <div class="postresponses"> <a class="button" href="#">{ResponseCount} Response{ResponseCountPluralized}</a> </div> {block:ResponsesShow} {Responses} {ResponseForm} {/block:ResponsesShow} {/block:Responses} </div> {/block:Posts} </div> {block:Pagination/} </div> </div> </div> </div> </body> </html>
html
css
layout
posterous
null
null
open
div height 100% === I know this has been asked a million times, but I haven't had much luck making it work.I'm working on a Posterous layout, and I'm trying to get my may content to flow to the bottom. Here is a link to the [layout so far][1] [1]: http://rockettree.com/indeex.html You can see that the content is held within center_col, so I basically need this column to stretch to the bottom of the page/window regardless of how much content is in there. Here is the current HTML: <!DOCTYPE html> <html> <head> <title>{Title}</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> * {margin:0;padding:0}/* mac hide \*/ html { height: 100%;} * html #wrap {height: 100%;}/* end hide */ body { background: #FFFFFF; color: #fff; height:100%; min-width:800px;} #inner { position:relative; width:100% } #wrap { min-height: 100%; margin-left:50%; position:relative; background:#F9F9F9; color:#000; z-index:1 } #center_col { float: left; width: 800px; height: auto; margin-left:-380px;/* drag it central on the page*/ position:relative; display:inline;/* ie double margin bug*/ background:#FFFFFF; } #sidebar { width:204px; height: 100%; padding-right:26px; float:left; min-height:234px; position:relative; background: #FFFFFF; } #content { width:570px; height: 100%; min-height: 100%; position:relative; float:left; background: #F9F9F9 url('http://www.rockettree.com/images/bg-content.png') left top repeat-y; padding-top:21px; padding-bottom:48px; } .postunit { width: 500px; margin-left: 30px; padding: 10px 5px 20px 5px; background: #FFFFFF; border: 1px solid #F9F9F9; } .sidebar { border: 1px solid #000000; background-color: #FFFFFF; margin-top: 50px; padding-left: 10px; float: left; height: auto; width:200px; -moz-border-radius: 10px; border-radius: 10px; } p{ padding:5px; margin-bottom:1em; } </style> <!--[if IE]><style type="text/css">body {width:expression( documentElement.clientWidth < 802 ? (documentElement.clientWidth == 0 ? (body.clientWidth < 802 ? "802" : "auto") : "802px") : "auto" );}</style><![endif]--> </head> <body> <div id="wrap"> <div id="inner"> <div id="center_col"> <div id="sidebar"> <div class="header"> <h1>{Title}</h1> <p>{Description}</p> </div> {block:ListSidebar} <div class="profile"> <a href="{ProfileLink}"> <img src="{PortraitURL-45}" width='75' height='75'> </a> <p>{Profile}</p> </div> {/block:ListSidebar} </div> <div id="content"> <div class="posts"> {block:Posts} <div id="postunit_{PostID}" class="postunit"> {block:EditBox/} <div class="post"> <h3><a class="posttitle" href="{Permalink}">{Title}</a></h3> <a class="button" href="{Permalink}">Posted {TimeAgo}</a> {Body} </div> {block:Responses} {block:ResponsesList} {/block:ResponsesList} {block:Sharing} {block:Tweet /}&nbsp;{block:FbLike /} {/block:Sharing} <div class="postresponses"> <a class="button" href="#">{ResponseCount} Response{ResponseCountPluralized}</a> </div> {block:ResponsesShow} {Responses} {ResponseForm} {/block:ResponsesShow} {/block:Responses} </div> {/block:Posts} </div> {block:Pagination/} </div> </div> </div> </div> </body> </html>
0
9,461,737
02/27/2012 08:04:34
1,235,089
02/27/2012 08:01:10
1
0
Should the scraper be hosted on a different server for better performance?
I'm planning a comparison website based on scraped data. To improve load times , is it better to host the scraper part of the website on a different server and the comparison (display) part of the website on a different server? Any other solution you can recommend to improve speed and reduce load times ? Thanks in advance
scraper
null
null
null
null
02/28/2012 14:10:53
not constructive
Should the scraper be hosted on a different server for better performance? === I'm planning a comparison website based on scraped data. To improve load times , is it better to host the scraper part of the website on a different server and the comparison (display) part of the website on a different server? Any other solution you can recommend to improve speed and reduce load times ? Thanks in advance
4
6,851,836
07/27/2011 22:06:27
866,375
07/27/2011 22:06:27
1
0
how do I add extra parameters to this code?
`$random = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_type = 'furniture' AND post_status = 'publish' ORDER BY rand() LIMIT 1");` For example, if I want to add a width and height, where would I input this?
php
null
null
null
null
07/27/2011 22:24:30
not a real question
how do I add extra parameters to this code? === `$random = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_type = 'furniture' AND post_status = 'publish' ORDER BY rand() LIMIT 1");` For example, if I want to add a width and height, where would I input this?
1
10,016,442
04/04/2012 17:39:52
1,005,633
10/20/2011 16:21:01
1
0
C# Wifi-How to get error password message
I develop a wifi manager with C# based on managed wifi api. I want to know when user inserts error password and when inserts the correct password in order to show up the appropriate messages. Is there any method to take these info? Thanks!
c#
.net
windows
wifi
null
04/05/2012 18:07:41
not a real question
C# Wifi-How to get error password message === I develop a wifi manager with C# based on managed wifi api. I want to know when user inserts error password and when inserts the correct password in order to show up the appropriate messages. Is there any method to take these info? Thanks!
1
193,008
10/10/2008 21:03:28
25,860
10/07/2008 15:57:26
16
0
Rube Goldberg software design
Anybody seen a [Rube Goldberg][1] software design? Basically, complicated design for simple stuffs. Please share your stories. [1]: http://www.codinghorror.com/blog/archives/000255.html
design
null
null
null
null
05/24/2012 03:03:58
not constructive
Rube Goldberg software design === Anybody seen a [Rube Goldberg][1] software design? Basically, complicated design for simple stuffs. Please share your stories. [1]: http://www.codinghorror.com/blog/archives/000255.html
4
9,740,304
03/16/2012 15:42:05
107,783
05/15/2009 15:52:49
864
46
Can't add new app, can't join FB community - a bit lost
From a previous FB SO question, I worked out that the Create New App button is probably missing because I created the fan page without a proper FB account and I think they want something more concrete to verify me or something. So I created a proper FB account, as me, and now I'm stuck. I can't join the developer community. The first time I clicked to join, it said "Cancel Request" for a few hours before reverting to Join, so I clicked it again and its been pending ever since - there's no email confirmation, it's all a bit mysterious. I need to join because I don't think this (SO) is the right place to ask questions about the problems I'm having just setting up a new app, or linking my new account to the fan page. I'm stuck - my company is blocked to add new features. It all feels a bit amateurish. Does anyone have any advice?
facebook
application
null
null
null
04/09/2012 13:18:59
off topic
Can't add new app, can't join FB community - a bit lost === From a previous FB SO question, I worked out that the Create New App button is probably missing because I created the fan page without a proper FB account and I think they want something more concrete to verify me or something. So I created a proper FB account, as me, and now I'm stuck. I can't join the developer community. The first time I clicked to join, it said "Cancel Request" for a few hours before reverting to Join, so I clicked it again and its been pending ever since - there's no email confirmation, it's all a bit mysterious. I need to join because I don't think this (SO) is the right place to ask questions about the problems I'm having just setting up a new app, or linking my new account to the fan page. I'm stuck - my company is blocked to add new features. It all feels a bit amateurish. Does anyone have any advice?
2
11,374,497
07/07/2012 11:12:33
1,364,684
04/29/2012 21:07:59
14
0
Android: Where can I store files for an android app?
I need play some mp3 files in my app. This mp3 files is in a provisional server. Do you know which is the best free server to store that mp3 files? thanks.
android
file
store
null
null
07/07/2012 11:14:35
not a real question
Android: Where can I store files for an android app? === I need play some mp3 files in my app. This mp3 files is in a provisional server. Do you know which is the best free server to store that mp3 files? thanks.
1
8,370,625
12/03/2011 20:10:43
425,386
08/19/2010 14:52:20
161
6
Please give critics to my database design
I'm designing a database for the department of the university. It is designed to store students, groups, teachers, subjects and others. Each subject has some teaching materials. Teachers may also have some teaching materials. Also I'll need to keep track of lecture schedule of every group and omissions of lectures. Below is a table diagram I designed. It doesn't have all the fields in tables but the main question is about relations and tables. Can you suggest something about this? ![enter image description here][1] [1]: http://i.stack.imgur.com/Lwi29.png
entity-framework
database-design
relational-database
null
null
12/03/2011 23:47:35
not a real question
Please give critics to my database design === I'm designing a database for the department of the university. It is designed to store students, groups, teachers, subjects and others. Each subject has some teaching materials. Teachers may also have some teaching materials. Also I'll need to keep track of lecture schedule of every group and omissions of lectures. Below is a table diagram I designed. It doesn't have all the fields in tables but the main question is about relations and tables. Can you suggest something about this? ![enter image description here][1] [1]: http://i.stack.imgur.com/Lwi29.png
1
7,880,258
10/24/2011 18:42:40
966,005
09/26/2011 23:40:56
3
0
Binding to service always returns false
I am trying to bind to a service, but the bind service method always returns false. I believe the problem is in my connection. When I import the location of the LocalBinder class (in the service) I dont get any compile errors but the bindService call is still false. Service information: //binder for client private final IBinder mBinder = new LocalBinder(); //client class binder public class LocalBinder extends Binder { ServiceA getService() { // Return this instance of LocalService so clients can call public methods return ServiceA.this; } } @Override public IBinder onBind(Intent arg0) { return mBinder; } //called when service is created public void onCreate(){ super.onCreate(); Toast.makeText(this,"ServiceA is started",Toast.LENGTH_SHORT).show(); } Connection: private ServiceConnection connect2A = new ServiceConnection() { @Override public void onServiceConnected(ComponentName className, IBinder service) { // We've bound to LocalService, cast the IBinder and get LocalService instance LocalBinder newBinder = (LocalBinder) service; mainService = newBinder.getService(); bound = true; } @Override public void onServiceDisconnected(ComponentName arg0) { bound = false; } }; Initial calls: @Override protected void onStart(){ super.onStart(); Intent intent = new Intent(this, ServiceA.class); startService(intent); boolean check = bindService(intent,connect2A,0); Toast.makeText(this, "Return from check is: " + check, Toast.LENGTH_LONG).show(); //program does get to this point, but binding fails }
android
binding
service
null
null
null
open
Binding to service always returns false === I am trying to bind to a service, but the bind service method always returns false. I believe the problem is in my connection. When I import the location of the LocalBinder class (in the service) I dont get any compile errors but the bindService call is still false. Service information: //binder for client private final IBinder mBinder = new LocalBinder(); //client class binder public class LocalBinder extends Binder { ServiceA getService() { // Return this instance of LocalService so clients can call public methods return ServiceA.this; } } @Override public IBinder onBind(Intent arg0) { return mBinder; } //called when service is created public void onCreate(){ super.onCreate(); Toast.makeText(this,"ServiceA is started",Toast.LENGTH_SHORT).show(); } Connection: private ServiceConnection connect2A = new ServiceConnection() { @Override public void onServiceConnected(ComponentName className, IBinder service) { // We've bound to LocalService, cast the IBinder and get LocalService instance LocalBinder newBinder = (LocalBinder) service; mainService = newBinder.getService(); bound = true; } @Override public void onServiceDisconnected(ComponentName arg0) { bound = false; } }; Initial calls: @Override protected void onStart(){ super.onStart(); Intent intent = new Intent(this, ServiceA.class); startService(intent); boolean check = bindService(intent,connect2A,0); Toast.makeText(this, "Return from check is: " + check, Toast.LENGTH_LONG).show(); //program does get to this point, but binding fails }
0
11,457,337
07/12/2012 17:30:22
1,486,657
06/27/2012 18:56:02
4
0
How to use Switch Case in C# for decimal values
I am converting a code from VB.net to C#. Since new to C# i got stuck on **Switch()** statement for **Decimals**. I found out that i can not use decimal values in switch statement. VB switch statement looks like this : changeAmt is decimal >Select Case changeAmt > Case Is > 0 >> expressions > Case Is < 0 >> expressions How can i convert this into C#? Do i have to use if-else statements. I want to use switch because it will make the code much easier to write and understand
c#
vb.net
null
null
null
07/12/2012 22:37:25
not constructive
How to use Switch Case in C# for decimal values === I am converting a code from VB.net to C#. Since new to C# i got stuck on **Switch()** statement for **Decimals**. I found out that i can not use decimal values in switch statement. VB switch statement looks like this : changeAmt is decimal >Select Case changeAmt > Case Is > 0 >> expressions > Case Is < 0 >> expressions How can i convert this into C#? Do i have to use if-else statements. I want to use switch because it will make the code much easier to write and understand
4
5,257,339
03/10/2011 08:54:10
456,919
07/30/2010 08:08:38
1
3
one sample class for any purpose uses most of the php 5 keywords.
I only need the topic not script.
php5
null
null
null
null
03/11/2011 02:02:39
not a real question
one sample class for any purpose uses most of the php 5 keywords. === I only need the topic not script.
1
3,077,229
06/19/2010 21:06:17
84,131
03/28/2009 23:11:03
449
15
RESTful password reset
What is the proper way to structure a RESTful resource for resetting a password? The two options that I have are: POST /reset_password/{user_name} or... POST /reset_password -Username passed through request body I'm pretty sure the request should be a POST. I'm less confident that I have selected an appropriate name. And I'm not sure if the user_name should be passed through the URL or the request body.
rest
restful-web-services
restful-url
password-recovery
null
null
open
RESTful password reset === What is the proper way to structure a RESTful resource for resetting a password? The two options that I have are: POST /reset_password/{user_name} or... POST /reset_password -Username passed through request body I'm pretty sure the request should be a POST. I'm less confident that I have selected an appropriate name. And I'm not sure if the user_name should be passed through the URL or the request body.
0
8,445,171
12/09/2011 11:59:01
880,347
08/05/2011 10:13:29
8
0
jqGrid not being populated with JSON data from Java Servlet
Hopefully someone will be able to point me in the right direction. I have already browsed the many other posts relating to jqGrid & json not populating the jqGrid table (some of the links): http://stackoverflow.com/questions/2232133/jqgrid-table-not-being-populated-by-data-from-json-request http://stackoverflow.com/questions/3164347/jggrid-not-displaying-json-data http://stackoverflow.com/questions/3128837/json-and-jqgrid-what-is-userdata http://stackoverflow.com/questions/259435/jqgrid-with-json-data-renders-table-as-empty http://stackoverflow.com/questions/6682240/jqgrid-not-displaying-json-data but could not find an answer to my problem. Basically what I am trying to do is read a list of events from a log file (with date and time info) and display in the jqGrid. This is my setup: [1] My Servlet snippet <code> @Override protected void doGet(HttpServletRequest aRequest, HttpServletResponse aResponse, Hashtable aQueryData, LocaleData aLocale) throws ServletException, IOException { System.out.println("doGet(): Received Request: " + aRequest.getServletPath()); // jqGrid expects the JSON data in a predefined format: // { // "total": "xxx", // "page": "yyy", // "records": "zzz", // "rows" : [ // {"id" :"1", "cell" :["cell11", "cell12", "cell13"]}, // {"id" :"2", "cell":["cell21", "cell22", "cell23"]}, // ... // ] // } // Calling getLogEntries() method populates logEntries & logEntriesCnt. // logEntries contains the "rows" data as specified above. // For now I am testing with 10 rows of data. getLogEntries(aLocale); JSONObject jqGridData = new JSONObject(); jqGridData.put("total", "1"); jqGridData.put("page", "1"); jqGridData.put("records", String.valueOf(logEntriesCnt-1)); jqGridData.put("rows", logEntries); System.out.println("\n\n# Event Log Entries (" + new Date() + "):" + (logEntriesCnt-1)); System.out.println("jqGrid JSON: \n" + jqGridData.toJSONString()); aRequest.setAttribute("userdata", jqGridData.toJSONString()); aRequest.getRequestDispatcher("/jsp/eventlogtest.jsp").forward(aRequest, aResponse); } </code> The output on the console (I validated it via http://jsonlint.com/): <code> # Event Log Entries (Fri Dec 09 11:02:25 GMT 2011):10 jqGrid JSON: {"total":"1","page":"1","records":"10","rows":[{"id":"1","cell":["09\/12\/11","11:01:52","Communication Established"]},{"id":"2","cell":["09\/12\/11","11:01:52","Monitoring Started"]},{"id":"3","cell":["09\/12\/11","10:50:55","Communication Established"]},{"id":"4","cell":["09\/12\/11","10:50:55","Monitoring Started"]},{"id":"5","cell":["09\/12\/11","10:36:57","Communication Established"]},{"id":"6","cell":["09\/12\/11","10:36:57","Monitoring Started"]},{"id":"7","cell":["09\/12\/11","10:30:58","Communication Established"]},{"id":"8","cell":["09\/12\/11","10:30:58","Monitoring Started"]},{"id":"9","cell":["09\/12\/11","10:21:58","Communication Established"]},{"id":"10","cell":["09\/12\/11","10:21:58","Monitoring Started"]}]} </code> [2] My JSP <code> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="application/json"> <link type="text/css" rel="stylesheet" href="/styles/cupertino/jquery-ui-1.8.14.custom.min.css"> <link type="text/css" rel="stylesheet" href="/styles/ui.jqgrid.css"> <script type="text/javascript" src="/js/jquery-1.5.2.min.js"></script> <script type="text/javascript" src="/js/jquery-ui-1.8.14.custom.min.js"></script> <script type="text/javascript" src="/js/grid.locale-en.js"></script> <script type="text/javascript" src="/js/jquery.jqGrid.min.js"></script> <script type="text/javascript" src="/js/eventlog.min.js"></script> <title>jqGrid Test</title> </head> <body> <h1>jqGrid Test</h1> <form id="formpageform" action="/eventlog" name="eventlogviewerform" method="post"> <div id="logEntries"> userdata = ${userdata} </div> <br/> <br/> <table id="tableGrid"></table> <div id="tablePager"></div> <br/> <br/> </form> </body> </html> <code> I output the userdata to the screen and again validated the json is correct. Firebug does not have any errors. [3] My JavaScript: <code> $(document).ready(function(){ // Test Data: All entries double quoted var userdatatest1 = { "total":"1", "page":"1", "records":"10", "rows":[ {"id":"1","cell":["08\/12\/11","21:09:19","Communication Established"]}, {"id":"2","cell":["08\/12\/11","21:09:19","Monitoring Started"]}, {"id":"3","cell":["08\/12\/11","21:02:47","Communication Established"]}, {"id":"4","cell":["08\/12\/11","21:02:47","Monitoring Started"]}, {"id":"5","cell":["08\/12\/11","20:51:40","Communication Established"]}, {"id":"6","cell":["08\/12\/11","20:51:40","Monitoring Started"]}, {"id":"7","cell":["08\/12\/11","20:33:24","Communication Established"]}, {"id":"8","cell":["08\/12\/11","20:33:24","Monitoring Started"]}, {"id":"9","cell":["08\/12\/11","20:23:06","Communication Established"]}, {"id":"10","cell":["08\/12\/11","20:23:06","Monitoring Started"]}] }; // jqGrid Options: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options // Pager Options: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:pager $("#tableGrid").jqGrid({ url:'/eventlogjqgrid', datatype:'json', //datastr: userdatatest3, colNames:['Date', 'Time', 'Event'], colModel:[ {name:'dateentry',index:'dateentry',width:150,align:"left",sortable:false,editable:false}, {name:'timeentry',index:'timeentry',width:150,align:"left",sortable:false,editable:false} , {name:'evententry',index:'evententry',width:400,align:"left",sortable:false,editable:false} ], rowNum:10, rowList:[10,20,30], sortname:'dateentry', sortorder:'asc', pager: jQuery('#tablePager'), viewrecords: true, caption: 'Event Log' }); jQuery("#tableGrid").jqGrid('navGrid', '#tablePager', {edit:false, add:false, del:false, search:false, refresh:false}); }); </code> As you can see from my Javascript. I have a test json data that corresponds to the json being sent from server. The Test data has no problem being rendered. Also I have tried changing jqGrid datatype. Again both work for test data: datatype:'json' datatype:'jsonstring' I don't really mind about being able to page the data in the table. I just want to be able display the data and update it every 5 mins. I will do the updates once I get the basic data to display. Any help appreciated. Thanks in advance.
java
json
servlets
jqgrid
null
null
open
jqGrid not being populated with JSON data from Java Servlet === Hopefully someone will be able to point me in the right direction. I have already browsed the many other posts relating to jqGrid & json not populating the jqGrid table (some of the links): http://stackoverflow.com/questions/2232133/jqgrid-table-not-being-populated-by-data-from-json-request http://stackoverflow.com/questions/3164347/jggrid-not-displaying-json-data http://stackoverflow.com/questions/3128837/json-and-jqgrid-what-is-userdata http://stackoverflow.com/questions/259435/jqgrid-with-json-data-renders-table-as-empty http://stackoverflow.com/questions/6682240/jqgrid-not-displaying-json-data but could not find an answer to my problem. Basically what I am trying to do is read a list of events from a log file (with date and time info) and display in the jqGrid. This is my setup: [1] My Servlet snippet <code> @Override protected void doGet(HttpServletRequest aRequest, HttpServletResponse aResponse, Hashtable aQueryData, LocaleData aLocale) throws ServletException, IOException { System.out.println("doGet(): Received Request: " + aRequest.getServletPath()); // jqGrid expects the JSON data in a predefined format: // { // "total": "xxx", // "page": "yyy", // "records": "zzz", // "rows" : [ // {"id" :"1", "cell" :["cell11", "cell12", "cell13"]}, // {"id" :"2", "cell":["cell21", "cell22", "cell23"]}, // ... // ] // } // Calling getLogEntries() method populates logEntries & logEntriesCnt. // logEntries contains the "rows" data as specified above. // For now I am testing with 10 rows of data. getLogEntries(aLocale); JSONObject jqGridData = new JSONObject(); jqGridData.put("total", "1"); jqGridData.put("page", "1"); jqGridData.put("records", String.valueOf(logEntriesCnt-1)); jqGridData.put("rows", logEntries); System.out.println("\n\n# Event Log Entries (" + new Date() + "):" + (logEntriesCnt-1)); System.out.println("jqGrid JSON: \n" + jqGridData.toJSONString()); aRequest.setAttribute("userdata", jqGridData.toJSONString()); aRequest.getRequestDispatcher("/jsp/eventlogtest.jsp").forward(aRequest, aResponse); } </code> The output on the console (I validated it via http://jsonlint.com/): <code> # Event Log Entries (Fri Dec 09 11:02:25 GMT 2011):10 jqGrid JSON: {"total":"1","page":"1","records":"10","rows":[{"id":"1","cell":["09\/12\/11","11:01:52","Communication Established"]},{"id":"2","cell":["09\/12\/11","11:01:52","Monitoring Started"]},{"id":"3","cell":["09\/12\/11","10:50:55","Communication Established"]},{"id":"4","cell":["09\/12\/11","10:50:55","Monitoring Started"]},{"id":"5","cell":["09\/12\/11","10:36:57","Communication Established"]},{"id":"6","cell":["09\/12\/11","10:36:57","Monitoring Started"]},{"id":"7","cell":["09\/12\/11","10:30:58","Communication Established"]},{"id":"8","cell":["09\/12\/11","10:30:58","Monitoring Started"]},{"id":"9","cell":["09\/12\/11","10:21:58","Communication Established"]},{"id":"10","cell":["09\/12\/11","10:21:58","Monitoring Started"]}]} </code> [2] My JSP <code> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="application/json"> <link type="text/css" rel="stylesheet" href="/styles/cupertino/jquery-ui-1.8.14.custom.min.css"> <link type="text/css" rel="stylesheet" href="/styles/ui.jqgrid.css"> <script type="text/javascript" src="/js/jquery-1.5.2.min.js"></script> <script type="text/javascript" src="/js/jquery-ui-1.8.14.custom.min.js"></script> <script type="text/javascript" src="/js/grid.locale-en.js"></script> <script type="text/javascript" src="/js/jquery.jqGrid.min.js"></script> <script type="text/javascript" src="/js/eventlog.min.js"></script> <title>jqGrid Test</title> </head> <body> <h1>jqGrid Test</h1> <form id="formpageform" action="/eventlog" name="eventlogviewerform" method="post"> <div id="logEntries"> userdata = ${userdata} </div> <br/> <br/> <table id="tableGrid"></table> <div id="tablePager"></div> <br/> <br/> </form> </body> </html> <code> I output the userdata to the screen and again validated the json is correct. Firebug does not have any errors. [3] My JavaScript: <code> $(document).ready(function(){ // Test Data: All entries double quoted var userdatatest1 = { "total":"1", "page":"1", "records":"10", "rows":[ {"id":"1","cell":["08\/12\/11","21:09:19","Communication Established"]}, {"id":"2","cell":["08\/12\/11","21:09:19","Monitoring Started"]}, {"id":"3","cell":["08\/12\/11","21:02:47","Communication Established"]}, {"id":"4","cell":["08\/12\/11","21:02:47","Monitoring Started"]}, {"id":"5","cell":["08\/12\/11","20:51:40","Communication Established"]}, {"id":"6","cell":["08\/12\/11","20:51:40","Monitoring Started"]}, {"id":"7","cell":["08\/12\/11","20:33:24","Communication Established"]}, {"id":"8","cell":["08\/12\/11","20:33:24","Monitoring Started"]}, {"id":"9","cell":["08\/12\/11","20:23:06","Communication Established"]}, {"id":"10","cell":["08\/12\/11","20:23:06","Monitoring Started"]}] }; // jqGrid Options: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options // Pager Options: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:pager $("#tableGrid").jqGrid({ url:'/eventlogjqgrid', datatype:'json', //datastr: userdatatest3, colNames:['Date', 'Time', 'Event'], colModel:[ {name:'dateentry',index:'dateentry',width:150,align:"left",sortable:false,editable:false}, {name:'timeentry',index:'timeentry',width:150,align:"left",sortable:false,editable:false} , {name:'evententry',index:'evententry',width:400,align:"left",sortable:false,editable:false} ], rowNum:10, rowList:[10,20,30], sortname:'dateentry', sortorder:'asc', pager: jQuery('#tablePager'), viewrecords: true, caption: 'Event Log' }); jQuery("#tableGrid").jqGrid('navGrid', '#tablePager', {edit:false, add:false, del:false, search:false, refresh:false}); }); </code> As you can see from my Javascript. I have a test json data that corresponds to the json being sent from server. The Test data has no problem being rendered. Also I have tried changing jqGrid datatype. Again both work for test data: datatype:'json' datatype:'jsonstring' I don't really mind about being able to page the data in the table. I just want to be able display the data and update it every 5 mins. I will do the updates once I get the basic data to display. Any help appreciated. Thanks in advance.
0
4,737,599
01/19/2011 16:08:19
417,294
08/11/2010 13:35:00
152
3
Drawing translucency drawable in Android, but black edge.
I have the below image to draw in a canvas. When I draw the image using the code.., the image 's edge is getting black circle and rounded .. the edge's alpha is 0x00. image.setBounds(left, top, right, bottom); image.draw(canvas); Expected ![alt text][1] When I draw ![alt text][2] [1]: http://i.stack.imgur.com/GEBRo.png [2]: http://i.stack.imgur.com/edIld.png How could I remove the black circle??? Is the image wrong?? or Anyone know the clue, Please give me a clue.. Thanks in advance.. ^^
android
canvas
alpha
drawable
null
null
open
Drawing translucency drawable in Android, but black edge. === I have the below image to draw in a canvas. When I draw the image using the code.., the image 's edge is getting black circle and rounded .. the edge's alpha is 0x00. image.setBounds(left, top, right, bottom); image.draw(canvas); Expected ![alt text][1] When I draw ![alt text][2] [1]: http://i.stack.imgur.com/GEBRo.png [2]: http://i.stack.imgur.com/edIld.png How could I remove the black circle??? Is the image wrong?? or Anyone know the clue, Please give me a clue.. Thanks in advance.. ^^
0
9,796,768
03/20/2012 23:56:50
601,869
02/03/2011 16:20:12
104
5
Looking for Open-Source or Licensed Personalised Greeting Card software
Before I jump in at the very deep end and try to make my own version of Moon Pig (www.moonpig.com) I would like to know what (if any) software/platforms currently exist that allow for visitors to personalise cards with text and uploaded photos and then purchase printed versions all via a single e-Commerce style platform. I have Googled till my fingers bled and I cannot find anything that matches my needs, which are: - admin can provide templates (backgrounds) for the cards - users can customise the card with text (font style and colour) - users can upload their own photos (minor editing e.g. crop) to insert into the cards - user can purchase a printed card via credit card payment Seeing as this kind of e-Commerce has been around for a while now, I would have thought there were some systems to purchase that can provide this functionality?
php
flash
api
e-commerce
null
03/21/2012 12:38:37
off topic
Looking for Open-Source or Licensed Personalised Greeting Card software === Before I jump in at the very deep end and try to make my own version of Moon Pig (www.moonpig.com) I would like to know what (if any) software/platforms currently exist that allow for visitors to personalise cards with text and uploaded photos and then purchase printed versions all via a single e-Commerce style platform. I have Googled till my fingers bled and I cannot find anything that matches my needs, which are: - admin can provide templates (backgrounds) for the cards - users can customise the card with text (font style and colour) - users can upload their own photos (minor editing e.g. crop) to insert into the cards - user can purchase a printed card via credit card payment Seeing as this kind of e-Commerce has been around for a while now, I would have thought there were some systems to purchase that can provide this functionality?
2
6,744,243
07/19/2011 08:23:16
790,156
06/09/2011 02:21:19
33
0
how to made SlidingDrawer animate from top to buttom?
from [this][1] tutor I try to follow his suggestion and I want to made slide from top to buttom insteade of bottom to top I wonder how to do it? please help [1]: http://techdroid.kbeanie.com/2009/08/android-sliding-drawer-example.html
android
animate
slidedown
null
null
07/19/2011 10:23:22
not a real question
how to made SlidingDrawer animate from top to buttom? === from [this][1] tutor I try to follow his suggestion and I want to made slide from top to buttom insteade of bottom to top I wonder how to do it? please help [1]: http://techdroid.kbeanie.com/2009/08/android-sliding-drawer-example.html
1