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
6,380,331
06/17/2011 00:58:36
720,943
04/22/2011 18:21:57
111
0
should apache upload dir have 777 permissions or belong to www-data user?
I'm running apache and my php site uploads images to the server. should apache upload dir have 777 permissions or belong to www-data user? How would this affect backing things up?
apache
file-upload
permissions
null
null
null
open
should apache upload dir have 777 permissions or belong to www-data user? === I'm running apache and my php site uploads images to the server. should apache upload dir have 777 permissions or belong to www-data user? How would this affect backing things up?
0
7,579,207
09/28/2011 06:35:35
905,356
08/22/2011 06:41:25
5
0
nginx + apache + mod_wsgi can not pass ab -c 20000 -n 40000 bench test
i set up nginx as the reverse proxy server in front of an apache + mod_wsgi + python2.7 backend. nginx and apache are in 2 physical machines with 24 threads cpu (Xeon E5645). if i run the "ab -c 20000 -n 40000" bench test directly to the apache server, it worked fine, in fact the apache server could handle an "ab -c 20000 -n 80000" bench test. but when i put the nginx in front of apache (in another server as powerful as the one apache resides), the bench test will fail on around 32000 requests. here is the nginx config file: worker_processes 24; events { worker_connections 65536; } server { listen 80; server_name example.net; location / { proxy_pass http://example.org; } } net.core.somaxconn has been adjusted to 1048576 so what could be the problem?
python
apache
nginx
benchmarking
mod-wsgi
09/29/2011 00:49:34
off topic
nginx + apache + mod_wsgi can not pass ab -c 20000 -n 40000 bench test === i set up nginx as the reverse proxy server in front of an apache + mod_wsgi + python2.7 backend. nginx and apache are in 2 physical machines with 24 threads cpu (Xeon E5645). if i run the "ab -c 20000 -n 40000" bench test directly to the apache server, it worked fine, in fact the apache server could handle an "ab -c 20000 -n 80000" bench test. but when i put the nginx in front of apache (in another server as powerful as the one apache resides), the bench test will fail on around 32000 requests. here is the nginx config file: worker_processes 24; events { worker_connections 65536; } server { listen 80; server_name example.net; location / { proxy_pass http://example.org; } } net.core.somaxconn has been adjusted to 1048576 so what could be the problem?
2
10,316,153
04/25/2012 12:57:03
1,348,778
04/21/2012 20:24:51
1
0
how long will google-drive-sdk be active?
I would like to know how long the google-drive-sdk will be active before it will be shutdown by Google. Please indicate how many years it will be supported. I'm tired of APIs that have been shut-down during the last and this year. Developers need to be sure that their work will not be thrown to garbage, due to unexpected API termination from Google.
api
google
lifecycle
google-drive-sdk
null
04/25/2012 13:54:06
not constructive
how long will google-drive-sdk be active? === I would like to know how long the google-drive-sdk will be active before it will be shutdown by Google. Please indicate how many years it will be supported. I'm tired of APIs that have been shut-down during the last and this year. Developers need to be sure that their work will not be thrown to garbage, due to unexpected API termination from Google.
4
638,332
03/12/2009 12:06:34
71,976
02/27/2009 17:43:14
62
1
How do I join two tables ON a column, that has the same name in both tables?
see above...
sql
null
null
null
null
null
open
How do I join two tables ON a column, that has the same name in both tables? === see above...
0
6,898,585
08/01/2011 12:43:54
560,204
12/29/2010 15:07:45
494
0
Best framework for java developers with tight AJAX integration
Before you close this question, I would like to emphasize that this requirement is specific to my skills as a developer and I have read other qns on SO which don't answer my own. I have used JSP, Servlets, Javabeans and MySQL to build web apps, but I would like to make a shift to a Java framework with **good AJAX integration**. Additionally, this framework should have a **strong community base** and should be good for developing **highly scalable** applications. Basically, I am also interested in concrete **examples** of commercial web applications developed using the framework you recommend. Currently, I'm thinking of using Spring MVC with Jquery. Thoughts? Thanks!
java
javascript
ajax
null
null
08/01/2011 14:33:26
not constructive
Best framework for java developers with tight AJAX integration === Before you close this question, I would like to emphasize that this requirement is specific to my skills as a developer and I have read other qns on SO which don't answer my own. I have used JSP, Servlets, Javabeans and MySQL to build web apps, but I would like to make a shift to a Java framework with **good AJAX integration**. Additionally, this framework should have a **strong community base** and should be good for developing **highly scalable** applications. Basically, I am also interested in concrete **examples** of commercial web applications developed using the framework you recommend. Currently, I'm thinking of using Spring MVC with Jquery. Thoughts? Thanks!
4
11,676,608
07/26/2012 19:25:48
1,555,295
07/26/2012 15:52:30
1
0
Python function
Here's my function: I need it to return False when it is not an integer or when it is not a number...now it still returns True both instances. def isInt(x): if str(x): print "True" else: print "False"
python
null
null
null
null
07/26/2012 19:37:43
not a real question
Python function === Here's my function: I need it to return False when it is not an integer or when it is not a number...now it still returns True both instances. def isInt(x): if str(x): print "True" else: print "False"
1
2,605,245
04/09/2010 05:25:30
312,518
04/09/2010 05:25:30
1
0
Accessing NSMutableDictionary Across Classes
I have declared an NSMutableDictionary object in AppController.h and initialized in the corresponding AppController.m file. AppController.h #import <Cocoa/Cocoa.h> @interface AppController : NSObject { NSMutableDictionary *uberDict; } AppController.m #import "AppController.h" @implementation AppController - (id)init { uberDict = [NSMutableDictionary new]; return self; } Now I want to use the NSMutableDictionary object in another view, flashcardView. I add/remove items in the dictionary using methods in the AppController class and want to use the same dictionary (with the current items still present in it) in the flashcardView view. The problem is that I don't know how to access the dictionary object from outside AppController. How would I do that? from flashcardView.m - (void)setAndCheckString { NSArray *keys = [uberDict allKeys]; NSString *i; for (i in keys) { string = i; NSLog(@"%@", string); } } Here's where the problem lies. What do I do with uberDict to make this work? Thanks!
objective-c
nsmutabledictionary
null
null
null
null
open
Accessing NSMutableDictionary Across Classes === I have declared an NSMutableDictionary object in AppController.h and initialized in the corresponding AppController.m file. AppController.h #import <Cocoa/Cocoa.h> @interface AppController : NSObject { NSMutableDictionary *uberDict; } AppController.m #import "AppController.h" @implementation AppController - (id)init { uberDict = [NSMutableDictionary new]; return self; } Now I want to use the NSMutableDictionary object in another view, flashcardView. I add/remove items in the dictionary using methods in the AppController class and want to use the same dictionary (with the current items still present in it) in the flashcardView view. The problem is that I don't know how to access the dictionary object from outside AppController. How would I do that? from flashcardView.m - (void)setAndCheckString { NSArray *keys = [uberDict allKeys]; NSString *i; for (i in keys) { string = i; NSLog(@"%@", string); } } Here's where the problem lies. What do I do with uberDict to make this work? Thanks!
0
10,183,776
04/17/2012 01:07:59
1,217,343
02/17/2012 23:16:54
3
0
Random Tiny L's popping up in IE8 and later (Wordpress)
As the title states this is a wordpress site and these random L's are popping up in my text. Has anyone seen this before? Here is a screenshot: http://imageshack.us/photo/my-images/14/screenshot20120416at553.png/
wordpress
random
null
null
null
04/17/2012 11:42:32
not a real question
Random Tiny L's popping up in IE8 and later (Wordpress) === As the title states this is a wordpress site and these random L's are popping up in my text. Has anyone seen this before? Here is a screenshot: http://imageshack.us/photo/my-images/14/screenshot20120416at553.png/
1
7,281,964
09/02/2011 10:09:09
859,154
07/23/2011 09:23:42
314
8
Httpcontext is null?
Is it right to say that when Httpcontext object is null - so the iis is down ? i know that when the first request to iis ( asp.net) the application manager creates enviroment : Application Domain. inside it theres Application Runtime. And inside it there's blocks of (if theres more then 1 application on the server) HttpApplication with each has httpContext which handler Response and Request. ![enter image description here][1] **So what does it mean when i get in asp.net HttpContext is null ?** [1]: http://i.stack.imgur.com/mkjgC.gif
asp.net
page-lifecycle
null
null
null
null
open
Httpcontext is null? === Is it right to say that when Httpcontext object is null - so the iis is down ? i know that when the first request to iis ( asp.net) the application manager creates enviroment : Application Domain. inside it theres Application Runtime. And inside it there's blocks of (if theres more then 1 application on the server) HttpApplication with each has httpContext which handler Response and Request. ![enter image description here][1] **So what does it mean when i get in asp.net HttpContext is null ?** [1]: http://i.stack.imgur.com/mkjgC.gif
0
8,547,226
12/17/2011 19:07:22
262,914
01/31/2010 13:52:50
380
4
just curious to know the difference between spring mvc vs django
I would like to ask the masters out there as what are the main differences between java spring mvc and django? and also..which one is preferred most?
java
python
django
mvc
spring-mvc
12/17/2011 23:43:48
not constructive
just curious to know the difference between spring mvc vs django === I would like to ask the masters out there as what are the main differences between java spring mvc and django? and also..which one is preferred most?
4
3,634,309
09/03/2010 09:02:27
434,519
08/30/2010 01:01:26
8
0
PHP: preg_replace help
I have the following code: $string = '[url]http://google.com[/url]'; $bbreplace = array ('/\[url\](.+?)\[\/url\]/'); $bbreplacements = array ('<a href=\"\\1\">\\1</a>'); $string = preg_replace($bbreplace, $bbreplacements, $string); print $string; Which creates a url called http://google.com/ that points to mydomain.com/"http://google.com/" instead of http://google.com/ How can I fix this? Thanks
php
regex
null
null
null
null
open
PHP: preg_replace help === I have the following code: $string = '[url]http://google.com[/url]'; $bbreplace = array ('/\[url\](.+?)\[\/url\]/'); $bbreplacements = array ('<a href=\"\\1\">\\1</a>'); $string = preg_replace($bbreplace, $bbreplacements, $string); print $string; Which creates a url called http://google.com/ that points to mydomain.com/"http://google.com/" instead of http://google.com/ How can I fix this? Thanks
0
9,582,299
03/06/2012 10:59:21
419,284
08/13/2010 07:22:32
151
2
The meaning of the term "boosting"
Can anyone tell me what is the meaning of "Graph boosting", when i search this term by google, i just find a Graph Boost Library, so the "boost" term in here means this is an enhanced library which can makes C++ more complete? Thanks!
c++
null
null
null
null
03/06/2012 11:27:37
not a real question
The meaning of the term "boosting" === Can anyone tell me what is the meaning of "Graph boosting", when i search this term by google, i just find a Graph Boost Library, so the "boost" term in here means this is an enhanced library which can makes C++ more complete? Thanks!
1
3,783,619
09/24/2010 01:29:47
456,806
09/24/2010 01:29:47
1
0
PHP - Need help with some string functions.
I am trying to write a script to pull schedule data out of a database used at work. The employees working times are stored daily as a string like this 000000000000000000000000000000001111111111111111111111111111111111111111000000000000000000000000 Every character represents 15 min. The first character space is 12:00 AM second is 12:15 AM and so on.... The example above the employee works 8:00 - 6:00. I created an array like this for every character position. $time[0] = "12:00"; $time[1] = "12:15"; $time[2] = "12:30"; $time[3] = "12:45"; $time[4] = "1:00"; $time[5] = "1:15"; $time[6] = "1:30"; $time[7] = "1:45"; $time[8] = "2:00"; and I can display the employees time like this echo $time[strpos($string, '1')] . "-" . $time[strpos($string, '0', strpos($string, '1'))]; but I cannot figure out how to make this work if someone has a split shift, such as 9:30 - 2:00 / 4:00 - 7:00 000000000000000000000000000000000000001111111111111111110000000011111111111110000000000000000000 Sorry if my English is poor. Thanks
php
null
null
null
null
null
open
PHP - Need help with some string functions. === I am trying to write a script to pull schedule data out of a database used at work. The employees working times are stored daily as a string like this 000000000000000000000000000000001111111111111111111111111111111111111111000000000000000000000000 Every character represents 15 min. The first character space is 12:00 AM second is 12:15 AM and so on.... The example above the employee works 8:00 - 6:00. I created an array like this for every character position. $time[0] = "12:00"; $time[1] = "12:15"; $time[2] = "12:30"; $time[3] = "12:45"; $time[4] = "1:00"; $time[5] = "1:15"; $time[6] = "1:30"; $time[7] = "1:45"; $time[8] = "2:00"; and I can display the employees time like this echo $time[strpos($string, '1')] . "-" . $time[strpos($string, '0', strpos($string, '1'))]; but I cannot figure out how to make this work if someone has a split shift, such as 9:30 - 2:00 / 4:00 - 7:00 000000000000000000000000000000000000001111111111111111110000000011111111111110000000000000000000 Sorry if my English is poor. Thanks
0
2,881,905
05/21/2010 12:14:29
222,781
12/02/2009 09:43:45
52
2
ImageView changes frame/bounds...
I have been trying to find this issue here, but no topic seems to fit... I have a UINavigationController that pushes different kinds of UIViews containing images. When the controller pushes a new view, it the navigation bar is moved onto the screen and it appears that the image subsequently is being 'squelched' a bit - or it 'moves in from top' (I hope I described this sufficiently). Anyway, my image has the frame of 320x460 (because of the top bar). I couldnt find a proper setting, where the image would remain in this size. It is always 'made smaller'. Subtracting 45 px for the new navigation bar (to 320x415) didnt help either. What am I missing? Any clues are welcome! P.S.:Setting the resizemask to 0 didnt help either....
iphone
uiview
uiimageview
resize
uinavigationcontroller
null
open
ImageView changes frame/bounds... === I have been trying to find this issue here, but no topic seems to fit... I have a UINavigationController that pushes different kinds of UIViews containing images. When the controller pushes a new view, it the navigation bar is moved onto the screen and it appears that the image subsequently is being 'squelched' a bit - or it 'moves in from top' (I hope I described this sufficiently). Anyway, my image has the frame of 320x460 (because of the top bar). I couldnt find a proper setting, where the image would remain in this size. It is always 'made smaller'. Subtracting 45 px for the new navigation bar (to 320x415) didnt help either. What am I missing? Any clues are welcome! P.S.:Setting the resizemask to 0 didnt help either....
0
7,980,013
11/02/2011 12:07:20
865,507
07/27/2011 13:39:57
65
0
How can I find how much energy is using my computer?
Hi How can I find how much energy is using my computer.. can I find using energy with C#.NET.. I looked too much but could not find any idea!
c#
.net
pc
electronics
energy
11/02/2011 12:28:07
off topic
How can I find how much energy is using my computer? === Hi How can I find how much energy is using my computer.. can I find using energy with C#.NET.. I looked too much but could not find any idea!
2
10,784,199
05/28/2012 11:49:29
1,421,633
05/28/2012 11:43:19
1
0
Entering iOS application from push-notification without passcode
Is there a way to open your iOS application from push-notification without entering passcode?
ios
null
null
null
null
06/01/2012 03:16:49
not a real question
Entering iOS application from push-notification without passcode === Is there a way to open your iOS application from push-notification without entering passcode?
1
8,443,621
12/09/2011 09:43:16
829,237
07/05/2011 08:03:11
145
2
Dynamic update sql
Im building a dynamic sql update statement. This statement will update an unknown number of columns. Im looking for a clever way to set the commas between the columns in the update-statement correct. DECLARE @UpdateSQL nvarchar(max) = 'UPDATE MYTABLE SET ' WHILE (somecondition) BEGIN IF (someothercondition) SET @UpdateSQL = @UpdateSQL + @ColNameVar + ' = ' @ColNameVar + ',' --How to set this comma only on columns that are not the last?? END There is ofcourse more building to do with this updateSQL, but this is the only relevant part for my question. One important note is that the last run of the while-loop is not necessarly putting in a new column in the update, so i could not use that as a check. Any ideas? Using SQL Server-2008
sql
sql-server
sql-server-2008
tsql
null
null
open
Dynamic update sql === Im building a dynamic sql update statement. This statement will update an unknown number of columns. Im looking for a clever way to set the commas between the columns in the update-statement correct. DECLARE @UpdateSQL nvarchar(max) = 'UPDATE MYTABLE SET ' WHILE (somecondition) BEGIN IF (someothercondition) SET @UpdateSQL = @UpdateSQL + @ColNameVar + ' = ' @ColNameVar + ',' --How to set this comma only on columns that are not the last?? END There is ofcourse more building to do with this updateSQL, but this is the only relevant part for my question. One important note is that the last run of the while-loop is not necessarly putting in a new column in the update, so i could not use that as a check. Any ideas? Using SQL Server-2008
0
10,598,547
05/15/2012 10:13:26
1,384,956
05/09/2012 15:06:17
3
0
how to set TextView from another Class (Android)
i have this code but it doesnt work (Force Close) ,i use this in C# but its not working in java ClassA c = new ClassA(); c.TextView1.setText("test"); i need to set the text view from ClassB can it be done without using the Intent because the Intent need to start the Activity all over and all the data will be lost can anyone suggest a code for this also can i set the int x value in ClassA from ClassB
java
android
null
null
null
05/16/2012 21:25:17
not a real question
how to set TextView from another Class (Android) === i have this code but it doesnt work (Force Close) ,i use this in C# but its not working in java ClassA c = new ClassA(); c.TextView1.setText("test"); i need to set the text view from ClassB can it be done without using the Intent because the Intent need to start the Activity all over and all the data will be lost can anyone suggest a code for this also can i set the int x value in ClassA from ClassB
1
9,661,084
03/12/2012 02:34:02
408,137
08/01/2010 21:36:45
205
1
JQuery UI Selectable API add on click not deselect
Im currently implementing a selectable list based off the jquery selectable grid demo at http://jqueryui.com/demos/selectable/#display-grid My question is, is there a way to have it so when you click on a new grid panel it selects it and doesnt deselect the current selection (disregard the ctl+mouse click logic). i.e. Panels can only be "de-selected" by clicking on them? Thanks
jquery
asp.net-mvc
jquery-ui
list
selectable
null
open
JQuery UI Selectable API add on click not deselect === Im currently implementing a selectable list based off the jquery selectable grid demo at http://jqueryui.com/demos/selectable/#display-grid My question is, is there a way to have it so when you click on a new grid panel it selects it and doesnt deselect the current selection (disregard the ctl+mouse click logic). i.e. Panels can only be "de-selected" by clicking on them? Thanks
0
11,698,254
07/28/2012 04:22:05
1,036,298
11/08/2011 19:15:40
63
2
How to Implement YUI Compresser in a website
I wish to create a js/css minifying website using yahoo YUI compressor. How can I use this on my webserver. My server is running apache. How to run this jar files in my server. What should I do for that? I wish to create the side in PHP along with YUI? I found this on the web. will it help me? https://github.com/gpbmike/PHP-YUI-Compressor
php
javascript
css
apache
yui
07/28/2012 15:27:28
not a real question
How to Implement YUI Compresser in a website === I wish to create a js/css minifying website using yahoo YUI compressor. How can I use this on my webserver. My server is running apache. How to run this jar files in my server. What should I do for that? I wish to create the side in PHP along with YUI? I found this on the web. will it help me? https://github.com/gpbmike/PHP-YUI-Compressor
1
3,523,079
08/19/2010 14:59:02
34,537
11/05/2008 03:00:23
6,090
125
Usage: Escape HTML problem
I ran into an interesting problem. In our webpage a user can write their own description. We escape all text to make it easy to write (`<3` shows up properly and isnt the start of a tag). This also avoids any problems with trying to inject their javascript code or hide something or do anything with html. A side effect is when a user writes Hi My name is shows up as Hi My name is Initially we (really i) wrote `var desc = (SafeHtml)obj.desc.HtmlEscape.replace("\n", "\n<br>")` however this doesnt replace anything because what really happens is \n is replaced as `#&10;` since all characters < 0x20 (<--i think) needs an escape to be represented in html. So my question is, am i doing things right? I changed the replace to `("&#10;", "\n<br/>");`. Is this the right way? Escape everything and replace characters you deem 'legal'? ATM i cant think of any other characters to escape.
html
escaping
best-pratice
null
null
null
open
Usage: Escape HTML problem === I ran into an interesting problem. In our webpage a user can write their own description. We escape all text to make it easy to write (`<3` shows up properly and isnt the start of a tag). This also avoids any problems with trying to inject their javascript code or hide something or do anything with html. A side effect is when a user writes Hi My name is shows up as Hi My name is Initially we (really i) wrote `var desc = (SafeHtml)obj.desc.HtmlEscape.replace("\n", "\n<br>")` however this doesnt replace anything because what really happens is \n is replaced as `#&10;` since all characters < 0x20 (<--i think) needs an escape to be represented in html. So my question is, am i doing things right? I changed the replace to `("&#10;", "\n<br/>");`. Is this the right way? Escape everything and replace characters you deem 'legal'? ATM i cant think of any other characters to escape.
0
8,077,932
11/10/2011 10:16:31
160,577
08/21/2009 06:25:51
454
15
How to use default value in LOAD statement in DB2?
I am currently using DB2 . I do not know much about load statement. I am using this query to load data.. > LOAD FROM "IXAC.CSV" OF DEL METHOD P ('IX',1,2,3,4,) MESSAGES > "SYAC.MSG" INSERT INTO SYNC.AC_COUNT ( "TYPE", AC1, AC2, AC3, > AC4 ) ; COMMIT; In "IXAC.CSV" there are 4 int values separated with comma. My problem is that how can i insert 'IX' with load statement as a constant with each row insert. I tried this but not found any success. I am newer in database. Help me .. Thanks in advance ...
insert
load
db2
null
null
null
open
How to use default value in LOAD statement in DB2? === I am currently using DB2 . I do not know much about load statement. I am using this query to load data.. > LOAD FROM "IXAC.CSV" OF DEL METHOD P ('IX',1,2,3,4,) MESSAGES > "SYAC.MSG" INSERT INTO SYNC.AC_COUNT ( "TYPE", AC1, AC2, AC3, > AC4 ) ; COMMIT; In "IXAC.CSV" there are 4 int values separated with comma. My problem is that how can i insert 'IX' with load statement as a constant with each row insert. I tried this but not found any success. I am newer in database. Help me .. Thanks in advance ...
0
8,028,845
11/06/2011 17:21:55
854,404
07/20/2011 16:48:32
1
0
CryEngine 3 SDK forum / irc / chat?
I'am working on the CryEngine 3 Free SDK (big IT school project), and I am looking for a place to ask some precise questions about CryEngine 3, eg how the source code handle some features (source code that are not in the Free SDK). Do you know an irc / chat / forum where I can ask my questions ? (the official forum doesnt seem to be really useful for my kind of questions...) PS: I'am French, so I'll take French stuff too. PSS: No CryEngine tag at stackoverflow ? I hope I am at the right place for my question...
game-engine
null
null
null
null
11/17/2011 13:58:38
off topic
CryEngine 3 SDK forum / irc / chat? === I'am working on the CryEngine 3 Free SDK (big IT school project), and I am looking for a place to ask some precise questions about CryEngine 3, eg how the source code handle some features (source code that are not in the Free SDK). Do you know an irc / chat / forum where I can ask my questions ? (the official forum doesnt seem to be really useful for my kind of questions...) PS: I'am French, so I'll take French stuff too. PSS: No CryEngine tag at stackoverflow ? I hope I am at the right place for my question...
2
2,752,453
05/02/2010 04:30:15
91,970
04/17/2009 05:32:48
83
5
How do I overlay an icon/image onto another image on form submission?
So I am trying to add an icon to an image, once someone has 'tagged' a portion of the image - i.e. they have submitted the form. How do I do that in jQuery? Just to be clear...imagine you are on flickr and you see an image. You want to add an annotation, you click on the image where you want, and it shows you a form field. You enter the information you want to, then after you have done so, there is a small image left on top of the picture that shows where you have left a comment. Any ideas?
jquery
css
null
null
null
null
open
How do I overlay an icon/image onto another image on form submission? === So I am trying to add an icon to an image, once someone has 'tagged' a portion of the image - i.e. they have submitted the form. How do I do that in jQuery? Just to be clear...imagine you are on flickr and you see an image. You want to add an annotation, you click on the image where you want, and it shows you a form field. You enter the information you want to, then after you have done so, there is a small image left on top of the picture that shows where you have left a comment. Any ideas?
0
11,210,943
06/26/2012 15:38:52
1,417,867
05/25/2012 16:33:03
1
0
Deauthorization Url not called
I have set a Deauthorization callback url in my app settings. This url is accessabe via the browser and currently just writing a string to a log file. When I authorize with my FB account at my application and then remove the application, there is no log entry in my log file. has somebody an idea, why there is no call to my provided url?
authorization
facebook-authorization
null
null
null
06/27/2012 18:27:53
not a real question
Deauthorization Url not called === I have set a Deauthorization callback url in my app settings. This url is accessabe via the browser and currently just writing a string to a log file. When I authorize with my FB account at my application and then remove the application, there is no log entry in my log file. has somebody an idea, why there is no call to my provided url?
1
8,195,724
11/19/2011 17:09:15
1,022,734
10/31/2011 21:31:57
1
0
Client & Socket - None - blocking in C
I started to read and learn about the "sockets", but I want a little sampel code written in C as a client and another code as a server, which will be none-blocking The code should be able to send input from the client and the server must be able to receive the output in the none-blocking stat, both should be in the none-blocking stat. I've read a lot in google and books, youtube, but nothing really help.. This is my server: #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <stdlib.h> int main() { int sock; int addr_len, bytes_read; char recv_data[1024]; struct sockaddr_in server_addr , client_addr; if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { perror("Socket"); exit(1); } server_addr.sin_family = AF_INET; server_addr.sin_port = htons(5000); server_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); bzero(&(server_addr.sin_zero),8); if (bind(sock,(struct sockaddr *)&server_addr, sizeof(struct sockaddr)) == -1) { perror("Bind"); exit(1); } addr_len = sizeof(struct sockaddr); printf("\nUDPServer Waiting for client on port 5000"); fflush(stdout); while (1) { bytes_read = recvfrom(sock,recv_data,1024,0, (struct sockaddr *)&client_addr, &addr_len); // <---- Here is the problem recv_data[bytes_read] = '\0'; printf("\n(%s , %d) said : ",inet_ntoa(client_addr.sin_addr), ntohs(client_addr.sin_port)); printf("%s", recv_data); fflush(stdout); } return 0; }
c++
c
sockets
null
null
11/19/2011 22:17:06
not a real question
Client & Socket - None - blocking in C === I started to read and learn about the "sockets", but I want a little sampel code written in C as a client and another code as a server, which will be none-blocking The code should be able to send input from the client and the server must be able to receive the output in the none-blocking stat, both should be in the none-blocking stat. I've read a lot in google and books, youtube, but nothing really help.. This is my server: #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <stdlib.h> int main() { int sock; int addr_len, bytes_read; char recv_data[1024]; struct sockaddr_in server_addr , client_addr; if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { perror("Socket"); exit(1); } server_addr.sin_family = AF_INET; server_addr.sin_port = htons(5000); server_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); bzero(&(server_addr.sin_zero),8); if (bind(sock,(struct sockaddr *)&server_addr, sizeof(struct sockaddr)) == -1) { perror("Bind"); exit(1); } addr_len = sizeof(struct sockaddr); printf("\nUDPServer Waiting for client on port 5000"); fflush(stdout); while (1) { bytes_read = recvfrom(sock,recv_data,1024,0, (struct sockaddr *)&client_addr, &addr_len); // <---- Here is the problem recv_data[bytes_read] = '\0'; printf("\n(%s , %d) said : ",inet_ntoa(client_addr.sin_addr), ntohs(client_addr.sin_port)); printf("%s", recv_data); fflush(stdout); } return 0; }
1
5,467,007
03/29/2011 01:41:45
319,473
04/18/2010 00:36:13
38
3
Inverting rotation in 3D, to make an object always face the camera?
i have lots of sprites arranged in 3D space, and their parent container has rotations applied. How do i reverse the sprites 3D rotation, that they always face the camera (Actionscript 3)? heres a code to test it: package{ import flash.display.Sprite; import flash.events.Event; public class test extends Sprite{ var canvas:Sprite = new Sprite(); var sprites:Array = [] public function test(){ addChild(canvas) for (var i:int=0;i<20;i++){ var sp:Sprite = new Sprite(); canvas.addChild(sp); sp.graphics.beginFill(0xFF0000); sp.graphics.drawCircle(0,0,4); sp.x = Math.random()*400-200; sp.y = Math.random()*400-200; sp.z = Math.random()*400-200; sprites.push(sp); } addEventListener(Event.ENTER_FRAME,function():void{ canvas.rotationX++; canvas.rotationY = canvas.rotationY+Math.random()*2; canvas.rotationZ++; for (var i:int=0;i<20;i++){ //this is not working... sprites[i].rotationX = -canvas.rotationX sprites[i].rotationY = -canvas.rotationY sprites[i].rotationZ = -canvas.rotationZ } }) } } } I am guessing i have to do some magic with the rotation3D matrices of the sprites... I've tried to implement this script: http://ughzoid.wordpress.com/2011/02/03/papervision3d-sprite3d/ , but had so success Thanks for help.
flash
actionscript-3
3d
null
null
null
open
Inverting rotation in 3D, to make an object always face the camera? === i have lots of sprites arranged in 3D space, and their parent container has rotations applied. How do i reverse the sprites 3D rotation, that they always face the camera (Actionscript 3)? heres a code to test it: package{ import flash.display.Sprite; import flash.events.Event; public class test extends Sprite{ var canvas:Sprite = new Sprite(); var sprites:Array = [] public function test(){ addChild(canvas) for (var i:int=0;i<20;i++){ var sp:Sprite = new Sprite(); canvas.addChild(sp); sp.graphics.beginFill(0xFF0000); sp.graphics.drawCircle(0,0,4); sp.x = Math.random()*400-200; sp.y = Math.random()*400-200; sp.z = Math.random()*400-200; sprites.push(sp); } addEventListener(Event.ENTER_FRAME,function():void{ canvas.rotationX++; canvas.rotationY = canvas.rotationY+Math.random()*2; canvas.rotationZ++; for (var i:int=0;i<20;i++){ //this is not working... sprites[i].rotationX = -canvas.rotationX sprites[i].rotationY = -canvas.rotationY sprites[i].rotationZ = -canvas.rotationZ } }) } } } I am guessing i have to do some magic with the rotation3D matrices of the sprites... I've tried to implement this script: http://ughzoid.wordpress.com/2011/02/03/papervision3d-sprite3d/ , but had so success Thanks for help.
0
10,742,742
05/24/2012 17:51:01
796,443
06/13/2011 18:37:33
227
4
Python plugin installation instructions I don't understand, can someone explain?
I'm trying to install python plugin for Trac. Being a noob, I don't quite understand instructions... Can someone please explain? $> svn co https://www.coderesort.com/svn/open/trac-talkplugin/trunk tractalk-trunk $> cd tractalk-trunk $> python setup.py install # or 'bdist_egg' or 'develop' Checkout from SVN - Done cd tractalk-trunk - Done **I'm stuck with installer.** Should I run it exactly how it is written? Or just python setup.py install ? Care explain what is going on in this command? As far as I understand # means that part is ignored?
python
null
null
null
null
null
open
Python plugin installation instructions I don't understand, can someone explain? === I'm trying to install python plugin for Trac. Being a noob, I don't quite understand instructions... Can someone please explain? $> svn co https://www.coderesort.com/svn/open/trac-talkplugin/trunk tractalk-trunk $> cd tractalk-trunk $> python setup.py install # or 'bdist_egg' or 'develop' Checkout from SVN - Done cd tractalk-trunk - Done **I'm stuck with installer.** Should I run it exactly how it is written? Or just python setup.py install ? Care explain what is going on in this command? As far as I understand # means that part is ignored?
0
8,605,344
12/22/2011 14:34:22
1,111,889
12/22/2011 14:29:14
1
0
Rails : How to load Validation Module in Console
I'm a newbie in Ruby on Rails development and I just developed a partial code to validate a field. But I want to verify my function in the rails console. The problem is that I can launch my function in the console, but I can't verify my validation because the official validation module is not loaded. How can I launch it? Thank you for your answer Orel
ruby
ruby-on-rails-3
null
null
null
null
open
Rails : How to load Validation Module in Console === I'm a newbie in Ruby on Rails development and I just developed a partial code to validate a field. But I want to verify my function in the rails console. The problem is that I can launch my function in the console, but I can't verify my validation because the official validation module is not loaded. How can I launch it? Thank you for your answer Orel
0
8,408,156
12/06/2011 23:01:47
232,417
12/15/2009 20:21:32
3,447
14
How can I do SQL string parameter escaping in the #select method of ActiveRecord::Relation?
With ActiveRecord 3, it looks like I have to do this: @query = "some user-entered query" @result = Entry.select("entries.*, ts_rank(entries.textsearchable_index_col, plainto_tsquery('#{@query}')) as score"). where("entries.textsearchable_index_col @@ plainto_tsquery(?)", @query). order("score desc") when I really want to do this: @query = "some user-entered query" @result = Entry.select("entries.*, ts_rank(entries.textsearchable_index_col, plainto_tsquery(?)) as score", @query). where("entries.textsearchable_index_col @@ plainto_tsquery(?)", @query). order("score desc") (I'm using Postgresql full text search.) When I try the second form, I get the error: ArgumentError (wrong number of arguments (2 for 1)): vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.6/lib/active_record/relation/query_methods.rb:34:in `select' ... I would like to have Rails sanitize the @query string and insert it into the `select` part of the SQL query safely. Any suggestions?
ruby-on-rails-3
activerecord
null
null
null
null
open
How can I do SQL string parameter escaping in the #select method of ActiveRecord::Relation? === With ActiveRecord 3, it looks like I have to do this: @query = "some user-entered query" @result = Entry.select("entries.*, ts_rank(entries.textsearchable_index_col, plainto_tsquery('#{@query}')) as score"). where("entries.textsearchable_index_col @@ plainto_tsquery(?)", @query). order("score desc") when I really want to do this: @query = "some user-entered query" @result = Entry.select("entries.*, ts_rank(entries.textsearchable_index_col, plainto_tsquery(?)) as score", @query). where("entries.textsearchable_index_col @@ plainto_tsquery(?)", @query). order("score desc") (I'm using Postgresql full text search.) When I try the second form, I get the error: ArgumentError (wrong number of arguments (2 for 1)): vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.6/lib/active_record/relation/query_methods.rb:34:in `select' ... I would like to have Rails sanitize the @query string and insert it into the `select` part of the SQL query safely. Any suggestions?
0
8,485,068
12/13/2011 06:10:06
887,235
08/10/2011 05:36:27
384
21
Spring Error: org.springframework.beans.factory.BeanCreationException
I have a web application which I am exporting as EAR and trying to deploy on Websphere 6.1 application server. The deployment goes fine. Even, the index page loads fine which is a login screen. However, on entering credentials and hitting enter, the next page does not load and HTTP 500 Internal Server Error is thrown. The next page which gets loaded is a JSP having a country drop down, whose values gets fetched from database via hibernate. I have Datasource created in Websphere with all details and even test connection succeeds. However, I get the below error on checking the server System.out logs: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ds': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Context: uschwasvmdev04Cell01/clusters/URMDUS, name: jdbc/mydbXA: First component in name mydbXA not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0] The description of NameNotFoundException says: "This exception is thrown when a component of the name cannot be resolved because it is not bound. " JNDI Lookup in my services.xml also seems fine: <jee:jndi-lookup id="ds" jndi-name="jdbc/mydbXA" resource-ref="true" /> What am I missing here ? Thanks for reading!
spring
web-applications
websphere
null
null
null
open
Spring Error: org.springframework.beans.factory.BeanCreationException === I have a web application which I am exporting as EAR and trying to deploy on Websphere 6.1 application server. The deployment goes fine. Even, the index page loads fine which is a login screen. However, on entering credentials and hitting enter, the next page does not load and HTTP 500 Internal Server Error is thrown. The next page which gets loaded is a JSP having a country drop down, whose values gets fetched from database via hibernate. I have Datasource created in Websphere with all details and even test connection succeeds. However, I get the below error on checking the server System.out logs: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ds': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Context: uschwasvmdev04Cell01/clusters/URMDUS, name: jdbc/mydbXA: First component in name mydbXA not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0] The description of NameNotFoundException says: "This exception is thrown when a component of the name cannot be resolved because it is not bound. " JNDI Lookup in my services.xml also seems fine: <jee:jndi-lookup id="ds" jndi-name="jdbc/mydbXA" resource-ref="true" /> What am I missing here ? Thanks for reading!
0
10,409,312
05/02/2012 07:17:04
1,360,342
04/27/2012 05:47:25
1
0
Rails 2 application: Interaction with facebook and Twitter
<body> I have an application running on ruby 1.8.7 and rails 2.3.5. In my application there is a provision for users to login through facebook or twitter and after successful login they can search for pre loaded articles, read them and leave comment if they want. From admin side of the application i should be able to post on user's facebook wall, if the user is signed in through FB or tweet a message to user if he is signed in through Twitter. When user sign in through FB connect, i am taking all the required permissions, in order to post on his wall and etc.. So please give me some hints, how can i implement this functionality.. </body>
ruby-on-rails
facebook
twitter
null
null
05/02/2012 16:41:39
not a real question
Rails 2 application: Interaction with facebook and Twitter === <body> I have an application running on ruby 1.8.7 and rails 2.3.5. In my application there is a provision for users to login through facebook or twitter and after successful login they can search for pre loaded articles, read them and leave comment if they want. From admin side of the application i should be able to post on user's facebook wall, if the user is signed in through FB or tweet a message to user if he is signed in through Twitter. When user sign in through FB connect, i am taking all the required permissions, in order to post on his wall and etc.. So please give me some hints, how can i implement this functionality.. </body>
1
8,593,949
12/21/2011 17:37:22
1,038,171
11/09/2011 17:22:33
1
1
Import a DLRCachedCode class in a IronPython Script
I'm trying to understand how to import in a IronPython script a dll generated with pyc.py. Is it possible ? Posts all around speak about to use a DLRCachedCode class by C#, instead , I would to import a DLRCachedCode inside an IronPython script. Thanks in advance
ironpython
dlr
null
null
null
null
open
Import a DLRCachedCode class in a IronPython Script === I'm trying to understand how to import in a IronPython script a dll generated with pyc.py. Is it possible ? Posts all around speak about to use a DLRCachedCode class by C#, instead , I would to import a DLRCachedCode inside an IronPython script. Thanks in advance
0
9,840,134
03/23/2012 13:35:16
1,286,482
03/22/2012 16:41:00
1
0
vbscript while loop syntax
In vbscript whenever I use a while loop sometimes the code doesn't work even there is no syntactical error.I want to know if there is any other syntax of writing a while loop. I have tried the following code but it didn't work. sub find_sum(no) dim rem,sum sum=0 while(no>0) rem=no mod 10 sum=sum+(rem*rem*rem) no=no\10 wend result.value=""&sum end sum
vbscript
null
null
null
null
03/27/2012 16:20:17
too localized
vbscript while loop syntax === In vbscript whenever I use a while loop sometimes the code doesn't work even there is no syntactical error.I want to know if there is any other syntax of writing a while loop. I have tried the following code but it didn't work. sub find_sum(no) dim rem,sum sum=0 while(no>0) rem=no mod 10 sum=sum+(rem*rem*rem) no=no\10 wend result.value=""&sum end sum
3
8,341,585
12/01/2011 12:42:41
1,060,044
11/22/2011 15:08:19
1
0
Developing plugin like "Google Talk browser plugin"
I am thinking to create a browser plugin for Windows PC. This plugin should work with all types browser on Windows(like IE, Chrome). I have plan to port the same plugin to other platforms like Linux,Mac. The plugin will have functionality similar to [Google Talk browser plugin][1]. That is the plugin is used to make P2P video/voice connections. I think, I need to follow NPAPI as answered[here][2]. Please tell me if I have to take care follow any other things for the plugin development of this nature. Thank you. [1]: http://www.google.com/chat/video [2]: http://stackoverflow.com/questions/2649056/how-to-write-a-browser-plugin
browser
cross-browser
cross-platform
libjingle
null
12/01/2011 16:16:24
not a real question
Developing plugin like "Google Talk browser plugin" === I am thinking to create a browser plugin for Windows PC. This plugin should work with all types browser on Windows(like IE, Chrome). I have plan to port the same plugin to other platforms like Linux,Mac. The plugin will have functionality similar to [Google Talk browser plugin][1]. That is the plugin is used to make P2P video/voice connections. I think, I need to follow NPAPI as answered[here][2]. Please tell me if I have to take care follow any other things for the plugin development of this nature. Thank you. [1]: http://www.google.com/chat/video [2]: http://stackoverflow.com/questions/2649056/how-to-write-a-browser-plugin
1
109,230
09/20/2008 20:15:54
13,630
09/16/2008 20:16:44
31
4
What is the best online book service for software development references?
I'm a member of ACM, and I have limited access to both Books 24x7 and Safari Books Online, however if I was interested in moving up to a full account for greater access to other books what online book service would you recommend?
reference
ebook
null
null
null
11/17/2011 02:41:06
not constructive
What is the best online book service for software development references? === I'm a member of ACM, and I have limited access to both Books 24x7 and Safari Books Online, however if I was interested in moving up to a full account for greater access to other books what online book service would you recommend?
4
1,775,335
11/21/2009 12:21:14
122,718
06/14/2009 12:30:09
181
4
How to bulk cleanup imports in Java with eclipse?
On a generated project i 100s of warnings caused by unused imports and the like. Can i bulk cleanup those imports for all files?
eclipse
code-formatting
code-cleanup
java
null
null
open
How to bulk cleanup imports in Java with eclipse? === On a generated project i 100s of warnings caused by unused imports and the like. Can i bulk cleanup those imports for all files?
0
11,374,074
07/07/2012 10:07:59
1,508,383
07/07/2012 07:04:05
1
0
Modifying Android Systems Functionality
I am a newbie to android and need to develop a recycle bin.I could get is it possible to modify the android system's delete functionality to work as our own.What i want to do is as user selects delete for any file on sdcard before android deletes it i want to save it to another folder before android could delete it.is it possible in ??????
android
delete
sd-card
recyclebin
null
07/08/2012 01:37:53
not a real question
Modifying Android Systems Functionality === I am a newbie to android and need to develop a recycle bin.I could get is it possible to modify the android system's delete functionality to work as our own.What i want to do is as user selects delete for any file on sdcard before android deletes it i want to save it to another folder before android could delete it.is it possible in ??????
1
3,884,860
10/07/2010 18:51:08
469,482
10/07/2010 18:51:08
1
0
c# drawing image to bigger bitmap
I have create a bitmap. it's width 500px, and height 500px.. And i have an image. it's w : 300px, h:300px; i want to set image to bitmap 500px, 500px without space or black background. Could u help me pls. Ty.
c#
image
drawing
bitmap
null
01/13/2012 19:47:17
not a real question
c# drawing image to bigger bitmap === I have create a bitmap. it's width 500px, and height 500px.. And i have an image. it's w : 300px, h:300px; i want to set image to bitmap 500px, 500px without space or black background. Could u help me pls. Ty.
1
9,871,543
03/26/2012 11:48:26
1,292,910
03/26/2012 11:43:50
1
0
c++ and VS2010 - No symbols are loaded for any call stack frame. The source code cannot be displayed
I have an annoying problem while debugging my applications using VS2010. I got "No symbols are loaded for any call stack frame. The source code cannot be displayed" for some functions (seems in a random way). Furthermore, it is not possible to show the disassembly too. The funny is that this problem occurs only when using x64 configuration. The debugging on 32-bit works properly. We have alle the .PDBs stored correctly. Is someone having an idea?
debugging
null
null
null
null
null
open
c++ and VS2010 - No symbols are loaded for any call stack frame. The source code cannot be displayed === I have an annoying problem while debugging my applications using VS2010. I got "No symbols are loaded for any call stack frame. The source code cannot be displayed" for some functions (seems in a random way). Furthermore, it is not possible to show the disassembly too. The funny is that this problem occurs only when using x64 configuration. The debugging on 32-bit works properly. We have alle the .PDBs stored correctly. Is someone having an idea?
0
9,528,620
03/02/2012 05:47:27
1,244,318
03/02/2012 05:05:09
1
0
How can use div by using loops with php
i want a table horizontally by using "DIV" tag by using loops in PHP. Hope i will be getting answer quickly THANK YOU
php
css
null
null
null
03/03/2012 03:35:52
not a real question
How can use div by using loops with php === i want a table horizontally by using "DIV" tag by using loops in PHP. Hope i will be getting answer quickly THANK YOU
1
5,560,173
04/06/2011 00:26:57
693,967
04/06/2011 00:26:57
1
0
Xlib Fatal IO Error: 11 (resource temporarily unavailable)
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0" after 58 requests (58 known processed) with 0 events remaining. I get this error when running my code. I have looked everywhere on the internet and in the documentation but I can't find anything on what this means? When I run the code I see the window, but nothing draws inside and when I quit the window I get the above error. I'm not trying to do anything fancy. I have set the X window system up with OpenGL I have a basic program like this: #include <GL/gl.h> #include <GL/glu.h> // create window bool success = paDisplay::init(640, 480); if (!success) std::cout << "oh noes"; while (1) { // do pre-frame tasks paDisplay::stepBegin(); // process the screen and draw // do post-frame tasks paDisplay::stepEnd(); } And here is the code for the paDisplay class: #include <X11/X.h> #include <X11/Xlib.h> #include <GL/glx.h> class paDisplay { private: // window information static Display *dpy; static Window win; static GLXContext glc; static XWindowAttributes gwa; static XEvent xev; static int width, height; static int frame; // event information static bool EV_Resize, EV_KeyPress; static KeySym EV_Key; // functions static void destroyWindow(); public: static bool init(int, int); static void stepBegin(); static void stepEnd(); // window static bool createWindow(int, int); static void setTitle(std::string); // events static void pollEvents(); static bool eventResize() { return EV_Resize; } static bool eventKeyPress() { return EV_KeyPress; } static unsigned int getKey() { return EV_Key; } // opengl static void initOpenGL(); static void swapBuffers(); // quit static void quit(); // window dimensions static int getWidth() { return width; } static int getHeight() { return height; } }; // static variables // window information Display* paDisplay::dpy; Window paDisplay::win; GLXContext paDisplay::glc; XWindowAttributes paDisplay::gwa; XEvent paDisplay::xev; int paDisplay::width; int paDisplay::height; int paDisplay::frame; // event information bool paDisplay::EV_Resize; bool paDisplay::EV_KeyPress; KeySym paDisplay::EV_Key; // implementation bool paDisplay::init(int w, int h) { if (createWindow(w, h)) { initOpenGL(); time_t start = time(NULL); srand(start); // initialize frame counter frame = 0; return true; } else return false; } void paDisplay::stepBegin() { // clear the screen glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); pollEvents(); } void paDisplay::stepEnd() { // start processing buffered opengl routines glFlush(); // swap buffers swapBuffers(); // implement dumb frames per second usleep(1000000 / 60); // increase frame counter frame ++; } void paDisplay::initOpenGL() { // init OpenGL glEnable(GL_DEPTH_TEST); glClearColor(1.0, 1.0, 1.0, 1.0); glShadeModel(GL_FLAT); // resize OpenGL projection function glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0, (GLdouble) width, 0, (GLdouble) height); } void paDisplay::setTitle(std::string title) { XStoreName(dpy, win, title.c_str()); } void paDisplay::quit() { destroyWindow(); exit(0); } void paDisplay::pollEvents() { // set defaults EV_Resize = false; EV_KeyPress = false; while (XPending(dpy) > 0) { // get next event XNextEvent(dpy, &xev); switch (xev.type) { // window resized case Expose: /*EV_Resize = true; XGetWindowAttributes(dpy, win, &gwa); width = gwa.width; height = gwa.height; // resize OpenGL projection function glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0, (GLdouble) width, 0, (GLdouble) height);*/ break; // a key was pressed case KeyPress: EV_KeyPress = true; EV_Key = XLookupKeysym(&xev.xkey, 0); break; } } } void paDisplay::swapBuffers() { glXSwapBuffers(dpy, win); } bool paDisplay::createWindow(int w, int h) { Window root; GLint att[] = {GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None}; XVisualInfo *vi; Colormap cmap; XSetWindowAttributes swa; dpy = XOpenDisplay(NULL); if (dpy == NULL) return false; XSynchronize(dpy, true); root = DefaultRootWindow(dpy); vi = glXChooseVisual(dpy, 0, att); if (vi == NULL) return false; cmap = XCreateColormap(dpy, root, vi->visual, AllocNone); swa.colormap = cmap; swa.event_mask = ExposureMask | KeyPressMask | ButtonPressMask; win = XCreateWindow(dpy, root, 0, 0, w, h, 0, vi->depth, InputOutput, vi->visual, CWColormap | CWEventMask, &swa); XMapWindow(dpy, win); XStoreName(dpy, win, "Pineapple"); glc = glXCreateContext(dpy, vi, NULL, GL_TRUE); glXMakeCurrent(dpy, win, glc); return true; } void paDisplay::destroyWindow() { glXMakeCurrent(dpy, None, NULL); glXDestroyContext(dpy, glc); XDestroyWindow(dpy, win); XCloseDisplay(dpy); }
c++
opengl
xlib
null
null
null
open
Xlib Fatal IO Error: 11 (resource temporarily unavailable) === XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0" after 58 requests (58 known processed) with 0 events remaining. I get this error when running my code. I have looked everywhere on the internet and in the documentation but I can't find anything on what this means? When I run the code I see the window, but nothing draws inside and when I quit the window I get the above error. I'm not trying to do anything fancy. I have set the X window system up with OpenGL I have a basic program like this: #include <GL/gl.h> #include <GL/glu.h> // create window bool success = paDisplay::init(640, 480); if (!success) std::cout << "oh noes"; while (1) { // do pre-frame tasks paDisplay::stepBegin(); // process the screen and draw // do post-frame tasks paDisplay::stepEnd(); } And here is the code for the paDisplay class: #include <X11/X.h> #include <X11/Xlib.h> #include <GL/glx.h> class paDisplay { private: // window information static Display *dpy; static Window win; static GLXContext glc; static XWindowAttributes gwa; static XEvent xev; static int width, height; static int frame; // event information static bool EV_Resize, EV_KeyPress; static KeySym EV_Key; // functions static void destroyWindow(); public: static bool init(int, int); static void stepBegin(); static void stepEnd(); // window static bool createWindow(int, int); static void setTitle(std::string); // events static void pollEvents(); static bool eventResize() { return EV_Resize; } static bool eventKeyPress() { return EV_KeyPress; } static unsigned int getKey() { return EV_Key; } // opengl static void initOpenGL(); static void swapBuffers(); // quit static void quit(); // window dimensions static int getWidth() { return width; } static int getHeight() { return height; } }; // static variables // window information Display* paDisplay::dpy; Window paDisplay::win; GLXContext paDisplay::glc; XWindowAttributes paDisplay::gwa; XEvent paDisplay::xev; int paDisplay::width; int paDisplay::height; int paDisplay::frame; // event information bool paDisplay::EV_Resize; bool paDisplay::EV_KeyPress; KeySym paDisplay::EV_Key; // implementation bool paDisplay::init(int w, int h) { if (createWindow(w, h)) { initOpenGL(); time_t start = time(NULL); srand(start); // initialize frame counter frame = 0; return true; } else return false; } void paDisplay::stepBegin() { // clear the screen glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); pollEvents(); } void paDisplay::stepEnd() { // start processing buffered opengl routines glFlush(); // swap buffers swapBuffers(); // implement dumb frames per second usleep(1000000 / 60); // increase frame counter frame ++; } void paDisplay::initOpenGL() { // init OpenGL glEnable(GL_DEPTH_TEST); glClearColor(1.0, 1.0, 1.0, 1.0); glShadeModel(GL_FLAT); // resize OpenGL projection function glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0, (GLdouble) width, 0, (GLdouble) height); } void paDisplay::setTitle(std::string title) { XStoreName(dpy, win, title.c_str()); } void paDisplay::quit() { destroyWindow(); exit(0); } void paDisplay::pollEvents() { // set defaults EV_Resize = false; EV_KeyPress = false; while (XPending(dpy) > 0) { // get next event XNextEvent(dpy, &xev); switch (xev.type) { // window resized case Expose: /*EV_Resize = true; XGetWindowAttributes(dpy, win, &gwa); width = gwa.width; height = gwa.height; // resize OpenGL projection function glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0, (GLdouble) width, 0, (GLdouble) height);*/ break; // a key was pressed case KeyPress: EV_KeyPress = true; EV_Key = XLookupKeysym(&xev.xkey, 0); break; } } } void paDisplay::swapBuffers() { glXSwapBuffers(dpy, win); } bool paDisplay::createWindow(int w, int h) { Window root; GLint att[] = {GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None}; XVisualInfo *vi; Colormap cmap; XSetWindowAttributes swa; dpy = XOpenDisplay(NULL); if (dpy == NULL) return false; XSynchronize(dpy, true); root = DefaultRootWindow(dpy); vi = glXChooseVisual(dpy, 0, att); if (vi == NULL) return false; cmap = XCreateColormap(dpy, root, vi->visual, AllocNone); swa.colormap = cmap; swa.event_mask = ExposureMask | KeyPressMask | ButtonPressMask; win = XCreateWindow(dpy, root, 0, 0, w, h, 0, vi->depth, InputOutput, vi->visual, CWColormap | CWEventMask, &swa); XMapWindow(dpy, win); XStoreName(dpy, win, "Pineapple"); glc = glXCreateContext(dpy, vi, NULL, GL_TRUE); glXMakeCurrent(dpy, win, glc); return true; } void paDisplay::destroyWindow() { glXMakeCurrent(dpy, None, NULL); glXDestroyContext(dpy, glc); XDestroyWindow(dpy, win); XCloseDisplay(dpy); }
0
120,578
09/23/2008 12:11:32
19,435
09/20/2008 01:27:11
597
35
A good pattern/solution to the social web user problem of point whoring?
Take any social website like digg or stackoverflow that lets users reward points for stories/questions/etc. somehow. What happens is quit similar to the process that lead to the rise of tabloid newspapers that feed only headlines and no content to its readers. Users are usually smart enough to figure out strategies to maximize their point rewards. This may or may not coincide with what the social website aims to do, and what the general readership finds interesting. I qualify this as a problem because the way to get most points is to involve as many users as possible. By definition that which can involve most users has to be closer to the lowest common denominator of all users. Given a random web crowd this unfortunately means mostly generic, subjective, argumentative and unspecific entries. As the creator of a social website you have the unique chance to engineer social behavior and steer it towards some favorable direction. What would be a good pattern/solution to battle this particular problem?
socialnetworking
null
null
null
null
01/13/2012 20:33:46
not constructive
A good pattern/solution to the social web user problem of point whoring? === Take any social website like digg or stackoverflow that lets users reward points for stories/questions/etc. somehow. What happens is quit similar to the process that lead to the rise of tabloid newspapers that feed only headlines and no content to its readers. Users are usually smart enough to figure out strategies to maximize their point rewards. This may or may not coincide with what the social website aims to do, and what the general readership finds interesting. I qualify this as a problem because the way to get most points is to involve as many users as possible. By definition that which can involve most users has to be closer to the lowest common denominator of all users. Given a random web crowd this unfortunately means mostly generic, subjective, argumentative and unspecific entries. As the creator of a social website you have the unique chance to engineer social behavior and steer it towards some favorable direction. What would be a good pattern/solution to battle this particular problem?
4
7,356,761
09/09/2011 03:13:07
586,836
01/24/2011 01:09:16
37
8
Overloading (),[] operators
how to overload the () and [] operators? Give some examples. Won't it affect the integrity of the programming language?
oop
overloading
operator-keyword
null
null
09/09/2011 03:42:00
not a real question
Overloading (),[] operators === how to overload the () and [] operators? Give some examples. Won't it affect the integrity of the programming language?
1
3,663,015
09/07/2010 21:46:08
32,840
10/30/2008 17:45:14
595
8
Change hotkey for autocomplete selection
In Eclipse, I find it pretty annoying that Enter is the hotkey that selects an item from the Content Assist/Autocomplete list. Especially in PyDev where there is no end-of-line semicolon, pressing enter for a new line will instead give me whatever is selected in the Autocomplete list. Tab is a much better selection hotkey since I'm not likely to want a tab mid-line. Any chance of changing this in Eclipse? Using CDT, PDT, and PyDev, but interested in any solution related to Eclipse.
eclipse
pydev
hotkey
null
null
null
open
Change hotkey for autocomplete selection === In Eclipse, I find it pretty annoying that Enter is the hotkey that selects an item from the Content Assist/Autocomplete list. Especially in PyDev where there is no end-of-line semicolon, pressing enter for a new line will instead give me whatever is selected in the Autocomplete list. Tab is a much better selection hotkey since I'm not likely to want a tab mid-line. Any chance of changing this in Eclipse? Using CDT, PDT, and PyDev, but interested in any solution related to Eclipse.
0
4,156,830
11/11/2010 16:43:55
504,781
11/11/2010 16:43:55
1
0
How to generate the moves in a chess?
I was just wondering about generating simple chess piece moves without taking into consideration two players game rules.I just want to have 1 player and it's pieces each piece can move repeatedly.I just wanted to know how do I go about generating piece moves? I want a chess piece to move on a telephone keypad(4X3,with *,0,# in the last row) and repeatedly generate unique telephone numbers.I am using C# development environment.
c#
chess
null
null
null
11/12/2010 11:31:44
not a real question
How to generate the moves in a chess? === I was just wondering about generating simple chess piece moves without taking into consideration two players game rules.I just want to have 1 player and it's pieces each piece can move repeatedly.I just wanted to know how do I go about generating piece moves? I want a chess piece to move on a telephone keypad(4X3,with *,0,# in the last row) and repeatedly generate unique telephone numbers.I am using C# development environment.
1
3,670,375
09/08/2010 17:30:53
442,679
09/08/2010 17:26:25
1
0
What's the best GUI designer for use with Eclipse?
This question was asked a couple years ago and the answers give out-dated recommendations, so here it is again. What is the best GUI designer for use with Eclipse?
java
eclipse
gui
null
null
09/19/2011 18:01:10
not constructive
What's the best GUI designer for use with Eclipse? === This question was asked a couple years ago and the answers give out-dated recommendations, so here it is again. What is the best GUI designer for use with Eclipse?
4
8,306,276
11/29/2011 05:26:25
1,070,570
11/29/2011 04:26:07
1
0
how to get the download link in java appication
Please help me to make a java program i have problem for example: I have a download page with the URL name [example won to link download ][1] that page has the download link .. how to parse the page using java to get the download link ... [1]: http://www.filestube.com/e745ba6956eca87503e9/go.html
java
downloading
download-manager
null
null
11/29/2011 05:47:12
not a real question
how to get the download link in java appication === Please help me to make a java program i have problem for example: I have a download page with the URL name [example won to link download ][1] that page has the download link .. how to parse the page using java to get the download link ... [1]: http://www.filestube.com/e745ba6956eca87503e9/go.html
1
6,437,080
06/22/2011 08:36:27
809,975
06/22/2011 08:36:27
1
0
bar chart of constant height for factors in time series
I am a beginner to try R for making graphs. Please help me. I have data of multiple columns (time series). Each column holds factors (please see the one column example data below). I would like to make a constant height (say 1 unit) bar chart of the time series and would like to represent “A” and “B” in different colors with the DATE on the x axis. Any tip? Thanking you in advance! DATE GROUP 2011.06.18 00:00:00 R 2011.06.18 06:00:00 L 2011.06.18 12:00:00 R 2011.06.18 18:00:00 R 2011.06.19 00:00:00 L 2011.06.19 06:00:00 L 2011.06.19 12:00:00 R 2011.06.19 18:00:00 L 2011.06.20 00:00:00 L 2011.06.20 06:00:00 L 2011.06.20 12:00:00 R 2011.06.20 18:00:00 L 2011.06.21 00:00:00 R 2011.06.21 06:00:00 L
r
null
null
null
null
null
open
bar chart of constant height for factors in time series === I am a beginner to try R for making graphs. Please help me. I have data of multiple columns (time series). Each column holds factors (please see the one column example data below). I would like to make a constant height (say 1 unit) bar chart of the time series and would like to represent “A” and “B” in different colors with the DATE on the x axis. Any tip? Thanking you in advance! DATE GROUP 2011.06.18 00:00:00 R 2011.06.18 06:00:00 L 2011.06.18 12:00:00 R 2011.06.18 18:00:00 R 2011.06.19 00:00:00 L 2011.06.19 06:00:00 L 2011.06.19 12:00:00 R 2011.06.19 18:00:00 L 2011.06.20 00:00:00 L 2011.06.20 06:00:00 L 2011.06.20 12:00:00 R 2011.06.20 18:00:00 L 2011.06.21 00:00:00 R 2011.06.21 06:00:00 L
0
10,172,693
04/16/2012 10:49:06
623,190
02/18/2011 13:21:20
82
10
How to check if a script is compatible with sql server 2000
I wrote a lot of scripts for SQL Server 2005. The task has changed. Now this work should be done for SQL Server 2000. Which tool to use for cheking syntax of the scripts? Can it be done with SSMS 2008?
sql-server
null
null
null
null
04/16/2012 19:18:33
not a real question
How to check if a script is compatible with sql server 2000 === I wrote a lot of scripts for SQL Server 2005. The task has changed. Now this work should be done for SQL Server 2000. Which tool to use for cheking syntax of the scripts? Can it be done with SSMS 2008?
1
5,569,604
04/06/2011 16:09:59
695,230
04/06/2011 16:09:59
1
0
Good mashup to replace Yahoo Pipes
I have website which aggregate lots of RSS and Atom feeds. I wanna separation for the aggregation. Yahoo Pipes is good but it doesn't works for aggregating thousand of feeds and categorization I need mashup which can: 1. aggregate lots of feeds 2. categorization
yahoo-pipes
eventaggregator
mashups
null
null
04/29/2012 12:31:36
not constructive
Good mashup to replace Yahoo Pipes === I have website which aggregate lots of RSS and Atom feeds. I wanna separation for the aggregation. Yahoo Pipes is good but it doesn't works for aggregating thousand of feeds and categorization I need mashup which can: 1. aggregate lots of feeds 2. categorization
4
7,119,562
08/19/2011 09:26:03
345,669
05/20/2010 02:40:24
1
0
Handling users saving excel files from Silverlight 4
I am currently trying to have Silverlight 4 manage/monitor a loaded excel workbook. Ideally I would like to know when the user has saved, and if the filename is different, what is it now. I have tried implementing events such as BeforeSave and AfterSave on the workbook as follows: delegate void WorkbookEvents_BeforeSaveEventHandler(bool saveAsUI, ref bool a); public void Method() { ... _workbook.BeforeSave += new WorkbookEvents_BeforeSaveEventHandler(BeforeSave) } However the event cannot be added (throws a System.Exception - "Event cannot be added"). (I've had no problem at all attaching to the SheetChange event) Secondly, I am having trouble reading the "FullName" variable from the workbook ie _workbook.FullName the object exists - but I cannot workout how to access the value (if documentation exists (other than http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel._workbook.fullname.aspx - which states it should be a string), I cannot find it) cheers, Ben
silverlight
excel
interop
null
null
null
open
Handling users saving excel files from Silverlight 4 === I am currently trying to have Silverlight 4 manage/monitor a loaded excel workbook. Ideally I would like to know when the user has saved, and if the filename is different, what is it now. I have tried implementing events such as BeforeSave and AfterSave on the workbook as follows: delegate void WorkbookEvents_BeforeSaveEventHandler(bool saveAsUI, ref bool a); public void Method() { ... _workbook.BeforeSave += new WorkbookEvents_BeforeSaveEventHandler(BeforeSave) } However the event cannot be added (throws a System.Exception - "Event cannot be added"). (I've had no problem at all attaching to the SheetChange event) Secondly, I am having trouble reading the "FullName" variable from the workbook ie _workbook.FullName the object exists - but I cannot workout how to access the value (if documentation exists (other than http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel._workbook.fullname.aspx - which states it should be a string), I cannot find it) cheers, Ben
0
2,341,619
02/26/2010 12:48:22
222,781
12/02/2009 09:43:45
8
2
Three20 getting started
I have been trying to get started with the Three20 project in order to get to display some images the way they are implemented 'defaultly' on your IPhone. So far, documentation for it is poor and I have had problems to get it working - are there any good beginner's hints on how to use it? Searching for tutorials did not help too much so far - I appreciate any advice! Thanks!
three20
iphone
tutorials
null
null
11/22/2011 16:38:22
not constructive
Three20 getting started === I have been trying to get started with the Three20 project in order to get to display some images the way they are implemented 'defaultly' on your IPhone. So far, documentation for it is poor and I have had problems to get it working - are there any good beginner's hints on how to use it? Searching for tutorials did not help too much so far - I appreciate any advice! Thanks!
4
5,768,095
04/24/2011 01:37:04
86,073
04/02/2009 08:15:19
1,109
2
Why hasn't Linux version number moved beyond 2.6?
Before 2.6 Linux moved up from 2.0 to 2.2 to 2.4 every few years. Why did it stop at 2.6? Is the version number ever going to go beyond 2.6?
linux
linux-kernel
version-numbering
null
null
04/24/2011 01:50:00
off topic
Why hasn't Linux version number moved beyond 2.6? === Before 2.6 Linux moved up from 2.0 to 2.2 to 2.4 every few years. Why did it stop at 2.6? Is the version number ever going to go beyond 2.6?
2
5,861,008
05/02/2011 18:39:40
256,007
01/21/2010 17:10:22
811
52
relation between QEventloop and QAbstractEventDispatcher
What is the relation between `QEventloop` and `QAbstractEventDispatcher` ? > Event loop is a loop that runs the event dispatcher until the loop is broken. But in Documentation of `QEventLoop` there is no single method that takes an `QAbstractEventDispatcher` as argument.
qt4
null
null
null
null
null
open
relation between QEventloop and QAbstractEventDispatcher === What is the relation between `QEventloop` and `QAbstractEventDispatcher` ? > Event loop is a loop that runs the event dispatcher until the loop is broken. But in Documentation of `QEventLoop` there is no single method that takes an `QAbstractEventDispatcher` as argument.
0
5,482,061
03/30/2011 05:01:51
192,223
10/19/2009 04:51:29
143
12
Where can i find AWS EC2 X.509 Certificate private key
Only the cert-xxxxx.pem can be download.
amazon-ec2
null
null
null
null
03/30/2011 11:27:25
off topic
Where can i find AWS EC2 X.509 Certificate private key === Only the cert-xxxxx.pem can be download.
2
5,533,922
04/04/2011 02:08:59
667,480
03/19/2011 16:54:15
13
0
comparing large number of values using php arrays but its not happening
i have to compare two very large number of values, for that i put them in arrays but it dint work. any idea? below is the code i used. any other efficient way? i have set the time and memory to unlimited as well. for($k=0;$k<sizeof($pid);$k++) { $out =0; for ($m=0;$m<sizeof($oid);$m++) { if ($pid[$k] == $oid[$m]) // $pid have 300000 indexes //and $oid have about 500000 indexes { $out ++; } } if($out) { echo "OID for ID ".$pid[$k]." = ".$out; echo "<br>"; } }
php
arrays
largenumber
null
null
null
open
comparing large number of values using php arrays but its not happening === i have to compare two very large number of values, for that i put them in arrays but it dint work. any idea? below is the code i used. any other efficient way? i have set the time and memory to unlimited as well. for($k=0;$k<sizeof($pid);$k++) { $out =0; for ($m=0;$m<sizeof($oid);$m++) { if ($pid[$k] == $oid[$m]) // $pid have 300000 indexes //and $oid have about 500000 indexes { $out ++; } } if($out) { echo "OID for ID ".$pid[$k]." = ".$out; echo "<br>"; } }
0
10,721,126
05/23/2012 13:36:32
1,365,650
04/30/2012 11:01:15
29
2
Using 'Contains' on an Array
Ok, so I'm not very familiar with VB6 but I'm trying to see if an array contains a value. This is what I have but it's throwing up an error to me. Could be an issue with the "passedValue" being the wrong type but I don't think so. Dim transCodes As Variant transCodes = Array(40, 41, 42, 43) If (transCodes.Contains("passedValue")) Then *Do Stuff* End If Any help would be really appreciated!
vb6
null
null
null
null
null
open
Using 'Contains' on an Array === Ok, so I'm not very familiar with VB6 but I'm trying to see if an array contains a value. This is what I have but it's throwing up an error to me. Could be an issue with the "passedValue" being the wrong type but I don't think so. Dim transCodes As Variant transCodes = Array(40, 41, 42, 43) If (transCodes.Contains("passedValue")) Then *Do Stuff* End If Any help would be really appreciated!
0
8,969,750
01/23/2012 09:52:21
1,164,482
01/23/2012 07:31:48
1
0
dynamic asynchronous iframe creation
dynamic asynchronous iframe creation -- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <iframe id="iframe1" src="http://www.google.com" height="240" width="350"></iframe> </body> </html> Suggest me using javascript
javascript
jquery
iframe
null
null
01/23/2012 10:24:17
not a real question
dynamic asynchronous iframe creation === dynamic asynchronous iframe creation -- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <iframe id="iframe1" src="http://www.google.com" height="240" width="350"></iframe> </body> </html> Suggest me using javascript
1
5,552,639
04/05/2011 13:30:45
592,237
01/27/2011 13:20:49
66
32
Database operation in sandbox web part in sharepoint 2010
i need to insert record in my database using sandbox web part. can anyone please give me some detail how can i do this. because if i used sql command operation in sandbox it give me wrapper error.
sharepoint2007
null
null
null
null
null
open
Database operation in sandbox web part in sharepoint 2010 === i need to insert record in my database using sandbox web part. can anyone please give me some detail how can i do this. because if i used sql command operation in sandbox it give me wrapper error.
0
6,275,736
06/08/2011 07:51:07
235,715
12/21/2009 00:56:44
715
45
Is clean domain-driven-design(DDD) a utopia?
I think I read all the book's on DDD and how to apply it in C# (3-5 books, don't remember it was few years ago). But during last 2 years I was using anemic domain model in all projects and it worked well. Actually I have never tried to implement pure domain model, moreover I have never seen a piece of code using clean domain model approach. Take for example code from the book's about DDD doesn't follow DDD style. Take for example code code from Tim MacCarthy book about DDD http://dddpds.codeplex.com/, look at his domain objects, they are clean from any behavior's it's just DTO's the only thing he integrated into domain object is validation, if I remember correctly in DDD your domain should not be in invalid state, so you should prevent setting invalid values and throw exception's instead of allowing to set them and do validation at some point. Same situation with other books and sample codes, they all are very simple and shows just a class with properties, maximum what you can find is a set of methods for inserting\removing child objects which set the parent property. For example I almost neven seen code using domain events, or injecting services into domain objects. In 2003 Martin Fawler wrote an article telling us that Anemic Domain Model is a bad thing http://www.martinfowler.com/bliki/AnemicDomainModel.html 8 years passed and I think Anemic model is quite popular now (it evoluted to Layered Architecture). And is used alot in 3-Tier RIA development. So my main question is clean DDD a utopia? Is it dead? Becouse all the code I see around for last 3 years is Layered Architecture (in my opinion it's essetialy anemic domain model). And I would very like to see some clean DDD code if it exists.
c#
oop
architecture
domain-driven-design
null
06/08/2011 08:31:07
not constructive
Is clean domain-driven-design(DDD) a utopia? === I think I read all the book's on DDD and how to apply it in C# (3-5 books, don't remember it was few years ago). But during last 2 years I was using anemic domain model in all projects and it worked well. Actually I have never tried to implement pure domain model, moreover I have never seen a piece of code using clean domain model approach. Take for example code from the book's about DDD doesn't follow DDD style. Take for example code code from Tim MacCarthy book about DDD http://dddpds.codeplex.com/, look at his domain objects, they are clean from any behavior's it's just DTO's the only thing he integrated into domain object is validation, if I remember correctly in DDD your domain should not be in invalid state, so you should prevent setting invalid values and throw exception's instead of allowing to set them and do validation at some point. Same situation with other books and sample codes, they all are very simple and shows just a class with properties, maximum what you can find is a set of methods for inserting\removing child objects which set the parent property. For example I almost neven seen code using domain events, or injecting services into domain objects. In 2003 Martin Fawler wrote an article telling us that Anemic Domain Model is a bad thing http://www.martinfowler.com/bliki/AnemicDomainModel.html 8 years passed and I think Anemic model is quite popular now (it evoluted to Layered Architecture). And is used alot in 3-Tier RIA development. So my main question is clean DDD a utopia? Is it dead? Becouse all the code I see around for last 3 years is Layered Architecture (in my opinion it's essetialy anemic domain model). And I would very like to see some clean DDD code if it exists.
4
4,694,291
01/14/2011 17:59:48
576,010
01/14/2011 17:59:48
1
0
(Obj-C) What is wrong with this syntax highlighting?
I am making a IDE for something... The syntax highlighting freezes when I do something like: <pre><code> int i = abs(); //then push " like so: int i = abs("); //when I push anything after that it gives me an error and deletes it: /* ERROR: 2011-01-14 11:53:29.554 PROJECT NAME GOES HERE[6767:a0f] HIToolbox: ignoring exception '*** -[NSBigMutableString substringWithRange:]: Range or index out of bounds' that raised inside Carbon event dispatch ( 0 CoreFoundation 0x00007fff800b57b4 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x00007fff83aed0f3 objc_exception_throw + 45 2 CoreFoundation 0x00007fff800b55d7 +[NSException raise:format:arguments:] + 103 3 CoreFoundation 0x00007fff800b5564 +[NSException raise:format:] + 148 4 Foundation 0x00007fff87e0ecf2 -[NSString substringWithRange:] + 204 5 PROJECT NAME GOES HERE 0x00000001000014bb -[ScriptController textStorageDidProcessEditing:] + 741 6 Foundation 0x00007fff87deba66 _nsnote_callback + 167 7 CoreFoundation 0x00007fff8005d000 __CFXNotificationPost + 1008 8 CoreFoundation 0x00007fff80049578 _CFXNotificationPostNotification + 200 9 Foundation 0x00007fff87de29ce -[NSNotificationCenter postNotificationName:object:userInfo:] + 101 10 AppKit 0x00007fff8577cef6 -[NSTextStorage processEditing] + 137 11 AppKit 0x00007fff8577d9e3 -[NSTextStorage endEditing] + 80 12 AppKit 0x00007fff857a5b56 -[NSTextView insertText:replacementRange:] + 2745 13 AppKit 0x00007fff857a3471 -[NSTextInputContext handleTSMEvent:] + 2204 14 AppKit 0x00007fff857a2bc6 _NSTSMEventHandler + 156 15 HIToolbox 0x00007fff84d6d9d5 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1002 16 HIToolbox 0x00007fff84d6cf28 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 395 17 HIToolbox 0x00007fff84d8abeb SendEventToEventTarget + 45 18 HIToolbox 0x00007fff84dbc2bb SendTSMEvent + 48 19 HIToolbox 0x00007fff84dbbe61 SendUnicodeTextAEToUnicodeDoc + 468 20 HIToolbox 0x00007fff84dbbbdc TSMKeyEvent + 604 21 HIToolbox 0x00007fff84da6724 TSMProcessRawKeyEvent + 1909 22 AppKit 0x00007fff857a18bb -[NSTextInputContext handleEvent:] + 620 23 AppKit 0x00007fff857a15e5 -[NSView interpretKeyEvents:] + 186 24 AppKit 0x00007fff857a13be -[NSTextView keyDown:] + 819 25 AppKit 0x00007fff8571306f -[NSWindow sendEvent:] + 8769 26 AppKit 0x00007fff85647a86 -[NSApplication sendEvent:] + 4719 27 AppKit 0x00007fff855de4da -[NSApplication run] + 474 28 AppKit 0x00007fff855d71a8 NSApplicationMain + 364 */ </code></pre> HERE IS MY SOURCE CODE: <pre><code> - (void)textStorageDidProcessEditing:(NSNotification *)notification { NSTextStorage *textStorage = [notification object]; NSRange found, area; NSString *string = [textStorage string]; unsigned int length = [string length]; NSArray * keys = [keyWords allKeys]; NSString * keyWord = nil; NSScanner * scanner = [NSScanner scannerWithString: string]; int last_location = 0; NSString * searchString = nil; NSEnumerator * wordEnumerator; NSRange fooRange; area.location = 0; area.length = length; [textStorage removeAttribute: NSForegroundColorAttributeName range: area]; // First colorize everything that is not enclosed in quotation marks while (![scanner isAtEnd]) { // Remember the last location of the scanner (initially zero, then the location of the last quotation mark) last_location = [scanner scanLocation]; // Now scan up to the next (or first) quotation mark into a temporary string [scanner scanUpToString: @"\"" intoString: &searchString]; // Get the length of the temporary string for use below length = [searchString length]; // Advance the scanner one character past the quotation mark we just found // UNLESS the scanner is already at the end of the string if ([scanner scanLocation] < [string length]) { [scanner setScanLocation: [scanner scanLocation] + 1]; } // Initialize the key word enumerator wordEnumerator = [keys objectEnumerator]; // Loop through all of the key words in the array and try to find them within the temporary string while (keyWord = [wordEnumerator nextObject]) { if (keyWord == @"quote-open" || keyWord == @"quote-close" || keyWord == @"quote-color") { continue; } // Initialize search range area.location = 0; area.length = length; // While there is a area to search... while (area.length) { //NSLog(@"%@",keyWord); // Try to find a key word found = [searchString rangeOfString: keyWord options: NSLiteralSearch range: area]; // If no key word found, try the next key word if (found.location == NSNotFound) break; // Otherwise a key word was found, lets go colorize it // Setup a temporary range to reflect the actual position of the string within the text view // by applying the offset of our current scanning location to the location of the key word fooRange.location = found.location; fooRange.length = found.length; fooRange.location += last_location; // Work around for an odd bug that only occurs occasionally if (![[string substringWithRange: fooRange] isEqual: keyWord]) { fooRange.location++; } // Set the foreground color attribute for the range of text described by the key word [textStorage addAttribute: NSForegroundColorAttributeName value: [keyWords objectForKey: keyWord] range: fooRange]; // Reduce the area to search to exclude the key word we just colorized area.location = NSMaxRange(found); area.length = length - area.location; } } } // Now colorize everything inside both brackets AND quotes scanner = [NSScanner scannerWithString: string]; while (![scanner isAtEnd]) { // Try to find on open comment string [scanner scanUpToString: [keyWords objectForKey: @"quote-open"] intoString: nil]; last_location = [scanner scanLocation]; //[scanner setScanLocation: [scanner scanLocation] + [[keyWords objectForKey: @"quote-open"] length]]; NSString *foobar; [scanner scanString:[keyWords objectForKey: @"quote-open"] intoString:&foobar]; // If we can't find the closing comment string, then set the range to include the whole string if (![scanner scanUpToString: [keyWords objectForKey: @"quote-close"] intoString: nil]) { [scanner setScanLocation: [string length]]; } else { // Otherwise we found the closing comment, so compute the range of text to colorize NSRange resetRange; // Advance the scanner past the closing comment string we just found if ([scanner scanLocation] < [string length]) { [scanner setScanLocation: [scanner scanLocation] + [[keyWords objectForKey: @"quote-close"] length]]; } // Calculate the range to be colorized resetRange = NSMakeRange(last_location, [scanner scanLocation] - last_location); if([textStorage attribute: NSForegroundColorAttributeName atIndex: resetRange.location effectiveRange: nil] == [keyWords objectForKey: @"bracket-color"]){ // Set the foreground color for the range [textStorage addAttribute: NSForegroundColorAttributeName value: [keyWords objectForKey: @"quote-color"] range: resetRange]; } } } // Now reset the colorization for anything that was commented out // Note: This may seem like a hack, but I found that the performance of the app was // worse when trying to embed the logic for exclusion within the key word search. // Re-initialize a new scanner to scan the whole string scanner = [NSScanner scannerWithString: string]; while (![scanner isAtEnd]) { // Try to find on open comment string [scanner scanUpToString: @"/*" intoString: nil]; last_location = [scanner scanLocation]; // If we can't find the closing comment string, then set the range to include the whole string if (![scanner scanUpToString: @"*/" intoString: nil]) { [scanner setScanLocation: [string length]]; } else { // Otherwise we found the closing comment, so compute the range of text to reset NSRange resetRange; // Advance the scanner past the closing comment string we just found if ([scanner scanLocation] < [string length]) { [scanner setScanLocation: [scanner scanLocation] + 2]; } // Calculate the range to be reset resetRange = NSMakeRange(last_location, [scanner scanLocation] - last_location); // Reset the foreground color for the range [textStorage removeAttribute: NSForegroundColorAttributeName range: resetRange]; //COLORIZE [textStorage addAttribute: NSForegroundColorAttributeName value: [keyWords objectForKey: @"comment-color"] range: resetRange]; } } // Now reset the single-line comments scanner = [NSScanner scannerWithString: string]; while (![scanner isAtEnd]) { [scanner scanUpToString: @"//" intoString: nil]; last_location = [scanner scanLocation]; if (![scanner scanUpToString: @"\n" intoString: nil]) { [scanner setScanLocation: [string length]]; } else { NSRange resetRange; if ([scanner scanLocation] < [string length]) { [scanner setScanLocation: [scanner scanLocation] + 1]; } resetRange = NSMakeRange(last_location, [scanner scanLocation] - last_location); [textStorage removeAttribute: NSForegroundColorAttributeName range: resetRange]; [textStorage addAttribute: NSForegroundColorAttributeName value: [keyWords objectForKey: @"comment-color"] range: resetRange]; } } } </code></pre> and my dictionary: <pre><code> [[textview textStorage] setDelegate:self]; keyWords = [[NSMutableDictionary alloc] init]; NSColor *blue = [NSColor colorWithCalibratedRed:0 green:0 blue:0.95 alpha:1]; NSColor *green= [NSColor colorWithCalibratedRed:0 green:0.65 blue:0 alpha:1]; NSColor *red = [NSColor colorWithCalibratedRed:0.90 green:0 blue:0 alpha:1]; NSColor *tBlue =[NSColor blueColor]; [keyWords setObject:blue forKey:@"abs"]; [keyWords setObject:blue forKey:@"sin"]; [keyWords setObject:blue forKey:@"cos"]; [keyWords setObject:blue forKey:@"pow"]; [keyWords setObject:blue forKey:@"rand"]; [keyWords setObject:tBlue forKey:@"int"]; [keyWords setObject:tBlue forKey:@"float"]; [keyWords setObject:tBlue forKey:@"double"]; [keyWords setObject:tBlue forKey:@"BOOL"]; [keyWords setObject:red forKey:@"debug"]; [keyWords setObject:red forKey:@"quote-color"]; [keyWords setObject:@"\"" forKey:@"quote-open"]; [keyWords setObject:@"\"" forKey:@"quote-close"]; [keyWords setObject:green forKey:@"comment-color"]; </code></pre>
objective-c
cocoa
syntax-highlighting
null
null
01/17/2011 04:06:30
not a real question
(Obj-C) What is wrong with this syntax highlighting? === I am making a IDE for something... The syntax highlighting freezes when I do something like: <pre><code> int i = abs(); //then push " like so: int i = abs("); //when I push anything after that it gives me an error and deletes it: /* ERROR: 2011-01-14 11:53:29.554 PROJECT NAME GOES HERE[6767:a0f] HIToolbox: ignoring exception '*** -[NSBigMutableString substringWithRange:]: Range or index out of bounds' that raised inside Carbon event dispatch ( 0 CoreFoundation 0x00007fff800b57b4 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x00007fff83aed0f3 objc_exception_throw + 45 2 CoreFoundation 0x00007fff800b55d7 +[NSException raise:format:arguments:] + 103 3 CoreFoundation 0x00007fff800b5564 +[NSException raise:format:] + 148 4 Foundation 0x00007fff87e0ecf2 -[NSString substringWithRange:] + 204 5 PROJECT NAME GOES HERE 0x00000001000014bb -[ScriptController textStorageDidProcessEditing:] + 741 6 Foundation 0x00007fff87deba66 _nsnote_callback + 167 7 CoreFoundation 0x00007fff8005d000 __CFXNotificationPost + 1008 8 CoreFoundation 0x00007fff80049578 _CFXNotificationPostNotification + 200 9 Foundation 0x00007fff87de29ce -[NSNotificationCenter postNotificationName:object:userInfo:] + 101 10 AppKit 0x00007fff8577cef6 -[NSTextStorage processEditing] + 137 11 AppKit 0x00007fff8577d9e3 -[NSTextStorage endEditing] + 80 12 AppKit 0x00007fff857a5b56 -[NSTextView insertText:replacementRange:] + 2745 13 AppKit 0x00007fff857a3471 -[NSTextInputContext handleTSMEvent:] + 2204 14 AppKit 0x00007fff857a2bc6 _NSTSMEventHandler + 156 15 HIToolbox 0x00007fff84d6d9d5 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1002 16 HIToolbox 0x00007fff84d6cf28 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 395 17 HIToolbox 0x00007fff84d8abeb SendEventToEventTarget + 45 18 HIToolbox 0x00007fff84dbc2bb SendTSMEvent + 48 19 HIToolbox 0x00007fff84dbbe61 SendUnicodeTextAEToUnicodeDoc + 468 20 HIToolbox 0x00007fff84dbbbdc TSMKeyEvent + 604 21 HIToolbox 0x00007fff84da6724 TSMProcessRawKeyEvent + 1909 22 AppKit 0x00007fff857a18bb -[NSTextInputContext handleEvent:] + 620 23 AppKit 0x00007fff857a15e5 -[NSView interpretKeyEvents:] + 186 24 AppKit 0x00007fff857a13be -[NSTextView keyDown:] + 819 25 AppKit 0x00007fff8571306f -[NSWindow sendEvent:] + 8769 26 AppKit 0x00007fff85647a86 -[NSApplication sendEvent:] + 4719 27 AppKit 0x00007fff855de4da -[NSApplication run] + 474 28 AppKit 0x00007fff855d71a8 NSApplicationMain + 364 */ </code></pre> HERE IS MY SOURCE CODE: <pre><code> - (void)textStorageDidProcessEditing:(NSNotification *)notification { NSTextStorage *textStorage = [notification object]; NSRange found, area; NSString *string = [textStorage string]; unsigned int length = [string length]; NSArray * keys = [keyWords allKeys]; NSString * keyWord = nil; NSScanner * scanner = [NSScanner scannerWithString: string]; int last_location = 0; NSString * searchString = nil; NSEnumerator * wordEnumerator; NSRange fooRange; area.location = 0; area.length = length; [textStorage removeAttribute: NSForegroundColorAttributeName range: area]; // First colorize everything that is not enclosed in quotation marks while (![scanner isAtEnd]) { // Remember the last location of the scanner (initially zero, then the location of the last quotation mark) last_location = [scanner scanLocation]; // Now scan up to the next (or first) quotation mark into a temporary string [scanner scanUpToString: @"\"" intoString: &searchString]; // Get the length of the temporary string for use below length = [searchString length]; // Advance the scanner one character past the quotation mark we just found // UNLESS the scanner is already at the end of the string if ([scanner scanLocation] < [string length]) { [scanner setScanLocation: [scanner scanLocation] + 1]; } // Initialize the key word enumerator wordEnumerator = [keys objectEnumerator]; // Loop through all of the key words in the array and try to find them within the temporary string while (keyWord = [wordEnumerator nextObject]) { if (keyWord == @"quote-open" || keyWord == @"quote-close" || keyWord == @"quote-color") { continue; } // Initialize search range area.location = 0; area.length = length; // While there is a area to search... while (area.length) { //NSLog(@"%@",keyWord); // Try to find a key word found = [searchString rangeOfString: keyWord options: NSLiteralSearch range: area]; // If no key word found, try the next key word if (found.location == NSNotFound) break; // Otherwise a key word was found, lets go colorize it // Setup a temporary range to reflect the actual position of the string within the text view // by applying the offset of our current scanning location to the location of the key word fooRange.location = found.location; fooRange.length = found.length; fooRange.location += last_location; // Work around for an odd bug that only occurs occasionally if (![[string substringWithRange: fooRange] isEqual: keyWord]) { fooRange.location++; } // Set the foreground color attribute for the range of text described by the key word [textStorage addAttribute: NSForegroundColorAttributeName value: [keyWords objectForKey: keyWord] range: fooRange]; // Reduce the area to search to exclude the key word we just colorized area.location = NSMaxRange(found); area.length = length - area.location; } } } // Now colorize everything inside both brackets AND quotes scanner = [NSScanner scannerWithString: string]; while (![scanner isAtEnd]) { // Try to find on open comment string [scanner scanUpToString: [keyWords objectForKey: @"quote-open"] intoString: nil]; last_location = [scanner scanLocation]; //[scanner setScanLocation: [scanner scanLocation] + [[keyWords objectForKey: @"quote-open"] length]]; NSString *foobar; [scanner scanString:[keyWords objectForKey: @"quote-open"] intoString:&foobar]; // If we can't find the closing comment string, then set the range to include the whole string if (![scanner scanUpToString: [keyWords objectForKey: @"quote-close"] intoString: nil]) { [scanner setScanLocation: [string length]]; } else { // Otherwise we found the closing comment, so compute the range of text to colorize NSRange resetRange; // Advance the scanner past the closing comment string we just found if ([scanner scanLocation] < [string length]) { [scanner setScanLocation: [scanner scanLocation] + [[keyWords objectForKey: @"quote-close"] length]]; } // Calculate the range to be colorized resetRange = NSMakeRange(last_location, [scanner scanLocation] - last_location); if([textStorage attribute: NSForegroundColorAttributeName atIndex: resetRange.location effectiveRange: nil] == [keyWords objectForKey: @"bracket-color"]){ // Set the foreground color for the range [textStorage addAttribute: NSForegroundColorAttributeName value: [keyWords objectForKey: @"quote-color"] range: resetRange]; } } } // Now reset the colorization for anything that was commented out // Note: This may seem like a hack, but I found that the performance of the app was // worse when trying to embed the logic for exclusion within the key word search. // Re-initialize a new scanner to scan the whole string scanner = [NSScanner scannerWithString: string]; while (![scanner isAtEnd]) { // Try to find on open comment string [scanner scanUpToString: @"/*" intoString: nil]; last_location = [scanner scanLocation]; // If we can't find the closing comment string, then set the range to include the whole string if (![scanner scanUpToString: @"*/" intoString: nil]) { [scanner setScanLocation: [string length]]; } else { // Otherwise we found the closing comment, so compute the range of text to reset NSRange resetRange; // Advance the scanner past the closing comment string we just found if ([scanner scanLocation] < [string length]) { [scanner setScanLocation: [scanner scanLocation] + 2]; } // Calculate the range to be reset resetRange = NSMakeRange(last_location, [scanner scanLocation] - last_location); // Reset the foreground color for the range [textStorage removeAttribute: NSForegroundColorAttributeName range: resetRange]; //COLORIZE [textStorage addAttribute: NSForegroundColorAttributeName value: [keyWords objectForKey: @"comment-color"] range: resetRange]; } } // Now reset the single-line comments scanner = [NSScanner scannerWithString: string]; while (![scanner isAtEnd]) { [scanner scanUpToString: @"//" intoString: nil]; last_location = [scanner scanLocation]; if (![scanner scanUpToString: @"\n" intoString: nil]) { [scanner setScanLocation: [string length]]; } else { NSRange resetRange; if ([scanner scanLocation] < [string length]) { [scanner setScanLocation: [scanner scanLocation] + 1]; } resetRange = NSMakeRange(last_location, [scanner scanLocation] - last_location); [textStorage removeAttribute: NSForegroundColorAttributeName range: resetRange]; [textStorage addAttribute: NSForegroundColorAttributeName value: [keyWords objectForKey: @"comment-color"] range: resetRange]; } } } </code></pre> and my dictionary: <pre><code> [[textview textStorage] setDelegate:self]; keyWords = [[NSMutableDictionary alloc] init]; NSColor *blue = [NSColor colorWithCalibratedRed:0 green:0 blue:0.95 alpha:1]; NSColor *green= [NSColor colorWithCalibratedRed:0 green:0.65 blue:0 alpha:1]; NSColor *red = [NSColor colorWithCalibratedRed:0.90 green:0 blue:0 alpha:1]; NSColor *tBlue =[NSColor blueColor]; [keyWords setObject:blue forKey:@"abs"]; [keyWords setObject:blue forKey:@"sin"]; [keyWords setObject:blue forKey:@"cos"]; [keyWords setObject:blue forKey:@"pow"]; [keyWords setObject:blue forKey:@"rand"]; [keyWords setObject:tBlue forKey:@"int"]; [keyWords setObject:tBlue forKey:@"float"]; [keyWords setObject:tBlue forKey:@"double"]; [keyWords setObject:tBlue forKey:@"BOOL"]; [keyWords setObject:red forKey:@"debug"]; [keyWords setObject:red forKey:@"quote-color"]; [keyWords setObject:@"\"" forKey:@"quote-open"]; [keyWords setObject:@"\"" forKey:@"quote-close"]; [keyWords setObject:green forKey:@"comment-color"]; </code></pre>
1
7,523,378
09/23/2011 01:38:22
960,141
09/22/2011 23:07:31
6
0
Sniffing packets in adhoc network
I want to ask, how can I overhear packets in a ad-hoc wireless topology. I don't want to go to "monitor mode" though, because I would also be able send packets at the same time. So, I just want to capture packets using promiscuous mode. I create an ad-hoc topology of 3 mobile nodes. I try to capture packets between the machines using Wireshark, but I cannot. Though wireshark can capture packets when I use "managed mode". Does anybody have any idea of what may be wrong. Thank you
wireshark
adhoc
sniffing
null
null
null
open
Sniffing packets in adhoc network === I want to ask, how can I overhear packets in a ad-hoc wireless topology. I don't want to go to "monitor mode" though, because I would also be able send packets at the same time. So, I just want to capture packets using promiscuous mode. I create an ad-hoc topology of 3 mobile nodes. I try to capture packets between the machines using Wireshark, but I cannot. Though wireshark can capture packets when I use "managed mode". Does anybody have any idea of what may be wrong. Thank you
0
8,337,477
12/01/2011 06:41:51
777,215
05/31/2011 07:05:31
13
4
Remove Git from my mac.?
I want to remove GIT completely from my mac machine; I go through git help and tutorials but unable to find and concreate solution; Any idea?
iphone
ios
git
macbook
null
12/01/2011 06:46:11
off topic
Remove Git from my mac.? === I want to remove GIT completely from my mac machine; I go through git help and tutorials but unable to find and concreate solution; Any idea?
2
6,043,399
05/18/2011 10:43:13
159,354
08/19/2009 14:59:33
48
0
Accessing Responder Object for AMF Call in Action Script 3
I'm beginner to AS3 and I'm using FlashDevelop as IDE and I'm trying to connect to AMF3 service (amfphp) and get user details. I can connect to AMF service with this code in AMFinit() function... private function AMFinit():void{ AMFService.objectEncoding = ObjectEncoding.AMF3; AMFService.connect(AMFServiceURL); AMFService.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); var responder:Responder = new Responder(AMF_MyUserInfo, AMF_onFault); AMFService.call("Danisman.GetUserWithIdentifier", responder, user_identifier); // I NEED TO USE returned object data here!! } on AMF_MyUserInfo() function I can get object returned from Responder and I can trace it successfully, here is the code private function AMF_MyUserInfo(res:Object):void { AMF_onResult(res); trace(res.user_ID + res.username); } But to use outside the AMF_MyUserInfo() function I want to copy that "res" object to another object. I tried with specifing an object in Class and set res to this object in AMF_MyuserInfo() function with "this.myobject = res" but it didn't work. I also tried "this.myobject.username = res.username" but it didn't work also. I'm newbie to OOP, how can I use this res object globally or in AMFinit() function? Thanks for your help...
flash
actionscript-3
oop
remoting
null
null
open
Accessing Responder Object for AMF Call in Action Script 3 === I'm beginner to AS3 and I'm using FlashDevelop as IDE and I'm trying to connect to AMF3 service (amfphp) and get user details. I can connect to AMF service with this code in AMFinit() function... private function AMFinit():void{ AMFService.objectEncoding = ObjectEncoding.AMF3; AMFService.connect(AMFServiceURL); AMFService.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); var responder:Responder = new Responder(AMF_MyUserInfo, AMF_onFault); AMFService.call("Danisman.GetUserWithIdentifier", responder, user_identifier); // I NEED TO USE returned object data here!! } on AMF_MyUserInfo() function I can get object returned from Responder and I can trace it successfully, here is the code private function AMF_MyUserInfo(res:Object):void { AMF_onResult(res); trace(res.user_ID + res.username); } But to use outside the AMF_MyUserInfo() function I want to copy that "res" object to another object. I tried with specifing an object in Class and set res to this object in AMF_MyuserInfo() function with "this.myobject = res" but it didn't work. I also tried "this.myobject.username = res.username" but it didn't work also. I'm newbie to OOP, how can I use this res object globally or in AMFinit() function? Thanks for your help...
0
6,118,095
05/24/2011 23:39:05
187,141
10/09/2009 12:23:03
3,425
120
Where I can host my proprietary Maven artifacts?
What are my options to host proprietary (non open-source) Maven artifacts online?
java
maven-2
maven
null
null
05/27/2011 03:01:32
off topic
Where I can host my proprietary Maven artifacts? === What are my options to host proprietary (non open-source) Maven artifacts online?
2
2,655,191
04/16/2010 18:07:21
237,121
12/22/2009 19:49:08
101
7
t-sql grouping query
based on the following table Name --------- A A A B B C C C I want to add another column to this table called 'OnGoing' and the values should alternate for each group of names. There are only two values 'X' and 'Y'. So the table will look like Name OnGoing ---------------- A X A X A X B Y B Y C X C X C X how to write such a query that can alternate the values for each group of names.
tsql
sql-server-2005
sql-server
null
null
null
open
t-sql grouping query === based on the following table Name --------- A A A B B C C C I want to add another column to this table called 'OnGoing' and the values should alternate for each group of names. There are only two values 'X' and 'Y'. So the table will look like Name OnGoing ---------------- A X A X A X B Y B Y C X C X C X how to write such a query that can alternate the values for each group of names.
0
7,415,797
09/14/2011 11:47:49
1,024,963
09/14/2011 10:49:25
1
0
Setting up HTTP connection and getting response in Android Emulator
I have an android application that parses the HTML content and displays the required tag. It is working fine for the hardcoded HTML code. But when I set up a HTTP connection for a URL, then it is not working in Emulator. Let me know how to set up an HTTP connection in android and see the response in Emulator. I want to give that response as an input to the parser. I want it working and parsing in Emulator iteself.
android
http
android-emulator
null
null
null
open
Setting up HTTP connection and getting response in Android Emulator === I have an android application that parses the HTML content and displays the required tag. It is working fine for the hardcoded HTML code. But when I set up a HTTP connection for a URL, then it is not working in Emulator. Let me know how to set up an HTTP connection in android and see the response in Emulator. I want to give that response as an input to the parser. I want it working and parsing in Emulator iteself.
0
10,507,244
05/08/2012 22:06:01
1,357,212
04/25/2012 20:50:34
11
0
In C or C++ why does it seem to be a trending habit to put the opening curly brace on the same line as the statement?
It seems every time I'm looking at source/example code that people seem to do something along these lines: for(int i = 0; i < MAX; ++i) { or if(statement) { I see this practice all the time, and I don't know if it's just me or not, but I find this really bothersome. Why is this (seemingly) a standard?
c++
null
null
null
null
05/08/2012 22:08:26
not constructive
In C or C++ why does it seem to be a trending habit to put the opening curly brace on the same line as the statement? === It seems every time I'm looking at source/example code that people seem to do something along these lines: for(int i = 0; i < MAX; ++i) { or if(statement) { I see this practice all the time, and I don't know if it's just me or not, but I find this really bothersome. Why is this (seemingly) a standard?
4
10,402,840
05/01/2012 19:07:32
1,368,411
05/01/2012 19:00:35
1
0
UnityContainer() LoadConfiguration not found
I have this code: 1: IUnityContainer container = new UnityContainer(); 2: container.LoadConfiguration(); Line 1 works, but line 2 not. LoadConfiguration is not found as a member. I think, i have register all unity-dlls. Why is LoadConfiguration() not found? Thanks
unity
null
null
null
null
05/01/2012 19:30:08
too localized
UnityContainer() LoadConfiguration not found === I have this code: 1: IUnityContainer container = new UnityContainer(); 2: container.LoadConfiguration(); Line 1 works, but line 2 not. LoadConfiguration is not found as a member. I think, i have register all unity-dlls. Why is LoadConfiguration() not found? Thanks
3
11,674,207
07/26/2012 16:53:54
1,555,460
07/26/2012 16:49:31
1
0
joomla and ajax - delete script tag
I have a site http://mobitbe.pl on script Joomla + pinterest module. I added on home site Facebbok share buttons and want add count via jQuery. Function working perfect and counter are adding to pins loading on site start, but when I scroll site and load new pins via Ajax, script tag to this pins is remove. Where in Joomla can I change, that data loading via Ajax dont remove script tag?
ajax
joomla
null
null
null
07/26/2012 17:45:21
not a real question
joomla and ajax - delete script tag === I have a site http://mobitbe.pl on script Joomla + pinterest module. I added on home site Facebbok share buttons and want add count via jQuery. Function working perfect and counter are adding to pins loading on site start, but when I scroll site and load new pins via Ajax, script tag to this pins is remove. Where in Joomla can I change, that data loading via Ajax dont remove script tag?
1
5,204,246
03/05/2011 14:00:31
646,054
03/05/2011 13:57:05
1
0
html, css any other script related to php
what is use of <a rel="" title="">somthing</a>
html
null
null
null
null
03/05/2011 14:07:30
not a real question
html, css any other script related to php === what is use of <a rel="" title="">somthing</a>
1
11,662,908
07/26/2012 05:27:52
345,905
05/20/2010 08:45:50
399
17
MongoDB Assertion Error
I started seeing this in my mongodb production database logs ns:my_app_production.artists query:{ $query: {}, $orderby: { semester: 1, name: 1 } } Wed Jul 25 19:20:59 [conn199] Assertion: 10334:Invalid BSONObj spec size: -286331154 (EEEEEEEE) first element:_id: "agelio-batle" Wed Jul 25 19:20:59 [conn199] assertion 10334 Invalid BSONObj spec size: -286331154 (EEEEEEEE) first element:_id: "agelio-batle" first i tried running a repair mongo --repair ... Wed Jul 25 22:20:39 [initandlisten] Assertion: 10334:Invalid BSONObj spec size: -286331154 (EEEEEEEE) first element:_id: "agelio-batle" 0x467eaa 0x4183ca 0x62dd82 0x643478 0x532b22 0x64d196 0x6578b7 0x65ac31 0x65cd75 0x65d6d9 0x51a419 0x6195f5 0x61b0c5 0x61bd3d 0x4914c8 0x47ad9a 0x5e2e7c 0x5e60b9 0x5e78ad 0x6346a2 [0x467eaa] # several more what i assume memory addresses omitted [0x6346a2] Wed Jul 25 22:20:39 [initandlisten] assertion 10334 Invalid BSONObj spec size: -286331154 (EEEEEEEE) first element:_id: "agelio-batle" ns:my_app_production.artists query:{} Wed Jul 25 22:20:39 [initandlisten] exception in initAndListen std::exception: nextSafe(): { $err: "Invalid BSONObj spec size: -286331154 (EEEEEEEE) first element:_id: "a...", code: 10334 }, terminating Wed Jul 25 22:20:39 dbexit: ... I have never seen this before. Typically with mongodb a repair fixes most problems so im not sure how to proceed or troubleshoot this. any ideas?
mongodb
null
null
null
null
null
open
MongoDB Assertion Error === I started seeing this in my mongodb production database logs ns:my_app_production.artists query:{ $query: {}, $orderby: { semester: 1, name: 1 } } Wed Jul 25 19:20:59 [conn199] Assertion: 10334:Invalid BSONObj spec size: -286331154 (EEEEEEEE) first element:_id: "agelio-batle" Wed Jul 25 19:20:59 [conn199] assertion 10334 Invalid BSONObj spec size: -286331154 (EEEEEEEE) first element:_id: "agelio-batle" first i tried running a repair mongo --repair ... Wed Jul 25 22:20:39 [initandlisten] Assertion: 10334:Invalid BSONObj spec size: -286331154 (EEEEEEEE) first element:_id: "agelio-batle" 0x467eaa 0x4183ca 0x62dd82 0x643478 0x532b22 0x64d196 0x6578b7 0x65ac31 0x65cd75 0x65d6d9 0x51a419 0x6195f5 0x61b0c5 0x61bd3d 0x4914c8 0x47ad9a 0x5e2e7c 0x5e60b9 0x5e78ad 0x6346a2 [0x467eaa] # several more what i assume memory addresses omitted [0x6346a2] Wed Jul 25 22:20:39 [initandlisten] assertion 10334 Invalid BSONObj spec size: -286331154 (EEEEEEEE) first element:_id: "agelio-batle" ns:my_app_production.artists query:{} Wed Jul 25 22:20:39 [initandlisten] exception in initAndListen std::exception: nextSafe(): { $err: "Invalid BSONObj spec size: -286331154 (EEEEEEEE) first element:_id: "a...", code: 10334 }, terminating Wed Jul 25 22:20:39 dbexit: ... I have never seen this before. Typically with mongodb a repair fixes most problems so im not sure how to proceed or troubleshoot this. any ideas?
0
7,176,032
08/24/2011 13:15:02
909,693
08/24/2011 13:15:02
1
0
How to deploye a windows application with sql server database
i have developed a small windows application in Visual studio 2010 with c# which use a sql server database. now i want to deploy and make an exe for this application for those machines which has not any .net framework and sql server installed.... i have visited many msdn forums and blogs for but no help was provided.. can anybody help me out step by step for this purpose. and please do not provide any link or references..
c#-4.0
null
null
null
null
08/24/2011 13:44:27
not a real question
How to deploye a windows application with sql server database === i have developed a small windows application in Visual studio 2010 with c# which use a sql server database. now i want to deploy and make an exe for this application for those machines which has not any .net framework and sql server installed.... i have visited many msdn forums and blogs for but no help was provided.. can anybody help me out step by step for this purpose. and please do not provide any link or references..
1
11,181,527
06/24/2012 21:57:04
1,445,628
06/09/2012 01:19:59
1
0
unable to view deployed liferay portlet in the add >> more option
I have created a sample liferay portlet and it has successfully deployed. But, the eclipse console didn't say "1 portlet is ready for use". And, I couldn't find this portlet in the Add >> More.. option on a liferay page. Urgent help is needed
liferay
portlet
null
null
null
null
open
unable to view deployed liferay portlet in the add >> more option === I have created a sample liferay portlet and it has successfully deployed. But, the eclipse console didn't say "1 portlet is ready for use". And, I couldn't find this portlet in the Add >> More.. option on a liferay page. Urgent help is needed
0
3,531,659
08/20/2010 14:10:21
175,721
09/18/2009 19:20:13
3
1
Secrets of Twitter and Foursqaure Ajax-like.
Does anyone know how to make things like these: Im talking about theses "hidden ajax" on Twitter home (Top tweets) and Foursquare Home (Recent Activity), that is in constant update, but theres no request under tools line Firebug. Seems to be "hidden ajax". Does this exist? Thanks. check it out here: http://i.stack.imgur.com/aN9Xm.png
ajax
twitter
foursquare
null
null
null
open
Secrets of Twitter and Foursqaure Ajax-like. === Does anyone know how to make things like these: Im talking about theses "hidden ajax" on Twitter home (Top tweets) and Foursquare Home (Recent Activity), that is in constant update, but theres no request under tools line Firebug. Seems to be "hidden ajax". Does this exist? Thanks. check it out here: http://i.stack.imgur.com/aN9Xm.png
0
7,611,523
09/30/2011 14:01:53
117,839
06/05/2009 07:38:52
2,789
165
maven tomcat deploy plugin so that no rebuild is done
I use jenkins to build my gwt app, now I want to run a tomcat:deploy on that built project so that it can deploy the built war to tomcat. Problem is it insists on doing a package beforehand even though the package was just done. This causes a gwt recompile - this takes a _Very_ long time. Is there a way I can invoke a deploy to tomcat with maven that will simply deploy an already existing war?
tomcat
maven
maven-tomcat-plugin
null
null
null
open
maven tomcat deploy plugin so that no rebuild is done === I use jenkins to build my gwt app, now I want to run a tomcat:deploy on that built project so that it can deploy the built war to tomcat. Problem is it insists on doing a package beforehand even though the package was just done. This causes a gwt recompile - this takes a _Very_ long time. Is there a way I can invoke a deploy to tomcat with maven that will simply deploy an already existing war?
0
9,821,454
03/22/2012 11:33:39
868,801
07/29/2011 05:55:18
33
0
Conditional Tag in Wordpress Shortcode
I'm building a website in wordpress and I use a shortcode to display blog items on my website I want to have the more button only on a particular category... I have this shortcode: add_shortcode('blog', 'sh_blog'); function sh_blog($attr, $content=null){ global $paged, $wpdb, $more, $blogparams, $pageTitle; $blogparams = $attr; $cats = ''; $postperpage = 10; if(!empty($blogparams['postperpage'])) $postperpage = $blogparams['postperpage']; if(!empty($blogparams['cats'])) $cats = $blogparams['cats']; $dataformat ='d.m.Y'; $metaformat = 'posted, comments, tag'; $useImage = true; if(!empty($blogparams['dateformat'])) $dataformat = $blogparams['dateformat']; if(!empty($blogparams['metaformat'])) $metaformat = $blogparams['metaformat']; $imageW = $imgW = 75; $imageH = $imgH = 75; wp_reset_postdata(); $the_query_arr = 'post_type=post&posts_per_page='.$postperpage.'&cat='.$cats.'&paged='.$paged; $the_query = new WP_Query($the_query_arr); $re = ''; while($the_query->have_posts()){ $the_query->the_post(); $sourceData = get_post_meta(get_the_ID(), "sourceData", true); $sourceOpen = get_post_meta(get_the_ID(), "sourceOpen", true); $useResizer = get_post_meta(get_the_ID(), "useResizer", true); $cropPos = get_post_meta(get_the_ID(), "cropPos", true); $cropPos = ($cropPos=='')?'c':$cropPos; $sourceType = getMediaType($sourceData); $sourceStr = getSource($sourceData, $imgW, $imgH); $blogClass = ''; $blogClassArr = get_post_class(array('blogitem'), get_the_ID()); foreach($blogClassArr as $blogClassArrItem) $blogClass.=$blogClassArrItem.' '; $re .= '<div id="post-'.get_the_ID().'" class="'.$blogClass.'"> <h3>'.get_the_title().'</h3>'; if( has_post_thumbnail() || (!empty($sourceStr) && $sourceOpen=='e')){ $thumbnail_src = wp_get_attachment_url(get_post_thumbnail_id(get_the_ID())); if($useResizer=='use') $thumbnail_url = get_template_directory_uri().'/includes/timthumb.php?src='.$thumbnail_src.'&h='.$imageH.'&w='.$imageW.'&zc=1&a='.$cropPos.'&q=100'; else $thumbnail_url = $thumbnail_src; $useImage = true; $re .= '<div class="blogimage"> <div class="image_frame">'; if($sourceOpen=='m' || empty($sourceOpen) || empty($sourceData)){ $re .= ' <img src="'.$thumbnail_url.'" width="'.$imgW.'" height="'.$imgH.'" alt="'.get_the_title().'" /> <div class="hoverWrapperBg"></div> '; } $re .= '</div> </div>'; }else{ $useImage = false; } $re .= '<div class="blogcontent" '. ((!$useImage)?'style="width:600px; margin-left:0"':'').'> <p>'; $more=0; $re .= get_the_content('').' </p> <a style="float:right;" class="morelink" href="#!'.get_ajax_permalink().'">'.__('READ MORE', 'SJRM').'</a> </div> <hr class="seperator"/> <div class="clearfix"></div> </div>'; } I would like to have this part to be only visible in a particular category... But I can't seem to manage it with normal wordpress conditional tags <a style="float:right;" class="morelink" href="#!'.get_ajax_permalink().'">'.__('READ MORE', 'SJRM').'</a>
php
wordpress
null
null
null
null
open
Conditional Tag in Wordpress Shortcode === I'm building a website in wordpress and I use a shortcode to display blog items on my website I want to have the more button only on a particular category... I have this shortcode: add_shortcode('blog', 'sh_blog'); function sh_blog($attr, $content=null){ global $paged, $wpdb, $more, $blogparams, $pageTitle; $blogparams = $attr; $cats = ''; $postperpage = 10; if(!empty($blogparams['postperpage'])) $postperpage = $blogparams['postperpage']; if(!empty($blogparams['cats'])) $cats = $blogparams['cats']; $dataformat ='d.m.Y'; $metaformat = 'posted, comments, tag'; $useImage = true; if(!empty($blogparams['dateformat'])) $dataformat = $blogparams['dateformat']; if(!empty($blogparams['metaformat'])) $metaformat = $blogparams['metaformat']; $imageW = $imgW = 75; $imageH = $imgH = 75; wp_reset_postdata(); $the_query_arr = 'post_type=post&posts_per_page='.$postperpage.'&cat='.$cats.'&paged='.$paged; $the_query = new WP_Query($the_query_arr); $re = ''; while($the_query->have_posts()){ $the_query->the_post(); $sourceData = get_post_meta(get_the_ID(), "sourceData", true); $sourceOpen = get_post_meta(get_the_ID(), "sourceOpen", true); $useResizer = get_post_meta(get_the_ID(), "useResizer", true); $cropPos = get_post_meta(get_the_ID(), "cropPos", true); $cropPos = ($cropPos=='')?'c':$cropPos; $sourceType = getMediaType($sourceData); $sourceStr = getSource($sourceData, $imgW, $imgH); $blogClass = ''; $blogClassArr = get_post_class(array('blogitem'), get_the_ID()); foreach($blogClassArr as $blogClassArrItem) $blogClass.=$blogClassArrItem.' '; $re .= '<div id="post-'.get_the_ID().'" class="'.$blogClass.'"> <h3>'.get_the_title().'</h3>'; if( has_post_thumbnail() || (!empty($sourceStr) && $sourceOpen=='e')){ $thumbnail_src = wp_get_attachment_url(get_post_thumbnail_id(get_the_ID())); if($useResizer=='use') $thumbnail_url = get_template_directory_uri().'/includes/timthumb.php?src='.$thumbnail_src.'&h='.$imageH.'&w='.$imageW.'&zc=1&a='.$cropPos.'&q=100'; else $thumbnail_url = $thumbnail_src; $useImage = true; $re .= '<div class="blogimage"> <div class="image_frame">'; if($sourceOpen=='m' || empty($sourceOpen) || empty($sourceData)){ $re .= ' <img src="'.$thumbnail_url.'" width="'.$imgW.'" height="'.$imgH.'" alt="'.get_the_title().'" /> <div class="hoverWrapperBg"></div> '; } $re .= '</div> </div>'; }else{ $useImage = false; } $re .= '<div class="blogcontent" '. ((!$useImage)?'style="width:600px; margin-left:0"':'').'> <p>'; $more=0; $re .= get_the_content('').' </p> <a style="float:right;" class="morelink" href="#!'.get_ajax_permalink().'">'.__('READ MORE', 'SJRM').'</a> </div> <hr class="seperator"/> <div class="clearfix"></div> </div>'; } I would like to have this part to be only visible in a particular category... But I can't seem to manage it with normal wordpress conditional tags <a style="float:right;" class="morelink" href="#!'.get_ajax_permalink().'">'.__('READ MORE', 'SJRM').'</a>
0
8,060,105
11/09/2011 03:47:09
88,597
04/08/2009 13:38:53
4,792
218
What's the official place to find latest stable version of 2.3.x Rails?
Is there an official webpage/blog/url to identify the latest stable version of 2.3.x Rails?
ruby-on-rails
null
null
null
null
11/10/2011 00:04:08
too localized
What's the official place to find latest stable version of 2.3.x Rails? === Is there an official webpage/blog/url to identify the latest stable version of 2.3.x Rails?
3
7,321,026
09/06/2011 13:50:36
359,935
06/06/2010 22:56:35
41
6
Binding in mapping converter
I try to use MappingConverter (existed in our appication and worked nice) in this way: <converters:MappingConverter x:Key="RewardTypeToSymbolConverter" ElseMappingValue="BlaBla"> <converters:MappingEntry FromValue="{x:Static loc:SomeEnum.Value}" ToValue="{Binding SomeStringInViewModel}" /> </converters:MappingConverter> I get no exceptions, but my TextBlock show nothing. Breakpoint within a converter shows that ToValue property is NULL (but SomeStringInViewModel isn't). Do anybody have some idea how can I use binding like this within a converter? Or using binding in resource is impossible?
wpf
xaml
data-binding
ivalueconverter
null
null
open
Binding in mapping converter === I try to use MappingConverter (existed in our appication and worked nice) in this way: <converters:MappingConverter x:Key="RewardTypeToSymbolConverter" ElseMappingValue="BlaBla"> <converters:MappingEntry FromValue="{x:Static loc:SomeEnum.Value}" ToValue="{Binding SomeStringInViewModel}" /> </converters:MappingConverter> I get no exceptions, but my TextBlock show nothing. Breakpoint within a converter shows that ToValue property is NULL (but SomeStringInViewModel isn't). Do anybody have some idea how can I use binding like this within a converter? Or using binding in resource is impossible?
0
5,952,557
05/10/2011 15:31:17
745,378
05/09/2011 15:05:19
8
0
load a tree : ExtJs - Jayrock
im trying to build a treepanel (or just a simple tree i just need it to work) and load it with data from database here is my code var objHandler = new Interact(); var treestore = new Ext.data.TreeStore ( { fields:['Title'], 'Adress', 'Description'] , //data:[], proxy: {//?? type: 'memory', reader: { type: 'json', root: 'users' } } }); function ReadTree() { try { objHandler.ReadAssets(function (serverResponse) { if (serverResponse.error == null) { var result = serverResponse.result; if (result.length > 2) { treestore.load(Ext.decode(result));//TreeStore does not inherit from Ext.data.Store and thus does not have a loadData method. Both TreeStore and Store inherit from Ext.data.AbstractStore which defines a load method only. Therefore TreeStore has a load method } } else { alert(serverResponse.error.message); } }); //eo serverResponse } //eo try catch (e) { alert(e.message); } } var AssetTree = Ext.create('Ext.tree.Panel', { title: 'Asset Tree', width: 200, height: 150, store: treestore, columns: [ {text : 'First Name', dataIndex :'Title'}, {text : 'Last', dataIndex :'Adress'}, {text : 'Hired Month', dataIndex :'Description'} ], autoscroll : true //,autoLoad: true//? //rootVisible: false, //renderTo: Ext.getBody() }); ReadTree(); im using jayrock : http://code.google.com/p/jayrock/ Interact.ashx.cs : public class Interact : JsonRpcHandler { [JsonRpcMethod()] public string ReadAssets() { // Make calls to DB or your custom assembly in project and return the result in JSON format. This part is making custom assembly calls. clsDBInteract objDBInteract = new clsDBInteract(); string result; try { result = objDBInteract.FetchAssetsJSON(); } catch (Exception ex) { throw ex; } return result; } I dont have any error, but the panel is empty, i tested and i can read the data in the readtree function..so i guess the problem would be in the store maybe or the loading its been more than a week that im trying to pull this off any help would be appreciated thanks
extjs
tree
load
extjs4
jayrock
null
open
load a tree : ExtJs - Jayrock === im trying to build a treepanel (or just a simple tree i just need it to work) and load it with data from database here is my code var objHandler = new Interact(); var treestore = new Ext.data.TreeStore ( { fields:['Title'], 'Adress', 'Description'] , //data:[], proxy: {//?? type: 'memory', reader: { type: 'json', root: 'users' } } }); function ReadTree() { try { objHandler.ReadAssets(function (serverResponse) { if (serverResponse.error == null) { var result = serverResponse.result; if (result.length > 2) { treestore.load(Ext.decode(result));//TreeStore does not inherit from Ext.data.Store and thus does not have a loadData method. Both TreeStore and Store inherit from Ext.data.AbstractStore which defines a load method only. Therefore TreeStore has a load method } } else { alert(serverResponse.error.message); } }); //eo serverResponse } //eo try catch (e) { alert(e.message); } } var AssetTree = Ext.create('Ext.tree.Panel', { title: 'Asset Tree', width: 200, height: 150, store: treestore, columns: [ {text : 'First Name', dataIndex :'Title'}, {text : 'Last', dataIndex :'Adress'}, {text : 'Hired Month', dataIndex :'Description'} ], autoscroll : true //,autoLoad: true//? //rootVisible: false, //renderTo: Ext.getBody() }); ReadTree(); im using jayrock : http://code.google.com/p/jayrock/ Interact.ashx.cs : public class Interact : JsonRpcHandler { [JsonRpcMethod()] public string ReadAssets() { // Make calls to DB or your custom assembly in project and return the result in JSON format. This part is making custom assembly calls. clsDBInteract objDBInteract = new clsDBInteract(); string result; try { result = objDBInteract.FetchAssetsJSON(); } catch (Exception ex) { throw ex; } return result; } I dont have any error, but the panel is empty, i tested and i can read the data in the readtree function..so i guess the problem would be in the store maybe or the loading its been more than a week that im trying to pull this off any help would be appreciated thanks
0
11,333,875
07/04/2012 18:21:09
861,744
07/25/2011 14:18:40
1
0
automaticaly/autocomplete input fields with jquery/js
i want to fill some input fields in a form with javascript or jquery e.g. when im typing in the first input. When i start typing the Lastname of an Customer, there should be an autocomplete/dropdown list with all customer names start with the typed text fragment. On Choice the firstname, address and city will be autocomplete/autofill with the data http://jsfiddle.net/3MnuA/ The data could be a mysql ressource / array / json e.g.
php
javascript
jquery
input
autocomplete
07/04/2012 18:47:39
not a real question
automaticaly/autocomplete input fields with jquery/js === i want to fill some input fields in a form with javascript or jquery e.g. when im typing in the first input. When i start typing the Lastname of an Customer, there should be an autocomplete/dropdown list with all customer names start with the typed text fragment. On Choice the firstname, address and city will be autocomplete/autofill with the data http://jsfiddle.net/3MnuA/ The data could be a mysql ressource / array / json e.g.
1
9,244,459
02/11/2012 22:07:24
1,202,432
02/10/2012 16:14:54
7
0
How to make a label do marquee left and marquee right?
I am trying to find the EASIEST way possible of making a labels text scroll via by typing the text into a textbox. I can't seem to find a good honest tutorial for both right and left can someone please give me an example of what to do?
c#
text
checkbox
label
marquee
null
open
How to make a label do marquee left and marquee right? === I am trying to find the EASIEST way possible of making a labels text scroll via by typing the text into a textbox. I can't seem to find a good honest tutorial for both right and left can someone please give me an example of what to do?
0
751,068
04/15/2009 10:26:10
6,691
09/15/2008 12:29:38
133
10
What VCS allows me to add changes to multiple pending commits simultaneously?
My workflow usually involves me making multiple changes to a file, each of which belongs to it's own conceptual unit of change across the project (= commit). What I would like to be able to do is to add certain diffs (either a whole file, or only certain lines of a file) to a pending commit (which would probably have to be named) and to have multiple pending commits 'active' at the same time. Then when all changes related to a particular pending commit are complete across all files, I can commit the named commit! Any ideas of which VCS would be a good candidate for this?
dvcs
git
bazaar
svn
mercurial
null
open
What VCS allows me to add changes to multiple pending commits simultaneously? === My workflow usually involves me making multiple changes to a file, each of which belongs to it's own conceptual unit of change across the project (= commit). What I would like to be able to do is to add certain diffs (either a whole file, or only certain lines of a file) to a pending commit (which would probably have to be named) and to have multiple pending commits 'active' at the same time. Then when all changes related to a particular pending commit are complete across all files, I can commit the named commit! Any ideas of which VCS would be a good candidate for this?
0
7,800,431
10/17/2011 22:36:49
820,511
06/29/2011 06:49:14
6
1
Secure Sharepoint iOS
I'd like to comment on http://stackoverflow.com/questions/982622/consume-wcf-web-service-using-objective-c-on-iphone But the post has been protected and I don't yet have enough reputation points... I'd like to know if this approach is still valid today and secure? Thank for the help
objective-c
ios
xcode
sharepoint
soap
10/18/2011 20:49:49
not a real question
Secure Sharepoint iOS === I'd like to comment on http://stackoverflow.com/questions/982622/consume-wcf-web-service-using-objective-c-on-iphone But the post has been protected and I don't yet have enough reputation points... I'd like to know if this approach is still valid today and secure? Thank for the help
1
1,521,429
10/05/2009 17:45:25
174,614
09/16/2009 21:07:49
10
0
WCF Stream length
I have the following code to send a (file) stream to a wcf client: public Stream Download( string path ) { try { FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read); return stream; } catch (Exception ex) { string error = ex.Message; return null; } } I want to be able to get the length of the sent stream at the client end, but the Stream class does not support this. What would be the best way of doing it? Thanks, Tony
wcf
c#
null
null
null
null
open
WCF Stream length === I have the following code to send a (file) stream to a wcf client: public Stream Download( string path ) { try { FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read); return stream; } catch (Exception ex) { string error = ex.Message; return null; } } I want to be able to get the length of the sent stream at the client end, but the Stream class does not support this. What would be the best way of doing it? Thanks, Tony
0
11,590,288
07/21/2012 07:24:40
1,343,638
04/19/2012 09:59:13
20
8
String.Format Issue
I want that string into String.Format But am not able to format that properly. Please if you can help me. string s = "$(\"#container\").notify();$(\"#container\").notify(\"create\", \"basic-template\", { title: '{0}', text: '{1}'},{ expires: false, speed: 1000 });"; i want this into string.Format. I tried converting it but it shows me error . Input string was not in correct format
c#
null
null
null
null
07/21/2012 13:34:26
not a real question
String.Format Issue === I want that string into String.Format But am not able to format that properly. Please if you can help me. string s = "$(\"#container\").notify();$(\"#container\").notify(\"create\", \"basic-template\", { title: '{0}', text: '{1}'},{ expires: false, speed: 1000 });"; i want this into string.Format. I tried converting it but it shows me error . Input string was not in correct format
1
5,795,263
04/26/2011 19:11:20
381,979
07/02/2010 11:01:52
404
12
Binary to Base64 (Delphi)
how can i get content of an `exe` file and convert it into `Base64` encoding ?
delphi
encoding
binary
base64
exe
null
open
Binary to Base64 (Delphi) === how can i get content of an `exe` file and convert it into `Base64` encoding ?
0
9,986,477
04/03/2012 02:49:32
923,904
09/01/2011 17:08:03
11
0
Rails Tutorial Chapter 7, Exercise 4
I'm having trouble with Exercise 4 in Chapter 7 of [railstutorial.org][1]. Here are the tests: describe "signup" do before { visit signup_path } describe "with invalid information" do it "should not create a user" do expect { click_button "Create my Account".not_to change(User, :count) } end end describe "error messages" do before { click_button "Create my account" } it { should have_selector('title', text: "Sign up") } it { should have_content('error') } end describe "with valid information" do before do fill_in "Name", with: "Example User" fill_in "Email", with: "user@example.com" fill_in "Password", with: "foobar" fill_in "Confirmation", with: "foobar" end it "should create a user" do expect do click_button "Create my account" end.to change(User, :count).by(1) end end describe "after saving the user" do before { click_button "Create my account" } let(:user) { User.find_by_email('user@example.com') } it { should have_selector('title', text: user.name) } it { should have_selector('div.alert.alert-success', text: 'Welcome') } end end Here is what it's supposed to test, users_controller.rb: def create @user = User.new(params[:user]) if @user.save flash[:success] = "Welcome to the Sample App!" redirect_to @user else render 'new' end end Here's the show.html.erb code as well: <% provide(:title, @user.name) %> <div class="row"> <aside class="span4"> <section> <h1> <%= gravatar_for @user %> <%= @user.name %> </h1> </section> </aside> </div> When I run my tests, I get this: $ bundle exec rspec spec/requests/user_pages_spec.rb ........FF Failures: 1) User Pages signup after saving the user Failure/Error: it { should have_selector('title', text: user.name) } NoMethodError: undefined method `name' for nil:NilClass # ./spec/requests/user_pages_spec.rb:57:in `block (4 levels) in <top (required)>' 2) User Pages signup after saving the user Failure/Error: it { should have_selector('div.alert.alert-success', text: 'Welcome') } expected css "div.alert.alert-success" with text "Welcome" to return something # ./spec/requests/user_pages_spec.rb:58:in `block (4 levels) in <top (required)>' Finished in 0.86152 seconds 10 examples, 2 failures Failed examples: rspec ./spec/requests/user_pages_spec.rb:57 # User Pages signup after saving the user rspec ./spec/requests/user_pages_spec.rb:58 # User Pages signup after saving the user It should save the test user to the test db, but for some reason, user.name is turning out nil. Any ideas? Thank you! [1]: http://ruby.railstutorial.org/book/ruby-on-rails-tutorial?version=3.2#sec:signup_exercises
ruby
rspec
ruby-on-rails-3.2
railstutorial.org
null
04/04/2012 03:29:31
too localized
Rails Tutorial Chapter 7, Exercise 4 === I'm having trouble with Exercise 4 in Chapter 7 of [railstutorial.org][1]. Here are the tests: describe "signup" do before { visit signup_path } describe "with invalid information" do it "should not create a user" do expect { click_button "Create my Account".not_to change(User, :count) } end end describe "error messages" do before { click_button "Create my account" } it { should have_selector('title', text: "Sign up") } it { should have_content('error') } end describe "with valid information" do before do fill_in "Name", with: "Example User" fill_in "Email", with: "user@example.com" fill_in "Password", with: "foobar" fill_in "Confirmation", with: "foobar" end it "should create a user" do expect do click_button "Create my account" end.to change(User, :count).by(1) end end describe "after saving the user" do before { click_button "Create my account" } let(:user) { User.find_by_email('user@example.com') } it { should have_selector('title', text: user.name) } it { should have_selector('div.alert.alert-success', text: 'Welcome') } end end Here is what it's supposed to test, users_controller.rb: def create @user = User.new(params[:user]) if @user.save flash[:success] = "Welcome to the Sample App!" redirect_to @user else render 'new' end end Here's the show.html.erb code as well: <% provide(:title, @user.name) %> <div class="row"> <aside class="span4"> <section> <h1> <%= gravatar_for @user %> <%= @user.name %> </h1> </section> </aside> </div> When I run my tests, I get this: $ bundle exec rspec spec/requests/user_pages_spec.rb ........FF Failures: 1) User Pages signup after saving the user Failure/Error: it { should have_selector('title', text: user.name) } NoMethodError: undefined method `name' for nil:NilClass # ./spec/requests/user_pages_spec.rb:57:in `block (4 levels) in <top (required)>' 2) User Pages signup after saving the user Failure/Error: it { should have_selector('div.alert.alert-success', text: 'Welcome') } expected css "div.alert.alert-success" with text "Welcome" to return something # ./spec/requests/user_pages_spec.rb:58:in `block (4 levels) in <top (required)>' Finished in 0.86152 seconds 10 examples, 2 failures Failed examples: rspec ./spec/requests/user_pages_spec.rb:57 # User Pages signup after saving the user rspec ./spec/requests/user_pages_spec.rb:58 # User Pages signup after saving the user It should save the test user to the test db, but for some reason, user.name is turning out nil. Any ideas? Thank you! [1]: http://ruby.railstutorial.org/book/ruby-on-rails-tutorial?version=3.2#sec:signup_exercises
3
11,478,545
07/13/2012 21:20:00
1,243,817
03/01/2012 21:50:18
8
1
Counting nested field sets in a form
Is there a way to count the number of nested fields that have been added to a form, in Rails? I currently have a form that allows the user to add or remove nested attributes. The code is basically the same from the Railscast http://railscasts.com/episodes/196-nested-model-form-revised just changed slightly for my requirements (different controller and model names). What I want to be able to do is count the number of sets of nested attributes that are currently in the form. Is there a way to do this in Rails or would I be better using jQuery? I need to be able to access the value in the view. Any help much appreciated. If you need to see the code, let me know.
ruby-on-rails
nested-forms
null
null
null
null
open
Counting nested field sets in a form === Is there a way to count the number of nested fields that have been added to a form, in Rails? I currently have a form that allows the user to add or remove nested attributes. The code is basically the same from the Railscast http://railscasts.com/episodes/196-nested-model-form-revised just changed slightly for my requirements (different controller and model names). What I want to be able to do is count the number of sets of nested attributes that are currently in the form. Is there a way to do this in Rails or would I be better using jQuery? I need to be able to access the value in the view. Any help much appreciated. If you need to see the code, let me know.
0
5,590,785
04/08/2011 05:22:39
670,534
03/22/2011 03:39:43
6
0
What is the advantage of using Symfony over raw PHP when we are considering in the design level???
For ex- advantages of using symfony disadvantages in PHP When it comes to database communication which is better????
php
symfony
null
null
null
04/08/2011 05:57:00
not a real question
What is the advantage of using Symfony over raw PHP when we are considering in the design level??? === For ex- advantages of using symfony disadvantages in PHP When it comes to database communication which is better????
1
3,825,853
09/29/2010 21:06:24
438,354
09/02/2010 20:07:21
10
0
cancel request in beforefilter() in PHP
I'm using CakePHP , CAS for Authentication and ACL for Authorization. If the user donot have permission to view the page, i need to flash a message stating Not permitted OR redirect to another page. Ex: If the user is viewing /users/view/1 .Now the user requests /users/delete/1. The user donot have permission to delete. So I want to display a flash message on the page he requested from (/users/view/1). In my app_controller, i have the following function: function beforeFilter() { $this->__initPhpCas(); if (isset($_SESSION['loggedIn'])){ if(!$this->Acl->check(.....){ //User do not have permission to view the page. // Need to cancel this request and flash a message } } Any suggestions are appreciated
php
acl
before-filter
null
null
null
open
cancel request in beforefilter() in PHP === I'm using CakePHP , CAS for Authentication and ACL for Authorization. If the user donot have permission to view the page, i need to flash a message stating Not permitted OR redirect to another page. Ex: If the user is viewing /users/view/1 .Now the user requests /users/delete/1. The user donot have permission to delete. So I want to display a flash message on the page he requested from (/users/view/1). In my app_controller, i have the following function: function beforeFilter() { $this->__initPhpCas(); if (isset($_SESSION['loggedIn'])){ if(!$this->Acl->check(.....){ //User do not have permission to view the page. // Need to cancel this request and flash a message } } Any suggestions are appreciated
0
7,483,624
09/20/2011 10:22:17
902,214
08/19/2011 10:05:02
11
1
Running jobs parallely in hadoop
I am new to hadoop. I have set up a 2 node cluster. How to run 2 jobs parallely in hadoop. When i submit jobs, they are running one by one in FIFO order. I have to run the jobs parallely. How to acheive that. Thanks MRK
hadoop
null
null
null
null
null
open
Running jobs parallely in hadoop === I am new to hadoop. I have set up a 2 node cluster. How to run 2 jobs parallely in hadoop. When i submit jobs, they are running one by one in FIFO order. I have to run the jobs parallely. How to acheive that. Thanks MRK
0
8,261,424
11/24/2011 18:49:51
1,064,520
11/24/2011 18:47:08
1
0
How to search and delete data from a Binary File created by my code?
I'm having trouble with the remove function in this question. Would appreciate any help. Thanks! :D Q19 Define a class BIN which performs some basic operation on binary file. The class has the following specifications Class Name: BIN Data Members/Instance Variables: Roll: An integer to store the roll number of a student Std: An integer to store the class of a student Marks : A double variable to store the mark in a subject of a student Member Functions/Methods: void output(): To read the details from user and save the contents to a binary file called my.dat void input(): To read all the contents from a binary file my.dat and display it to terminal window. boolean remove(int R) : To remove the details of a student from the binary file bin.dat if present and return true, otherwise simply return false. Write a menu driven main() function to check the functionality of above class
java
file
delete
binary
removal
11/25/2011 03:36:03
not a real question
How to search and delete data from a Binary File created by my code? === I'm having trouble with the remove function in this question. Would appreciate any help. Thanks! :D Q19 Define a class BIN which performs some basic operation on binary file. The class has the following specifications Class Name: BIN Data Members/Instance Variables: Roll: An integer to store the roll number of a student Std: An integer to store the class of a student Marks : A double variable to store the mark in a subject of a student Member Functions/Methods: void output(): To read the details from user and save the contents to a binary file called my.dat void input(): To read all the contents from a binary file my.dat and display it to terminal window. boolean remove(int R) : To remove the details of a student from the binary file bin.dat if present and return true, otherwise simply return false. Write a menu driven main() function to check the functionality of above class
1
6,728,564
07/18/2011 04:15:57
144,600
07/24/2009 16:05:46
149
7
External atmel memory with coldfire 5282 processor
Background: I have inherited this project which is using an [freescale coldfire 5282][coldfire] processor. The system is using a custom made RTOS so there is no documentation. The previous person also added in a [Atmel AT45DB642D][atmel] to be able to save logging data. Currently I have been trying to go through the source of the RTOS and all ready written source but I have been unable to find anything that interfaces with the atmel memory. I have found something in the source for accessing "flash memory", but it appears to be accessing some internal 8Kb of memory on the coldfire chip. Having gone through some of the coldfire datasheet, I believe that there appears that there might be some "native" interface in the coldfire chip, but I have not been able to find it yet in the datasheet. My question is basically what should I look for in the current source to try and find if there is all ready some interface for this memory. And if I need to go about writing my own interfaces, what is the best way to go about doing that (some thing I should know about the coldfire chip etc or should I just be setting values directly to the pins and pulling the clock pin). Here is the relevant part of the schematic that I found on a sheet that was stash away: ![schematic][schematic] [coldfire]: http://www.freescale.com/files/32bit/doc/ref_manual/MCF5282UM.pdf [atmel]: http://www.atmel.com/dyn/products/product_docs.asp?category_id=162&family_id=668&subfamily_id=1805&part_id=3777 [schematic]: http://dl.dropbox.com/u/2551761/2011-07-15%2014.58.37.jpg
memory
embedded
atmel
coldfire
null
07/24/2011 10:03:16
too localized
External atmel memory with coldfire 5282 processor === Background: I have inherited this project which is using an [freescale coldfire 5282][coldfire] processor. The system is using a custom made RTOS so there is no documentation. The previous person also added in a [Atmel AT45DB642D][atmel] to be able to save logging data. Currently I have been trying to go through the source of the RTOS and all ready written source but I have been unable to find anything that interfaces with the atmel memory. I have found something in the source for accessing "flash memory", but it appears to be accessing some internal 8Kb of memory on the coldfire chip. Having gone through some of the coldfire datasheet, I believe that there appears that there might be some "native" interface in the coldfire chip, but I have not been able to find it yet in the datasheet. My question is basically what should I look for in the current source to try and find if there is all ready some interface for this memory. And if I need to go about writing my own interfaces, what is the best way to go about doing that (some thing I should know about the coldfire chip etc or should I just be setting values directly to the pins and pulling the clock pin). Here is the relevant part of the schematic that I found on a sheet that was stash away: ![schematic][schematic] [coldfire]: http://www.freescale.com/files/32bit/doc/ref_manual/MCF5282UM.pdf [atmel]: http://www.atmel.com/dyn/products/product_docs.asp?category_id=162&family_id=668&subfamily_id=1805&part_id=3777 [schematic]: http://dl.dropbox.com/u/2551761/2011-07-15%2014.58.37.jpg
3
9,092,590
02/01/2012 07:59:59
658,408
03/14/2011 07:56:15
1
0
Context menu in DialogFragment
public boolean onContextItemSelected(MenuItem item) does not call for DialogFragment but was called for simple Fragment that replaced on Activity? WTF? public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) - calls normally, and menu wav build for my view.
android
fragment
android-dialogfragment
null
null
02/02/2012 18:23:09
not a real question
Context menu in DialogFragment === public boolean onContextItemSelected(MenuItem item) does not call for DialogFragment but was called for simple Fragment that replaced on Activity? WTF? public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) - calls normally, and menu wav build for my view.
1
11,468,853
07/13/2012 10:39:01
1,523,301
07/13/2012 10:32:54
1
0
I have to show a countdown timer in android say days:hours:min: sec to show how much time is left in deal to expire?
i have an activity that shows a deal that you can purchase ,i have to show a <b>timer that shows time left in deal expiration in format(days:hours:min:seconds) in android ...pls help
android
null
null
null
null
07/13/2012 13:53:53
not a real question
I have to show a countdown timer in android say days:hours:min: sec to show how much time is left in deal to expire? === i have an activity that shows a deal that you can purchase ,i have to show a <b>timer that shows time left in deal expiration in format(days:hours:min:seconds) in android ...pls help
1
11,530,102
07/17/2012 20:09:04
1,522,688
07/13/2012 05:54:17
1
0
Please explain how this short ruby program works
I thought Ruby was supposed to be fun and have the principle of least surprise. then I found this bit of code. Can someone please explain how it is working? d,l,s,c,f,S=15,3,[[5,6],[5,5],[5,4]],[1,0],[rand(15),rand(15)],STDIN system'stty -icanon -echoke' loop do k=S.getc if k=select([S],[],[],0.2)&&S.getc=="\e"&&S.getc==?[ c={?A=>[0,-1],?B=>[0,1],?C=>[1,0],?D=>[-1,0]}[k]||c s=[[s[0][0]+c[0],s[0][1]+c[1]]]+s[0..-2] exit if s[0][0]+1>d||s[0][1]+1>d||s[0][0]+1==0||s[0][1]+1==0||s[1..-1].index(s[0]) s+=[[s[0][0]+c[0],s[0][1]+c[1]]] if s[0]==f f=[rand(d),rand(d)] if s.index f (d+3).times{|y|(d+3).times{|x|print y==0?"\e[2J\e[1;1H": s.index([x-1,y-2])? ?#: f==[x- 1,y-2]? ?@: x==d+2? "\n": y==1||y==d+2||x==0||x==d+1? ?X: ' '}} end
ruby
null
null
null
null
07/17/2012 20:41:01
not a real question
Please explain how this short ruby program works === I thought Ruby was supposed to be fun and have the principle of least surprise. then I found this bit of code. Can someone please explain how it is working? d,l,s,c,f,S=15,3,[[5,6],[5,5],[5,4]],[1,0],[rand(15),rand(15)],STDIN system'stty -icanon -echoke' loop do k=S.getc if k=select([S],[],[],0.2)&&S.getc=="\e"&&S.getc==?[ c={?A=>[0,-1],?B=>[0,1],?C=>[1,0],?D=>[-1,0]}[k]||c s=[[s[0][0]+c[0],s[0][1]+c[1]]]+s[0..-2] exit if s[0][0]+1>d||s[0][1]+1>d||s[0][0]+1==0||s[0][1]+1==0||s[1..-1].index(s[0]) s+=[[s[0][0]+c[0],s[0][1]+c[1]]] if s[0]==f f=[rand(d),rand(d)] if s.index f (d+3).times{|y|(d+3).times{|x|print y==0?"\e[2J\e[1;1H": s.index([x-1,y-2])? ?#: f==[x- 1,y-2]? ?@: x==d+2? "\n": y==1||y==d+2||x==0||x==d+1? ?X: ' '}} end
1
2,415,132
03/10/2010 07:15:13
73,715
03/04/2009 15:01:26
110
6
Which PHP framework should I use when creating this type of website/application?
In the jungle of frameworks out there, I've come to the conclusion that I cannot simply determine a framework beforehand without considering the type of application/site I want to create. So I think I need a rittre herp with determining this one. This site is a heavy graphics site, where basically all of the content is presented in a small square (div) in the centre of the page. And with graphics all around basically. And the graphics around it needs to be loaded only once preferrably. What it basically is, well. It's a site where you log on with your user account and choose from a number of premade receipes for foods, or create your own. Then, you can hit a 'generate'-button to have the site generate a week or two of dishes for you. Other than that? The users need their own control panel where they can customize stuff as wallpaper, dishes, labels etc. As well as browsing receipes, adding ingredients and looking up which dishes they can create with the ingredients. Pretty basic stuff really. And mind you, all of this data is supposed to be presented inside a square in the centre. So we need a system of jQuery panels as well. I was actually thinking and hoping of dynamicall adding content to this square as needed. Emptying the content and adding new content to it when clicking links etc. Other than that, we don't need any community percé, perhaps the possibility to discuss stuff, but that can be in a separate external site or something. It should also be mentioned that I myself are a graphics designer more than a programmer. I do get stuff pretty easily but I fear I don't have the capacity to create a framework like this from the ground up.. Although I do know a bit of Visual Basic, but not so good with C# (more the syntax really). I've never even touched PHP, but my partner has. He's also a bit familiar with Java as well. So, we basically need a framework that's easy to understand and get up and running.
php
frameworks
html
css
null
03/06/2012 00:06:26
not constructive
Which PHP framework should I use when creating this type of website/application? === In the jungle of frameworks out there, I've come to the conclusion that I cannot simply determine a framework beforehand without considering the type of application/site I want to create. So I think I need a rittre herp with determining this one. This site is a heavy graphics site, where basically all of the content is presented in a small square (div) in the centre of the page. And with graphics all around basically. And the graphics around it needs to be loaded only once preferrably. What it basically is, well. It's a site where you log on with your user account and choose from a number of premade receipes for foods, or create your own. Then, you can hit a 'generate'-button to have the site generate a week or two of dishes for you. Other than that? The users need their own control panel where they can customize stuff as wallpaper, dishes, labels etc. As well as browsing receipes, adding ingredients and looking up which dishes they can create with the ingredients. Pretty basic stuff really. And mind you, all of this data is supposed to be presented inside a square in the centre. So we need a system of jQuery panels as well. I was actually thinking and hoping of dynamicall adding content to this square as needed. Emptying the content and adding new content to it when clicking links etc. Other than that, we don't need any community percé, perhaps the possibility to discuss stuff, but that can be in a separate external site or something. It should also be mentioned that I myself are a graphics designer more than a programmer. I do get stuff pretty easily but I fear I don't have the capacity to create a framework like this from the ground up.. Although I do know a bit of Visual Basic, but not so good with C# (more the syntax really). I've never even touched PHP, but my partner has. He's also a bit familiar with Java as well. So, we basically need a framework that's easy to understand and get up and running.
4
8,183,301
11/18/2011 13:40:28
340,353
05/13/2010 14:15:28
138
25
change local variable size
I have a big giant sql using a predefined parameter at many places, please see below -- @myVar nvarchar(10) This was passed as a parameter with some value in it. ` @myVar = 'sad' + @myVar` here is a Big giant sql using @myvar at many places As u guys would have figured out that if the length of value in @myVar is > 7, then addking 'sad' will remove characters from the end of @myVar. A normal solution to this is to declare another local variable of @myVar.len + my required size(3 in this case).But I wanted to know is it possible that I can change the length of @myVar somehow?? Thanks for ur time! :)
sql-server-2005
null
null
null
null
null
open
change local variable size === I have a big giant sql using a predefined parameter at many places, please see below -- @myVar nvarchar(10) This was passed as a parameter with some value in it. ` @myVar = 'sad' + @myVar` here is a Big giant sql using @myvar at many places As u guys would have figured out that if the length of value in @myVar is > 7, then addking 'sad' will remove characters from the end of @myVar. A normal solution to this is to declare another local variable of @myVar.len + my required size(3 in this case).But I wanted to know is it possible that I can change the length of @myVar somehow?? Thanks for ur time! :)
0