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
11,182,229
06/25/2012 00:18:09
909,974
08/24/2011 15:35:41
254
0
Poweshell based programs
Does anyone know how the consoles of programs like Lync, Exchange or SCVM was written? They execute powershell scripts. Is there any SDK?
c#
winforms
powershell
null
null
null
open
Poweshell based programs === Does anyone know how the consoles of programs like Lync, Exchange or SCVM was written? They execute powershell scripts. Is there any SDK?
0
6,020,099
05/16/2011 16:04:12
755,658
05/16/2011 12:52:10
1
0
how to replace the 'connectionstring' that is in a dll file?
i mean: how to override a connectionstring ? it's possible? I tried a few things in the file 'Site.master' but no sucess ;/ thx.
asp.net
windows
iis
helper
null
null
open
how to replace the 'connectionstring' that is in a dll file? === i mean: how to override a connectionstring ? it's possible? I tried a few things in the file 'Site.master' but no sucess ;/ thx.
0
11,479,931
07/14/2012 00:24:35
1,001,643
10/18/2011 16:56:27
22,776
762
How to make a real apostrophe or single-quote in LaTeX
I am trying to incorporate programming examples in a LaTeX document. The document renders nicely with *pdflatex*; however, the single quotes get transformed into U+2019, a right-single-quotation mark. And, a backtick renders as U+2018, a left-single-quotation-mark. What I need is a U+0027 real apostrophe so that the code can be successfully cut-and-pasted from the PDF into actual source code. \documentclass{article} \usepackage{alltt} \usepackage{color} \usepackage{fullpage} \begin{document} \center{\LARGE{hello.py}} \begin{alltt} {\color{red}print} 'hello world' \end{alltt} \end{document}
latex
syntax-highlighting
tex
null
null
07/14/2012 23:07:34
off topic
How to make a real apostrophe or single-quote in LaTeX === I am trying to incorporate programming examples in a LaTeX document. The document renders nicely with *pdflatex*; however, the single quotes get transformed into U+2019, a right-single-quotation mark. And, a backtick renders as U+2018, a left-single-quotation-mark. What I need is a U+0027 real apostrophe so that the code can be successfully cut-and-pasted from the PDF into actual source code. \documentclass{article} \usepackage{alltt} \usepackage{color} \usepackage{fullpage} \begin{document} \center{\LARGE{hello.py}} \begin{alltt} {\color{red}print} 'hello world' \end{alltt} \end{document}
2
4,470,434
12/17/2010 12:28:01
406,682
07/30/2010 11:56:52
42
1
Get the current page being viewed in the browser (Possible?)
I would like to know Is it possible for me as an android developer to know if the browser app is currently open, and if it is, what page is being viewed? (URL?) If so, how would I go about doing this? If not, I would also love to know so I wouldn't search anymore. Thanks, Omri.
android
browser
android-intent
null
null
null
open
Get the current page being viewed in the browser (Possible?) === I would like to know Is it possible for me as an android developer to know if the browser app is currently open, and if it is, what page is being viewed? (URL?) If so, how would I go about doing this? If not, I would also love to know so I wouldn't search anymore. Thanks, Omri.
0
8,388,735
12/05/2011 16:47:16
234,316
12/18/2009 04:49:01
128
6
Netstat solved my slowdown?
I was wondering what netstat does? I know this kind of a weird question.... We were encountering a very grave slowdown in our web server machine which is running on debian linux. After running netstat command, for some reason, the web server suddenly performed properly and the slowdown was gone. would netstat have any involvement in this? I know this is kind of weird question but in any case anyone can provide any insight, it would be welcome Thanks
linux
debian
netstat
null
null
12/05/2011 20:07:23
off topic
Netstat solved my slowdown? === I was wondering what netstat does? I know this kind of a weird question.... We were encountering a very grave slowdown in our web server machine which is running on debian linux. After running netstat command, for some reason, the web server suddenly performed properly and the slowdown was gone. would netstat have any involvement in this? I know this is kind of weird question but in any case anyone can provide any insight, it would be welcome Thanks
2
8,112,591
11/13/2011 15:32:03
1,044,287
11/13/2011 15:17:23
1
0
Place to find Android research papers
I want to find research topics on mobile projects. Are there websites to find Android research papers for free. Can anyone help me.
android
null
null
null
null
11/14/2011 01:43:00
off topic
Place to find Android research papers === I want to find research topics on mobile projects. Are there websites to find Android research papers for free. Can anyone help me.
2
9,722,691
03/15/2012 15:16:06
467,875
10/06/2010 11:21:37
382
40
Add button click as an event to this jQuery script?
Im working from this demo: http://kilianvalkhof.com/uploads/listfilter/ I want to add a button that empties the input text area when you click it. I can do this with jQuery's .val however the list doesn't filter. I think the code does the recalculation after a keyup event, so how can I add clicking a button as an event that listened for? Thanks
jquery
events
onkeyup
null
null
04/06/2012 17:22:27
not a real question
Add button click as an event to this jQuery script? === Im working from this demo: http://kilianvalkhof.com/uploads/listfilter/ I want to add a button that empties the input text area when you click it. I can do this with jQuery's .val however the list doesn't filter. I think the code does the recalculation after a keyup event, so how can I add clicking a button as an event that listened for? Thanks
1
9,970,349
04/02/2012 02:49:19
387,099
07/08/2010 19:42:51
1,365
66
Weird RenderTarget2D behaviour
I've been dabbling with XNA for a couple of days now. This chunk of code doesn't work as I expect. The goal is to render sprites individually and composite them on another rendertarget. P = RenderTarget2D(with RenderTargetUsage.PreserveContents) D = RenderTarget2D(with RenderTargetUsage.DiscardContents) for all sprites: graphicsDevice.SetRenderTarget(D); <draw sprite i> graphicsDevice.SetRenderTarget(P); <Draw D> graphicsDevice.SetRenderTarget(null); <Draw P> The result I get is - only the last sprite is visible. I'm sure I'm missing some piece of information about RenderTarget2D. Any hints on what that might be?
xna
xna4.0
render-to-texture
null
null
04/02/2012 06:54:02
off topic
Weird RenderTarget2D behaviour === I've been dabbling with XNA for a couple of days now. This chunk of code doesn't work as I expect. The goal is to render sprites individually and composite them on another rendertarget. P = RenderTarget2D(with RenderTargetUsage.PreserveContents) D = RenderTarget2D(with RenderTargetUsage.DiscardContents) for all sprites: graphicsDevice.SetRenderTarget(D); <draw sprite i> graphicsDevice.SetRenderTarget(P); <Draw D> graphicsDevice.SetRenderTarget(null); <Draw P> The result I get is - only the last sprite is visible. I'm sure I'm missing some piece of information about RenderTarget2D. Any hints on what that might be?
2
8,484,816
12/13/2011 05:38:57
501,314
11/09/2010 00:30:38
26
0
Is it possible to use a DELETE statement in a trigger on MS SQL Server 2000 database?
I have created a trigger with this script. DECLARE @JRNENTRY_INSERTED INTEGER, @BACHNUMB CHAR(15) SELECT @JRNENTRY_INSERTED = INSERTED.JRNENTRY FROM INSERTED SELECT @BACHNUMB = (SELECT DISTINCT BACHNUMB FROM GL10000 WHERE JRNENTRY = (SELECT INSERTED.JRNENTRY FROM INSERTED)) -- CHECK IF JRNENTRY EXIST ON GL10000. IF YES DELETE IT FROM TABLE GL10000 IF EXISTS (SELECT JRNENTRY FROM GL10000 WHERE JRNENTRY = @JRNENTRY_INSERTED) BEGIN DELETE FROM SY00500 WHERE BACHNUMB = @BACHNUMB DELETE FROM GL10000 WHERE JRNENTRY = @JRNENTRY_INSERTED DELETE FROM GL10001 WHERE JRNENTRY = @JRNENTRY_INSERTED END In this script I have validated the record if it exist on the [GL10000] table and if yes, it would execute the DELETE statement inside of it.
sql-server
sql-server-2000
null
null
null
12/13/2011 17:57:51
not a real question
Is it possible to use a DELETE statement in a trigger on MS SQL Server 2000 database? === I have created a trigger with this script. DECLARE @JRNENTRY_INSERTED INTEGER, @BACHNUMB CHAR(15) SELECT @JRNENTRY_INSERTED = INSERTED.JRNENTRY FROM INSERTED SELECT @BACHNUMB = (SELECT DISTINCT BACHNUMB FROM GL10000 WHERE JRNENTRY = (SELECT INSERTED.JRNENTRY FROM INSERTED)) -- CHECK IF JRNENTRY EXIST ON GL10000. IF YES DELETE IT FROM TABLE GL10000 IF EXISTS (SELECT JRNENTRY FROM GL10000 WHERE JRNENTRY = @JRNENTRY_INSERTED) BEGIN DELETE FROM SY00500 WHERE BACHNUMB = @BACHNUMB DELETE FROM GL10000 WHERE JRNENTRY = @JRNENTRY_INSERTED DELETE FROM GL10001 WHERE JRNENTRY = @JRNENTRY_INSERTED END In this script I have validated the record if it exist on the [GL10000] table and if yes, it would execute the DELETE statement inside of it.
1
10,728,680
05/23/2012 22:18:09
504,596
11/11/2010 14:08:27
133
11
Strategy for testing android custom views
The graphical layout tab shown in adt is still not so reliable. On the other hand, manually testing how a custom view are rendered manually can be unnecessary complicated, especially if the application requires some interaction to get to the activity you want to test. Currently I build fake activities that I register as "main" until I am not satisfied with the result. Which approach do you suggest?
android
testing
android-layout
null
null
05/23/2012 22:20:26
not a real question
Strategy for testing android custom views === The graphical layout tab shown in adt is still not so reliable. On the other hand, manually testing how a custom view are rendered manually can be unnecessary complicated, especially if the application requires some interaction to get to the activity you want to test. Currently I build fake activities that I register as "main" until I am not satisfied with the result. Which approach do you suggest?
1
4,319,354
11/30/2010 22:27:04
283,933
03/01/2010 21:42:05
371
71
How should I approach an 'experience versus education' standoff?
I've just now been asked why my judgement should be trusted over that of an educated professional (3 years) in my field, where I have no 'bonified qualification', though I have 8 years of experience (blood, sweat, success). I think it's a fairly messed up outlook to weigh people up like this, but I've seen it happen in a number of environments, some big but mainly small teams. Really the people involved should work on what strengths exist, not what theoretical strengths we should have. But ho-hum when its me versus Mr. Ed(ucation), I've proved both faster and more accurate though less complicated in some of my solutions. I have a private portfolio, and I can talk about x number of subjects relating to web development, but apparently that doesn't cut it, so how do I (politely) negotiate this situation, where the people involved are managers who don't necessarily understand much about different coding styles, plus myself and the other guy as mentioned above? Also, this could become a 'What should I say on my CV these days, given I have no formal qualififcation' question, if Mr. Ed keeps trumping me because he sat through an awful lot of lectures.
coding-style
education
experience
null
null
12/02/2010 05:12:36
off topic
How should I approach an 'experience versus education' standoff? === I've just now been asked why my judgement should be trusted over that of an educated professional (3 years) in my field, where I have no 'bonified qualification', though I have 8 years of experience (blood, sweat, success). I think it's a fairly messed up outlook to weigh people up like this, but I've seen it happen in a number of environments, some big but mainly small teams. Really the people involved should work on what strengths exist, not what theoretical strengths we should have. But ho-hum when its me versus Mr. Ed(ucation), I've proved both faster and more accurate though less complicated in some of my solutions. I have a private portfolio, and I can talk about x number of subjects relating to web development, but apparently that doesn't cut it, so how do I (politely) negotiate this situation, where the people involved are managers who don't necessarily understand much about different coding styles, plus myself and the other guy as mentioned above? Also, this could become a 'What should I say on my CV these days, given I have no formal qualififcation' question, if Mr. Ed keeps trumping me because he sat through an awful lot of lectures.
2
4,512,095
12/22/2010 17:55:05
551,505
12/22/2010 17:36:50
1
0
Creating a Turbo Tax like Software
I have to develop a tool in visual Studio about a Chemical Analysis Tool kinda similar to Turbo Tax Software.This tool asks the user some questions about the chemical composition of the product and some production data during the run time.On the basis of the values entered by the user,it does some calculations(some Big calculations) on the back end and prints/pdfs a report which displays the total environmental impact of that product in terms of green house gases,waste,water consumption etc. So,according to my research online,one way would be to store the data entered during run time in a database and then use Crystal Reports to generate a report. Another thing I can do is to create some kind of Quiz engine which I still have to figure out how to do. I am wondering if I am thinking in the right direction or there is some other way to do it. I will really appreciate any help on this one. Software Used: Visual Studio 2010, C#
reports
visual
crystal
studio
null
04/11/2011 23:54:22
not a real question
Creating a Turbo Tax like Software === I have to develop a tool in visual Studio about a Chemical Analysis Tool kinda similar to Turbo Tax Software.This tool asks the user some questions about the chemical composition of the product and some production data during the run time.On the basis of the values entered by the user,it does some calculations(some Big calculations) on the back end and prints/pdfs a report which displays the total environmental impact of that product in terms of green house gases,waste,water consumption etc. So,according to my research online,one way would be to store the data entered during run time in a database and then use Crystal Reports to generate a report. Another thing I can do is to create some kind of Quiz engine which I still have to figure out how to do. I am wondering if I am thinking in the right direction or there is some other way to do it. I will really appreciate any help on this one. Software Used: Visual Studio 2010, C#
1
7,639,609
10/03/2011 19:20:11
187,144
10/09/2009 12:33:33
679
25
SQL error using sqlanywhere php API sasql_query()
I'm having problem executing a specific query using php API from sqlanywhere 12. It only happens with SET OPTION query. <?php // setup omitted for clarity here $result = sasql_query( $conn, "SET OPTION PUBLIC.AjusteFuso = '0'" ); // clean up omitted for clarity here ?> I receive the following exception: **'AjusteFuso' is an unknown option SET OPTION PUBLIC.AjusteFuso = '0'** But this is not true, it is known option in my database! 1 - others select/update/delete/insert works normal as expected. 2 - SET OPTION works ok if i test it using sybase central. This same query was working normal using sql anywhere 9 with **sybase_query()** old API.
php
sqlanywhere
null
null
null
null
open
SQL error using sqlanywhere php API sasql_query() === I'm having problem executing a specific query using php API from sqlanywhere 12. It only happens with SET OPTION query. <?php // setup omitted for clarity here $result = sasql_query( $conn, "SET OPTION PUBLIC.AjusteFuso = '0'" ); // clean up omitted for clarity here ?> I receive the following exception: **'AjusteFuso' is an unknown option SET OPTION PUBLIC.AjusteFuso = '0'** But this is not true, it is known option in my database! 1 - others select/update/delete/insert works normal as expected. 2 - SET OPTION works ok if i test it using sybase central. This same query was working normal using sql anywhere 9 with **sybase_query()** old API.
0
9,971,773
04/02/2012 06:31:30
306,719
04/01/2010 08:57:51
1,140
1
update self reference object in db
Suppose I have an entity: class Department{ private Department parent; private long id; private String description; private String name; } Then if I create a new Department throgh the form,I will get only the id of parent of the department to be inserted. That's to say I got the following params when the form submit: department.name=xx department.parent.id=2 department.description=xxxx; Then before I insert this new object to the database,I have to set its parent by: department.setParent(depDao.queryById(department.getParent().getId())); When I insert it: getJdbcTemplate().update(insert, t.getName(), t.getDescription(), t.getParent().getId()); t.setId(queryForIdentity()); It seems that the sql query to get the parent is not necessary,how to avoid it? Add an parentId property to the Department like this? class Department{ private Department parent; private long id; private String description; private String name; private long parentId; } Is this the prefered way? If not,what is the best practice?
spring
spring-mvc
dao
null
null
null
open
update self reference object in db === Suppose I have an entity: class Department{ private Department parent; private long id; private String description; private String name; } Then if I create a new Department throgh the form,I will get only the id of parent of the department to be inserted. That's to say I got the following params when the form submit: department.name=xx department.parent.id=2 department.description=xxxx; Then before I insert this new object to the database,I have to set its parent by: department.setParent(depDao.queryById(department.getParent().getId())); When I insert it: getJdbcTemplate().update(insert, t.getName(), t.getDescription(), t.getParent().getId()); t.setId(queryForIdentity()); It seems that the sql query to get the parent is not necessary,how to avoid it? Add an parentId property to the Department like this? class Department{ private Department parent; private long id; private String description; private String name; private long parentId; } Is this the prefered way? If not,what is the best practice?
0
10,268,657
04/22/2012 14:12:54
454,049
09/21/2010 14:26:11
3,942
111
Structuring JSF file in web application
I am making a web application (JSF) and I wonder how to structure the files. I have different resources a user can interact with such as "Questions". Would I make a folder named "questions" and do the following: - index.xhtml --> Lists the questions - add.xhtml --> add new question - edit.xhtml --> edit question - show.xhtml --> show question Or would you call the files questions.xhtml, question-add.xhtml etc? **Or** are both alternatives wrong?
java
jsf
java-ee
null
null
04/22/2012 16:42:05
not constructive
Structuring JSF file in web application === I am making a web application (JSF) and I wonder how to structure the files. I have different resources a user can interact with such as "Questions". Would I make a folder named "questions" and do the following: - index.xhtml --> Lists the questions - add.xhtml --> add new question - edit.xhtml --> edit question - show.xhtml --> show question Or would you call the files questions.xhtml, question-add.xhtml etc? **Or** are both alternatives wrong?
4
11,408,472
07/10/2012 07:24:24
804,799
06/18/2011 19:27:17
936
60
match item search like Google - PHP code
I wanna write a function like this function (str, find){} such that when I have a str like > Hello every body, HeLlo and hElLo everyone blah and term find like "hello", i get the result <span class="match">Hello</span> every body, <span class="match">HeLlo</span> and <span class="match">hElLo</span> everyone blah
php
pattern-matching
preg-match
preg-match-all
null
null
open
match item search like Google - PHP code === I wanna write a function like this function (str, find){} such that when I have a str like > Hello every body, HeLlo and hElLo everyone blah and term find like "hello", i get the result <span class="match">Hello</span> every body, <span class="match">HeLlo</span> and <span class="match">hElLo</span> everyone blah
0
7,768,379
10/14/2011 13:33:20
956,629
09/21/2011 09:55:39
18
2
Bad request - Invalid Hostname Error when using ARR IP address
I'm trying to setup a simple ARR system. I have 1 ARR machine load balancing between 2 APP servers. I can reach the app sites if i use the server name of the ARR machine. (`http://arrserver/app`) But i can't do it with its IP address. (`http://10.7.10.25/app`). It gives the "Bad Request - Invalid Hostname". In the ARR machine i configured the default site's bindings to "All Unassigned","80" (default values). Do i need to change the binding rule or need additional url rewrite rules? And also, in the ARR server `http://127.0.0.1/app` doesn't work. But `http://localhost/app` works fine. Thx in advance
iis
iis7
load-balancing
null
null
null
open
Bad request - Invalid Hostname Error when using ARR IP address === I'm trying to setup a simple ARR system. I have 1 ARR machine load balancing between 2 APP servers. I can reach the app sites if i use the server name of the ARR machine. (`http://arrserver/app`) But i can't do it with its IP address. (`http://10.7.10.25/app`). It gives the "Bad Request - Invalid Hostname". In the ARR machine i configured the default site's bindings to "All Unassigned","80" (default values). Do i need to change the binding rule or need additional url rewrite rules? And also, in the ARR server `http://127.0.0.1/app` doesn't work. But `http://localhost/app` works fine. Thx in advance
0
8,709,727
01/03/2012 08:42:26
203,256
11/05/2009 08:10:15
350
24
php session &array
I have problem with session variables. When i am in root folder www.domain.com/index.php array(2) { ["sessionvariables"]=> array(6) {......} and print_r SESSION i see the vars without & in front when i am in a directory www.domain.com/directory/index.php array(2) { ["sessionvariables"]=> &array(6) {......} and print_r SESSION i see the vars WITH & in front As far as i know this is happening (the & in front of var) when register_global is On but in my case is Off This is cause me problems because it seems that session variables are register and confused with other variables in my code Any help appreciated.
arrays
session
null
null
null
01/03/2012 16:18:34
not a real question
php session &array === I have problem with session variables. When i am in root folder www.domain.com/index.php array(2) { ["sessionvariables"]=> array(6) {......} and print_r SESSION i see the vars without & in front when i am in a directory www.domain.com/directory/index.php array(2) { ["sessionvariables"]=> &array(6) {......} and print_r SESSION i see the vars WITH & in front As far as i know this is happening (the & in front of var) when register_global is On but in my case is Off This is cause me problems because it seems that session variables are register and confused with other variables in my code Any help appreciated.
1
9,606,613
03/07/2012 17:51:56
866,333
07/27/2011 21:25:29
1,161
74
What is the cost of entry/membership in the Android Marketplace?
I don't recall this information being immediately accessible. I do recall it being a one off fee of £25. Last month I read some of Samsung's bada literature stating that, by comparison, Android cost developers £25/year, while bada was free. I suspect I was reading old information, bada cost £1 for seller registration last time I checked. But I don't think Android ever cost £25/year and this was just Samsung pushing their own alternative OS.
android
android-market
cost
null
null
03/07/2012 23:21:16
off topic
What is the cost of entry/membership in the Android Marketplace? === I don't recall this information being immediately accessible. I do recall it being a one off fee of £25. Last month I read some of Samsung's bada literature stating that, by comparison, Android cost developers £25/year, while bada was free. I suspect I was reading old information, bada cost £1 for seller registration last time I checked. But I don't think Android ever cost £25/year and this was just Samsung pushing their own alternative OS.
2
5,901,004
05/05/2011 16:20:58
509,271
11/16/2010 08:55:19
95
2
Getting nginx/php-fpm to fail gracefully if uploaded file exceeds limits
At the moment, if I try to upload a file that takes too long or exceeds the maximum file size, the browser just reports that the connection has timed out. How do I get this to fail gracefully without relying on JavaScript, preferably by passing the error to PHP?
php
php5
file-upload
nginx
php5-fpm
null
open
Getting nginx/php-fpm to fail gracefully if uploaded file exceeds limits === At the moment, if I try to upload a file that takes too long or exceeds the maximum file size, the browser just reports that the connection has timed out. How do I get this to fail gracefully without relying on JavaScript, preferably by passing the error to PHP?
0
1,424,283
09/14/2009 22:53:32
95,764
04/24/2009 21:48:19
218
19
What Post-Secondary Courses do I need to be a Web Developer?
I'm going to be finishing up High School this year and moving onto either University or College. However, after looking at some course lists, I'm perplexed - what types of courses (or which category [such as computing science]) do I need to start looking at in terms of enrollment? My goal is to ultimately have a career developing websites in PHP or ASP.NET, so I know <em>what</em> I want to do; just not <em>how</em> to get there. Which types of courses have you accomplished devs taken? How have they worked out for you? Also, which type of institution generally offers the best career opportunities? By some local devs I've been advised to attend a University; despite the longer course lengths, it would apparently open more doors for me down the road. According to them, College offers a quick in/out approach to get in the work field quicker, but the credentials aren't good enough to higher-up jobs. What do you think? I'd love to hear your responses!
post-secondary
university
college
null
null
01/27/2012 20:19:44
off topic
What Post-Secondary Courses do I need to be a Web Developer? === I'm going to be finishing up High School this year and moving onto either University or College. However, after looking at some course lists, I'm perplexed - what types of courses (or which category [such as computing science]) do I need to start looking at in terms of enrollment? My goal is to ultimately have a career developing websites in PHP or ASP.NET, so I know <em>what</em> I want to do; just not <em>how</em> to get there. Which types of courses have you accomplished devs taken? How have they worked out for you? Also, which type of institution generally offers the best career opportunities? By some local devs I've been advised to attend a University; despite the longer course lengths, it would apparently open more doors for me down the road. According to them, College offers a quick in/out approach to get in the work field quicker, but the credentials aren't good enough to higher-up jobs. What do you think? I'd love to hear your responses!
2
972,600
06/09/2009 21:27:47
7,529
09/15/2008 13:54:42
641
23
Why can't I modify an object after animating it?
After executing this code... DoubleAnimation a = new DoubleAnimation(newWidth, new Duration(...)); ThicknessAnimation b = new ThicknessAnimation(new Thickness(...), new Duration(...)); border.BeginAnimation(Border.MarginProperty, b); border.BeginAnimation(Border.WidthProperty, a); ...this code no longer works (Margin does not change after assigning a new value): // doesn't have any effect border.Margin = new Thickness(...); What's going on?? Thanks!
wpf
animation
null
null
null
null
open
Why can't I modify an object after animating it? === After executing this code... DoubleAnimation a = new DoubleAnimation(newWidth, new Duration(...)); ThicknessAnimation b = new ThicknessAnimation(new Thickness(...), new Duration(...)); border.BeginAnimation(Border.MarginProperty, b); border.BeginAnimation(Border.WidthProperty, a); ...this code no longer works (Margin does not change after assigning a new value): // doesn't have any effect border.Margin = new Thickness(...); What's going on?? Thanks!
0
2,033,915
01/09/2010 16:00:06
231,485
12/14/2009 17:45:20
1
0
struct pointer manipulation
I have struct struct st { char a; short c; int b; }; struct st s1; if i print the address of &s1.b it prints 0x804a01c and &s1.b-2 prints 0x804a018 why it is printing same address 0x804a01c if i select &s1.b-1 ?
c
null
null
null
null
null
open
struct pointer manipulation === I have struct struct st { char a; short c; int b; }; struct st s1; if i print the address of &s1.b it prints 0x804a01c and &s1.b-2 prints 0x804a018 why it is printing same address 0x804a01c if i select &s1.b-1 ?
0
8,466,628
12/11/2011 19:06:31
805,420
06/19/2011 14:16:19
8
1
Determine inode usage
How could I determine what's causing high inode usage? I need something more precise than df -hi. I currently have opened millions of inodes and I would like to know what is causing this. Deleting files doesn't really help much. I'm running Debian.
linux
debian
disk
inode
du
12/12/2011 10:33:26
off topic
Determine inode usage === How could I determine what's causing high inode usage? I need something more precise than df -hi. I currently have opened millions of inodes and I would like to know what is causing this. Deleting files doesn't really help much. I'm running Debian.
2
11,632,789
07/24/2012 14:14:40
1,417,513
05/25/2012 13:34:41
3
0
C# Login to web site
I try to login to http://www.argusmedia.com/pages/SignIn.aspx using C#. But I can't find out names of form's parameters (Email and Password) which I have to POST with my WebRequest. Is it ctl00$P$SignIn$LoginForm$UserName and ctl00$P$SignIn$LoginForm$Password ? string formUrl = "http://www.argusmedia.com/pages/SignIn.aspx"; string formParams = string.Format("ctl00$P$SignIn$LoginForm$UserName={0}&ctl00$P$SignIn$LoginForm$Password={1}", mylogin, mypassword); string cookieHeader; WebRequest req = WebRequest.Create(formUrl); req.ContentType = "application/x-www-form-urlencoded"; req.Method = "POST"; byte[] bytes = Encoding.ASCII.GetBytes(formParams); req.ContentLength = bytes.Length; using (Stream os = req.GetRequestStream()) { os.Write(bytes, 0, bytes.Length); } WebResponse resp = req.GetResponse(); cookieHeader = resp.Headers["Set-cookie"]; string pageSource; using (StreamReader sr = new StreamReader(resp.GetResponseStream())) { pageSource = sr.ReadToEnd(); } But I can't login. Guess that I post wrong parameters.
c#
login
website
null
null
07/26/2012 01:10:34
too localized
C# Login to web site === I try to login to http://www.argusmedia.com/pages/SignIn.aspx using C#. But I can't find out names of form's parameters (Email and Password) which I have to POST with my WebRequest. Is it ctl00$P$SignIn$LoginForm$UserName and ctl00$P$SignIn$LoginForm$Password ? string formUrl = "http://www.argusmedia.com/pages/SignIn.aspx"; string formParams = string.Format("ctl00$P$SignIn$LoginForm$UserName={0}&ctl00$P$SignIn$LoginForm$Password={1}", mylogin, mypassword); string cookieHeader; WebRequest req = WebRequest.Create(formUrl); req.ContentType = "application/x-www-form-urlencoded"; req.Method = "POST"; byte[] bytes = Encoding.ASCII.GetBytes(formParams); req.ContentLength = bytes.Length; using (Stream os = req.GetRequestStream()) { os.Write(bytes, 0, bytes.Length); } WebResponse resp = req.GetResponse(); cookieHeader = resp.Headers["Set-cookie"]; string pageSource; using (StreamReader sr = new StreamReader(resp.GetResponseStream())) { pageSource = sr.ReadToEnd(); } But I can't login. Guess that I post wrong parameters.
3
11,669,842
07/26/2012 12:58:28
1,554,730
07/26/2012 12:53:05
1
0
Your code for sending mms
Could you explain me the part of your code? `if (parts != null) { for (MMSPart part : parts) { final PduPart partPdu = new PduPart(); partPdu.setName(part.Name.getBytes()); partPdu.setContentType(part.MimeType.getBytes()); partPdu.setData(part.Data); pduBody.addPart(partPdu); }`} I don't know what is the variable parts? Where and how i can it initialized or assign something to it?
android
mms
sending
null
null
null
open
Your code for sending mms === Could you explain me the part of your code? `if (parts != null) { for (MMSPart part : parts) { final PduPart partPdu = new PduPart(); partPdu.setName(part.Name.getBytes()); partPdu.setContentType(part.MimeType.getBytes()); partPdu.setData(part.Data); pduBody.addPart(partPdu); }`} I don't know what is the variable parts? Where and how i can it initialized or assign something to it?
0
6,707,366
07/15/2011 13:02:48
446,261
09/13/2010 11:41:51
10,914
487
PCI interface for 3D graphics programming (OpenGL?)
**Where can I find information for how the PCI interface for 3D graphics programming works?** I know that for VESA, you create access to the frame buffer at `0xf8000000` and just write to that memory range (among many other details). I was wondering where I can find how the low level PCI interface works for graphics programming? Specifically, I have the following questions: * Is there a standard PCI protocol or does this differ per graphics card vendor/model?; * Does OpenGL go over the PCI bus or is this something the graphics driver translates to a custom protocol?; * Is generic documentation available on all of this and where can I find this?
driver
gpu
low-level
pci
null
07/18/2011 14:32:26
off topic
PCI interface for 3D graphics programming (OpenGL?) === **Where can I find information for how the PCI interface for 3D graphics programming works?** I know that for VESA, you create access to the frame buffer at `0xf8000000` and just write to that memory range (among many other details). I was wondering where I can find how the low level PCI interface works for graphics programming? Specifically, I have the following questions: * Is there a standard PCI protocol or does this differ per graphics card vendor/model?; * Does OpenGL go over the PCI bus or is this something the graphics driver translates to a custom protocol?; * Is generic documentation available on all of this and where can I find this?
2
10,705,329
05/22/2012 15:38:11
648,672
03/07/2011 18:52:38
274
8
Twitter's activerecord-reputation-system gem + Devise
I am working with Twitter's new [activerecord-reputation-system][1] gem, yet it doesn't seem to be registering in my app. I ran to install (docs have a typo): gem install activerecord-reputation-system && rails generate reputation_system && rake db:migrate I've included it in my gemfile and tried pulling directly from github, as well as restarting my local server. The error is the following: > ActionController::RoutingError (undefined method `has_reputation' for #<Class:0x007fa7ed783ec0>): app/models/post.rb:18:in `<class:Post>' app/models/post.rb:1:in `<top (required)>' app/controllers/posts_controller.rb:1:in `<top (required)>' when I try to add votes to posts with this code: class Post < ActiveRecord::Base belongs_to :user has_reputation :votes, :source => :user, :aggregated_by => :sum end When I try to add votes to users with the same code I get: undefined method `has_reputation' for #<Class:0x007fa7efb70388> app/models/user.rb:17:in `<class:User>' app/models/user.rb:1:in `<top (required)>' config/routes.rb:4:in `block in <top (required)>' config/routes.rb:1:in `<top (required)>' This error occurred while loading the following files: /Users/username/appname/config/routes.rb routes.rb, Line 4: > devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } Any ideas? [1]: https://github.com/twitter/activerecord-reputation-system/issues?state=open
ruby-on-rails
ruby-on-rails-3
twitter
routing
gem
null
open
Twitter's activerecord-reputation-system gem + Devise === I am working with Twitter's new [activerecord-reputation-system][1] gem, yet it doesn't seem to be registering in my app. I ran to install (docs have a typo): gem install activerecord-reputation-system && rails generate reputation_system && rake db:migrate I've included it in my gemfile and tried pulling directly from github, as well as restarting my local server. The error is the following: > ActionController::RoutingError (undefined method `has_reputation' for #<Class:0x007fa7ed783ec0>): app/models/post.rb:18:in `<class:Post>' app/models/post.rb:1:in `<top (required)>' app/controllers/posts_controller.rb:1:in `<top (required)>' when I try to add votes to posts with this code: class Post < ActiveRecord::Base belongs_to :user has_reputation :votes, :source => :user, :aggregated_by => :sum end When I try to add votes to users with the same code I get: undefined method `has_reputation' for #<Class:0x007fa7efb70388> app/models/user.rb:17:in `<class:User>' app/models/user.rb:1:in `<top (required)>' config/routes.rb:4:in `block in <top (required)>' config/routes.rb:1:in `<top (required)>' This error occurred while loading the following files: /Users/username/appname/config/routes.rb routes.rb, Line 4: > devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } Any ideas? [1]: https://github.com/twitter/activerecord-reputation-system/issues?state=open
0
4,646,884
01/10/2011 12:37:07
559,208
12/31/2010 11:08:32
73
0
Why First arg is in a register, stdarg.h?
In stdarg.h header file they had written that "warning First arg is in a register, stdarg.h cannot take its address" Why the first argument will be stored in register?
c
null
null
null
null
01/11/2011 11:06:03
not a real question
Why First arg is in a register, stdarg.h? === In stdarg.h header file they had written that "warning First arg is in a register, stdarg.h cannot take its address" Why the first argument will be stored in register?
1
10,368,910
04/29/2012 01:10:16
1,321,507
04/09/2012 08:58:18
33
0
CheckBox and selectedObjects
In a table I have three attributes: name (string), (date) and selection (bool). With the following code I pull each selected date and execute calculations. for (FesteGruppo *festeGruppoEntity in arrayController_.selectedObjects) { if ([buttonCell state]==NSOffState) { NSDateComponents *festeGruppoEntityComponents = [[NSCalendar currentCalendar] components:(NSEraCalendarUnit | NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit) fromDate:festeGruppoEntity.data]; NSString *nomeFesta = festeGruppoEntity.nome; As you can see there is an "if" going to check if the check box of the row is selected or not. Everything works properly when table elements are all ticked and selected, or if all are not ticked and selected. I would like that would work even in the case in which there are elements ticked and not ticked. How can I do this?
objective-c
xcode
core-data
nsarray
nsarraycontroller
null
open
CheckBox and selectedObjects === In a table I have three attributes: name (string), (date) and selection (bool). With the following code I pull each selected date and execute calculations. for (FesteGruppo *festeGruppoEntity in arrayController_.selectedObjects) { if ([buttonCell state]==NSOffState) { NSDateComponents *festeGruppoEntityComponents = [[NSCalendar currentCalendar] components:(NSEraCalendarUnit | NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit) fromDate:festeGruppoEntity.data]; NSString *nomeFesta = festeGruppoEntity.nome; As you can see there is an "if" going to check if the check box of the row is selected or not. Everything works properly when table elements are all ticked and selected, or if all are not ticked and selected. I would like that would work even in the case in which there are elements ticked and not ticked. How can I do this?
0
7,197,800
08/25/2011 22:05:52
246,568
01/08/2010 17:08:16
1,727
114
iOS -- trying to setup a dictionary of locks
I have some code that takes an NSString as input and uses that string to create an object. I need to make sure that it does not operate on the same string twice, e.g. if called from different threads, or even if the same thread tries to do it recursively. I can make a start by making a dictionary of my initialized objects and grabbing that object if passed the same string again. But this still leaves the problem of what happens when the object is requested a second time while other code is initializing it. I see that Apple has provided me with the NSLock class. I am at a loss as to how to apply it to my problem. I see Apple lets me name my locks, but I don't see any way to access the lock with a given name. I suppose I could make a dictionary of locks, but even that does not seem bulletproof -- what if two threads try to make the lock of the same name at the same time? Can anyone point me in the right direction here?
iphone
locking
nslock
null
null
null
open
iOS -- trying to setup a dictionary of locks === I have some code that takes an NSString as input and uses that string to create an object. I need to make sure that it does not operate on the same string twice, e.g. if called from different threads, or even if the same thread tries to do it recursively. I can make a start by making a dictionary of my initialized objects and grabbing that object if passed the same string again. But this still leaves the problem of what happens when the object is requested a second time while other code is initializing it. I see that Apple has provided me with the NSLock class. I am at a loss as to how to apply it to my problem. I see Apple lets me name my locks, but I don't see any way to access the lock with a given name. I suppose I could make a dictionary of locks, but even that does not seem bulletproof -- what if two threads try to make the lock of the same name at the same time? Can anyone point me in the right direction here?
0
11,097,655
06/19/2012 08:56:34
1,271,089
03/15/2012 08:50:56
1
0
How to Create custom android update.zip file to System.img?
I have download a CM9 Rom from xda-developers.com. How can put the file to my android AVD Emulator. I have search many site but no use. Many sites are telling system.img to system folder using unyaffs win tool. How can i convert the system folder to system.img. My machine config:- win7 ultimate 32bit. i already installed cygwin. pls guide me step by step instruction. Any one pls help, Thank you.
android
android-emulator
null
null
null
06/20/2012 21:10:03
off topic
How to Create custom android update.zip file to System.img? === I have download a CM9 Rom from xda-developers.com. How can put the file to my android AVD Emulator. I have search many site but no use. Many sites are telling system.img to system folder using unyaffs win tool. How can i convert the system folder to system.img. My machine config:- win7 ultimate 32bit. i already installed cygwin. pls guide me step by step instruction. Any one pls help, Thank you.
2
7,142,387
08/22/2011 01:36:09
297,060
03/19/2010 03:10:25
15
0
Can I use membase as database?
I want to make some product to offer key-value data system. but local memory is limited. so, I try to use membase as database. but membase is cache. i afraid whether the data stored in membase is go away or not. can i use membase as databse ? it is safe? thank you.
membase
null
null
null
null
null
open
Can I use membase as database? === I want to make some product to offer key-value data system. but local memory is limited. so, I try to use membase as database. but membase is cache. i afraid whether the data stored in membase is go away or not. can i use membase as databse ? it is safe? thank you.
0
7,374,568
09/10/2011 20:40:29
935,457
09/08/2011 17:58:45
8
0
publishing content from outlook to facebook
Is it possible to publish an email from outlook express to say facebook. If yes which is the best method to do this? I am looking a way to do this programmatically. Thanks
social-networking
outlook-addin
publish
null
null
09/11/2011 15:19:05
not a real question
publishing content from outlook to facebook === Is it possible to publish an email from outlook express to say facebook. If yes which is the best method to do this? I am looking a way to do this programmatically. Thanks
1
11,324,328
07/04/2012 07:28:52
1,498,565
07/03/2012 11:04:27
1
2
Google Chat using php and javascript
<br> I want to integrate google chat into my web application. <br> Whatever code i get from searching is not completely helpful for me so please if anyone as solution for that provide me. <br> <br> Thanks
php
null
null
null
null
07/04/2012 08:32:44
not a real question
Google Chat using php and javascript === <br> I want to integrate google chat into my web application. <br> Whatever code i get from searching is not completely helpful for me so please if anyone as solution for that provide me. <br> <br> Thanks
1
9,052,697
01/29/2012 11:08:14
1,148,922
01/14/2012 04:48:53
1
0
using urllib for collecting the urls
i need to collect the url by using urllib. - first i need to do the process from my account in the site,so first i need to log in to that site. - in that particular site there is a small box called enter the number,i collected the numbers from another sit and kept it in one folder on my desktop there are 10000 numbers in this folder.now giving each and every number and then press enter then i need to collect the url for this all numbers. - this all urls i need to save in one folder. i did this in selenium,but now i need to do this by using urllib.iam not having any idea about this any one can you plz help me.thank's in advance.my python version is 2.6.2
python
urllib
null
null
null
01/29/2012 16:45:53
not a real question
using urllib for collecting the urls === i need to collect the url by using urllib. - first i need to do the process from my account in the site,so first i need to log in to that site. - in that particular site there is a small box called enter the number,i collected the numbers from another sit and kept it in one folder on my desktop there are 10000 numbers in this folder.now giving each and every number and then press enter then i need to collect the url for this all numbers. - this all urls i need to save in one folder. i did this in selenium,but now i need to do this by using urllib.iam not having any idea about this any one can you plz help me.thank's in advance.my python version is 2.6.2
1
7,941,532
10/29/2011 20:38:03
849,163
07/17/2011 23:57:12
1
0
How does one determine if all messages in an Azure Queue have been processed?
I've just begun tinkering with Windows Azure and would appreciate help with a question. How does one determine if a Windows Azure Queue is empty and that all work-items in it have been processed? If I have multiple worker processes querying a work-item queue, GetMessage(s) returns no messages if the queue is empty. But there is no guarantee that a currently invisible message will not be pushed back into the queue. I need this functionality since follow-up behavior of my workflow depends on completion of all work-items in that particular queue. A possible way of tackling this problem would be to count the number of puts and deletes. But this will again require synchronization at a shared storage level and I would like to avoid it if possible. Any ideas?
azure
windows-azure-storage
windows-azure-queues
null
null
null
open
How does one determine if all messages in an Azure Queue have been processed? === I've just begun tinkering with Windows Azure and would appreciate help with a question. How does one determine if a Windows Azure Queue is empty and that all work-items in it have been processed? If I have multiple worker processes querying a work-item queue, GetMessage(s) returns no messages if the queue is empty. But there is no guarantee that a currently invisible message will not be pushed back into the queue. I need this functionality since follow-up behavior of my workflow depends on completion of all work-items in that particular queue. A possible way of tackling this problem would be to count the number of puts and deletes. But this will again require synchronization at a shared storage level and I would like to avoid it if possible. Any ideas?
0
6,094,108
05/23/2011 07:26:23
451,089
09/17/2010 21:53:32
56
1
My Visual Studio is missing Microsoft.VisualStudio.QualityTools.UnitTestFramework
I configured now a new computer. Installed VS 2010 and all necessary component, got my running project on that new computer.. Compiling the project shows me that VS 2010 cannot find the reference "Microsoft.VisualStudio.QualityTools.UnitTestFramework". This assembly is located in Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies But VS is not able to find it. The used project is OK. It can be compiled on my old machine!
visual-studio
reference
null
null
null
null
open
My Visual Studio is missing Microsoft.VisualStudio.QualityTools.UnitTestFramework === I configured now a new computer. Installed VS 2010 and all necessary component, got my running project on that new computer.. Compiling the project shows me that VS 2010 cannot find the reference "Microsoft.VisualStudio.QualityTools.UnitTestFramework". This assembly is located in Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies But VS is not able to find it. The used project is OK. It can be compiled on my old machine!
0
2,033,418
01/09/2010 12:56:38
247,063
01/09/2010 12:56:38
1
0
what is the best system to run django on, operating sysyem, database, web server etc considering robustness, simplicity, maintence cost, maintence reliability, pricing, upgrades for the application and upgrade of the django and other system component
any body knows?
django
null
null
null
null
08/01/2012 02:22:12
not constructive
what is the best system to run django on, operating sysyem, database, web server etc considering robustness, simplicity, maintence cost, maintence reliability, pricing, upgrades for the application and upgrade of the django and other system component === any body knows?
4
6,922,086
08/03/2011 05:34:19
712,997
04/18/2011 07:49:04
128
1
proprietary driver - does this nullify rights?
if I use a proprietary driver in a software/hardware (based in linux) product I develop, can I still sell it/own rights to its use? Just curious.
linux
driver
rights
proprietary-software
null
08/03/2011 18:18:50
not constructive
proprietary driver - does this nullify rights? === if I use a proprietary driver in a software/hardware (based in linux) product I develop, can I still sell it/own rights to its use? Just curious.
4
4,735,309
01/19/2011 12:36:51
578,871
01/17/2011 17:44:32
3
0
FW generated css full width issue
i have recently generated css using Fireworks cs5 and i cannot seem to set my my header full width.I have been trying various solutions but none has worked very well so far.I need Div2 which is my header to be full width. Here is the code. @charset "utf-8"; body { background-color: #fff; font-size: 62.5%; margin: 0; padding: 0; } body * { font-size: 100%; } h1, h2, h3, h4, h5, h6 { font-weight: normal; } p { margin-bottom: 1.1em; margin-top: 0; } #main p.lastNode { margin-bottom: 0; } a:link img, a:visited img { border: none; } div.clearFloat { clear: both; font-size: 0; height: 0; line-height: 0px; } li.clearFloat { clear: both; } ul.symbolList { display: inline; float: left; list-style-type: none; margin: 0; padding: 0; } .AbsWrap { position: relative; width: 100%; } .rowWrap { width: 100%; } #main { margin: 0 auto; width: 960px; } #Div { margin-left: 0px; margin-top: 0px; display: inline; float: left; margin-bottom: 0; background-color: #333; width: 960px; padding-top: 0px; height: 849px; } html > body #Div { height: auto; min-height: 850px; } #Div2 { margin-left: 0px; margin-top: 0px; display: inline; float: left; margin-bottom: 0; background-color: #e8807d; width: 960px; padding-top: 0px; height: 99px; } html > body #Div2 { height: auto; min-height: 100px; }
css
null
null
null
null
null
open
FW generated css full width issue === i have recently generated css using Fireworks cs5 and i cannot seem to set my my header full width.I have been trying various solutions but none has worked very well so far.I need Div2 which is my header to be full width. Here is the code. @charset "utf-8"; body { background-color: #fff; font-size: 62.5%; margin: 0; padding: 0; } body * { font-size: 100%; } h1, h2, h3, h4, h5, h6 { font-weight: normal; } p { margin-bottom: 1.1em; margin-top: 0; } #main p.lastNode { margin-bottom: 0; } a:link img, a:visited img { border: none; } div.clearFloat { clear: both; font-size: 0; height: 0; line-height: 0px; } li.clearFloat { clear: both; } ul.symbolList { display: inline; float: left; list-style-type: none; margin: 0; padding: 0; } .AbsWrap { position: relative; width: 100%; } .rowWrap { width: 100%; } #main { margin: 0 auto; width: 960px; } #Div { margin-left: 0px; margin-top: 0px; display: inline; float: left; margin-bottom: 0; background-color: #333; width: 960px; padding-top: 0px; height: 849px; } html > body #Div { height: auto; min-height: 850px; } #Div2 { margin-left: 0px; margin-top: 0px; display: inline; float: left; margin-bottom: 0; background-color: #e8807d; width: 960px; padding-top: 0px; height: 99px; } html > body #Div2 { height: auto; min-height: 100px; }
0
5,609,807
04/10/2011 04:37:29
700,486
04/10/2011 01:45:01
1
0
iOS Getter and Setter confusion.
I think that I am a bit confused about iOS @property getter and setters. I am trying to set an NSString iVar in my AppDelegate.h file from another class so that it can be used by all of the classes in the project? For example, I am working on an iPhone project that stores an iVar NSString *currentUser in AppDelegate.h. I need to be able to set this through one method in a ViewController.m and then get it through another method in a second ViewController? Maybe Getter and Setter is the wrong direction of attack all together? I understand that i don't want to alloc init the AppDelegate as the iVar will only exist in that object and I want it accessible to ALL objects in ALL classes? Please someone set me straight. All the best, Darren
ios
iphone-sdk-4.0
ios4
null
null
null
open
iOS Getter and Setter confusion. === I think that I am a bit confused about iOS @property getter and setters. I am trying to set an NSString iVar in my AppDelegate.h file from another class so that it can be used by all of the classes in the project? For example, I am working on an iPhone project that stores an iVar NSString *currentUser in AppDelegate.h. I need to be able to set this through one method in a ViewController.m and then get it through another method in a second ViewController? Maybe Getter and Setter is the wrong direction of attack all together? I understand that i don't want to alloc init the AppDelegate as the iVar will only exist in that object and I want it accessible to ALL objects in ALL classes? Please someone set me straight. All the best, Darren
0
10,300,068
04/24/2012 14:30:27
1,353,952
04/24/2012 14:24:33
1
0
JavaScript working in IE but not in Firefox
function onLoadMoneyEarned(size){ for(var i=1;i<=size;i++){ var countStr1 = 'howOften__JB1_'+i; var countStr2 = 'howOften__JB2_'+i; var countStr3 = 'howOften__JB3_'+i; var countStr4 = 'howOften__JB4_'+i; var hrsPerWeek1 = 'hrsPerWeek__JB1_'+i var hrsPerWeek2 = 'hrsPerWeek__JB2_'+i var hrsPerWeek3 = 'hrsPerWeek__JB3_'+i var hrsPerWeek4 = 'hrsPerWeek__JB4_'+i var dropDownValue1 = document.getElementById(countStr1).value; var dropDownValue2 = document.getElementById(countStr2).value; var dropDownValue3 = document.getElementById(countStr3).value; var dropDownValue4 = document.getElementById(countStr4).value; var textbox1 = document.getElementById(hrsPerWeek1); textbox1.disabled = true; var textbox2 = document.getElementById(hrsPerWeek2); textbox2.disabled = true; var textbox3 = document.getElementById(hrsPerWeek3); textbox3.disabled = true; var textbox4 = document.getElementById(hrsPerWeek4); textbox4.disabled = true; if(dropDownValue1=="HR"){ textbox1.disabled = false; } if(dropDownValue2=="HR"){ textbox2.disabled = false; } if(dropDownValue3=="HR"){ textbox3.disabled = false; } if(dropDownValue4=="HR"){ textbox4.disabled = false; } } This is the one working in IE.. In JSp I am calling the script like this <script language="javascript" type="text/javascript"> $(window).load(function(){onLoadMoneyEarned("<%=nameLength%>");}); </script> The main function of this script to enable the number of hours text field only if we select hourly in the dropdown beside it..But it is throwing validation errors in Firefox Any Help appreciated
javascript
jsp
null
null
null
null
open
JavaScript working in IE but not in Firefox === function onLoadMoneyEarned(size){ for(var i=1;i<=size;i++){ var countStr1 = 'howOften__JB1_'+i; var countStr2 = 'howOften__JB2_'+i; var countStr3 = 'howOften__JB3_'+i; var countStr4 = 'howOften__JB4_'+i; var hrsPerWeek1 = 'hrsPerWeek__JB1_'+i var hrsPerWeek2 = 'hrsPerWeek__JB2_'+i var hrsPerWeek3 = 'hrsPerWeek__JB3_'+i var hrsPerWeek4 = 'hrsPerWeek__JB4_'+i var dropDownValue1 = document.getElementById(countStr1).value; var dropDownValue2 = document.getElementById(countStr2).value; var dropDownValue3 = document.getElementById(countStr3).value; var dropDownValue4 = document.getElementById(countStr4).value; var textbox1 = document.getElementById(hrsPerWeek1); textbox1.disabled = true; var textbox2 = document.getElementById(hrsPerWeek2); textbox2.disabled = true; var textbox3 = document.getElementById(hrsPerWeek3); textbox3.disabled = true; var textbox4 = document.getElementById(hrsPerWeek4); textbox4.disabled = true; if(dropDownValue1=="HR"){ textbox1.disabled = false; } if(dropDownValue2=="HR"){ textbox2.disabled = false; } if(dropDownValue3=="HR"){ textbox3.disabled = false; } if(dropDownValue4=="HR"){ textbox4.disabled = false; } } This is the one working in IE.. In JSp I am calling the script like this <script language="javascript" type="text/javascript"> $(window).load(function(){onLoadMoneyEarned("<%=nameLength%>");}); </script> The main function of this script to enable the number of hours text field only if we select hourly in the dropdown beside it..But it is throwing validation errors in Firefox Any Help appreciated
0
6,955,826
08/05/2011 11:53:32
844,365
07/14/2011 10:42:43
24
0
Publishing PAID app in android market - India
I want to publish a paid app in android market. But I do not see India when registering to merchant account. Can
android
null
null
null
null
08/05/2011 12:22:22
off topic
Publishing PAID app in android market - India === I want to publish a paid app in android market. But I do not see India when registering to merchant account. Can
2
8,895,105
01/17/2012 13:06:38
978,114
10/04/2011 09:02:40
1
0
How to get site collection url using javascript?
I am stuck up in a requirement where i need to get the site collection url to pass in a function. Please help?
javascript
sharepoint
sharepoint2007
null
null
01/18/2012 10:09:48
not a real question
How to get site collection url using javascript? === I am stuck up in a requirement where i need to get the site collection url to pass in a function. Please help?
1
7,258,624
08/31/2011 14:37:45
666,533
03/08/2011 02:42:17
83
5
(git) How to merge all revision from doesn't existing branch into other branch?
I have 3 branch in my git repo: **master**, **stand** and **develop**. For each feature i create new brach from **develop**. After feature done, i'll merge it branch into **develop** (with *--no-ff* option). For example, i have 3 feature (**f1**, **f2**, **f3**) merged branches in **develop**. And now i want to "put" **f1** and **f3** to **stand** branch (it have more than one commit in it and i can't use *cherry-pick*) what should i do? Sure, i can create *cherry-pick* script for revision range merging, but maybe, i have a better way to merge it (by old branch name, or something else). my repo: develop --- / stand --- / master --- feature branches: f1 f2 f3 / \ / \ / \ develop ---------------- i want: f1 f2 f3 develop ---------------- stand ----- ------- Thanks.
git
merge
null
null
null
null
open
(git) How to merge all revision from doesn't existing branch into other branch? === I have 3 branch in my git repo: **master**, **stand** and **develop**. For each feature i create new brach from **develop**. After feature done, i'll merge it branch into **develop** (with *--no-ff* option). For example, i have 3 feature (**f1**, **f2**, **f3**) merged branches in **develop**. And now i want to "put" **f1** and **f3** to **stand** branch (it have more than one commit in it and i can't use *cherry-pick*) what should i do? Sure, i can create *cherry-pick* script for revision range merging, but maybe, i have a better way to merge it (by old branch name, or something else). my repo: develop --- / stand --- / master --- feature branches: f1 f2 f3 / \ / \ / \ develop ---------------- i want: f1 f2 f3 develop ---------------- stand ----- ------- Thanks.
0
8,640,145
12/27/2011 00:24:08
488,652
10/27/2010 10:01:43
81
0
Resources for learning HTML5 with Ruby on Rails
I initial went through some tutorials on ROR. Then Later on HTML5. But I don't really understand how to use HTML5 with ROR. It'll be great if you know of some resources which can help me to get a hang of things. Thanks!
ruby-on-rails
html5
null
null
null
12/27/2011 21:54:18
not a real question
Resources for learning HTML5 with Ruby on Rails === I initial went through some tutorials on ROR. Then Later on HTML5. But I don't really understand how to use HTML5 with ROR. It'll be great if you know of some resources which can help me to get a hang of things. Thanks!
1
9,174,677
02/07/2012 10:34:12
1,194,397
02/07/2012 10:28:13
1
0
Which database?
I'm a java developer, currently starting developing a hospital management system that will server patients, doctors, accountant, .... etc the system is really huge that may have 900,000 records/day, data is really growing so fast, for that i'm confusing in which database to use since i have the following options: (Percona Server(Mysql), Oracle, SQLServer), since the application will run on network with average of 45 online users. I hope to find a good answers here. Thanks in advance
sql
database
oracle
percona
null
02/07/2012 11:00:12
not constructive
Which database? === I'm a java developer, currently starting developing a hospital management system that will server patients, doctors, accountant, .... etc the system is really huge that may have 900,000 records/day, data is really growing so fast, for that i'm confusing in which database to use since i have the following options: (Percona Server(Mysql), Oracle, SQLServer), since the application will run on network with average of 45 online users. I hope to find a good answers here. Thanks in advance
4
3,764,291
09/21/2010 20:39:15
187,730
10/10/2009 17:45:27
201
12
How to see if a internet is avaiable using python?
I want to see if I can access one online api but for that I need to have internet avaiable. How can I see if there's a internet connection avaiable and active using Python?
python
connection
internet
null
null
05/06/2012 23:25:44
not a real question
How to see if a internet is avaiable using python? === I want to see if I can access one online api but for that I need to have internet avaiable. How can I see if there's a internet connection avaiable and active using Python?
1
5,766,159
04/23/2011 18:43:09
310,291
03/02/2010 15:22:39
2,709
17
Will java support equivalent of C# CODEDOM one day ?
Seems java doesn't support CODEDOM equivalent: http://stackoverflow.com/questions/2623726/java-code-generation-metaprogramming-reflection-wtv Code Generation through code template as suggested in post above is not equivalent to codedom but rather equivalent to C# T4. So does java has any will to support it in some future release ?
c#
java
.net
null
null
04/25/2011 15:54:42
not a real question
Will java support equivalent of C# CODEDOM one day ? === Seems java doesn't support CODEDOM equivalent: http://stackoverflow.com/questions/2623726/java-code-generation-metaprogramming-reflection-wtv Code Generation through code template as suggested in post above is not equivalent to codedom but rather equivalent to C# T4. So does java has any will to support it in some future release ?
1
7,475,521
09/19/2011 18:25:17
445,018
09/11/2010 09:21:20
1
1
How healthy is your Ruby on Rails project?
Over the last five years I have been involved with lots of RoR based projects. I personally feel that though much talked about I rarely see RoR projects following all the good practices. I would like to know from the community here, if you were asked to lead a project whose code is already written almost (client's favorite way of saying ;) need not be right!) how do you evaluate the healthiness of the project code base! What is the approach do you use to evaluate? What are the best tools that come into handy? Do you have any standard procedure to speed up the process? Thanks in advance!
ruby-on-rails
ruby
coding-style
null
null
09/19/2011 18:51:49
off topic
How healthy is your Ruby on Rails project? === Over the last five years I have been involved with lots of RoR based projects. I personally feel that though much talked about I rarely see RoR projects following all the good practices. I would like to know from the community here, if you were asked to lead a project whose code is already written almost (client's favorite way of saying ;) need not be right!) how do you evaluate the healthiness of the project code base! What is the approach do you use to evaluate? What are the best tools that come into handy? Do you have any standard procedure to speed up the process? Thanks in advance!
2
9,970,468
04/02/2012 03:12:22
1,104,458
12/18/2011 12:32:28
61
1
"Cannot fully validate proxy" message with RequestFactory
While working on an AppEngine connected Android project, I occasionally have problems with RequestFactory validation, such as the following warning I see in the error log: > Cannot fully validate proxy since type foo is not available Add > @SuppressWarnings("requestfactory") to dismiss. This is usually fixed by edited some of the files in the project, saving, which forces a re-build, and presumably, a re-validation. And type "foo" has always been available, I don't know why it occasionally thinks it is not available. I don't know how to force a re-validation, or what causes it to re-validate when I edit, but sometimes I can't get it to re-validate at all, like now. Since this question is vague, I'm simply asking for some general direction on where to look to begin fixing this problem. Thanks.
android
requestfactory
null
null
null
null
open
"Cannot fully validate proxy" message with RequestFactory === While working on an AppEngine connected Android project, I occasionally have problems with RequestFactory validation, such as the following warning I see in the error log: > Cannot fully validate proxy since type foo is not available Add > @SuppressWarnings("requestfactory") to dismiss. This is usually fixed by edited some of the files in the project, saving, which forces a re-build, and presumably, a re-validation. And type "foo" has always been available, I don't know why it occasionally thinks it is not available. I don't know how to force a re-validation, or what causes it to re-validate when I edit, but sometimes I can't get it to re-validate at all, like now. Since this question is vague, I'm simply asking for some general direction on where to look to begin fixing this problem. Thanks.
0
6,424,568
06/21/2011 11:33:17
736,036
05/03/2011 11:29:27
39
4
How to change font color in a loadedHtml text.
I have save a string like this.. NSString *loadString = [NSString stringWithFormat:@"<html><body><font color=\"white\">%@</font></body></html>", string]; Now i want to load this string in a webview using [webView loadHTMLString:loadString baseURL:nil]; now when the webpage is loaded the colour is default as black. I want to change the colour to white but m unable to do so. any suggestion how can i change the font colour.Thanks.
html
objective-c
xcode
apple
null
null
open
How to change font color in a loadedHtml text. === I have save a string like this.. NSString *loadString = [NSString stringWithFormat:@"<html><body><font color=\"white\">%@</font></body></html>", string]; Now i want to load this string in a webview using [webView loadHTMLString:loadString baseURL:nil]; now when the webpage is loaded the colour is default as black. I want to change the colour to white but m unable to do so. any suggestion how can i change the font colour.Thanks.
0
9,386,538
02/21/2012 22:46:32
975,239
10/02/2011 08:43:13
9
0
Timer for threads in c programming language
At the main of code,i want to create a thread(mythread) and stop main for 20Sec,and at this time(20Sec) mythread is processed and after 20Sec main is resumed.What am i do?
c
multithreading
pthreads
null
null
02/21/2012 23:47:15
not a real question
Timer for threads in c programming language === At the main of code,i want to create a thread(mythread) and stop main for 20Sec,and at this time(20Sec) mythread is processed and after 20Sec main is resumed.What am i do?
1
7,763,995
10/14/2011 06:46:15
301,336
03/25/2010 00:46:46
468
19
Silverlight: How to Create a VisualState for a Templated / Custom Control
I'm trying to create a templated/custom control in Silverlight. The base control can be a `System.Windows.Controls.Button`. The button has the following visual states: <vsm:VisualStateManager.VisualStateGroups> <!--Define the states for the common states. The states in a VisualStateGroup are mutually exclusive to each other.--> <vsm:VisualStateGroup x:Name="CommonStates"> <!--Define the VisualStates in this VistualStateGroup.--> <vsm:VisualState x:Name="Normal"/> <vsm:VisualState x:Name="MouseOver" /> <vsm:VisualState x:Name="Pressed" /> <vsm:VisualState x:Name="Disabled" /> </vsm:VisualStateGroup> <!--Define the states for the focus states. The states in a VisualStateGroup are mutually exclusive to each other.--> <vsm:VisualStateGroup x:Name="FocusStates"> <!--Define the VisualStates in this VistualStateGroup.--> <vsm:VisualState x:Name="Focused" /> <vsm:VisualState x:Name="Unfocused" /> </vsm:VisualStateGroup> </vsm:VisualStateManager.VisualStateGroups> My custom control requires another state, `MouseButtonUp` (`MouseButtonDown` can be represented by the predefined `Pressed` state). Here, the `MouseButtonUp` state will be interpreted as a `MouseOver` state by default, but I want the `MouseButtonUp` state behaves differently from a `MouseOver` state. How can I add this `MouseButtonUp` visual state? (`MouseButtonUp` states only exists after the user releases the mouse and before the user starts moving. BTW: Should I use Custom Control or User Control? I've been very confused about these two. It seems both of them would work in lots of cases. Thanks a lot.
silverlight
custom-controls
controltemplate
visualstates
null
null
open
Silverlight: How to Create a VisualState for a Templated / Custom Control === I'm trying to create a templated/custom control in Silverlight. The base control can be a `System.Windows.Controls.Button`. The button has the following visual states: <vsm:VisualStateManager.VisualStateGroups> <!--Define the states for the common states. The states in a VisualStateGroup are mutually exclusive to each other.--> <vsm:VisualStateGroup x:Name="CommonStates"> <!--Define the VisualStates in this VistualStateGroup.--> <vsm:VisualState x:Name="Normal"/> <vsm:VisualState x:Name="MouseOver" /> <vsm:VisualState x:Name="Pressed" /> <vsm:VisualState x:Name="Disabled" /> </vsm:VisualStateGroup> <!--Define the states for the focus states. The states in a VisualStateGroup are mutually exclusive to each other.--> <vsm:VisualStateGroup x:Name="FocusStates"> <!--Define the VisualStates in this VistualStateGroup.--> <vsm:VisualState x:Name="Focused" /> <vsm:VisualState x:Name="Unfocused" /> </vsm:VisualStateGroup> </vsm:VisualStateManager.VisualStateGroups> My custom control requires another state, `MouseButtonUp` (`MouseButtonDown` can be represented by the predefined `Pressed` state). Here, the `MouseButtonUp` state will be interpreted as a `MouseOver` state by default, but I want the `MouseButtonUp` state behaves differently from a `MouseOver` state. How can I add this `MouseButtonUp` visual state? (`MouseButtonUp` states only exists after the user releases the mouse and before the user starts moving. BTW: Should I use Custom Control or User Control? I've been very confused about these two. It seems both of them would work in lots of cases. Thanks a lot.
0
7,250,097
08/30/2011 21:33:55
75,846
03/09/2009 21:36:04
126
2
Trying to refactor to Null object pattern but the end result seems worse
I'm refactoring a big class that has a lot of checks for null all over the place into using the null object pattern. So far it's been an almost smooth change but I am having a couple of issues with the end result and I would like to know if there is a better or different approach or even to go back the way it was. The biggest problem is that I have the following code: IMyObject myObject = GetMyObject(); if(myObject != null && !myObject.BooleanProperty) DoSomething(); So as you can see I could probably remove the null check from this condition but I have a boolean property which if set to the default value will execute a piece of code. If I always return true I might introduce subtle bugs that would be painful to find and eliminate. Another problem is that I've had to modify a check from null like this: if(myObject.GetType() != typeof(MyNullObject)) return false; DoSomething(); This is just plain ugly since instead of just checking for null, now I have to check the type. This kind of situation happens three times in the class since I am not returning one of the object's properties or executing one of its methods I must do this check. And lastly the object has a couple of DateTime properties which are not nullable and the architect does not want them to be nullable. Again by having the MinDate value as default some nasty bugs could crawl into the code. So there you have it. Is this a case in which the null object pattern is just worse than the spaghetti null checks scattered all over? Is there a better way to accomplish this? Thanks for your answers.
c#
refactoring
null-object-pattern
null-object
null
null
open
Trying to refactor to Null object pattern but the end result seems worse === I'm refactoring a big class that has a lot of checks for null all over the place into using the null object pattern. So far it's been an almost smooth change but I am having a couple of issues with the end result and I would like to know if there is a better or different approach or even to go back the way it was. The biggest problem is that I have the following code: IMyObject myObject = GetMyObject(); if(myObject != null && !myObject.BooleanProperty) DoSomething(); So as you can see I could probably remove the null check from this condition but I have a boolean property which if set to the default value will execute a piece of code. If I always return true I might introduce subtle bugs that would be painful to find and eliminate. Another problem is that I've had to modify a check from null like this: if(myObject.GetType() != typeof(MyNullObject)) return false; DoSomething(); This is just plain ugly since instead of just checking for null, now I have to check the type. This kind of situation happens three times in the class since I am not returning one of the object's properties or executing one of its methods I must do this check. And lastly the object has a couple of DateTime properties which are not nullable and the architect does not want them to be nullable. Again by having the MinDate value as default some nasty bugs could crawl into the code. So there you have it. Is this a case in which the null object pattern is just worse than the spaghetti null checks scattered all over? Is there a better way to accomplish this? Thanks for your answers.
0
9,750,862
03/17/2012 14:43:02
872,130
08/01/2011 03:09:52
6
0
how do I get a copy of articles of incorporation from the Secretary of State in New York to satisfy Apple's developer registration requirements?
I have created an LLC that I intend to use to do business on the iPhone app store. Apple asked for copies of documents verifying the identity of my business. I sent them a copy of the filing receipt for my articles of incorporation that I got when I created my LLC. They called me and said they need copies of the actual articles of incorporation with the seal of the Secretary of State of New York. I spent an hour googling ways to request them from the Secretary of State but all I learned was that the government of New York is an impenetrable bureaucracy (which I already knew). There seem to be these people called registered agents who can do it for a fee. Should I go through one of them or are they just trying to rip me off? Any help would be much appreciated. My app is all ready to go and it's frustrating to be delayed by this kind of thing. Thanks, Dessie
iphone
apple
null
null
null
03/17/2012 15:57:19
off topic
how do I get a copy of articles of incorporation from the Secretary of State in New York to satisfy Apple's developer registration requirements? === I have created an LLC that I intend to use to do business on the iPhone app store. Apple asked for copies of documents verifying the identity of my business. I sent them a copy of the filing receipt for my articles of incorporation that I got when I created my LLC. They called me and said they need copies of the actual articles of incorporation with the seal of the Secretary of State of New York. I spent an hour googling ways to request them from the Secretary of State but all I learned was that the government of New York is an impenetrable bureaucracy (which I already knew). There seem to be these people called registered agents who can do it for a fee. Should I go through one of them or are they just trying to rip me off? Any help would be much appreciated. My app is all ready to go and it's frustrating to be delayed by this kind of thing. Thanks, Dessie
2
9,628,379
03/09/2012 03:03:22
430,281
08/25/2010 04:57:38
121
0
How do I make simple echo bot for an IRC using twisted?
I think the question pretty much sums it up. I have seen some things that retrieve and log messages, but I am having trouble deciphering what parts are the bare minimum necessary for a simple echo bot.
python
twisted
echo
irc
null
03/10/2012 09:26:18
not a real question
How do I make simple echo bot for an IRC using twisted? === I think the question pretty much sums it up. I have seen some things that retrieve and log messages, but I am having trouble deciphering what parts are the bare minimum necessary for a simple echo bot.
1
9,416,587
02/23/2012 16:00:25
1,147,065
01/13/2012 06:12:52
5
0
Adding three UITableViews in iPhone Application
I have application in which i have three buttons. i want that when i click on any button it should display the desired table view .
iphone
objective-c
null
null
null
03/23/2012 09:16:36
not a real question
Adding three UITableViews in iPhone Application === I have application in which i have three buttons. i want that when i click on any button it should display the desired table view .
1
8,563,726
12/19/2011 15:45:11
1,106,210
12/19/2011 15:41:45
1
0
Join strings with XML node between in scala
I have a list of strings and I need to join them together with &lt;br/> tags in between. So starting from: val list = List("line1", "line2", "line3") I need to end up with a NodeSeq of: line1<br/>line2<br/>line3 It's possible the list contains only one element, in which case I should end up with a NodeSeq just of Text("line1"). Is there a one-liner to do this, using one of the higher order functions on list? I've tried to play around with foldLeft but can't seem to get it to do what I want.
xml
scala
null
null
null
null
open
Join strings with XML node between in scala === I have a list of strings and I need to join them together with &lt;br/> tags in between. So starting from: val list = List("line1", "line2", "line3") I need to end up with a NodeSeq of: line1<br/>line2<br/>line3 It's possible the list contains only one element, in which case I should end up with a NodeSeq just of Text("line1"). Is there a one-liner to do this, using one of the higher order functions on list? I've tried to play around with foldLeft but can't seem to get it to do what I want.
0
4,213,633
11/18/2010 10:08:45
136,130
07/10/2009 08:12:14
16
0
Multiple IP for One Host
I am setting up a grid-enabled cluster. I plan to assign 2 IP to my head node: one for local connection (LAN for distributing jobs to compute nodes) and one for public (internet for user access). So, my /etc/hosts file looks something like this: 111.111.111.111 myserver.whatever.com myserver #for public IP 11.11.11.11 myserver.whatever.com myserver #for local LAN 22.22.22.22 computenode01 33.33.33.33 computenode03 My concern here is will the hostname of myserver get messed up since it is mapped to two IPs?
cluster-computing
globus-toolkit
null
null
null
null
open
Multiple IP for One Host === I am setting up a grid-enabled cluster. I plan to assign 2 IP to my head node: one for local connection (LAN for distributing jobs to compute nodes) and one for public (internet for user access). So, my /etc/hosts file looks something like this: 111.111.111.111 myserver.whatever.com myserver #for public IP 11.11.11.11 myserver.whatever.com myserver #for local LAN 22.22.22.22 computenode01 33.33.33.33 computenode03 My concern here is will the hostname of myserver get messed up since it is mapped to two IPs?
0
3,489,929
08/16/2010 00:48:21
421,200
08/15/2010 21:25:15
1
0
How to remove the things I don't like about Python?
Python is a great programming language, but certain things about it just annoy the heck out of me. As such, I: **1)** wanted to find out how to remove these annoyances from the language itself, or **2)** find a language that is Python-like that don't have these annoyances. <hr /> I love Python for everything *except*: - **self**: just seems stupid to me that I need to include "self" as the first parameter of a function - **double-underscores**: It just looks ugly and a terrible special character. - **__name__** has always felt like a hack to me. Try explaining it to a novice programmer, or worse to someone who programs in perl or ruby or java for a living. Comparing the magic variable __name__ to the magic constant ”__main__” feels doubly so - **Blocks** give me of ruby envy or smalltalk envy. I like local functions. Love them. I tolerate lambda. But I really, really would like to see a more rubyesque iterator setup where we pass a callable to the list, and the callable can be defined free-form inline. Python doesn’t really do that and so it’s less of a language lab than I might like. - **Properties** are unattractive, partly because of blocks being absent. I don’t really want to define a named parameter (with double-underscores, most likely) and then two named functions, and THEN declare a property. That seems like so much work for such a simple situation. It is something I will only do if all other methods fail me, or if all other methods are overriding __setattr__ and __getattr__. *I do realize this might be petty annoyances, but a language I programming in daily, these small annoyances can grow to be quite large.*
python
programming-languages
null
null
null
08/16/2010 00:56:03
not constructive
How to remove the things I don't like about Python? === Python is a great programming language, but certain things about it just annoy the heck out of me. As such, I: **1)** wanted to find out how to remove these annoyances from the language itself, or **2)** find a language that is Python-like that don't have these annoyances. <hr /> I love Python for everything *except*: - **self**: just seems stupid to me that I need to include "self" as the first parameter of a function - **double-underscores**: It just looks ugly and a terrible special character. - **__name__** has always felt like a hack to me. Try explaining it to a novice programmer, or worse to someone who programs in perl or ruby or java for a living. Comparing the magic variable __name__ to the magic constant ”__main__” feels doubly so - **Blocks** give me of ruby envy or smalltalk envy. I like local functions. Love them. I tolerate lambda. But I really, really would like to see a more rubyesque iterator setup where we pass a callable to the list, and the callable can be defined free-form inline. Python doesn’t really do that and so it’s less of a language lab than I might like. - **Properties** are unattractive, partly because of blocks being absent. I don’t really want to define a named parameter (with double-underscores, most likely) and then two named functions, and THEN declare a property. That seems like so much work for such a simple situation. It is something I will only do if all other methods fail me, or if all other methods are overriding __setattr__ and __getattr__. *I do realize this might be petty annoyances, but a language I programming in daily, these small annoyances can grow to be quite large.*
4
2,066,906
01/14/2010 19:25:37
238,919
12/26/2009 19:08:04
11
2
object oriented programming
I have confusion about the concept of inheritance in c++, suppose we have a class named computer and we publically inherits a class named laptop from computer class. now when we create an object of class laptop in main function what happens in the memory? please explain .
oop
c++
java
null
null
null
open
object oriented programming === I have confusion about the concept of inheritance in c++, suppose we have a class named computer and we publically inherits a class named laptop from computer class. now when we create an object of class laptop in main function what happens in the memory? please explain .
0
3,465,342
08/12/2010 06:52:08
417,028
07/13/2010 10:19:56
55
7
When will IPv4 addresses run out ?
From years I am hearing that soon IPv4 address will run out. When will it happen? When will we see IPv6 only application?
ipv6
ipv4
null
null
null
08/12/2010 06:57:26
off topic
When will IPv4 addresses run out ? === From years I am hearing that soon IPv4 address will run out. When will it happen? When will we see IPv6 only application?
2
2,515,677
03/25/2010 13:04:44
301,689
03/25/2010 13:04:44
1
0
IE6 the last three characters in a div are being repeated else where in the page? really weird
Hey, Basically i have an issues (in IE6) where the last three characters of a line of text in a div are being repeated further down the page even though they are only in the HTML once. http://www.disturbmedia.com/jason/test/ please see the numbers in black, its always the last three characters that get repeated, so strange. I have never seen this before, its only in IE6? Anyone have any info?! Am super confused as to how this is happening. Thanks Jason
internet-explorer-6
repeating
character
html
css
null
open
IE6 the last three characters in a div are being repeated else where in the page? really weird === Hey, Basically i have an issues (in IE6) where the last three characters of a line of text in a div are being repeated further down the page even though they are only in the HTML once. http://www.disturbmedia.com/jason/test/ please see the numbers in black, its always the last three characters that get repeated, so strange. I have never seen this before, its only in IE6? Anyone have any info?! Am super confused as to how this is happening. Thanks Jason
0
10,984,173
06/11/2012 16:38:56
344,286
05/01/2010 16:35:26
5,499
226
Python3 json.dumps gives TypeError: keys must be a string
I've got a simple web server written in Python3 (using classes from `http.server`) that I'm porting from 2 to 3. I have the following code: # More code here... postvars = cgi.parse_qs(self.rfile.read(length), keep_blank_values=1) something.json_run(json.dumps(postvars)) Which throws: TypeError: keys must be a string By inspecting the data, I've determined that `parse_qs` seems to encode the keys as bytes, which is what's throwing the error (`json` doesn't like bytes, apparently). import json json.dumps({b'Throws error' : [b"Keys must be a string"]}) json.dumps({'Also throws error': [b'TypeError, is not JSON serializable']}) json.dumps({'This works': ['No bytes!']}) What is the best solution here? With Python 2, the code works fine because `parse_qs` uses `str` instead of `bytes`. My initial thought is that I probably need to write a JSON serializer. Not that it's difficult for something so simple, but I'd prefer not to if I can do it some other way (e.g. translate the dictionary to using strings instead of bytes).
python
json
python-3.x
null
null
null
open
Python3 json.dumps gives TypeError: keys must be a string === I've got a simple web server written in Python3 (using classes from `http.server`) that I'm porting from 2 to 3. I have the following code: # More code here... postvars = cgi.parse_qs(self.rfile.read(length), keep_blank_values=1) something.json_run(json.dumps(postvars)) Which throws: TypeError: keys must be a string By inspecting the data, I've determined that `parse_qs` seems to encode the keys as bytes, which is what's throwing the error (`json` doesn't like bytes, apparently). import json json.dumps({b'Throws error' : [b"Keys must be a string"]}) json.dumps({'Also throws error': [b'TypeError, is not JSON serializable']}) json.dumps({'This works': ['No bytes!']}) What is the best solution here? With Python 2, the code works fine because `parse_qs` uses `str` instead of `bytes`. My initial thought is that I probably need to write a JSON serializer. Not that it's difficult for something so simple, but I'd prefer not to if I can do it some other way (e.g. translate the dictionary to using strings instead of bytes).
0
4,281,285
11/25/2010 22:33:28
24,391
10/02/2008 05:00:08
1,154
36
Is there anyway in PHP to use uniquely identify a user's router?
Is there anyway in PHP to use uniquely identify a user's router? I'd like t know what users are on the second router.
php
unique
router
null
null
null
open
Is there anyway in PHP to use uniquely identify a user's router? === Is there anyway in PHP to use uniquely identify a user's router? I'd like t know what users are on the second router.
0
9,315,947
02/16/2012 17:24:00
1,175,914
01/29/2012 00:55:11
21
0
iOS 5 Audio Backgrounding: Code only runs when audio file playing?
I'd like to understand how audio backgrounding on iOS works. Is it true that an app's code only runs when audio is actively playing or does code always run when I tag the app as using audio backgrounding? Does this mean that if my app isn't already playing audio when it goes to the background, I won't be able to start playing audio? What if one playing audio clip ends and I want to run some code to determine what is the next audio clip to run, while the app is in the background? Are there specific audio callbacks that are used when the app is in the background?
ios
audio
backgrounding
null
null
null
open
iOS 5 Audio Backgrounding: Code only runs when audio file playing? === I'd like to understand how audio backgrounding on iOS works. Is it true that an app's code only runs when audio is actively playing or does code always run when I tag the app as using audio backgrounding? Does this mean that if my app isn't already playing audio when it goes to the background, I won't be able to start playing audio? What if one playing audio clip ends and I want to run some code to determine what is the next audio clip to run, while the app is in the background? Are there specific audio callbacks that are used when the app is in the background?
0
11,145,345
06/21/2012 19:25:16
1,473,125
06/21/2012 19:15:11
1
0
Focus on bootstrap textarea with jquery
I am having trouble focusing on a textarea on a webpage which uses jquery and bootstrap. It should be a trivial job but I don't see why it doesn't work the way it it supposed to. $('#textarea').focus(); By default, bootstrap gives a blue glow to a focused area (see http://twitter.github.com/bootstrap/base-css.html?#forms). Unfortunately, the line above doesn't seem to do the job. To be more specific, I have a button which opens displays a side-pane with an editor (textarea). My aim is to automatically send the focus to the textarea after displaying the pane.
javascript
jquery
twitter-bootstrap
null
null
06/24/2012 00:46:08
not a real question
Focus on bootstrap textarea with jquery === I am having trouble focusing on a textarea on a webpage which uses jquery and bootstrap. It should be a trivial job but I don't see why it doesn't work the way it it supposed to. $('#textarea').focus(); By default, bootstrap gives a blue glow to a focused area (see http://twitter.github.com/bootstrap/base-css.html?#forms). Unfortunately, the line above doesn't seem to do the job. To be more specific, I have a button which opens displays a side-pane with an editor (textarea). My aim is to automatically send the focus to the textarea after displaying the pane.
1
5,199,494
03/04/2011 21:29:28
564,184
01/05/2011 15:51:51
65
1
Scrape Data in C# from images
Scrape Data in C# from images ![enter image description here][1] [1]: http://i.stack.imgur.com/qerP3.png
c#
null
null
null
null
03/04/2011 21:33:12
not a real question
Scrape Data in C# from images === Scrape Data in C# from images ![enter image description here][1] [1]: http://i.stack.imgur.com/qerP3.png
1
8,089,519
11/11/2011 04:00:15
515,932
11/22/2010 10:41:55
29
1
To caculate a destination coordinate from a one coordinate and heading information.
If I Have information with one coordinate(lat, lon) and true heading degree in iPhone, how can I find a destination coordinate from this? ex) starting coordinate2D: 37.6009, 126.8647 true heading: 271.4766227 distance: 0.8m destination coordinate????? p.s I think it's OK if it dose not use formula about ellipse because it is short beyond comparison than a circumference of the earth. But if considering ellipse formula do, that's better.
iphone
location
coordinate
heading
bearing
null
open
To caculate a destination coordinate from a one coordinate and heading information. === If I Have information with one coordinate(lat, lon) and true heading degree in iPhone, how can I find a destination coordinate from this? ex) starting coordinate2D: 37.6009, 126.8647 true heading: 271.4766227 distance: 0.8m destination coordinate????? p.s I think it's OK if it dose not use formula about ellipse because it is short beyond comparison than a circumference of the earth. But if considering ellipse formula do, that's better.
0
10,362,075
04/28/2012 08:59:26
1,362,627
04/28/2012 08:53:45
1
0
15 puzzle backgroud image javascript/css
my tiles(divs) in the 15 puzzle are placed correctly but all have the same image which is the top left corner of my background image, how can i set the div to take a specific position of the background image applied to it? most probbably a css question. Thanks!
javascript
css
null
null
null
null
open
15 puzzle backgroud image javascript/css === my tiles(divs) in the 15 puzzle are placed correctly but all have the same image which is the top left corner of my background image, how can i set the div to take a specific position of the background image applied to it? most probbably a css question. Thanks!
0
10,166,086
04/15/2012 21:05:30
1,125,402
01/01/2012 20:55:43
252
7
Good examples of PHP code for an intermediate PHPer?
I know the basics for PHP and have written a school project in PHP (although looking back on it, I'd really love to rewrite it) I'd really like to get a feel for how to code *good* PHP code though, for example what are the best practices when it comes to PHP? And are there recommended ways of tackling certain tasks? I think the best way for me to tackle this question would just be for me to spend some time browsing through some PHP code, although I realise there are questions similar to this already the answers mostly seem to reference PHP programs like wordpress . . . which is just a little over my head (not to mention incredibly large to trawl through and try and understand) So can anybody recommend some programs for me to look at, that promote best practises, but are simple enough for me to understand (i.e. not Wordpress, Magento, or something on that level)?
php
practice
null
null
null
04/16/2012 01:59:36
not a real question
Good examples of PHP code for an intermediate PHPer? === I know the basics for PHP and have written a school project in PHP (although looking back on it, I'd really love to rewrite it) I'd really like to get a feel for how to code *good* PHP code though, for example what are the best practices when it comes to PHP? And are there recommended ways of tackling certain tasks? I think the best way for me to tackle this question would just be for me to spend some time browsing through some PHP code, although I realise there are questions similar to this already the answers mostly seem to reference PHP programs like wordpress . . . which is just a little over my head (not to mention incredibly large to trawl through and try and understand) So can anybody recommend some programs for me to look at, that promote best practises, but are simple enough for me to understand (i.e. not Wordpress, Magento, or something on that level)?
1
8,628,192
12/25/2011 04:23:02
860,324
07/24/2011 15:06:39
962
6
Compatibility with open-source project licenses
<sub>(Apologies if this question does not fit the StackOverflow question format.)</sub> My project uses various open-source technologies, specifically: * Node - [Complicated license - depends on V8](https://raw.github.com/joyent/node/v0.6.6/LICENSE) * jQuery - [MIT and GPL](http://jquery.org/license/) * Backbone - [MIT](http://documentcloud.github.com/backbone/docs/backbone.html) * Bootstrap - [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0) Do I have full rights to modify and reuse the above technologies, even for a closed-source and for-profit project? Are there common legal pitfalls in using those open-source projects?
open-source
licensing
legal
null
null
12/25/2011 13:52:55
off topic
Compatibility with open-source project licenses === <sub>(Apologies if this question does not fit the StackOverflow question format.)</sub> My project uses various open-source technologies, specifically: * Node - [Complicated license - depends on V8](https://raw.github.com/joyent/node/v0.6.6/LICENSE) * jQuery - [MIT and GPL](http://jquery.org/license/) * Backbone - [MIT](http://documentcloud.github.com/backbone/docs/backbone.html) * Bootstrap - [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0) Do I have full rights to modify and reuse the above technologies, even for a closed-source and for-profit project? Are there common legal pitfalls in using those open-source projects?
2
2,389,208
03/05/2010 19:03:35
134,743
07/08/2009 07:01:07
409
34
Should I buy Obout? Help, Please.
We started a new project and the nature of the project is very interactive and a Rich UI is required. We would need a set of controls that would require for Rich UI development. I found Obout while googling. I never heard about them and never seen fellow members telling me such name except Telerik, ComponentOne, NetAdvantage. These are the famous names we heard but no this one. But, the controls give a positive feeling. But as two things matter always when you are buying some services: How good are their customer support? and How much feasible their price is? Another, How quickly they release patches/updates? As, what if we find a bug or an error during development what will gonna happen? Do they provide a quick solution for this? I hope you understand my query. I'm bit confused making a decision here. I need your assistance, experience and feedback. Please, assist! Thanks.
asp.net
custom-server-controls
rich-internet-application
null
null
05/08/2012 23:08:25
not constructive
Should I buy Obout? Help, Please. === We started a new project and the nature of the project is very interactive and a Rich UI is required. We would need a set of controls that would require for Rich UI development. I found Obout while googling. I never heard about them and never seen fellow members telling me such name except Telerik, ComponentOne, NetAdvantage. These are the famous names we heard but no this one. But, the controls give a positive feeling. But as two things matter always when you are buying some services: How good are their customer support? and How much feasible their price is? Another, How quickly they release patches/updates? As, what if we find a bug or an error during development what will gonna happen? Do they provide a quick solution for this? I hope you understand my query. I'm bit confused making a decision here. I need your assistance, experience and feedback. Please, assist! Thanks.
4
1,243,200
08/07/2009 06:26:04
150,759
08/05/2009 02:50:52
13
0
Object Orientation - Where to place this Interface Declaration...
I have a few questions for you wise people involving OO design with Interfaces and abstract base classes. Consider the following scenario: I have an abstract bass class "DataObjectBase" and a derived class "UserDataObject." I also have an interface "IDataObject." The interface of course exposes all of the public methods and properties that my Data Objects must expose, and you can probably guess that the abstract base implements the methods and properties common to all Data Objects. My question is, if the abstract bass class DataObjectBase implements everything specified in the interface IDataObject, should the interface be declared on the base class, or on the derived classes(s)? In C# interfaces declared on the base class are implicity applied to the derived classes, but is this the best practice? It seems to me that implementing the interface on the base class makes it less obvious that the derived class implements the interface, but then again requires the Interface to be specified for each derived class. Additionally, if the base class was NOT abstract, would the reccomendation change? A second sub-question: If the base class implements all of the methods/properties of the IDataObject interface, is the interface even needed? The base class typename can simply be used in place of the interface name, ie: private DataObjectBase _dataObject; private IDataObject _dataObject; In the above example (where again the base implements everything exposed by the interface) both can be assigned the same derived types. Personally I always use the interface in these situations, but I am intrested in hearing peoples thoughts. Thanks in advance.
abstract-class
interface
oop
null
null
null
open
Object Orientation - Where to place this Interface Declaration... === I have a few questions for you wise people involving OO design with Interfaces and abstract base classes. Consider the following scenario: I have an abstract bass class "DataObjectBase" and a derived class "UserDataObject." I also have an interface "IDataObject." The interface of course exposes all of the public methods and properties that my Data Objects must expose, and you can probably guess that the abstract base implements the methods and properties common to all Data Objects. My question is, if the abstract bass class DataObjectBase implements everything specified in the interface IDataObject, should the interface be declared on the base class, or on the derived classes(s)? In C# interfaces declared on the base class are implicity applied to the derived classes, but is this the best practice? It seems to me that implementing the interface on the base class makes it less obvious that the derived class implements the interface, but then again requires the Interface to be specified for each derived class. Additionally, if the base class was NOT abstract, would the reccomendation change? A second sub-question: If the base class implements all of the methods/properties of the IDataObject interface, is the interface even needed? The base class typename can simply be used in place of the interface name, ie: private DataObjectBase _dataObject; private IDataObject _dataObject; In the above example (where again the base implements everything exposed by the interface) both can be assigned the same derived types. Personally I always use the interface in these situations, but I am intrested in hearing peoples thoughts. Thanks in advance.
0
9,200,069
02/08/2012 19:28:29
65,717
02/12/2009 19:43:52
189
13
c# Detect if .wav file is accessed?
Say I have an application in windows, any application, that has a setting that plays a sound when something happens. This could be when a DVD is finished burning, when a party is getting attacked in a MMORPG or when a stock alert is fired on etrade. What would be the easiest way to trigger a chain of events to occur when this file is accessed? It would be handy if we could take which application is doing the accessing, but thats not a requirement. Maybe this is more a question for serverfault or poweruser, but I thought I'd start here. Any ideas folks?
c#
file-access
null
null
null
02/08/2012 19:37:14
off topic
c# Detect if .wav file is accessed? === Say I have an application in windows, any application, that has a setting that plays a sound when something happens. This could be when a DVD is finished burning, when a party is getting attacked in a MMORPG or when a stock alert is fired on etrade. What would be the easiest way to trigger a chain of events to occur when this file is accessed? It would be handy if we could take which application is doing the accessing, but thats not a requirement. Maybe this is more a question for serverfault or poweruser, but I thought I'd start here. Any ideas folks?
2
9,546,703
03/03/2012 14:03:53
230,377
12/12/2009 17:46:13
1,463
71
asp.net mvc - automatically binding a model property if it is present
I'm not sure i know the exact terminology for what i want to do, so i'll just describe what i want, and hopefully someone will give me the answer or direct me to the right place... I want some (maybe all) of the models on my site to inherit from `IGeneralSettings` - public interface IGeneralSettings { User CurrentUser { get; set; } UserSettings PersonalSettings { get; set; } } and if the current user is authenticated/logged in, I will check if the current controller's model is of a type that implements `IGeneralSettings`, and if it is, I will fill the data with the current user data. I am using Windsor Castle as an IoC container. I don't want to use the property bag for this. Is this possible ?
c#
asp.net-mvc
castle-windsor
null
null
null
open
asp.net mvc - automatically binding a model property if it is present === I'm not sure i know the exact terminology for what i want to do, so i'll just describe what i want, and hopefully someone will give me the answer or direct me to the right place... I want some (maybe all) of the models on my site to inherit from `IGeneralSettings` - public interface IGeneralSettings { User CurrentUser { get; set; } UserSettings PersonalSettings { get; set; } } and if the current user is authenticated/logged in, I will check if the current controller's model is of a type that implements `IGeneralSettings`, and if it is, I will fill the data with the current user data. I am using Windsor Castle as an IoC container. I don't want to use the property bag for this. Is this possible ?
0
9,450,515
02/26/2012 04:20:13
1,184,100
02/02/2012 01:59:49
82
0
Custom fonts : @Font-Face issues in chrome,firefox
I downloaded a font and generated font-face css using font-squirrel. The font is displayed properly in IE,Opera but in chrome , firefox & safari it looks small and something totally different... Is there anything that i need to change ?? @font-face { font-family: 'LektonRegular'; src: url('myfonts/lekton-regular-webfont.eot'); src: url('myfonts/lekton-regular-webfont.eot?#iefix') format('embedded-opentype'), url('myfonts/lekton-regular-webfont.woff') format('woff'), url(myfonts/lekton-regular-webfont.ttf) format('truetype'), url('myfonts/lekton-regular-webfont.svg#LektonRegular') format('svg'); font-weight: normal; font-style: normal; }
css
css3
null
null
null
null
open
Custom fonts : @Font-Face issues in chrome,firefox === I downloaded a font and generated font-face css using font-squirrel. The font is displayed properly in IE,Opera but in chrome , firefox & safari it looks small and something totally different... Is there anything that i need to change ?? @font-face { font-family: 'LektonRegular'; src: url('myfonts/lekton-regular-webfont.eot'); src: url('myfonts/lekton-regular-webfont.eot?#iefix') format('embedded-opentype'), url('myfonts/lekton-regular-webfont.woff') format('woff'), url(myfonts/lekton-regular-webfont.ttf) format('truetype'), url('myfonts/lekton-regular-webfont.svg#LektonRegular') format('svg'); font-weight: normal; font-style: normal; }
0
10,832,993
05/31/2012 11:48:38
1,179,695
01/31/2012 06:52:57
1
1
struct pointer casting and its memery allocation
The point here is the code "int header = (((int)(txUserPtr) - 4))" Illustration of UserTypes and struct pointer casting is great of help! how should i set incoming pointer "txUserPtr" so that Fun() would skip following lines. I don't want to execute error() typedef union UserTypes { SAUser AUser; BUser BUser; SCUser CUser; SDUser DUser; } UserTypes; typedef struct AUser { int userId; int dbIndex; ChannelType ChanType; } AUser; typedef struct AUser { int userId; int dbIndex; ChannelType ChanType; } AUser; typedef struct BUser { int userId; int dbIndex; ChannelType ChanType; } BUser; typedef struct CUser { int userId; int dbIndex; ChannelType ChanType; } CUser; typedef struct DUser { int userId; int dbIndex; ChannelType ChanType; } DUser; //this is the function I want to test void Fun(UserTypes * txUserPtr) { int header = (*((int*)(txUserPtr) - 4)); //the problem is here //how should i set incoming pointer "txUserPtr" so that //Fun() would skip following lines. // I don't want to execute error() if((header & 0xFF000000) != (int)0xAA000000) { error("sth error\n"); } /*the following is the rest */ }
c
null
null
null
null
05/31/2012 13:54:08
not a real question
struct pointer casting and its memery allocation === The point here is the code "int header = (((int)(txUserPtr) - 4))" Illustration of UserTypes and struct pointer casting is great of help! how should i set incoming pointer "txUserPtr" so that Fun() would skip following lines. I don't want to execute error() typedef union UserTypes { SAUser AUser; BUser BUser; SCUser CUser; SDUser DUser; } UserTypes; typedef struct AUser { int userId; int dbIndex; ChannelType ChanType; } AUser; typedef struct AUser { int userId; int dbIndex; ChannelType ChanType; } AUser; typedef struct BUser { int userId; int dbIndex; ChannelType ChanType; } BUser; typedef struct CUser { int userId; int dbIndex; ChannelType ChanType; } CUser; typedef struct DUser { int userId; int dbIndex; ChannelType ChanType; } DUser; //this is the function I want to test void Fun(UserTypes * txUserPtr) { int header = (*((int*)(txUserPtr) - 4)); //the problem is here //how should i set incoming pointer "txUserPtr" so that //Fun() would skip following lines. // I don't want to execute error() if((header & 0xFF000000) != (int)0xAA000000) { error("sth error\n"); } /*the following is the rest */ }
1
3,271,911
07/17/2010 14:38:14
354,192
05/30/2010 22:03:15
1
0
Background image always centered
I have created a website but am having an issue forcing the background image to always be center. It looks great when the site is maximized but when I make the window resolution smaller the background gets pushed to the left and the content overflows to the right. It would be solved if I could just force the background image to just be centered all the time no matter what the window size. My CSS to center the image looks as follows background: #EDEDED url(../images/bg-y.png) repeat-y scroll 50% 0; font-size:12px; font-family:'Lucida Grande', 'Lucida Sans Unicode', Tahoma, Arial, san-serif; color:#000000;
css
null
null
null
null
04/22/2012 13:25:59
too localized
Background image always centered === I have created a website but am having an issue forcing the background image to always be center. It looks great when the site is maximized but when I make the window resolution smaller the background gets pushed to the left and the content overflows to the right. It would be solved if I could just force the background image to just be centered all the time no matter what the window size. My CSS to center the image looks as follows background: #EDEDED url(../images/bg-y.png) repeat-y scroll 50% 0; font-size:12px; font-family:'Lucida Grande', 'Lucida Sans Unicode', Tahoma, Arial, san-serif; color:#000000;
3
7,744,662
10/12/2011 18:22:18
570,222
01/10/2011 18:24:22
129
27
Efficient Schema Modeling has_many associations with ActiveRecord (or maybe Mongoid?)
im having troubles create a rather complicated schema for my application. I have Objects and Users, and Users can create, like and unlike many Objects and conversely the other way round. So i have set up my models like this: class User < ActiveRecord::Base has_many :userobjects, :foreign_key => "user_id" has_many :likedobjects, :through => :userobjects, :source => :object, :conditions => ['userobjects.liked = ?', true] has_many :dislikedobjects, :through => :userobjects, :source => :object, :conditions => ['userobjects.liked = ?', false] has_many :createdobjects, :through => :userobjects, :source => :object, :conditions => ['userobjects.created = ?', true] class Object < ActiveRecord::Base has_many :userobjects, :foreign_key => "object_id" has_many :likers, :through => :userobjects, :source => :user, :conditions => ['userobjects.liked = ?', true] has_many :dislikers, :through => :userobjects, :source => :user, :conditions => ['userobjects.liked = ?', false] has_many :creators, :through => :userobjects, :source => :user, :conditions => ['userobjects.created = ?', true] #array of length 1 class Userobjects < ActiveRecord::Base belongs_to :user belongs_to :object Among the most frequent operations, I want to get the liked/disliked objects of current_user and the likers/dislikers for a given object. However, as we all know, both of these operations require joins which are computationally expensive. Given that :root is a page of objects and their likers/dislikers and the profile is a list of liked/disliked objects, above schema just doesn't feel right. What is the approach to sort of embed/cache the association in Object/User? Is this maybe on of the scenarios, where a document-based schema like MongoDb is more effective? I haven't done too much schema modeling yet, so im not sure what is the best approach
ruby-on-rails
activerecord
mongodb
null
null
null
open
Efficient Schema Modeling has_many associations with ActiveRecord (or maybe Mongoid?) === im having troubles create a rather complicated schema for my application. I have Objects and Users, and Users can create, like and unlike many Objects and conversely the other way round. So i have set up my models like this: class User < ActiveRecord::Base has_many :userobjects, :foreign_key => "user_id" has_many :likedobjects, :through => :userobjects, :source => :object, :conditions => ['userobjects.liked = ?', true] has_many :dislikedobjects, :through => :userobjects, :source => :object, :conditions => ['userobjects.liked = ?', false] has_many :createdobjects, :through => :userobjects, :source => :object, :conditions => ['userobjects.created = ?', true] class Object < ActiveRecord::Base has_many :userobjects, :foreign_key => "object_id" has_many :likers, :through => :userobjects, :source => :user, :conditions => ['userobjects.liked = ?', true] has_many :dislikers, :through => :userobjects, :source => :user, :conditions => ['userobjects.liked = ?', false] has_many :creators, :through => :userobjects, :source => :user, :conditions => ['userobjects.created = ?', true] #array of length 1 class Userobjects < ActiveRecord::Base belongs_to :user belongs_to :object Among the most frequent operations, I want to get the liked/disliked objects of current_user and the likers/dislikers for a given object. However, as we all know, both of these operations require joins which are computationally expensive. Given that :root is a page of objects and their likers/dislikers and the profile is a list of liked/disliked objects, above schema just doesn't feel right. What is the approach to sort of embed/cache the association in Object/User? Is this maybe on of the scenarios, where a document-based schema like MongoDb is more effective? I haven't done too much schema modeling yet, so im not sure what is the best approach
0
8,804,270
01/10/2012 13:48:22
496,120
11/03/2010 15:35:37
199
2
An issue of reading different matrices in one YAML file...
I have a problem, it might be trivial to many of you... I'm reading different images, extract SIFT features and save the features in Yaml file... which I got a file of: descriptors1: !!opencv-matrix rows: 342 cols: 128 dt: f data: [ 0.,......... ....................] descriptors1: !!opencv-matrix rows: 393 cols: 128 dt: f data: [ 0., 0., 3., 62..... ......] and so on... The first part is the first image information and the second part in the second image information The think so far is quite satisfy my work... but when I'm reading it I got only one part which is the first one (i.e reading only the information of the first image (and it's neglecting the rest of the file) :( This is the way for reading my code FileStorage fs; fs.open("cola.yaml", FileStorage::READ); if (!fs.isOpened()) { cout << "failed to open " << "test.yaml" << endl; return 1; } Mat descriptors1; fs["descriptors1"] >> descriptors1; fs.release(); What I want is to read all the information contained in this file... So I got in the end one matrix has all the information of different images (I'm getting 342*128 matrix) but I want (735*128 matrix) What should I do?
opencv
null
null
null
null
null
open
An issue of reading different matrices in one YAML file... === I have a problem, it might be trivial to many of you... I'm reading different images, extract SIFT features and save the features in Yaml file... which I got a file of: descriptors1: !!opencv-matrix rows: 342 cols: 128 dt: f data: [ 0.,......... ....................] descriptors1: !!opencv-matrix rows: 393 cols: 128 dt: f data: [ 0., 0., 3., 62..... ......] and so on... The first part is the first image information and the second part in the second image information The think so far is quite satisfy my work... but when I'm reading it I got only one part which is the first one (i.e reading only the information of the first image (and it's neglecting the rest of the file) :( This is the way for reading my code FileStorage fs; fs.open("cola.yaml", FileStorage::READ); if (!fs.isOpened()) { cout << "failed to open " << "test.yaml" << endl; return 1; } Mat descriptors1; fs["descriptors1"] >> descriptors1; fs.release(); What I want is to read all the information contained in this file... So I got in the end one matrix has all the information of different images (I'm getting 342*128 matrix) but I want (735*128 matrix) What should I do?
0
5,094,712
02/23/2011 17:43:17
616,639
02/14/2011 18:15:48
8
4
writing a php script.....
how do you write a php script and execute that in a web page?suppose there is web page www.somepage.com and i want to find out a specific word in that page...i know you could search without a script since searching functionality is provided by the browser but how do someone write a script and find out that...i mean i need to know the method by which one can execute that script...please any help would be usefull..
php
null
null
null
null
02/23/2011 17:50:41
not a real question
writing a php script..... === how do you write a php script and execute that in a web page?suppose there is web page www.somepage.com and i want to find out a specific word in that page...i know you could search without a script since searching functionality is provided by the browser but how do someone write a script and find out that...i mean i need to know the method by which one can execute that script...please any help would be usefull..
1
4,357,209
12/05/2010 03:27:12
523,872
11/29/2010 12:09:01
8
0
Deploy MVC 2 to IIS 7.5 Windows Server 2008 Intergrated Mode
I'm stuck while I'm trying to deploy my mvc 2 web application in IIS, using IIS 7.5 in Windows Server 2008 R2, intergrated mode. I got into an issue with Session, Session lost when I use hostname to launch my web pages in IE 7 or IE 8. This issue is not related to cookies, Session is always null doesn't matter cookies are enabled or disabled in IE. doesn't matter cookies are enabled or not. However, if I use IP address url (like http://192.168.1.101/ ), Session works fine. Also, Firefox is working fine all case. I'm thinking that, this issue doesn't come from my code, correct? I might do something wrong while I was trying to deploy my mvc2 application in IIS. I just dome some easy configuration steps to have mvc 2 works in IIS like below 1. Install IIS 7.5 2. execute aspnet_regiss -ir 3. create a new website in IIS using .Net framework 4.0 application pool intergrated mode. 4. publish my web project (file system mode) 5. copy published folder to "root directory" of the website has just created 6. copy the dll system.web.mvc.dll to bin From here, I already have my web run in IIS, everything, javascript, css, views, dll.... working well except Session I appreciate any suggest, any comment any guide helps to get this issue resolved. Thanks
asp.net-mvc-2
null
null
null
null
null
open
Deploy MVC 2 to IIS 7.5 Windows Server 2008 Intergrated Mode === I'm stuck while I'm trying to deploy my mvc 2 web application in IIS, using IIS 7.5 in Windows Server 2008 R2, intergrated mode. I got into an issue with Session, Session lost when I use hostname to launch my web pages in IE 7 or IE 8. This issue is not related to cookies, Session is always null doesn't matter cookies are enabled or disabled in IE. doesn't matter cookies are enabled or not. However, if I use IP address url (like http://192.168.1.101/ ), Session works fine. Also, Firefox is working fine all case. I'm thinking that, this issue doesn't come from my code, correct? I might do something wrong while I was trying to deploy my mvc2 application in IIS. I just dome some easy configuration steps to have mvc 2 works in IIS like below 1. Install IIS 7.5 2. execute aspnet_regiss -ir 3. create a new website in IIS using .Net framework 4.0 application pool intergrated mode. 4. publish my web project (file system mode) 5. copy published folder to "root directory" of the website has just created 6. copy the dll system.web.mvc.dll to bin From here, I already have my web run in IIS, everything, javascript, css, views, dll.... working well except Session I appreciate any suggest, any comment any guide helps to get this issue resolved. Thanks
0
11,051,439
06/15/2012 13:19:32
1,442,966
06/07/2012 18:28:20
6
0
jQuery dialog working as expected
It might be a stupid problem, but I am very new to jQuery. I am trying to create a button that on-click will pop-up a login dialog. Somehow the form is shown instead of being created as a dialog. Below is my code: <head> <script src="js/jquery-ui-1.8.21.custom.min.js"></script> <script> $(function() { $('#login').dialog({ autoOpen: false, title: 'Login', height: 300, width: 350, modal: true }); $('#open').click(function() { $('#login_form').dialog('open'); return false; }); }); </script> <meta charset="utf-8" /> <title></title> </head> <body> <div id="login"> <form class="caption" action="Login.php" method="post"> <p>E-mail: <br><input type="text" name="email" maxlength="255" /></p> <p>Password:</p> <br><input type="password" name="pwd" /></p> <p><input type="submit" value="Login" /></p> </form> </div> <button id="open">Click</button> </body> </html> Any idea what I have done wrong? Thank you very much!
jquery
null
null
null
null
null
open
jQuery dialog working as expected === It might be a stupid problem, but I am very new to jQuery. I am trying to create a button that on-click will pop-up a login dialog. Somehow the form is shown instead of being created as a dialog. Below is my code: <head> <script src="js/jquery-ui-1.8.21.custom.min.js"></script> <script> $(function() { $('#login').dialog({ autoOpen: false, title: 'Login', height: 300, width: 350, modal: true }); $('#open').click(function() { $('#login_form').dialog('open'); return false; }); }); </script> <meta charset="utf-8" /> <title></title> </head> <body> <div id="login"> <form class="caption" action="Login.php" method="post"> <p>E-mail: <br><input type="text" name="email" maxlength="255" /></p> <p>Password:</p> <br><input type="password" name="pwd" /></p> <p><input type="submit" value="Login" /></p> </form> </div> <button id="open">Click</button> </body> </html> Any idea what I have done wrong? Thank you very much!
0
8,972,050
01/23/2012 13:02:57
1,136,700
01/08/2012 04:02:19
265
0
what is the recommended JavaScript Editor/Debugger under Windows
Which editor you are using for JavaScript, may it support JQuery code assist.
javascript
jquery
null
null
null
01/23/2012 13:11:07
not constructive
what is the recommended JavaScript Editor/Debugger under Windows === Which editor you are using for JavaScript, may it support JQuery code assist.
4
3,868,240
10/05/2010 22:28:13
171,560
09/10/2009 16:40:14
145
3
NLog performance
What should the expected overhead be for logging? I have tried this example private class Person { private static Logger logger = LogManager.GetCurrentClassLogger(); public string Name { get; private set; } public Person(string name) { Name = name; logger.Info("New person created with name {0}", name); } } List<Person> people = new List<Person>(); for (int i = 0; i < MAXTEST; i++) { people.Add(new Person(i.ToString())); } With MAXTEST values of 100,500,1000, 5000 Results in MAXTEST,noLogging, Logging 100,25ms,186ms 500, 33ms, 812ms 1000, 33ms,1554ms 5000, 33ms, 7654ms Granted one would prolly never log this excessive amount, but it this the performance hit one would expect? I have also tried using the asyncwrapper in the config <target name="asyncFile" xsi:type="AsyncWrapper"> <target name="file" xsi:type="File" fileName="${basedir}/log.txt" /> </target> Regards _Eric
c#
nlog
null
null
null
null
open
NLog performance === What should the expected overhead be for logging? I have tried this example private class Person { private static Logger logger = LogManager.GetCurrentClassLogger(); public string Name { get; private set; } public Person(string name) { Name = name; logger.Info("New person created with name {0}", name); } } List<Person> people = new List<Person>(); for (int i = 0; i < MAXTEST; i++) { people.Add(new Person(i.ToString())); } With MAXTEST values of 100,500,1000, 5000 Results in MAXTEST,noLogging, Logging 100,25ms,186ms 500, 33ms, 812ms 1000, 33ms,1554ms 5000, 33ms, 7654ms Granted one would prolly never log this excessive amount, but it this the performance hit one would expect? I have also tried using the asyncwrapper in the config <target name="asyncFile" xsi:type="AsyncWrapper"> <target name="file" xsi:type="File" fileName="${basedir}/log.txt" /> </target> Regards _Eric
0
194,812
10/11/2008 23:17:53
11,110
09/16/2008 05:08:25
48
2
List of opensource programming books
I'm trying to amass a list of programming books with opensource licenses, like Creative Commons, GPL, etc. The books can be about a particlar programming language or about computers in general. Hoping you guys could help: # Programming Languages ## Python * [Dive Into Python](http://diveintopython.org/) * [How to Think Like a Computer Scientist](http://openbookproject.net/thinkcs/python/english2e/index.xhtml) * [A Byte of Python](http://www.ibiblio.org/g2swap/byteofpython/read/) * [Python for Fun](http://www.openbookproject.net/py4fun/) # Programming Tools * [The SVN Book](http://svnbook.red-bean.com/) I will expand on this list as i get comments or when i think of more :D
creative-commons
ebooks
books
free
null
02/29/2012 19:20:39
not constructive
List of opensource programming books === I'm trying to amass a list of programming books with opensource licenses, like Creative Commons, GPL, etc. The books can be about a particlar programming language or about computers in general. Hoping you guys could help: # Programming Languages ## Python * [Dive Into Python](http://diveintopython.org/) * [How to Think Like a Computer Scientist](http://openbookproject.net/thinkcs/python/english2e/index.xhtml) * [A Byte of Python](http://www.ibiblio.org/g2swap/byteofpython/read/) * [Python for Fun](http://www.openbookproject.net/py4fun/) # Programming Tools * [The SVN Book](http://svnbook.red-bean.com/) I will expand on this list as i get comments or when i think of more :D
4
8,508,653
12/14/2011 17:09:13
823,398
06/30/2011 16:03:12
46
8
The correct sytax for IF THEN with variables
How does one code for a choice between two options? if ((one_spinner.getSelectedItem().toString() .equals("one"))) { double one_thing = new Double(one.getText() .toString()); double two_thing = one_thing * 5; } else { double two_thing = new Double(one.getText() .toString()); double one_thing = two / 5; }
java
android
null
null
null
12/14/2011 17:13:22
not a real question
The correct sytax for IF THEN with variables === How does one code for a choice between two options? if ((one_spinner.getSelectedItem().toString() .equals("one"))) { double one_thing = new Double(one.getText() .toString()); double two_thing = one_thing * 5; } else { double two_thing = new Double(one.getText() .toString()); double one_thing = two / 5; }
1
9,989,675
04/03/2012 08:27:24
365,251
06/12/2010 13:37:57
3,083
7
What is a good File Manager for .NET?
I need a File Manager for C#/.NET in my application (similar to the old one in Telerik, but I'll avoid Telerik right now). I need it because the user should browse folder, enter the folder, e select "file". I just need this behaviour. Found [this][1], but I don't know how good it is! What can you suggest to me? [1]: http://www.codeproject.com/Articles/13097/An-quot-Explorer-Style-quot-TreeView-Control
c#
.net
file-browser
null
null
null
open
What is a good File Manager for .NET? === I need a File Manager for C#/.NET in my application (similar to the old one in Telerik, but I'll avoid Telerik right now). I need it because the user should browse folder, enter the folder, e select "file". I just need this behaviour. Found [this][1], but I don't know how good it is! What can you suggest to me? [1]: http://www.codeproject.com/Articles/13097/An-quot-Explorer-Style-quot-TreeView-Control
0
9,124,297
02/03/2012 05:54:51
638,445
02/28/2011 22:09:09
376
13
How can I find the decryption code in an executable?
I'm not sure what the algorithm is, but I presume there is a way of finding it in an executable. After that, isn't it a short step via debugging to get the key?
encryption
reverse-engineering
null
null
null
02/03/2012 16:38:47
not a real question
How can I find the decryption code in an executable? === I'm not sure what the algorithm is, but I presume there is a way of finding it in an executable. After that, isn't it a short step via debugging to get the key?
1
8,815,188
01/11/2012 06:42:10
1,140,243
01/10/2012 06:27:07
1
0
Compile project in Xcode with Undefined symbols for architecture i386:
Undefined symbols for architecture i386: "__objc_empty_vtable", referenced from: _OBJC_METACLASS_$_CalAppDelegate in CalAppDelegate.o _OBJC_CLASS_$_CalAppDelegate in CalAppDelegate.o _OBJC_CLASS_$_CalViewController in CalViewController.o _OBJC_METACLASS_$_CalViewController in CalViewController.o "_objc_msgSendSuper2", referenced from: -[CalViewController didReceiveMemoryWarning] in CalViewController.o -[CalViewController viewDidLoad] in CalViewController.o -[CalViewController viewDidUnload] in CalViewController.o -[CalViewController viewWillAppear:] in CalViewController.o -[CalViewController viewDidAppear:] in CalViewController.o -[CalViewController viewWillDisappear:] in CalViewController.o -[CalViewController viewDidDisappear:] in CalViewController.o ... "_gcry_control", referenced from: _init_runtime in caldav.o "_gnutls_global_init", referenced from: _init_runtime in caldav.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) Can anyone help me to solve it ?
xcode
null
null
null
null
01/11/2012 21:30:20
not a real question
Compile project in Xcode with Undefined symbols for architecture i386: === Undefined symbols for architecture i386: "__objc_empty_vtable", referenced from: _OBJC_METACLASS_$_CalAppDelegate in CalAppDelegate.o _OBJC_CLASS_$_CalAppDelegate in CalAppDelegate.o _OBJC_CLASS_$_CalViewController in CalViewController.o _OBJC_METACLASS_$_CalViewController in CalViewController.o "_objc_msgSendSuper2", referenced from: -[CalViewController didReceiveMemoryWarning] in CalViewController.o -[CalViewController viewDidLoad] in CalViewController.o -[CalViewController viewDidUnload] in CalViewController.o -[CalViewController viewWillAppear:] in CalViewController.o -[CalViewController viewDidAppear:] in CalViewController.o -[CalViewController viewWillDisappear:] in CalViewController.o -[CalViewController viewDidDisappear:] in CalViewController.o ... "_gcry_control", referenced from: _init_runtime in caldav.o "_gnutls_global_init", referenced from: _init_runtime in caldav.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) Can anyone help me to solve it ?
1
4,571,041
12/31/2010 16:04:59
198,183
10/28/2009 14:55:35
1,401
31
printf-format-question
This script outputs "abc". How could I change the FORMAT part of printf to get "123" as output? #!/usr/bin/env perl use warnings; use 5.012; my $str = 'abc123'; printf "%3.3s\n", $str; # abc
perl
format
printf
null
null
null
open
printf-format-question === This script outputs "abc". How could I change the FORMAT part of printf to get "123" as output? #!/usr/bin/env perl use warnings; use 5.012; my $str = 'abc123'; printf "%3.3s\n", $str; # abc
0
2,301,424
02/20/2010 07:18:26
98,251
04/30/2009 04:41:35
28
2
Building Solr indexes through Haystack throws unknown field error
I'm trying to integrate Haystack with Solr. When I try to build the index, I get an error "Unknown field django_id" from SOLR. What's causing this to happen?
haystack
solr
django
null
null
null
open
Building Solr indexes through Haystack throws unknown field error === I'm trying to integrate Haystack with Solr. When I try to build the index, I get an error "Unknown field django_id" from SOLR. What's causing this to happen?
0
2,301,187
02/20/2010 05:25:52
34,537
11/05/2008 03:00:23
3,260
85
How do i build 64bit asp.net projects?
I created a new project, build and run, it asked me to modify my web.config for debugging and i clicked yes. The projected loaded fine. I switched the target cpu from any to 64bits and i got an exception. How do i build and run 64bit projects? Server Error in '/' Application. Could not load file or assembly 'x64Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.BadImageFormatException: Could not load file or assembly 'x64Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [BadImageFormatException: Could not load file or assembly 'x64Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.] System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0 System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43 System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127 System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142 System.Reflection.Assembly.Load(String assemblyString) +28 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46 [ConfigurationErrorsException: Could not load file or assembly 'x64Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178 System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163 System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53 System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +86 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +62 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33 System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40 System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +160 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155 Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
x64
asp.net
error-message
exception
null
null
open
How do i build 64bit asp.net projects? === I created a new project, build and run, it asked me to modify my web.config for debugging and i clicked yes. The projected loaded fine. I switched the target cpu from any to 64bits and i got an exception. How do i build and run 64bit projects? Server Error in '/' Application. Could not load file or assembly 'x64Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.BadImageFormatException: Could not load file or assembly 'x64Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [BadImageFormatException: Could not load file or assembly 'x64Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.] System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0 System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43 System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127 System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142 System.Reflection.Assembly.Load(String assemblyString) +28 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46 [ConfigurationErrorsException: Could not load file or assembly 'x64Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178 System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163 System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53 System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +86 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +62 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33 System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40 System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +160 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155 Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
0
5,433,735
03/25/2011 14:25:01
601,117
02/03/2011 07:27:47
42
0
i have four numbers a b c d and i want to sort it how could i do it in c#
i have four numbers a b c d and i want to sort it how could i do it in c#
c#
.net
null
null
null
03/25/2011 14:29:16
not a real question
i have four numbers a b c d and i want to sort it how could i do it in c# === i have four numbers a b c d and i want to sort it how could i do it in c#
1
1,855,338
12/06/2009 13:01:06
208,992
11/11/2009 19:57:23
14
1
Setting a default Apache RewriteRule entry
I want to set a 'default' rewrite rule to catch anything that didn't match the previous rewrite entries. I've tried this: RewriteRule ^(.*)/?$ index.php?url=$1 [L] But the output returned is: url = index.php Ideally what I want is to attach all the GET values to 'url' so they will be saved to my web log. Anyone have any suggestions how to solve this?
apache
mod-rewrite
url-rewrite
default-value
null
null
open
Setting a default Apache RewriteRule entry === I want to set a 'default' rewrite rule to catch anything that didn't match the previous rewrite entries. I've tried this: RewriteRule ^(.*)/?$ index.php?url=$1 [L] But the output returned is: url = index.php Ideally what I want is to attach all the GET values to 'url' so they will be saved to my web log. Anyone have any suggestions how to solve this?
0
2,499,323
03/23/2010 11:09:34
221,951
12/01/2009 09:02:12
166
16
JEE6 vs. Spring 3 stack
I'm starting a new project now. I have to choose technologies. I need something light, so no EJB or Seam. On the other hand I need JPA(Hibernate or alternative) and JSF with IceFaces. Do you think that such stack on Spring 3 deployed on Tomcat is a good choice? Or a JEE6 web application could be better? I'm afraid that JEE6 is a new technology, not well docummented yet. Tomcat seems to be easier to mantain than Glassfish 3. What's your opinion? Do you have any experiences ?
jee6
spring
jsf
null
null
01/24/2012 19:08:58
not constructive
JEE6 vs. Spring 3 stack === I'm starting a new project now. I have to choose technologies. I need something light, so no EJB or Seam. On the other hand I need JPA(Hibernate or alternative) and JSF with IceFaces. Do you think that such stack on Spring 3 deployed on Tomcat is a good choice? Or a JEE6 web application could be better? I'm afraid that JEE6 is a new technology, not well docummented yet. Tomcat seems to be easier to mantain than Glassfish 3. What's your opinion? Do you have any experiences ?
4
5,825,192
04/28/2011 21:22:07
473,423
10/12/2010 14:00:24
127
0
word count limitations
If i have a string like String s = " , , , , , "; this is demarcated by space so the unix utility "wc" ends up counting them as 5 words. However, it doesn't make much sense. In Java, if I use s.split("\\s+") again the same issue. So, my question is, they shouldn't be considered words right? Punctuations are always ignored in word counts correct ?
java
algorithm
null
null
null
04/28/2011 21:33:42
not a real question
word count limitations === If i have a string like String s = " , , , , , "; this is demarcated by space so the unix utility "wc" ends up counting them as 5 words. However, it doesn't make much sense. In Java, if I use s.split("\\s+") again the same issue. So, my question is, they shouldn't be considered words right? Punctuations are always ignored in word counts correct ?
1