PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
11,646,698
07/25/2012 09:29:08
1,480,107
06/25/2012 13:23:31
1
0
How I could dynamicly resize the popup for plugin for tinymce Editor ?
I made u plugin for tynemce editor for importing pictures ,the size of the popup depends on how much pictures are shown in the pop-up ...so that means the size should be dynamicly changed. I only know how to set a static size of the popup,is there any event/function to change the size dynamicly ?
javascript
plugins
resize
editor
tinymce
null
open
How I could dynamicly resize the popup for plugin for tinymce Editor ? === I made u plugin for tynemce editor for importing pictures ,the size of the popup depends on how much pictures are shown in the pop-up ...so that means the size should be dynamicly changed. I only know how to set a static size of the popup,is there any event/function to change the size dynamicly ?
0
4,357,415
12/05/2010 04:40:19
509,070
11/16/2010 04:13:56
48
0
nHibernate - Objects or ObjectID's in classes
We are migrating a current C# application to use nHibernate. As nHibernate promotes a purely domain driven design can we add business objects as properties of classes or should be continue to use an ID. Let me illustrate this with an example; Take the following existing class. The Address (and children) are identified by their ID' only. public class Person { public int PersonID { get; set; } public string FirstName { get; set; } public string FirstName { get; set; } public int AddressID { get; set; } public List<int> ChildrenIDs { get; set; } } When we convert the class to use nHibernate we would also like to take the opportunity to change the structure of the 'Person' class to better accommodate out needs. Hoping that nHibernate will take care of all the data retrieval 'under the hood' public class Person { public virtual int PersonID { get; private set; } public virtual string FirstName { get; set; } public virtual string FirstName { get; set; } public virtual AddressObject Address { get; set; } public virtual List<ChildrenObject> Children { get; set; } } We now store an Address object and a List of Children objects against the Person. This is better for our business needs as we have all the information when accessing the class and we can move away from using ID's but instead using the underlying object. In this scenario, what would nHibernate persist for the Person.Address? Will it persist only the unique ID that is nominated for that object in the Person table? What about ChildrenObject?
c#
nhibernate
domain-driven-design
nhibernate-mapping
null
null
open
nHibernate - Objects or ObjectID's in classes === We are migrating a current C# application to use nHibernate. As nHibernate promotes a purely domain driven design can we add business objects as properties of classes or should be continue to use an ID. Let me illustrate this with an example; Take the following existing class. The Address (and children) are identified by their ID' only. public class Person { public int PersonID { get; set; } public string FirstName { get; set; } public string FirstName { get; set; } public int AddressID { get; set; } public List<int> ChildrenIDs { get; set; } } When we convert the class to use nHibernate we would also like to take the opportunity to change the structure of the 'Person' class to better accommodate out needs. Hoping that nHibernate will take care of all the data retrieval 'under the hood' public class Person { public virtual int PersonID { get; private set; } public virtual string FirstName { get; set; } public virtual string FirstName { get; set; } public virtual AddressObject Address { get; set; } public virtual List<ChildrenObject> Children { get; set; } } We now store an Address object and a List of Children objects against the Person. This is better for our business needs as we have all the information when accessing the class and we can move away from using ID's but instead using the underlying object. In this scenario, what would nHibernate persist for the Person.Address? Will it persist only the unique ID that is nominated for that object in the Person table? What about ChildrenObject?
0
2,935,525
05/29/2010 14:54:05
303,756
03/28/2010 20:03:04
744
63
Is AppFapric mature for production.
We have a lot of WCF services using as a host windows services. And as we are upgrading our servers to windows server 2008 R2 we are planning to migrate some of services under WAS. Also having already the release of AppFabric it is interesting does AppFabric is mature to be used, so may be we can use it instead of WAS. Is there already someone using in on production. And what are your impressions of course maximum objectively :). Thank you.
c#
.net
wcf
workflow-foundation
appfabric
null
open
Is AppFapric mature for production. === We have a lot of WCF services using as a host windows services. And as we are upgrading our servers to windows server 2008 R2 we are planning to migrate some of services under WAS. Also having already the release of AppFabric it is interesting does AppFabric is mature to be used, so may be we can use it instead of WAS. Is there already someone using in on production. And what are your impressions of course maximum objectively :). Thank you.
0
8,375,508
12/04/2011 13:09:52
834,166
06/18/2011 18:55:11
430
10
Why are my ASIHTTPRequest files showing ARC errors?
I have implemented all of my ASIHTTPRequest files, but unfortunately the following errors occur: ![enter image description here][1] ![enter image description here][2] Why is this happening? [1]: http://i.stack.imgur.com/Lzt1d.png [2]: http://i.stack.imgur.com/wxEGN.png
iphone
objective-c
ios
xcode
asihttprequest
null
open
Why are my ASIHTTPRequest files showing ARC errors? === I have implemented all of my ASIHTTPRequest files, but unfortunately the following errors occur: ![enter image description here][1] ![enter image description here][2] Why is this happening? [1]: http://i.stack.imgur.com/Lzt1d.png [2]: http://i.stack.imgur.com/wxEGN.png
0
8,905,958
01/18/2012 06:15:02
850,975
07/18/2011 23:23:53
16
0
Integer -> Roman numeral converter: written in bad ruby, seeking good ruby
I'm writing a program to convert integers to Roman numerals (naively -- it doesn't know how to do the subtraction trick yet). What I have is functional, but it is not "Good Ruby". VALUES = [ ["M", 1000], ["D", 500], ["C", 100], ["L", 50], ["X", 10], ["V", 5], ["I", 1], ] def romanize n roman = "" VALUES.each do |pair| letter = pair[0] value = pair[1] roman += letter*(n / value) n = n % value end return roman end I suppose a hash makes more sense than the array of arrays, but the way I update `n`, order matters. Passing in `pair` to the block is dumb, but passing `letter, value` didn't work like I'd hoped. Thank you for your comments.
ruby
patterns
roman-numerals
null
null
01/18/2012 10:49:31
off topic
Integer -> Roman numeral converter: written in bad ruby, seeking good ruby === I'm writing a program to convert integers to Roman numerals (naively -- it doesn't know how to do the subtraction trick yet). What I have is functional, but it is not "Good Ruby". VALUES = [ ["M", 1000], ["D", 500], ["C", 100], ["L", 50], ["X", 10], ["V", 5], ["I", 1], ] def romanize n roman = "" VALUES.each do |pair| letter = pair[0] value = pair[1] roman += letter*(n / value) n = n % value end return roman end I suppose a hash makes more sense than the array of arrays, but the way I update `n`, order matters. Passing in `pair` to the block is dumb, but passing `letter, value` didn't work like I'd hoped. Thank you for your comments.
2
7,913,737
10/27/2011 09:01:29
481,635
10/20/2010 11:49:11
359
14
How to autoformat (not just auto-indent) in vim?
Is there a way to let vim Autoformat my (c#) code? I'm not just talking about indenting, but actually formatting. Like changing public void Program() { ... } to public void Program () { ... } and the other way around. Be it a macro, plugin or something else (formatexpr?). I'm trying to imitate the Visual Studio formatting here. I'd love to type `}` and have everything look nice.
vim
code-formatting
null
null
null
null
open
How to autoformat (not just auto-indent) in vim? === Is there a way to let vim Autoformat my (c#) code? I'm not just talking about indenting, but actually formatting. Like changing public void Program() { ... } to public void Program () { ... } and the other way around. Be it a macro, plugin or something else (formatexpr?). I'm trying to imitate the Visual Studio formatting here. I'd love to type `}` and have everything look nice.
0
4,808,138
01/26/2011 18:05:32
480,212
10/19/2010 08:20:46
81
1
Python, faking stdin
I'm currently writing an abstraction over darcs in python, however once I'm trying to send data to my repository, the repository requests for a key; I was thinking wether it was possible to make python send keys to darcs, using stdin, or whatever, to emulate what the user would be typing, since in this way; I could allow users to simply store a file with their information in, and python would simply read this file and fire off its contents.
python
version-control
stdin
pipe
null
null
open
Python, faking stdin === I'm currently writing an abstraction over darcs in python, however once I'm trying to send data to my repository, the repository requests for a key; I was thinking wether it was possible to make python send keys to darcs, using stdin, or whatever, to emulate what the user would be typing, since in this way; I could allow users to simply store a file with their information in, and python would simply read this file and fire off its contents.
0
3,188,787
07/06/2010 17:44:15
380,223
06/30/2010 15:19:41
1
0
Why wont my viewDidLoad method execute?
I have an iPhone app, with a tab bar controller. Before the tab bar is loaded, I present a modal view for registration. Once registration is completed this view is dismissed, and the tabs appear, with the "News" tab selected. For some reason, even though the News view is displaying, the viewDidLoad method of the News class is not being called. I know I am probably missing something simple, I'm kind of a noob at iPhone programming. Any help is appreciated.
iphone
load
modal
tabbar
viewdidload
null
open
Why wont my viewDidLoad method execute? === I have an iPhone app, with a tab bar controller. Before the tab bar is loaded, I present a modal view for registration. Once registration is completed this view is dismissed, and the tabs appear, with the "News" tab selected. For some reason, even though the News view is displaying, the viewDidLoad method of the News class is not being called. I know I am probably missing something simple, I'm kind of a noob at iPhone programming. Any help is appreciated.
0
6,907,247
08/02/2011 04:29:16
762,351
05/20/2011 08:04:50
1
0
Default Button for ImageButton in Panel not working in IE-7 & IE-8
I have a search page which has selection criteria & two image buttons Search & Clear. I want to fire Search Click whenever user enters in any of the selection criteria. I put the search criteria & button in Panel & set the default button to Search. It works fine in Firefox & Chrome but doesn't work in IE7 or IE8. My preference is not to attach keydown event to all the search criteria textbox & dropdown. Any idea what's different in IE 7-8 which is stopping this to work. ASP.NET version is 3.5 Here is my html hierarchy <Panel> <table> Search Criterias & buttons are here </table> </Panel>
asp.net
null
null
null
null
null
open
Default Button for ImageButton in Panel not working in IE-7 & IE-8 === I have a search page which has selection criteria & two image buttons Search & Clear. I want to fire Search Click whenever user enters in any of the selection criteria. I put the search criteria & button in Panel & set the default button to Search. It works fine in Firefox & Chrome but doesn't work in IE7 or IE8. My preference is not to attach keydown event to all the search criteria textbox & dropdown. Any idea what's different in IE 7-8 which is stopping this to work. ASP.NET version is 3.5 Here is my html hierarchy <Panel> <table> Search Criterias & buttons are here </table> </Panel>
0
7,076,711
08/16/2011 10:23:33
8,741
09/15/2008 16:46:16
4,803
96
How can I programmatically connect to a VPN?
I have a VPN connection that I keep losing, that I need to connect to our DB server, but every second or third connection fails because I have lost the VPN connection. I'd like to add somde code - for DEBUG config only - to check the VPN connection and reconnect if necessary, before proceeding to attempt the database connection.
c#
.net
windows-7
vpn
null
null
open
How can I programmatically connect to a VPN? === I have a VPN connection that I keep losing, that I need to connect to our DB server, but every second or third connection fails because I have lost the VPN connection. I'd like to add somde code - for DEBUG config only - to check the VPN connection and reconnect if necessary, before proceeding to attempt the database connection.
0
6,236,667
06/04/2011 12:09:50
783,908
06/04/2011 12:09:50
1
0
I'm wondering how to add the @synthesize statements for the MovieEditorViewController header file in XCode
The implementation file looks like this: #import "MovieViewController.h" #import "Movie.h" #import "MovieEditorViewController.h" @implementation MovieViewController @synthesize titleLabel; @synthesize boxOfficeGrossLabel; @synthesize summaryLabel; @synthesize movie; but i'm thinking my problem is not adding @synthesize statements for the MovieEditorViewController header file. If it's not this then I've included the debugging log below. I'm really new to programming and I really can't seem to figure out whats going wrong. When I run the iOS simulator and click the button to display editable text fields the program terminates and goes back to the homescreen. The debugger shows as follows: [Session started at 2011-06-04 13:00:00 +0100.] 2011-06-04 13:00:05.568 Movie[6678:207] -[MovieViewController editingViewController]: unrecognized selector sent to instance 0x8a3bd10 2011-06-04 13:00:05.572 Movie[6678:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MovieViewController editingViewController]: unrecognized selector sent to instance 0x8a3bd10' *** Call stack at first throw: ( 0 CoreFoundation 0x00dc95a9 __exceptionPreprocess + 185 1 libobjc.A.dylib 0x00f1d313 objc_exception_throw + 44 2 CoreFoundation 0x00dcb0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187 3 CoreFoundation 0x00d3a966 ___forwarding___ + 966 4 CoreFoundation 0x00d3a522 _CF_forwarding_prep_0 + 50 5 Movie 0x000021b4 -[MovieViewController edit] + 62 6 UIKit 0x002b94fd -[UIApplication sendAction:to:from:forEvent:] + 119 7 UIKit 0x00349799 -[UIControl sendAction:to:forEvent:] + 67 8 UIKit 0x0034bc2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527 9 UIKit 0x0034a7d8 -[UIControl touchesEnded:withEvent:] + 458 10 UIKit 0x002ddded -[UIWindow _sendTouchesForEvent:] + 567 11 UIKit 0x002bec37 -[UIApplication sendEvent:] + 447 12 UIKit 0x002c3f2e _UIApplicationHandleEvent + 7576 13 GraphicsServices 0x01721992 PurpleEventCallback + 1550 14 CoreFoundation 0x00daa944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52 15 CoreFoundation 0x00d0acf7 __CFRunLoopDoSource1 + 215 16 CoreFoundation 0x00d07f83 __CFRunLoopRun + 979 17 CoreFoundation 0x00d07840 CFRunLoopRunSpecific + 208 18 CoreFoundation 0x00d07761 CFRunLoopRunInMode + 97 19 GraphicsServices 0x017201c4 GSEventRunModal + 217 20 GraphicsServices 0x01720289 GSEventRun + 115 21 UIKit 0x002c7c93 UIApplicationMain + 1160 22 Movie 0x00001b40 main + 102 23 Movie 0x00001ad1 start + 53 24 ??? 0x00000001 0x0 + 1 ) terminate called after throwing an instance of 'NSException' If anyone could point me in the right direction i'd be very grateful... Thanks!
cocoa-touch
xcode
properties
terminate
statements
null
open
I'm wondering how to add the @synthesize statements for the MovieEditorViewController header file in XCode === The implementation file looks like this: #import "MovieViewController.h" #import "Movie.h" #import "MovieEditorViewController.h" @implementation MovieViewController @synthesize titleLabel; @synthesize boxOfficeGrossLabel; @synthesize summaryLabel; @synthesize movie; but i'm thinking my problem is not adding @synthesize statements for the MovieEditorViewController header file. If it's not this then I've included the debugging log below. I'm really new to programming and I really can't seem to figure out whats going wrong. When I run the iOS simulator and click the button to display editable text fields the program terminates and goes back to the homescreen. The debugger shows as follows: [Session started at 2011-06-04 13:00:00 +0100.] 2011-06-04 13:00:05.568 Movie[6678:207] -[MovieViewController editingViewController]: unrecognized selector sent to instance 0x8a3bd10 2011-06-04 13:00:05.572 Movie[6678:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MovieViewController editingViewController]: unrecognized selector sent to instance 0x8a3bd10' *** Call stack at first throw: ( 0 CoreFoundation 0x00dc95a9 __exceptionPreprocess + 185 1 libobjc.A.dylib 0x00f1d313 objc_exception_throw + 44 2 CoreFoundation 0x00dcb0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187 3 CoreFoundation 0x00d3a966 ___forwarding___ + 966 4 CoreFoundation 0x00d3a522 _CF_forwarding_prep_0 + 50 5 Movie 0x000021b4 -[MovieViewController edit] + 62 6 UIKit 0x002b94fd -[UIApplication sendAction:to:from:forEvent:] + 119 7 UIKit 0x00349799 -[UIControl sendAction:to:forEvent:] + 67 8 UIKit 0x0034bc2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527 9 UIKit 0x0034a7d8 -[UIControl touchesEnded:withEvent:] + 458 10 UIKit 0x002ddded -[UIWindow _sendTouchesForEvent:] + 567 11 UIKit 0x002bec37 -[UIApplication sendEvent:] + 447 12 UIKit 0x002c3f2e _UIApplicationHandleEvent + 7576 13 GraphicsServices 0x01721992 PurpleEventCallback + 1550 14 CoreFoundation 0x00daa944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52 15 CoreFoundation 0x00d0acf7 __CFRunLoopDoSource1 + 215 16 CoreFoundation 0x00d07f83 __CFRunLoopRun + 979 17 CoreFoundation 0x00d07840 CFRunLoopRunSpecific + 208 18 CoreFoundation 0x00d07761 CFRunLoopRunInMode + 97 19 GraphicsServices 0x017201c4 GSEventRunModal + 217 20 GraphicsServices 0x01720289 GSEventRun + 115 21 UIKit 0x002c7c93 UIApplicationMain + 1160 22 Movie 0x00001b40 main + 102 23 Movie 0x00001ad1 start + 53 24 ??? 0x00000001 0x0 + 1 ) terminate called after throwing an instance of 'NSException' If anyone could point me in the right direction i'd be very grateful... Thanks!
0
2,961,457
06/02/2010 20:43:41
295,133
03/16/2010 20:31:18
40
0
How do you create an outfit creator like this?
http://www.tailorstore.co.uk/tailor-made-shirts I believe it's using a form but how does it assemble the different layers of images? Is it just css?
javascript
css
null
null
null
06/03/2010 03:22:28
not a real question
How do you create an outfit creator like this? === http://www.tailorstore.co.uk/tailor-made-shirts I believe it's using a form but how does it assemble the different layers of images? Is it just css?
1
8,565,335
12/19/2011 17:53:48
612,987
02/11/2011 11:52:55
331
12
where to signup for apple store and how to upload app via window
i don't have MAC but want to signup for apple store and some one have developed an iPhone app for me. Can i upload it to apple store via windows OS. And can i signup for apple store via Windows OS and How to? Thanks
iphone
apple
app-store
howto
appstore-approval
12/20/2011 01:27:28
off topic
where to signup for apple store and how to upload app via window === i don't have MAC but want to signup for apple store and some one have developed an iPhone app for me. Can i upload it to apple store via windows OS. And can i signup for apple store via Windows OS and How to? Thanks
2
10,878,399
06/04/2012 08:30:46
1,434,691
06/04/2012 08:21:02
1
0
Copy shell script and preserve permissions
I have a small shell script that starts a program when I double-click it. (I have set the permissions to allow executing the script). I want to be able to copy that script to another computer so that the new user can double-click it without needing to know anything about chmod or permissions. But I can't find out how to preserve the execute permission when I copy the file. I can usually find answers with Google but this has me defeated - I guess I am not expressing my question properly. Thanks
bash
permissions
distribute
null
null
06/05/2012 12:50:53
off topic
Copy shell script and preserve permissions === I have a small shell script that starts a program when I double-click it. (I have set the permissions to allow executing the script). I want to be able to copy that script to another computer so that the new user can double-click it without needing to know anything about chmod or permissions. But I can't find out how to preserve the execute permission when I copy the file. I can usually find answers with Google but this has me defeated - I guess I am not expressing my question properly. Thanks
2
4,699,163
01/15/2011 10:49:22
575,522
01/14/2011 10:13:51
23
1
How to, using PHP, generate a one-way hash of the host's hardware profile?
_How to, using PHP, generate a one-way hash of the host's hardware profile?_
php
hardware
host
null
null
01/16/2011 17:30:58
not a real question
How to, using PHP, generate a one-way hash of the host's hardware profile? === _How to, using PHP, generate a one-way hash of the host's hardware profile?_
1
3,401,218
08/03/2010 22:22:09
53,007
01/08/2009 16:57:03
4,748
203
Is there a way to pivot a customer ID and a their most recent order dates?
I have a query that gives me all customer's and their last three order dates. EX: CustomerId DateOrdered 167 2006-09-16 01:25:38.060 167 2006-09-21 13:11:53.530 171 2006-08-31 15:19:22.543 171 2006-09-01 13:30:54.013 171 2006-09-01 13:34:36.483 178 2006-09-04 11:36:19.983 186 2006-09-05 12:50:27.153 186 2006-09-05 12:51:08.513 I want to know if there is a way for me to pivot it to display like this: [CustomerId] [Most Recent] [Middle] [Oldest] '167' '2006-09-21 13:11:53.530' '2006-09-16 01:25:38.060' 'NULL' '171' '2006-09-01 13:34:36.483' '2006-09-01 13:30:54.013' '2006-08-31 15:19:22.543' '178' '2006-09-04 11:36:19.983' NULL NULL '186' '2006-09-05 12:51:08.513' '2006-09-05 12:50:27.153' NULL
sql-server
sql-server-2005
tsql
null
null
null
open
Is there a way to pivot a customer ID and a their most recent order dates? === I have a query that gives me all customer's and their last three order dates. EX: CustomerId DateOrdered 167 2006-09-16 01:25:38.060 167 2006-09-21 13:11:53.530 171 2006-08-31 15:19:22.543 171 2006-09-01 13:30:54.013 171 2006-09-01 13:34:36.483 178 2006-09-04 11:36:19.983 186 2006-09-05 12:50:27.153 186 2006-09-05 12:51:08.513 I want to know if there is a way for me to pivot it to display like this: [CustomerId] [Most Recent] [Middle] [Oldest] '167' '2006-09-21 13:11:53.530' '2006-09-16 01:25:38.060' 'NULL' '171' '2006-09-01 13:34:36.483' '2006-09-01 13:30:54.013' '2006-08-31 15:19:22.543' '178' '2006-09-04 11:36:19.983' NULL NULL '186' '2006-09-05 12:51:08.513' '2006-09-05 12:50:27.153' NULL
0
9,371,549
02/21/2012 03:04:03
1,196,048
02/08/2012 00:50:09
1
0
Unable to install Visual Studio 2011
I've been trying to install VS11, it appears to install successfully, but it stops half way through then finishes saying it's complete and successful. Only when I go to Programs, nothing is under the VS11 folder. and the executable in the VS11 folder are nowhere to be found. Any help? I've tried installing with the AV disabled, I've tried completely removing it, and reinstalling it. I've tried rebooting it. Nothing seems to work. I have had it prior installed, but it's not reinstalling.
visual-studio
null
null
null
null
02/21/2012 06:37:58
off topic
Unable to install Visual Studio 2011 === I've been trying to install VS11, it appears to install successfully, but it stops half way through then finishes saying it's complete and successful. Only when I go to Programs, nothing is under the VS11 folder. and the executable in the VS11 folder are nowhere to be found. Any help? I've tried installing with the AV disabled, I've tried completely removing it, and reinstalling it. I've tried rebooting it. Nothing seems to work. I have had it prior installed, but it's not reinstalling.
2
7,635,761
10/03/2011 13:38:20
976,525
10/03/2011 10:50:53
1
0
Publish App in Appstore
I want to publish My App in App Store, First:If i want to provide the trial version(limited option) and after payment i want to provide full version(unlock trial to full version)in full version it has different version,how can i do this,kindly help me
app-store
publish
null
null
null
10/03/2011 14:09:17
off topic
Publish App in Appstore === I want to publish My App in App Store, First:If i want to provide the trial version(limited option) and after payment i want to provide full version(unlock trial to full version)in full version it has different version,how can i do this,kindly help me
2
10,238,513
04/19/2012 23:59:06
545,447
12/16/2010 23:31:32
101
2
uwsgi postfork not working
I can't seem to get my @postfork functions to run... 1 import uwsgi 2 from uwsgidecorators import * 3 from gevent import monkey; monkey.patch_all() 4 import sys 5 import umysql 6 import time 7 8 DB_HOST = 'stage.masked.com' 9 DB_PORT = 3306 10 DB_USER = 'masked' 11 DB_PASSWD = 'masked' 12 DB_DB = 'masked' 13 14 mysql_conn = None 15 16 @postfork 17 def zebra(): 18 print "I AM ZEBRA" 19 raise 20 21 @postfork 22 def setup_pool(): 23 global mysql_conn 24 mysql_conn = umysql.Connection() 25 print "HIII" 26 sys.stderr.write(str(mysql_conn.is_connected())) 27 mysql_conn.connect (DB_HOST, DB_PORT, DB_USER, DB_PASSWD, DB_DB) 28 sys.stderr.write(str(mysql_conn.is_connected())) 29 30 def application(env, start_response): 31 print "HALLO" When I start uwsgi, I get nothing until I hit the route (defined in nginx that calls this py app). Here's how I start uwsgi: # uwsgi --socket=/tmp/uwsgi_server.sock --master --processes=2 --listen=4096 --disable-logging --loop gevent --async 128 --uid=www-data --gid=www-data --vhost *** Starting uWSGI 1.1.2 (64bit) on [Thu Apr 19 23:55:32 2012] *** compiled with version: 4.6.1 on 18 April 2012 20:10:46 current working directory: /ebs/py detected binary path: /usr/local/bin/uwsgi setgid() to 33 setuid() to 33 your memory page size is 4096 bytes detected max file descriptor number: 1024 async fd table size: 1024 allocated 130048 bytes (127 KB) for 128 cores per worker. VirtualHosting mode enabled. lock engine: pthread mutexes uwsgi socket 0 bound to UNIX address /tmp/uwsgi_server.sock fd 3 Python version: 2.7.2+ (default, Oct 4 2011, 20:41:12) [GCC 4.6.1] Python main interpreter initialized at 0xbb9ad0 your server socket listen backlog is limited to 4096 connections *** Operational MODE: preforking+async *** *** no app loaded. going in full dynamic mode *** *** uWSGI is running in multiple interpreter mode *** spawned uWSGI master process (pid: 3340) spawned uWSGI worker 1 (pid: 3341, cores: 128) spawned uWSGI worker 2 (pid: 3342, cores: 128) *** running gevent loop engine [addr:0x451080] *** WSGI app 0 (mountpoint='masked.com|') ready in 0 seconds on interpreter 0xbb9ad0 pid: 3342 When I hit the route, I get: HALLO How can I get my @postfork functions to run? My end goal is to get connection pooling in the application function. Thanks!
python
python-2.7
uwsgi
null
null
null
open
uwsgi postfork not working === I can't seem to get my @postfork functions to run... 1 import uwsgi 2 from uwsgidecorators import * 3 from gevent import monkey; monkey.patch_all() 4 import sys 5 import umysql 6 import time 7 8 DB_HOST = 'stage.masked.com' 9 DB_PORT = 3306 10 DB_USER = 'masked' 11 DB_PASSWD = 'masked' 12 DB_DB = 'masked' 13 14 mysql_conn = None 15 16 @postfork 17 def zebra(): 18 print "I AM ZEBRA" 19 raise 20 21 @postfork 22 def setup_pool(): 23 global mysql_conn 24 mysql_conn = umysql.Connection() 25 print "HIII" 26 sys.stderr.write(str(mysql_conn.is_connected())) 27 mysql_conn.connect (DB_HOST, DB_PORT, DB_USER, DB_PASSWD, DB_DB) 28 sys.stderr.write(str(mysql_conn.is_connected())) 29 30 def application(env, start_response): 31 print "HALLO" When I start uwsgi, I get nothing until I hit the route (defined in nginx that calls this py app). Here's how I start uwsgi: # uwsgi --socket=/tmp/uwsgi_server.sock --master --processes=2 --listen=4096 --disable-logging --loop gevent --async 128 --uid=www-data --gid=www-data --vhost *** Starting uWSGI 1.1.2 (64bit) on [Thu Apr 19 23:55:32 2012] *** compiled with version: 4.6.1 on 18 April 2012 20:10:46 current working directory: /ebs/py detected binary path: /usr/local/bin/uwsgi setgid() to 33 setuid() to 33 your memory page size is 4096 bytes detected max file descriptor number: 1024 async fd table size: 1024 allocated 130048 bytes (127 KB) for 128 cores per worker. VirtualHosting mode enabled. lock engine: pthread mutexes uwsgi socket 0 bound to UNIX address /tmp/uwsgi_server.sock fd 3 Python version: 2.7.2+ (default, Oct 4 2011, 20:41:12) [GCC 4.6.1] Python main interpreter initialized at 0xbb9ad0 your server socket listen backlog is limited to 4096 connections *** Operational MODE: preforking+async *** *** no app loaded. going in full dynamic mode *** *** uWSGI is running in multiple interpreter mode *** spawned uWSGI master process (pid: 3340) spawned uWSGI worker 1 (pid: 3341, cores: 128) spawned uWSGI worker 2 (pid: 3342, cores: 128) *** running gevent loop engine [addr:0x451080] *** WSGI app 0 (mountpoint='masked.com|') ready in 0 seconds on interpreter 0xbb9ad0 pid: 3342 When I hit the route, I get: HALLO How can I get my @postfork functions to run? My end goal is to get connection pooling in the application function. Thanks!
0
9,704,826
03/14/2012 15:23:13
1,090,965
12/10/2011 07:10:36
16
0
FTP Tunneling not working
My college is said to have unblocked port 21. I'm trying FTP and it's still not working. FTP connection is established but file list is not shown. It says try passive mode. I thought of ssh tunneling through AWS. This is the command I used to start port forwarding ssh -vvvi ../apoorv.pem -L2001:localhost:21 ubuntu@107.20.xxx.xxx This is the output of FTP connection Apoorv-Parijats-MacBook-Pro:iwbb apoorvparijat$ ftp localhost 2001 Trying ::1... Connected to localhost. 220 (vsFTPd 2.3.2) Name (localhost:apoorvparijat): apache-ftp 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 229 Entering Extended Passive Mode (|||9246|). ftp: Can't connect to `::1': Connection refused 500 Unknown command. 425 Use PORT or PASV first. ftp> ls 500 Unknown command. ftp> I've already allowed tunneling in sshd_config.
tunnel
null
null
null
null
03/15/2012 09:09:08
off topic
FTP Tunneling not working === My college is said to have unblocked port 21. I'm trying FTP and it's still not working. FTP connection is established but file list is not shown. It says try passive mode. I thought of ssh tunneling through AWS. This is the command I used to start port forwarding ssh -vvvi ../apoorv.pem -L2001:localhost:21 ubuntu@107.20.xxx.xxx This is the output of FTP connection Apoorv-Parijats-MacBook-Pro:iwbb apoorvparijat$ ftp localhost 2001 Trying ::1... Connected to localhost. 220 (vsFTPd 2.3.2) Name (localhost:apoorvparijat): apache-ftp 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 229 Entering Extended Passive Mode (|||9246|). ftp: Can't connect to `::1': Connection refused 500 Unknown command. 425 Use PORT or PASV first. ftp> ls 500 Unknown command. ftp> I've already allowed tunneling in sshd_config.
2
4,784,152
01/24/2011 16:07:13
26,130
10/08/2008 13:05:48
1,406
32
need easy to use date selection menu, for just date / year
I need a jQuery date picker that asks the user to select month and year. I want it to be simple and not confusing at all. I could use two drop-down menus, one for month, the other for year, but I want it to be dead simple, just the click of the menue. I prefer it to be jQuery, anyone know of an elegant choice in this situation?
jquery
datepicker
null
null
null
null
open
need easy to use date selection menu, for just date / year === I need a jQuery date picker that asks the user to select month and year. I want it to be simple and not confusing at all. I could use two drop-down menus, one for month, the other for year, but I want it to be dead simple, just the click of the menue. I prefer it to be jQuery, anyone know of an elegant choice in this situation?
0
9,000,510
01/25/2012 09:42:52
1,063,555
11/24/2011 08:56:42
1
0
Sql 2000 to 2008
M having select queris using order by and column alias.We are planning to upgrade sql 2000 to 2008 . I think column alias are not supported in 2008. i have to write select quries that will work as expected in both sql 2000 and 2008.Please help me
sql
null
null
null
null
01/25/2012 18:23:15
not a real question
Sql 2000 to 2008 === M having select queris using order by and column alias.We are planning to upgrade sql 2000 to 2008 . I think column alias are not supported in 2008. i have to write select quries that will work as expected in both sql 2000 and 2008.Please help me
1
11,249,945
06/28/2012 17:32:53
1,427,180
05/30/2012 22:51:26
6
0
USB HID and Mass storage configuration in linux kernel 2.6.35
Please let me know if any body has worked on composite USB with Mass Storage + HID on linux kernel 2.6.35.3 (iMX Family) ?
usb
kernel
hid
usb-drive
null
06/29/2012 14:51:09
not a real question
USB HID and Mass storage configuration in linux kernel 2.6.35 === Please let me know if any body has worked on composite USB with Mass Storage + HID on linux kernel 2.6.35.3 (iMX Family) ?
1
11,495,781
07/15/2012 21:32:56
601,543
02/03/2011 13:10:22
13
6
Are Google APIs Typos Considered a XSS Attack? Are CDN's Secure? NO.
Dear Google and Internet Developers, Are Content Delivery Networks such as Google APIs CDN secure? A simple answer is NO. The reason - a huge list of unregistered CDN Typo domains. Please consider Google API Typo domains are an open and existing threat to the security of the Google APIs in general. Everyday people are accidentally linking their sites to domains like: ajax.googlapis.com Here is a live example after I registered the typo and [found this poor fellow already linking to my CDN typo][1]. A very simple and friendly example of what could be a nasty hack. This could be one of the greatest xss attacks against CDN's in general. Again every day people are linking to the wrong CDN URL's. This has huge implications for security and the place of CDN's Are these kinds of typo domain names worth owning to protect the typo space? Yes I know they are. Google could close this potential xss hole as easily as I registered the typo domain googlapis.com It only took me a couple hours and I had a site up with a clone of the actual CDN serving all the various JS and CSS content along with a handy fake site: https://ajax.googlapis.com/ I am a working contract developer and I am only asking Google to address this long term xss security hole after discovering it and testing it for the purposes of securing the web. I am not a hacker. [1]: http://mindfulmassage.org/ Thank you
xss
cdn
google-cdn
null
null
07/18/2012 00:13:11
not a real question
Are Google APIs Typos Considered a XSS Attack? Are CDN's Secure? NO. === Dear Google and Internet Developers, Are Content Delivery Networks such as Google APIs CDN secure? A simple answer is NO. The reason - a huge list of unregistered CDN Typo domains. Please consider Google API Typo domains are an open and existing threat to the security of the Google APIs in general. Everyday people are accidentally linking their sites to domains like: ajax.googlapis.com Here is a live example after I registered the typo and [found this poor fellow already linking to my CDN typo][1]. A very simple and friendly example of what could be a nasty hack. This could be one of the greatest xss attacks against CDN's in general. Again every day people are linking to the wrong CDN URL's. This has huge implications for security and the place of CDN's Are these kinds of typo domain names worth owning to protect the typo space? Yes I know they are. Google could close this potential xss hole as easily as I registered the typo domain googlapis.com It only took me a couple hours and I had a site up with a clone of the actual CDN serving all the various JS and CSS content along with a handy fake site: https://ajax.googlapis.com/ I am a working contract developer and I am only asking Google to address this long term xss security hole after discovering it and testing it for the purposes of securing the web. I am not a hacker. [1]: http://mindfulmassage.org/ Thank you
1
3,519,969
08/19/2010 08:29:52
1,357,818
08/19/2010 08:17:20
1
0
What to choose Software development or Software Testing?
looking forward to your advice I believe this is the best place to ask this question. I am a Software developer having 1 yr experience in .Net(windows app) but somehow i am finding my work monotonous cuz wen i chose this domain i was keen on making dynamic websites but my first job didnt give me any experience in it instead i am developing some windows app using .Net framework so want to switch to testing but the problem is i dont have any handson experience in it. I believe that have to train myself on some tools before i go for it .. Somehow i feel that coding requires lot of hard work as compare to testing I am in a dilemma as its a start of my career i dont want to make a worng decision... I want it to be exciting ...and really want to be proficient in watever i do. Please Please tell me whether i should stick to software development or move to testing. Please help Thanks
dilemma
null
null
null
null
08/19/2010 14:11:50
off topic
What to choose Software development or Software Testing? === looking forward to your advice I believe this is the best place to ask this question. I am a Software developer having 1 yr experience in .Net(windows app) but somehow i am finding my work monotonous cuz wen i chose this domain i was keen on making dynamic websites but my first job didnt give me any experience in it instead i am developing some windows app using .Net framework so want to switch to testing but the problem is i dont have any handson experience in it. I believe that have to train myself on some tools before i go for it .. Somehow i feel that coding requires lot of hard work as compare to testing I am in a dilemma as its a start of my career i dont want to make a worng decision... I want it to be exciting ...and really want to be proficient in watever i do. Please Please tell me whether i should stick to software development or move to testing. Please help Thanks
2
2,778,562
05/06/2010 05:02:02
334,091
05/06/2010 05:02:01
1
0
flashlog viewer
I want to build an application using air. The application should load the flashlog file and display the contents after performing some text filtering. But when i load the application this clears my flashlog.txt though my file mode is READ. I can understand that running my air application clears the flashlog and prepares it for new logging. Is there a workaround for this. I dont want to open the flashlog file everytime and check for traces from my web application
flex
logging
flashlog
air
null
null
open
flashlog viewer === I want to build an application using air. The application should load the flashlog file and display the contents after performing some text filtering. But when i load the application this clears my flashlog.txt though my file mode is READ. I can understand that running my air application clears the flashlog and prepares it for new logging. Is there a workaround for this. I dont want to open the flashlog file everytime and check for traces from my web application
0
10,594,195
05/15/2012 04:37:00
1,363,803
04/29/2012 05:54:11
3
0
C++ Appending Random Ordinal Causing Unresolved External Symbol
I just can't figure out what **Visual C++ 2010** is doing, I've Googled the heck out of it for hours and I still have no idea what is going on. I would really, really appreciate any help I can get. I have a DLL that I'm **importing functions** from, and I have gone through all of the usual motions. I have created a **.lib file** from the **DLL**, and I have created a header file with `extern "C"` and `__stdcall`. Yet dispite all of my efforts the compiler *STILL* complains: unresolved external symbol _Connected@4 referenced in function _main Here's the **real kicker**, do you see the **ordinal** there? `@4` <-- I did not specify that anywhere in my code, VC++ just decided it liked the number 4 apparently. In the DLL the function Connected actually is listed as ordinal 11, NOT 4. If I change the function to ordinal 4 in my .lib file **then the project compiles**, but then the DLL complains because it has Connected listed as 11. BinDump for **NtDirect.dll:** File Type: DLL Section contains the following exports for NtDirect.dll 00000000 characteristics 4F58E306 time date stamp Thu Mar 08 09:49:10 2012 0.00 version 1 ordinal base 32 number of functions 32 number of names ordinal hint RVA name 1 0 000011F0 Ask ... 10 9 000016A0 ConfirmOrders 11 A 000016E0 Connected 12 B 00001750 Filled ... 32 1F 00002070 UnsubscribeMarketData Summary 13000 .data 3000 .rdata 2000 .reloc 1000 .rsrc F000 .text Code for **main.cpp:** #include <iostream> #include "ninja.h" int main() { std::cout << Connected(1); std::cin.get(); return 0; } Declaration in **ninja.h**: (only showing connected to conserve space) extern "C" __declspec(dllexport) int __stdcall Connected(int showMessage); Export in **NtDirect.def**: (I've tried this with AND without specifying ordinals.) LIBRARY NtDirect EXPORTS ... ConfirmOrders@10 Connected@11 Filled@12 ... **Already Tried:** Building .lib from both a .def file containing `Connected@11` AND `Connected`. I've also tried using other functions than just Connected, they also don't work. I've tried playing around with my import declaration (adding and removing `extern "C"`). I have also made sure that the DLL is in the same folder as my executable, and I have added NtDirect.dll to the linker so it is accessible. **I am running Windows 7 64bit.**
c++
visual-studio-2010
dll
unresolved-external
ordinal
null
open
C++ Appending Random Ordinal Causing Unresolved External Symbol === I just can't figure out what **Visual C++ 2010** is doing, I've Googled the heck out of it for hours and I still have no idea what is going on. I would really, really appreciate any help I can get. I have a DLL that I'm **importing functions** from, and I have gone through all of the usual motions. I have created a **.lib file** from the **DLL**, and I have created a header file with `extern "C"` and `__stdcall`. Yet dispite all of my efforts the compiler *STILL* complains: unresolved external symbol _Connected@4 referenced in function _main Here's the **real kicker**, do you see the **ordinal** there? `@4` <-- I did not specify that anywhere in my code, VC++ just decided it liked the number 4 apparently. In the DLL the function Connected actually is listed as ordinal 11, NOT 4. If I change the function to ordinal 4 in my .lib file **then the project compiles**, but then the DLL complains because it has Connected listed as 11. BinDump for **NtDirect.dll:** File Type: DLL Section contains the following exports for NtDirect.dll 00000000 characteristics 4F58E306 time date stamp Thu Mar 08 09:49:10 2012 0.00 version 1 ordinal base 32 number of functions 32 number of names ordinal hint RVA name 1 0 000011F0 Ask ... 10 9 000016A0 ConfirmOrders 11 A 000016E0 Connected 12 B 00001750 Filled ... 32 1F 00002070 UnsubscribeMarketData Summary 13000 .data 3000 .rdata 2000 .reloc 1000 .rsrc F000 .text Code for **main.cpp:** #include <iostream> #include "ninja.h" int main() { std::cout << Connected(1); std::cin.get(); return 0; } Declaration in **ninja.h**: (only showing connected to conserve space) extern "C" __declspec(dllexport) int __stdcall Connected(int showMessage); Export in **NtDirect.def**: (I've tried this with AND without specifying ordinals.) LIBRARY NtDirect EXPORTS ... ConfirmOrders@10 Connected@11 Filled@12 ... **Already Tried:** Building .lib from both a .def file containing `Connected@11` AND `Connected`. I've also tried using other functions than just Connected, they also don't work. I've tried playing around with my import declaration (adding and removing `extern "C"`). I have also made sure that the DLL is in the same folder as my executable, and I have added NtDirect.dll to the linker so it is accessible. **I am running Windows 7 64bit.**
0
3,619,344
09/01/2010 14:50:46
153,439
08/09/2009 22:56:50
198
2
Embedding jetty server for EXT GWT in Eclipse
I am trying to create an EXT GWT project with an embedded Jetty server. I am completely new to Jetty and EXT GWT. Can anyone please point me in the right direction to get started about embedding jetty server for EXT GWT project? I have read a couple of blogs and tutorials but cannot figure it out. I have also downloaded Eclipse plugin for Jetty but the project requirement states that I have to have an embedded jetty server. Thank you.
java
eclipse
jetty
ext-gwt
null
null
open
Embedding jetty server for EXT GWT in Eclipse === I am trying to create an EXT GWT project with an embedded Jetty server. I am completely new to Jetty and EXT GWT. Can anyone please point me in the right direction to get started about embedding jetty server for EXT GWT project? I have read a couple of blogs and tutorials but cannot figure it out. I have also downloaded Eclipse plugin for Jetty but the project requirement states that I have to have an embedded jetty server. Thank you.
0
56,704
09/11/2008 14:37:28
1,223
08/13/2008 13:53:10
306
34
What jobs to give to an intern?
Interns typically get given the mundane jobs - bit of filing, some simple bugfixes, a 'no use' project or CD\DVD duplication for example. If you were (or are) an Intern, what would you want from your internship? If you're responsible for an Intern, what measures have you taken to make the internship a really valuable one - both for the company and the Intern?
management
null
null
null
null
10/25/2011 16:08:35
not constructive
What jobs to give to an intern? === Interns typically get given the mundane jobs - bit of filing, some simple bugfixes, a 'no use' project or CD\DVD duplication for example. If you were (or are) an Intern, what would you want from your internship? If you're responsible for an Intern, what measures have you taken to make the internship a really valuable one - both for the company and the Intern?
4
11,577,929
07/20/2012 10:57:16
1,291,638
03/25/2012 18:24:26
1
1
Is there a way to serialize a string in java script?
I am new to javascript. I want to store the value of a string in a file. I am able to store the string in a normal text file. But what i need is I want to serialize the data and then store it in a file so that no one can edit it. Like what we do in java (serialization concept in java). Can anyone help me in how to serialize a string using javascript?
javascript
file
serialization
phonegap
null
null
open
Is there a way to serialize a string in java script? === I am new to javascript. I want to store the value of a string in a file. I am able to store the string in a normal text file. But what i need is I want to serialize the data and then store it in a file so that no one can edit it. Like what we do in java (serialization concept in java). Can anyone help me in how to serialize a string using javascript?
0
9,386,938
02/21/2012 23:26:54
171,142
09/09/2009 22:08:36
1,064
39
How to specify the Type in an XML Comment <return> comment
In my C# XML Comment's `<return>` comment, I would like the output (I'm using Sandcastle) to specify the Type that is returned, but I am unable to find out how to do that. **Psuedo Example:** ///<summary> ///Serves as a hash function for a particular type. ///</summary> ///<returns **Type="System.Int32"**> ///A hash code for the current Object. ///</returns> public virtual int GetHashCode(){...} The example above is a mock of what my guess was to tell Sandcastle how to specify the return type that is documented in the `Syntax` section of the documentation - not so. For clarity, here is a screenshot of MSDN's documentation of the [GetHastCode()][1] method that shows the return type that I'm shooting for. Do we have to manually specify the Type, or can we specify a type (similar to the mock example) and Sandcastle will determine how to display/format the output - similar to how Sandcastle automatically displays/formats the Type for parameters via the `<param>` tag. ![enter image description here][2] [1]: http://msdn.microsoft.com/en-us/library/system.object.gethashcode.aspx [2]: http://i.stack.imgur.com/rWudi.png
c#
sandcastle
xml-comments
null
null
null
open
How to specify the Type in an XML Comment <return> comment === In my C# XML Comment's `<return>` comment, I would like the output (I'm using Sandcastle) to specify the Type that is returned, but I am unable to find out how to do that. **Psuedo Example:** ///<summary> ///Serves as a hash function for a particular type. ///</summary> ///<returns **Type="System.Int32"**> ///A hash code for the current Object. ///</returns> public virtual int GetHashCode(){...} The example above is a mock of what my guess was to tell Sandcastle how to specify the return type that is documented in the `Syntax` section of the documentation - not so. For clarity, here is a screenshot of MSDN's documentation of the [GetHastCode()][1] method that shows the return type that I'm shooting for. Do we have to manually specify the Type, or can we specify a type (similar to the mock example) and Sandcastle will determine how to display/format the output - similar to how Sandcastle automatically displays/formats the Type for parameters via the `<param>` tag. ![enter image description here][2] [1]: http://msdn.microsoft.com/en-us/library/system.object.gethashcode.aspx [2]: http://i.stack.imgur.com/rWudi.png
0
4,022,605
10/26/2010 10:04:43
377,953
06/28/2010 10:52:57
2,233
151
First programming language to be taught - C or Python?
I know that there is a long debate regarding this matter. I also understand that this is strictly not a programming question. But I am asking here as this platform contains wide range of experts from different realms. When we got admitted in a Computer Science and Engineering(CSE) course in university, we were first taught C. The course was actually structured programming language but we used C as the language. And on next semester we were taught C++ and Java as OOP. Recently I have heard that the department is going to introduce Python as the first language. I strongly oppose the idea for the following reasons: 1. Python is a super high language. In the first course the students should become familiar with the basics of programming concepts like data type, pointer, by value or by reference etc. You can write lots of things in Python without understanding these in details. 2. Python has a wide range of build in data structures and library. In first language students should become familiar with basic algorithms like sorting or searching. I know there is sorting library in C too, but that is not as widely used as Python's sorting methods. 3. Python is OOP. How can you teach someone OOP when (s)he does not have the basic knowledge of structured programming. If Python is the first language, then they might not differ OOP with non-OOP concepts. 4. Memory is crucial. If you allocate, then you need to release the memory. These concepts are not necessary with a language with garbage collector. So what is your opinion? What do you prefer as the first teaching language? Please don't start a flameware or something similar. Whatever you suggests, please explain why you think so. And also please keep in mind that the course is for university level. It's not for kids and so trying to make things simple is not much helpful. And also I know that Python is a great language. I am personally a fan of it. But the question is whether Python should be first teaching language instead of C. Thanks in advance.
python
c
programming-languages
teaching
conceptual
10/26/2010 12:02:30
not constructive
First programming language to be taught - C or Python? === I know that there is a long debate regarding this matter. I also understand that this is strictly not a programming question. But I am asking here as this platform contains wide range of experts from different realms. When we got admitted in a Computer Science and Engineering(CSE) course in university, we were first taught C. The course was actually structured programming language but we used C as the language. And on next semester we were taught C++ and Java as OOP. Recently I have heard that the department is going to introduce Python as the first language. I strongly oppose the idea for the following reasons: 1. Python is a super high language. In the first course the students should become familiar with the basics of programming concepts like data type, pointer, by value or by reference etc. You can write lots of things in Python without understanding these in details. 2. Python has a wide range of build in data structures and library. In first language students should become familiar with basic algorithms like sorting or searching. I know there is sorting library in C too, but that is not as widely used as Python's sorting methods. 3. Python is OOP. How can you teach someone OOP when (s)he does not have the basic knowledge of structured programming. If Python is the first language, then they might not differ OOP with non-OOP concepts. 4. Memory is crucial. If you allocate, then you need to release the memory. These concepts are not necessary with a language with garbage collector. So what is your opinion? What do you prefer as the first teaching language? Please don't start a flameware or something similar. Whatever you suggests, please explain why you think so. And also please keep in mind that the course is for university level. It's not for kids and so trying to make things simple is not much helpful. And also I know that Python is a great language. I am personally a fan of it. But the question is whether Python should be first teaching language instead of C. Thanks in advance.
4
4,772,389
01/23/2011 04:59:00
32,914
10/30/2008 22:10:38
28,212
650
Simplest way to remove something from the FPU stack
I've been having some trouble lately with FPU stack overflows. I managed to track it back to a buggy library function that pushes a garbage value onto the FPU stack every time it's called and never cleans it up. Fortunately, this is easily reproducible and I know exactly what conditions cause it. I can drop a block of inline ASM into the routine that calls this routine to pop the top value back off the FPU stack... except I don't quite know what to write. My ASM-fu is fair to middlin', but not *that* strong. So what's the simplest way to get rid of the top value on the FPU stack in x86 assembly, assuming it's garbage data and I don't care about the value?
assembly
x86
x87
null
null
null
open
Simplest way to remove something from the FPU stack === I've been having some trouble lately with FPU stack overflows. I managed to track it back to a buggy library function that pushes a garbage value onto the FPU stack every time it's called and never cleans it up. Fortunately, this is easily reproducible and I know exactly what conditions cause it. I can drop a block of inline ASM into the routine that calls this routine to pop the top value back off the FPU stack... except I don't quite know what to write. My ASM-fu is fair to middlin', but not *that* strong. So what's the simplest way to get rid of the top value on the FPU stack in x86 assembly, assuming it's garbage data and I don't care about the value?
0
9,382,950
02/21/2012 18:22:27
816,537
06/26/2011 21:33:10
53
0
Get integer memory location [C/C++]
Let's say we declare an integer as follow in C or C++: int i = 7; Is it possible to get its memory location without a one-liner that uses pointers? The professor said we would need to use the concept or big/little endianness, but I don't really have any idea where to start. Also, the 7 was assigned (because it's the largest unsigned 3 bit number maybe?), and isn't arbitrary. Thank you
c++
c
homework
memory
null
02/21/2012 20:18:29
too localized
Get integer memory location [C/C++] === Let's say we declare an integer as follow in C or C++: int i = 7; Is it possible to get its memory location without a one-liner that uses pointers? The professor said we would need to use the concept or big/little endianness, but I don't really have any idea where to start. Also, the 7 was assigned (because it's the largest unsigned 3 bit number maybe?), and isn't arbitrary. Thank you
3
11,542,894
07/18/2012 13:46:47
93,468
02/03/2009 22:24:01
4,281
23
IPhone App to record Any Audio that's playing
I'm looking for an app in the app store which may not exist but I certainly have not had success finding which is I'd like to record any audio that's being played on my iphone no matter the source. I want to record what the IPhone sound card is playing at any time but not interrupt any app that's the player playing it (browser, another iphone app, whatever is playing the stream). Anyone find an app that does specifically this?
iphone
null
null
null
null
07/18/2012 14:31:42
off topic
IPhone App to record Any Audio that's playing === I'm looking for an app in the app store which may not exist but I certainly have not had success finding which is I'd like to record any audio that's being played on my iphone no matter the source. I want to record what the IPhone sound card is playing at any time but not interrupt any app that's the player playing it (browser, another iphone app, whatever is playing the stream). Anyone find an app that does specifically this?
2
9,149,183
02/05/2012 12:21:05
849,891
07/18/2011 11:05:00
388
20
Tail optimization guarantee - loop encoding in Haskell
So the short version of my question is, how are we supposed to encode loops in Haskell, *in general*? There is no tail optimization guarantee in Haskell, bang patterns aren't even a part of the standard (right?), and fold/unfold paradigm is *not* guaranteed to work in all situation. Here's [case in point](http://rosettacode.org/wiki/Hamming_numbers#Direct_calculation_through_triples_enumeration) were only bang-patterns did the trick for me of making it run in constant space (not even using `$!` helped ... although [the testing](http://ideone.com/AkbN1) was done at Ideone.com which uses ghc-6.8.2). It is basically about a nested loop, which in list-paradigm can be stated as prod (sum,concat) . unzip $ [ (c, [r | t]) | k<-[0..kmax], j<-[0..jmax], let (c,r,t)=...] prod (f,g) x = (f.fst $ x, g.snd $ x) Or in pseudocode: let list_store = [] in for k from 0 to kmax for j from 0 to jmax if test(k,j) list_store += [entry(k,j)] count += local_count(k,j) result = (count, list_store) Until I added the bang-pattern to it, I got either a memory blow-out or even a stack overflow. But bang patterns are not part of the standard, right?
haskell
loops
tail-call-optimization
null
null
null
open
Tail optimization guarantee - loop encoding in Haskell === So the short version of my question is, how are we supposed to encode loops in Haskell, *in general*? There is no tail optimization guarantee in Haskell, bang patterns aren't even a part of the standard (right?), and fold/unfold paradigm is *not* guaranteed to work in all situation. Here's [case in point](http://rosettacode.org/wiki/Hamming_numbers#Direct_calculation_through_triples_enumeration) were only bang-patterns did the trick for me of making it run in constant space (not even using `$!` helped ... although [the testing](http://ideone.com/AkbN1) was done at Ideone.com which uses ghc-6.8.2). It is basically about a nested loop, which in list-paradigm can be stated as prod (sum,concat) . unzip $ [ (c, [r | t]) | k<-[0..kmax], j<-[0..jmax], let (c,r,t)=...] prod (f,g) x = (f.fst $ x, g.snd $ x) Or in pseudocode: let list_store = [] in for k from 0 to kmax for j from 0 to jmax if test(k,j) list_store += [entry(k,j)] count += local_count(k,j) result = (count, list_store) Until I added the bang-pattern to it, I got either a memory blow-out or even a stack overflow. But bang patterns are not part of the standard, right?
0
4,587,869
01/03/2011 20:02:49
193,414
10/20/2009 21:39:18
56
1
Experience with g-wan Web server
Has anyone experience with using the g-wan Web server? Is it any good? Are there any significant Web sites using it?
g-wan
null
null
null
null
09/02/2011 20:28:55
off topic
Experience with g-wan Web server === Has anyone experience with using the g-wan Web server? Is it any good? Are there any significant Web sites using it?
2
11,399,297
07/09/2012 16:30:36
1,512,531
07/09/2012 16:15:33
1
0
Assembly 8086 (exponent )
I got a project for school and part of it is to add 3 to the exponent (and only to exponent ) of a 32 bit float number. any ideas? thanks.
assembly
null
null
null
null
07/11/2012 00:00:24
not constructive
Assembly 8086 (exponent ) === I got a project for school and part of it is to add 3 to the exponent (and only to exponent ) of a 32 bit float number. any ideas? thanks.
4
7,399,904
09/13/2011 09:54:02
84,201
03/29/2009 07:46:24
9,081
162
Is there any practical benefit of using <header> over <div id="header">?
Is there any practical benefit of using `<header>` over `<div id="header">`? and writing css for `header {}` over #header `{}` I know one downside is , I will have to punish IE users with a Javascript if use `<header>` otherwise it will not take style. I know it's HTML5 but is there any advantage of using it until non HTML5 supported browsers are still in use. IE6, IE7, IE8 and some old mobile browsers do not understand these new tags.
html
css
html5
null
null
null
open
Is there any practical benefit of using <header> over <div id="header">? === Is there any practical benefit of using `<header>` over `<div id="header">`? and writing css for `header {}` over #header `{}` I know one downside is , I will have to punish IE users with a Javascript if use `<header>` otherwise it will not take style. I know it's HTML5 but is there any advantage of using it until non HTML5 supported browsers are still in use. IE6, IE7, IE8 and some old mobile browsers do not understand these new tags.
0
8,962,334
01/22/2012 15:52:58
1,052,628
11/17/2011 20:23:24
1
0
Papers on Software Immunity or Immunity in software system
Can anyone give me some paper or article link about "Software Immunity" or "Immunity of Software System"? Any kind of paper published in this area will be enough for me to start on. I found some places but haven't found anything useful. Thanks in advance for the replies :)
software-engineering
research
null
null
null
01/23/2012 03:47:14
not a real question
Papers on Software Immunity or Immunity in software system === Can anyone give me some paper or article link about "Software Immunity" or "Immunity of Software System"? Any kind of paper published in this area will be enough for me to start on. I found some places but haven't found anything useful. Thanks in advance for the replies :)
1
1,823,936
12/01/2009 04:06:07
199,675
10/30/2009 13:57:01
1
1
How to hide a modal dialogbox in MFC application?
hey guys..I have a hard time hiding the modal dialog box...to tell u exactly..what i am doing is..I am trying a design a UI for my own application in MFC..its kinda setup assistant.. In the 1st dialog box i have NEXT button so when I click that it has to hide the 1st dialog box and move to the 2nd dialog box..where i have some controls in 2nd dialog box.can any on help me...
mfc
modal-dialog
hide
null
null
null
open
How to hide a modal dialogbox in MFC application? === hey guys..I have a hard time hiding the modal dialog box...to tell u exactly..what i am doing is..I am trying a design a UI for my own application in MFC..its kinda setup assistant.. In the 1st dialog box i have NEXT button so when I click that it has to hide the 1st dialog box and move to the 2nd dialog box..where i have some controls in 2nd dialog box.can any on help me...
0
8,473,380
12/12/2011 11:09:12
1,093,566
12/12/2011 11:00:31
1
0
Problems loading and saving images from camera and camera roll. What am I doing wrong?
I am building an app in which you can make pictures or pick an image from the camera roll and save these inside the app to be displayed in a tableview and detailview. The problem is that when I make a picture from inside the app and save it, the tableview and detailview get terribly slow as if the app is freezing. I also get this error "<Error>: CGAffineTransformInvert: singular matrix.". When I load a picture from the camera-rol that was not taken from inside my app, there is no problem and the app runs very smouthly. This is the code for when I open the camera and camera roll: -(void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex{ if (buttonIndex == actionSheet.cancelButtonIndex) { return; } UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.allowsEditing = NO; switch (buttonIndex) { case 0: if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { picker.sourceType = UIImagePickerControllerSourceTypeCamera; } break; case 1: if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeSavedPhotosAlbum]) { picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; } break; } [self presentModalViewController:picker animated:YES]; } This is where I save it to the camera roll and put the image in an imageView: -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{ NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType]; UIImage *mijnImage; if (CFStringCompare((__bridge_retained CFStringRef)mediaType, kUTTypeImage, 0)==kCFCompareEqualTo) { mijnImage = (UIImage *) [info objectForKey:UIImagePickerControllerOriginalImage]; mijnPlaatje_.image = mijnImage; UIImageWriteToSavedPhotosAlbum(mijnImage, nil, nil, nil); } [picker dismissModalViewControllerAnimated:YES]; } And here I save the image inside my app: -(IBAction)save:(id)sender{ drankjes.plaatje = [mijnPlaatje_ image]; [self dismissModalViewControllerAnimated:YES]; } What am I doing wrong?
iphone
xcode
ios5
uiimagepickercontroller
null
null
open
Problems loading and saving images from camera and camera roll. What am I doing wrong? === I am building an app in which you can make pictures or pick an image from the camera roll and save these inside the app to be displayed in a tableview and detailview. The problem is that when I make a picture from inside the app and save it, the tableview and detailview get terribly slow as if the app is freezing. I also get this error "<Error>: CGAffineTransformInvert: singular matrix.". When I load a picture from the camera-rol that was not taken from inside my app, there is no problem and the app runs very smouthly. This is the code for when I open the camera and camera roll: -(void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex{ if (buttonIndex == actionSheet.cancelButtonIndex) { return; } UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.allowsEditing = NO; switch (buttonIndex) { case 0: if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { picker.sourceType = UIImagePickerControllerSourceTypeCamera; } break; case 1: if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeSavedPhotosAlbum]) { picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; } break; } [self presentModalViewController:picker animated:YES]; } This is where I save it to the camera roll and put the image in an imageView: -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{ NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType]; UIImage *mijnImage; if (CFStringCompare((__bridge_retained CFStringRef)mediaType, kUTTypeImage, 0)==kCFCompareEqualTo) { mijnImage = (UIImage *) [info objectForKey:UIImagePickerControllerOriginalImage]; mijnPlaatje_.image = mijnImage; UIImageWriteToSavedPhotosAlbum(mijnImage, nil, nil, nil); } [picker dismissModalViewControllerAnimated:YES]; } And here I save the image inside my app: -(IBAction)save:(id)sender{ drankjes.plaatje = [mijnPlaatje_ image]; [self dismissModalViewControllerAnimated:YES]; } What am I doing wrong?
0
11,635,099
07/24/2012 16:17:21
963,369
09/25/2011 07:02:49
125
6
Javascript 'undefined' error in IE8- only
My script at http://www.mincovlaw.com/interest/calculate is working fine in FF, Chrome, Safari and IE9. I've just realized that it throws an `'newamount' is undefined` error in IE8. Any idea why that may be happening?
javascript
internet-explorer
null
null
null
07/25/2012 16:48:09
too localized
Javascript 'undefined' error in IE8- only === My script at http://www.mincovlaw.com/interest/calculate is working fine in FF, Chrome, Safari and IE9. I've just realized that it throws an `'newamount' is undefined` error in IE8. Any idea why that may be happening?
3
3,050,141
06/16/2010 01:22:34
112,355
05/26/2009 03:58:14
1,983
30
What movie website allows people to scrape it?
I've wanted to make a C# library to scrape movie information and return it to the application, but someone told me that it's against the TOS. RottenTomatoes seems to have no problems with it from what I've read on their licensing page, but I'm not quite sure. Where could I aquire movie information legally and without cost? It's for an open source application hosted here: [LINK][1] [1]: http://thefreeimdb.codeplex.com
.net
screen-scraping
movie
licensing
imdb
06/16/2010 05:59:47
off topic
What movie website allows people to scrape it? === I've wanted to make a C# library to scrape movie information and return it to the application, but someone told me that it's against the TOS. RottenTomatoes seems to have no problems with it from what I've read on their licensing page, but I'm not quite sure. Where could I aquire movie information legally and without cost? It's for an open source application hosted here: [LINK][1] [1]: http://thefreeimdb.codeplex.com
2
8,251,004
11/24/2011 00:42:29
785,349
06/06/2011 04:20:32
369
13
Is there a open source php auction platform/site?
Is there a open source php auction platform/site? Like Boonex Dolphin for a social network site; how about for a bid/auction site? Where users can post and bid on items.
php
null
null
null
null
11/24/2011 00:50:15
not constructive
Is there a open source php auction platform/site? === Is there a open source php auction platform/site? Like Boonex Dolphin for a social network site; how about for a bid/auction site? Where users can post and bid on items.
4
11,554,903
07/19/2012 06:11:46
1,536,561
07/19/2012 02:17:19
1
0
cant figure out what is wrong with my script can anybody correct this?
can anybody help me with this i need some corrections made and im not sure why it is not working ppprunning = yes while $ppprunning = yes ; do echo " INTERNET MENU\N 1. Dial out 2. Exit Choice: read choice case choice in 1) if [ -z $ppprunning echo "Enter your username and password" else chat.sh endif ; *) ppprunning=no endcase done
bash
unix
script
null
null
07/19/2012 06:56:31
not constructive
cant figure out what is wrong with my script can anybody correct this? === can anybody help me with this i need some corrections made and im not sure why it is not working ppprunning = yes while $ppprunning = yes ; do echo " INTERNET MENU\N 1. Dial out 2. Exit Choice: read choice case choice in 1) if [ -z $ppprunning echo "Enter your username and password" else chat.sh endif ; *) ppprunning=no endcase done
4
4,270,508
11/24/2010 19:03:04
150,803
08/05/2009 05:37:51
377
17
How do I get data from an old (non-ruby) app to a new (ruby) app?
I have an old CMS I built using Coldfusion. I would like to get the data from the old CMS to the new Ruby on Rails app. It's not a huge set, only about 1300 records. I need some advice/ideas. The databases are on separate servers now but that can be fixed, and since I've followed the "Sensible Defaults" of RoR, the database structure is different. Example of old data structure: **Old CMS Table Example:** CONTENT_ID int CONTENT_NAME varchar 150 CONTENT_DESC varchar 500 CONTENT_ACTIVE tinyint CONTENT_URL varchar 200 **New RoR CMS Table Example:** id int name varchar 255 visible tinyint 1 content text created_at datetime updated_at datetime I'm a RoR newbie so I don't even know where to begin. I was going to use a program like [Navicat][1] and just migrate the data from one server to another. Would that be okay? It has a [utility that will allow you to map columns][2]. [1]: http://navicat.com/ [2]: http://navicat.com/manual/online_manual/en/win_manual/index.html
mysql
ruby-on-rails
ruby
null
null
null
open
How do I get data from an old (non-ruby) app to a new (ruby) app? === I have an old CMS I built using Coldfusion. I would like to get the data from the old CMS to the new Ruby on Rails app. It's not a huge set, only about 1300 records. I need some advice/ideas. The databases are on separate servers now but that can be fixed, and since I've followed the "Sensible Defaults" of RoR, the database structure is different. Example of old data structure: **Old CMS Table Example:** CONTENT_ID int CONTENT_NAME varchar 150 CONTENT_DESC varchar 500 CONTENT_ACTIVE tinyint CONTENT_URL varchar 200 **New RoR CMS Table Example:** id int name varchar 255 visible tinyint 1 content text created_at datetime updated_at datetime I'm a RoR newbie so I don't even know where to begin. I was going to use a program like [Navicat][1] and just migrate the data from one server to another. Would that be okay? It has a [utility that will allow you to map columns][2]. [1]: http://navicat.com/ [2]: http://navicat.com/manual/online_manual/en/win_manual/index.html
0
7,751,866
10/13/2011 09:14:34
987,316
10/10/2011 08:29:48
4
0
Get Second to last charcter position from string
I have a dynamically formed string like - part1.abc.part2.abc.part3.abc In this string I want to know position of second to last "." so that i can split string as part1.abc.part2.abc and part3.abc let mw know is there any method available to get this?
c#
null
null
null
null
null
open
Get Second to last charcter position from string === I have a dynamically formed string like - part1.abc.part2.abc.part3.abc In this string I want to know position of second to last "." so that i can split string as part1.abc.part2.abc and part3.abc let mw know is there any method available to get this?
0
7,756,962
10/13/2011 15:58:53
993,801
10/13/2011 15:28:31
1
0
Why am I not able to install Ruby 1.9.2 on Mac OSX Lion?
I am trying to install Ruby 1.9.2 on a brand new MacBook Air with OSX Lion (10.7.2) and I keep getting an error message during the installation process. I'm new to Ruby and starting out with Ruby on Rails 3 Tutorial, so I downloaded RVM and then ran the command "$ rvm install 1.9.2." and this is what happened: Installing Ruby from source to: /Users/richardberger/.rvm/rubies/ruby-1.9.2-p290 ruby-1.9.2-p290 - #fetching ruby-1.9.2-p290 - #extracted to /Users/richardberger/.rvm/src/ruby-1.9.2-p290 Fetching yaml-0.1.4.tar.gz to /Users/richardberger/.rvm/archives Extracting yaml-0.1.4.tar.gz to /Users/richardberger/.rvm/src Configuring yaml in /Users/richardberger/.rvm/src/yaml-0.1.4. ERROR: Error running ' ./configure --prefix="/Users/richardberger/.rvm/usr" ', please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/yaml/configure.log Compiling yaml in /Users/richardberger/.rvm/src/yaml-0.1.4. ERROR: Error running 'make ', please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/yaml/make.log Installing yaml to /Users/richardberger/.rvm/usr ERROR: Error running 'make install', please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/yaml/make.install.log ruby-1.9.2-p290 - #configuring ERROR: Error running ' ./configure --prefix=/Users/richardberger/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/richardberger/.rvm/usr ', please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/configure.log ERROR: There has been an error while running configure. Halting the installation. Any help or alternative solutions would be greatly appreciated. And since I am new to this, please let me know if I need to provide more info. Thanks!
ruby
rvm
osx-lion
ruby-1.9.2
null
10/17/2011 08:47:14
off topic
Why am I not able to install Ruby 1.9.2 on Mac OSX Lion? === I am trying to install Ruby 1.9.2 on a brand new MacBook Air with OSX Lion (10.7.2) and I keep getting an error message during the installation process. I'm new to Ruby and starting out with Ruby on Rails 3 Tutorial, so I downloaded RVM and then ran the command "$ rvm install 1.9.2." and this is what happened: Installing Ruby from source to: /Users/richardberger/.rvm/rubies/ruby-1.9.2-p290 ruby-1.9.2-p290 - #fetching ruby-1.9.2-p290 - #extracted to /Users/richardberger/.rvm/src/ruby-1.9.2-p290 Fetching yaml-0.1.4.tar.gz to /Users/richardberger/.rvm/archives Extracting yaml-0.1.4.tar.gz to /Users/richardberger/.rvm/src Configuring yaml in /Users/richardberger/.rvm/src/yaml-0.1.4. ERROR: Error running ' ./configure --prefix="/Users/richardberger/.rvm/usr" ', please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/yaml/configure.log Compiling yaml in /Users/richardberger/.rvm/src/yaml-0.1.4. ERROR: Error running 'make ', please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/yaml/make.log Installing yaml to /Users/richardberger/.rvm/usr ERROR: Error running 'make install', please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/yaml/make.install.log ruby-1.9.2-p290 - #configuring ERROR: Error running ' ./configure --prefix=/Users/richardberger/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/richardberger/.rvm/usr ', please read /Users/richardberger/.rvm/log/ruby-1.9.2-p290/configure.log ERROR: There has been an error while running configure. Halting the installation. Any help or alternative solutions would be greatly appreciated. And since I am new to this, please let me know if I need to provide more info. Thanks!
2
6,667,908
07/12/2011 16:48:18
832,361
07/06/2011 20:33:35
1
1
What percentage of users can't read html emails
I'm looking for an up to date statistics of how many users wont be able to read my messages if I only send an html message. The reason I want this information, is to know if its worth to do the effort to support both html/plain-text emails. Thanks :)
email
statistics
html-email
usage
usage-statistics
07/14/2011 01:50:16
off topic
What percentage of users can't read html emails === I'm looking for an up to date statistics of how many users wont be able to read my messages if I only send an html message. The reason I want this information, is to know if its worth to do the effort to support both html/plain-text emails. Thanks :)
2
5,164,966
03/02/2011 08:15:10
640,800
03/02/2011 08:15:10
1
0
Optical Character Recognition
I want to make windows phone 7 application to detect text from images. There is no Library available and still Windows phone 7 api does not support OCR. So is there any way to make my own OCR ? any basic tutorial available on the internet? If yes please help, I've to complete this soon :S ....
ocr
null
null
null
null
06/05/2012 23:55:09
not a real question
Optical Character Recognition === I want to make windows phone 7 application to detect text from images. There is no Library available and still Windows phone 7 api does not support OCR. So is there any way to make my own OCR ? any basic tutorial available on the internet? If yes please help, I've to complete this soon :S ....
1
3,120,288
06/25/2010 18:01:51
311
08/04/2008 14:57:09
1,146
54
Are input sanitization and parameterized queries mutually exclusive?
I'm working updating some legacy code that does not properly handle user input. The code does do a minimal amount of sanitization, but does not cover all known threats. Our newer code uses parameterized queries. As I understand it, the queries are precompiled, and the input is treated simply as data which cannot be executed. In that case, sanitization is not necessary. Is that right? To put it another way, if I parameterize the queries in this legacy code, is it OK to eliminate the sanitization that it currently does? Or am I missing some additional benefit of sanitization on top of parameterization?
sql
database
language-agnostic
sanitization
parameterized
null
open
Are input sanitization and parameterized queries mutually exclusive? === I'm working updating some legacy code that does not properly handle user input. The code does do a minimal amount of sanitization, but does not cover all known threats. Our newer code uses parameterized queries. As I understand it, the queries are precompiled, and the input is treated simply as data which cannot be executed. In that case, sanitization is not necessary. Is that right? To put it another way, if I parameterize the queries in this legacy code, is it OK to eliminate the sanitization that it currently does? Or am I missing some additional benefit of sanitization on top of parameterization?
0
3,504,557
08/17/2010 16:08:31
233,971
12/17/2009 17:08:48
233
4
update UI from parent class on different thread from secondary class JAVA
I have a parent class which builds my UI (basically just a text box at the moment). I have created a secondary class which creates a new thread and I need to be able to update the textbox on the parent class from the new thread. Everything I try throws errors. I'm assuming I need to create some kind of dispatcher but my background is C# and I'm not 100% familiar on how to do this in Java. My latest iteration passes the object of the parent class to a static method in the secondary which ultimately creates the new thread by instantiating an object for the secondary class (which has the run() method inside). I have a constructor in the secondary object that expects the passed in object from the parent class which, when passed in, sets a property that I've decalred in my member section for the parent class. when I try to access that member in the run() method to update a textbox on the parent class, I get an error. Essentially the secondary class looks something like this: public class SecondaryClass extends Thread { private ParentClass pc = null; public SecondaryClass(ParentClass PC){ pc = PC; } public static void StartThread(ParentClass pC){ Thread thread = new SecondaryClass(pC); thread.start(); } public void run() { pc.myTextBox.append("something"); } } I've also tried creating a public method on the parent class that accepts a string as it's only argument and calling that method from within run() on the secondary class and passing "somethign" there. The method on the parent class updates the same textbox but having problems there as well. can anyone please provide some insight as to what I need to do to access UI elements across these threads?
java
multithreading
null
null
null
null
open
update UI from parent class on different thread from secondary class JAVA === I have a parent class which builds my UI (basically just a text box at the moment). I have created a secondary class which creates a new thread and I need to be able to update the textbox on the parent class from the new thread. Everything I try throws errors. I'm assuming I need to create some kind of dispatcher but my background is C# and I'm not 100% familiar on how to do this in Java. My latest iteration passes the object of the parent class to a static method in the secondary which ultimately creates the new thread by instantiating an object for the secondary class (which has the run() method inside). I have a constructor in the secondary object that expects the passed in object from the parent class which, when passed in, sets a property that I've decalred in my member section for the parent class. when I try to access that member in the run() method to update a textbox on the parent class, I get an error. Essentially the secondary class looks something like this: public class SecondaryClass extends Thread { private ParentClass pc = null; public SecondaryClass(ParentClass PC){ pc = PC; } public static void StartThread(ParentClass pC){ Thread thread = new SecondaryClass(pC); thread.start(); } public void run() { pc.myTextBox.append("something"); } } I've also tried creating a public method on the parent class that accepts a string as it's only argument and calling that method from within run() on the secondary class and passing "somethign" there. The method on the parent class updates the same textbox but having problems there as well. can anyone please provide some insight as to what I need to do to access UI elements across these threads?
0
3,660,633
09/07/2010 16:34:12
329,424
04/12/2010 14:40:29
81
4
I use cakephp and I want host apache windows on godaddy
I want buy host apache windows but i dont see how to buy. I should buy host Linux or Windows order to have Apache server ? I use cakePHP...
server
null
null
null
null
09/09/2010 05:58:07
not a real question
I use cakephp and I want host apache windows on godaddy === I want buy host apache windows but i dont see how to buy. I should buy host Linux or Windows order to have Apache server ? I use cakePHP...
1
4,311,017
11/30/2010 06:08:51
524,746
11/30/2010 06:08:51
1
0
Sending data throgh NamedPipe when server is down
I was wondering how to handle a situation where you successfully connected two processes through named pipe (one server and one client), and suddenly (for some reason) the server process ends. What happens to the pipe? Does it close? What happens to information being sent by the client to the server? Does it get lost? How can the client know if the server is down? All The Best, Gil
c#
namedpipes
null
null
null
null
open
Sending data throgh NamedPipe when server is down === I was wondering how to handle a situation where you successfully connected two processes through named pipe (one server and one client), and suddenly (for some reason) the server process ends. What happens to the pipe? Does it close? What happens to information being sent by the client to the server? Does it get lost? How can the client know if the server is down? All The Best, Gil
0
2,602,627
04/08/2010 18:59:13
312,202
04/08/2010 18:59:13
1
0
Using for or while loops
Every month, 4 or 5 text files are created. The data in the files is pulled into MS Access and used in a mailmerge. Each file contains a header. This is an example: HEADER|0000000130|0000527350|0000171250|0000058000|0000756600|0000814753|0000819455|100106 The 2nd field is the number of records contained in the file (excluding the header line). The last field is the date in the form yymmdd. Using gawk (for Windows), I've done ok with rearranging/modifying the data and writing it all out to a new file for importing into Access except for the following. I'm trying to create a unique ID number for each record. The ID number has the form 1mmddyyXXXX, where XXXX is a number, padded with leading zeros. Using the header above, the first record in the output file would get the ID number 10106100001 and the last record would get the ID 10106100130. I've tried putting the second field in the header into a variable, rearranging the last header field into the required date format and then looping with "for" statements to append the XXXX part of the ID and then outputting it all with printf but so far I've been complete rubbish at it. Thanks for your help! gary
awk
null
null
null
null
null
open
Using for or while loops === Every month, 4 or 5 text files are created. The data in the files is pulled into MS Access and used in a mailmerge. Each file contains a header. This is an example: HEADER|0000000130|0000527350|0000171250|0000058000|0000756600|0000814753|0000819455|100106 The 2nd field is the number of records contained in the file (excluding the header line). The last field is the date in the form yymmdd. Using gawk (for Windows), I've done ok with rearranging/modifying the data and writing it all out to a new file for importing into Access except for the following. I'm trying to create a unique ID number for each record. The ID number has the form 1mmddyyXXXX, where XXXX is a number, padded with leading zeros. Using the header above, the first record in the output file would get the ID number 10106100001 and the last record would get the ID 10106100130. I've tried putting the second field in the header into a variable, rearranging the last header field into the required date format and then looping with "for" statements to append the XXXX part of the ID and then outputting it all with printf but so far I've been complete rubbish at it. Thanks for your help! gary
0
10,761,218
05/25/2012 20:53:09
1,267,757
03/13/2012 23:49:26
3
0
Advanced usage of pointers in C
My question is simple, where can i get some examples and explanation of using pointers of pointers, tables of pointers to function, using pointers with functions, and such ? What book/site/ancient-monolyths-with-writings-made-by-celtic-tribes-way-before-making-of-stonehedge-or-birth-of-the-christ-...-which-hides-ultimate-wisdom would you recomend ?
c
pointers
information
null
null
05/25/2012 22:26:55
not constructive
Advanced usage of pointers in C === My question is simple, where can i get some examples and explanation of using pointers of pointers, tables of pointers to function, using pointers with functions, and such ? What book/site/ancient-monolyths-with-writings-made-by-celtic-tribes-way-before-making-of-stonehedge-or-birth-of-the-christ-...-which-hides-ultimate-wisdom would you recomend ?
4
1,743,131
11/16/2009 16:02:00
189,311
10/13/2009 17:45:18
184
3
"Must Know" IIS feature for .NET Architect/Lead
What all IIS features in regards to maintain application/optimization should an architect or team lead should be aware of? One of the feature that I came across recently, which actually made me ask this question was [HTTP Compression][1]. This option significantly improves bandwidth utilization and application performs much faster. [1]: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/502ef631-3695-4616-b268-cbe7cf1351ce.mspx?mfr=true
asp.net
iis
.net
performance
null
11/17/2009 02:58:32
not constructive
"Must Know" IIS feature for .NET Architect/Lead === What all IIS features in regards to maintain application/optimization should an architect or team lead should be aware of? One of the feature that I came across recently, which actually made me ask this question was [HTTP Compression][1]. This option significantly improves bandwidth utilization and application performs much faster. [1]: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/502ef631-3695-4616-b268-cbe7cf1351ce.mspx?mfr=true
4
9,773,071
03/19/2012 15:33:20
201,742
11/03/2009 14:28:29
1
0
Beyond Compare 3 : How To Zip Files After Folder Sync
I would like to mirror two folders and after the sync has been done I would like the folder to be zipped. Is this possible in Beyond Compare 3?
zip
folder
sync
beyondcompare3
null
null
open
Beyond Compare 3 : How To Zip Files After Folder Sync === I would like to mirror two folders and after the sync has been done I would like the folder to be zipped. Is this possible in Beyond Compare 3?
0
8,998,196
01/25/2012 05:20:00
991,652
10/12/2011 14:32:25
1
0
newbie- php line breaks not working in email message script
Maybe I'm not very good at proofing but i cant see any difference in the last 4 lines of this code with regards to line breaks. all of my line breaks are working properly except "Producer ID" and "Producer Key" are still showing on the same line. what am i doing wrong? $to = 'xxxx@yahoo.com'; $subject = 'New Lead Submission'; $msg = "$name SUBMITTED LEAD FORM $when_it_happened and was gone for $how_long.\n" . "Number of aliens: $how_many\n" . "Alien description: $alien_description\n" . "What they did: $what_they_did\n" . "Fang spotted: $fang_spotted\n" . "Other comments: $other\n" . "Producer ID: $producer_id\n" . "Producer Key: $producer_key"; mail($to, $subject, $msg, 'From:' . $email);
php
null
null
null
null
01/25/2012 20:08:21
too localized
newbie- php line breaks not working in email message script === Maybe I'm not very good at proofing but i cant see any difference in the last 4 lines of this code with regards to line breaks. all of my line breaks are working properly except "Producer ID" and "Producer Key" are still showing on the same line. what am i doing wrong? $to = 'xxxx@yahoo.com'; $subject = 'New Lead Submission'; $msg = "$name SUBMITTED LEAD FORM $when_it_happened and was gone for $how_long.\n" . "Number of aliens: $how_many\n" . "Alien description: $alien_description\n" . "What they did: $what_they_did\n" . "Fang spotted: $fang_spotted\n" . "Other comments: $other\n" . "Producer ID: $producer_id\n" . "Producer Key: $producer_key"; mail($to, $subject, $msg, 'From:' . $email);
3
1,416,476
09/12/2009 23:44:34
122,731
06/14/2009 12:53:47
155
37
Is the Open/Closed Principle a good idea?
This question is not about what OCP is. And I am not looking for simplistic answers, either. So, here is why I ask this. OCP was first described in the late 80s. It reflects the thinking and context of that time. The concern was that changing source code to add or modify functionality, after the code had already been tested and put into production, would end up being too risky and costly. So the idea was to avoid changing existing source files as much as possible, and only add to the codebase in the form of subclasses (extensions). I may be wrong, but my impression is that network-based <em>version control systems</em> (VCS) were not widely used back then. The point is that a VCS is essential to manage source code changes. The idea of <em>refactoring</em> is much more recent. The sophisticated IDEs that enable automated refactoring operations were certainly inexistent back then. Even today, many developers don't use the best refactoring tools available. The point here is that such modern tools allow a developer to change literally thousands of lines of code, <strong>safely</strong>, in a few seconds. Lastly, today the idea of automated <em>developer testing</em> (unit/integration tests) is widespread. There are many free and sophisticated tools that support it. But what good is creating and maintaining a large automated test suite if we never/rarely change existing code? New code, as the OCP requires, will only require new tests. So, does the OCP really makes sense today? I don't think so. Instead, I would indeed prefer to change existing code when adding new functionality, if the new functionality does not require new classes. Doing so will keep the codebase simpler, smaller, and much easier to read and understand. The risk of breaking previous functionality will be managed through a VCS, refactoring tools, and automated test suites.
ocp
null
null
null
null
09/13/2009 07:37:20
not a real question
Is the Open/Closed Principle a good idea? === This question is not about what OCP is. And I am not looking for simplistic answers, either. So, here is why I ask this. OCP was first described in the late 80s. It reflects the thinking and context of that time. The concern was that changing source code to add or modify functionality, after the code had already been tested and put into production, would end up being too risky and costly. So the idea was to avoid changing existing source files as much as possible, and only add to the codebase in the form of subclasses (extensions). I may be wrong, but my impression is that network-based <em>version control systems</em> (VCS) were not widely used back then. The point is that a VCS is essential to manage source code changes. The idea of <em>refactoring</em> is much more recent. The sophisticated IDEs that enable automated refactoring operations were certainly inexistent back then. Even today, many developers don't use the best refactoring tools available. The point here is that such modern tools allow a developer to change literally thousands of lines of code, <strong>safely</strong>, in a few seconds. Lastly, today the idea of automated <em>developer testing</em> (unit/integration tests) is widespread. There are many free and sophisticated tools that support it. But what good is creating and maintaining a large automated test suite if we never/rarely change existing code? New code, as the OCP requires, will only require new tests. So, does the OCP really makes sense today? I don't think so. Instead, I would indeed prefer to change existing code when adding new functionality, if the new functionality does not require new classes. Doing so will keep the codebase simpler, smaller, and much easier to read and understand. The risk of breaking previous functionality will be managed through a VCS, refactoring tools, and automated test suites.
1
2,386,046
03/05/2010 10:38:21
275,711
02/18/2010 00:48:36
20
1
Help with LINQ query
I'm trying to do this with LINQ: SQL>> SELECT p_Id from items WHERE p_Name = 'R1' LINQ>> var getpID = (from p in myDatabaseDataSet.Items where p.p_Name == ptxtBox.Text select p.p_Id).SingleOrDefault(); int p_Id = getpID; But getpID always return 0. What's wrong?.
linq
linq-to-sql
sql
null
null
null
open
Help with LINQ query === I'm trying to do this with LINQ: SQL>> SELECT p_Id from items WHERE p_Name = 'R1' LINQ>> var getpID = (from p in myDatabaseDataSet.Items where p.p_Name == ptxtBox.Text select p.p_Id).SingleOrDefault(); int p_Id = getpID; But getpID always return 0. What's wrong?.
0
9,110,603
02/02/2012 10:20:41
956,689
09/21/2011 10:27:33
756
2
Recognised 'Best Books' for data structures and algorithms in C++
I have been told to get the book - [Objects, Abstraction, Data Structures and Design: Using C++][1], and also [Foundations of Algorithms, Fourth Edition][2] before I commit to buying these - as they're quite expensive, I just wanted to know what people's opinions of them are. They were recommended by a graduate and often I find many uni books that are used are not the best ones. Are they some of the best at what they cover? if not, what would you recommend? [1]: http://www.amazon.com/dp/0471467553/?tag=stackoverfl08-20 [2]: http://www.amazon.com/dp/0763782505/?tag=stackoverfl08-20
c++
books
null
null
null
02/04/2012 08:57:51
not constructive
Recognised 'Best Books' for data structures and algorithms in C++ === I have been told to get the book - [Objects, Abstraction, Data Structures and Design: Using C++][1], and also [Foundations of Algorithms, Fourth Edition][2] before I commit to buying these - as they're quite expensive, I just wanted to know what people's opinions of them are. They were recommended by a graduate and often I find many uni books that are used are not the best ones. Are they some of the best at what they cover? if not, what would you recommend? [1]: http://www.amazon.com/dp/0471467553/?tag=stackoverfl08-20 [2]: http://www.amazon.com/dp/0763782505/?tag=stackoverfl08-20
4
11,654,699
07/25/2012 16:48:56
665,031
03/17/2011 20:07:30
298
1
Sooner and later payment puzzle
Question is simple. There are two persons. First person has payment in last day of the month. Second person has payment in 10th day of next month. Usually when we think farsighted both of them have same balance after few months. I have made some calculation which show that first person is in more comfortable situation. Problem is very simple and arose in conversation with my colleague, when he assume that we are in same position even I get payment earlier.
algorithm
null
null
null
null
07/25/2012 19:03:59
not a real question
Sooner and later payment puzzle === Question is simple. There are two persons. First person has payment in last day of the month. Second person has payment in 10th day of next month. Usually when we think farsighted both of them have same balance after few months. I have made some calculation which show that first person is in more comfortable situation. Problem is very simple and arose in conversation with my colleague, when he assume that we are in same position even I get payment earlier.
1
10,950,297
06/08/2012 13:59:37
1,433,591
06/03/2012 13:47:26
1
0
How can I use $_GET in the same page
how can do : if($_GET['action'] == 'list'){ do function getFileList($dir) else do nothing exit; } require_once "./dir.php"; require_once "./echo.php"; function getFileList($dir) { } i need the true code ?! how can i insert the function in here?!
list
get
action
null
null
06/08/2012 14:11:55
not a real question
How can I use $_GET in the same page === how can do : if($_GET['action'] == 'list'){ do function getFileList($dir) else do nothing exit; } require_once "./dir.php"; require_once "./echo.php"; function getFileList($dir) { } i need the true code ?! how can i insert the function in here?!
1
8,331,656
11/30/2011 19:21:38
484,290
10/22/2010 14:06:21
805
22
RESTFul authentication System
I want to implement a RESTful authentication whereby the user will enter his username or password. Can i implement such a RESTFul authentication without HTTPs??
authentication
rest
https
restful-authentication
null
01/16/2012 05:09:04
not a real question
RESTFul authentication System === I want to implement a RESTful authentication whereby the user will enter his username or password. Can i implement such a RESTFul authentication without HTTPs??
1
9,771,370
03/19/2012 13:47:18
1,274,753
03/16/2012 18:49:17
8
0
Animation Drawable + Android + Start and stop animation
I am creating an application that implements an animation, when a certain variable is true, when I start the activity and the variable is true, the animation works, but if I change the variable, and then change it back to the true variable the animation will not work. Does anybody have any ideas as to why? Declare Variables // Load the ImageView that will host the animation and // set its background to our AnimationDrawable XML resource. chargeStatus = (ImageView)findViewById(R.id.chargeStatus); chargeStatus.setBackgroundResource(R.drawable.chargeon); // Get the background, which has been compiled to an AnimationDrawable object. chargeAnimation = (AnimationDrawable) chargeStatus.getBackground(); Starts the thread on app start /////When Application Starts @Override public void onStart() { super.onStart(); Thread cThread = new Thread(new serverThread()); //Starts the thread that initiates communications cThread.start(); Thread That sets the value public class serverThread implements Runnable { //public boolean connected = false; //connection public void run() //runs the thread { try { functions.connectToServer(serverIp); //connects to server connected = true; while (connected) { try { connectStatus.setImageResource(R.drawable.blue_car); functions.getStreams(); //establish stream connections functions. updateStatus(); //updates the status of the server changeButtonImage(); //sets initial state for charge button try { Thread.sleep(2500); } catch ( InterruptedException interruptedException ) { functions.displayMessage( "\nThread exception" ); } // end catch } catch (IOException e) { Log.e("Client","Trouble Getting Streams",e); } }//end while }//end try catch (Exception e) { Log.e("Client", "Error Connecting", e); connected = false; connectStatus.setImageResource(R.drawable.red_car); } }; //end run }; //end serverThread Change button function public void changeButtonImage(){ runOnUiThread(new Runnable(){ public void run() { if (functions.chargeStatNumber != 0) { // Start the charge animation chargeAnimation.start(); //set the Charge on off button to stop chargeOnOff.setImageResource(R.drawable.charge_off); } else { // stop the charge animation if running chargeAnimation.stop(); //set charge on off button to on chargeOnOff.setImageResource(R.drawable.charge_on); //set the charging symbol to off chargeStatus.setImageResource(R.drawable.not_charging); } }}); } Thanks in advance for your help.
java
android
multithreading
animation
null
null
open
Animation Drawable + Android + Start and stop animation === I am creating an application that implements an animation, when a certain variable is true, when I start the activity and the variable is true, the animation works, but if I change the variable, and then change it back to the true variable the animation will not work. Does anybody have any ideas as to why? Declare Variables // Load the ImageView that will host the animation and // set its background to our AnimationDrawable XML resource. chargeStatus = (ImageView)findViewById(R.id.chargeStatus); chargeStatus.setBackgroundResource(R.drawable.chargeon); // Get the background, which has been compiled to an AnimationDrawable object. chargeAnimation = (AnimationDrawable) chargeStatus.getBackground(); Starts the thread on app start /////When Application Starts @Override public void onStart() { super.onStart(); Thread cThread = new Thread(new serverThread()); //Starts the thread that initiates communications cThread.start(); Thread That sets the value public class serverThread implements Runnable { //public boolean connected = false; //connection public void run() //runs the thread { try { functions.connectToServer(serverIp); //connects to server connected = true; while (connected) { try { connectStatus.setImageResource(R.drawable.blue_car); functions.getStreams(); //establish stream connections functions. updateStatus(); //updates the status of the server changeButtonImage(); //sets initial state for charge button try { Thread.sleep(2500); } catch ( InterruptedException interruptedException ) { functions.displayMessage( "\nThread exception" ); } // end catch } catch (IOException e) { Log.e("Client","Trouble Getting Streams",e); } }//end while }//end try catch (Exception e) { Log.e("Client", "Error Connecting", e); connected = false; connectStatus.setImageResource(R.drawable.red_car); } }; //end run }; //end serverThread Change button function public void changeButtonImage(){ runOnUiThread(new Runnable(){ public void run() { if (functions.chargeStatNumber != 0) { // Start the charge animation chargeAnimation.start(); //set the Charge on off button to stop chargeOnOff.setImageResource(R.drawable.charge_off); } else { // stop the charge animation if running chargeAnimation.stop(); //set charge on off button to on chargeOnOff.setImageResource(R.drawable.charge_on); //set the charging symbol to off chargeStatus.setImageResource(R.drawable.not_charging); } }}); } Thanks in advance for your help.
0
54,130
09/10/2008 14:09:43
1,103
08/12/2008 12:00:50
31
6
Billing for phone calls
I have an arrangement with a couple of my regular clients whereby there's a regularly scheduled conference call to chat about various work being done and also new stuff coming down the pike. At first I never billed for this time, since some of it was spent on sales-y stuff like discussing potential new projects, etc. It also just seemed like a nice way to build goodwill. Over time, however, this has become problematic and I feel like I'm being taken advantage of. We're a small shop and often as many as 3 people need to attend these conference calls. For a 90 minute call, that's around $500 of potentially billable time that's being given away for free. Considering these calls happen once per week for a couple of different clients, and it adds up to something like $5K/month in lost (potential) revenue. What are standard industry practices around this kind of thing? Should I insist on billing for this time? Or is that being greedy and was my initial instinct not to bill correct?
business
consulting
billing
null
null
05/06/2012 23:06:20
off topic
Billing for phone calls === I have an arrangement with a couple of my regular clients whereby there's a regularly scheduled conference call to chat about various work being done and also new stuff coming down the pike. At first I never billed for this time, since some of it was spent on sales-y stuff like discussing potential new projects, etc. It also just seemed like a nice way to build goodwill. Over time, however, this has become problematic and I feel like I'm being taken advantage of. We're a small shop and often as many as 3 people need to attend these conference calls. For a 90 minute call, that's around $500 of potentially billable time that's being given away for free. Considering these calls happen once per week for a couple of different clients, and it adds up to something like $5K/month in lost (potential) revenue. What are standard industry practices around this kind of thing? Should I insist on billing for this time? Or is that being greedy and was my initial instinct not to bill correct?
2
10,560,353
05/12/2012 01:32:42
1,354,493
04/24/2012 18:31:26
1
0
Basic CSS manipulation using JavaScript
I'm currently learning JavaScript, but I'm very weak on the fundamentals. I'm trying to write a function that changes the background color when a link is clicked, can you please advice me on what I'm doing wrong? <head> <script type="text/javscript"> fuction change() { var abra = document.getElementbyId("body").style; abra.background-color = "black"; } </script> </head> <body> <div id="body" style="background-color: red;"> <a href="#" id="test" onclick="return change()">Test</a> sdfdsfsdfds </div> </body>
javascript
css
basic
null
null
null
open
Basic CSS manipulation using JavaScript === I'm currently learning JavaScript, but I'm very weak on the fundamentals. I'm trying to write a function that changes the background color when a link is clicked, can you please advice me on what I'm doing wrong? <head> <script type="text/javscript"> fuction change() { var abra = document.getElementbyId("body").style; abra.background-color = "black"; } </script> </head> <body> <div id="body" style="background-color: red;"> <a href="#" id="test" onclick="return change()">Test</a> sdfdsfsdfds </div> </body>
0
49,252
09/08/2008 06:54:26
5,004
09/07/2008 10:03:29
23
0
ruby method names
For a project I am working on in ruby I am overriding the method_missing method so that I can set variables using a method call like this: `Object.variable_name= 'new value'` (similar to setting variables in an ActiveRecord object). However, after implementing this I found out that many of the variable names have periods (.) in them. I have found this work arround: `Object.send('variable.name=', 'new value')`. However, I am wondering is there a way to escape the period so that I can use `Object.variable.name= 'new value'`? Thanks, Josh
ruby
null
null
null
null
null
open
ruby method names === For a project I am working on in ruby I am overriding the method_missing method so that I can set variables using a method call like this: `Object.variable_name= 'new value'` (similar to setting variables in an ActiveRecord object). However, after implementing this I found out that many of the variable names have periods (.) in them. I have found this work arround: `Object.send('variable.name=', 'new value')`. However, I am wondering is there a way to escape the period so that I can use `Object.variable.name= 'new value'`? Thanks, Josh
0
10,099,479
04/11/2012 03:38:31
371,974
06/21/2010 08:35:27
311
30
iOS notification receive: some can and the other can't
I use a <code>UINavigationController</code> to control the view controller change.Supposing I push A1 and A2 one by one. Both A1 and A2 is the instance of my custom View Controller A. A has registered a notification, and it will refresh the UI when it receive the notification. My problem is : when I post the notification in A2, and A2 can receive it. However, when I pop to A1, there is no change in A1. So could any one help me how to fix it? BTW,the reason why I use notification is that I may push several instances of A, and if any one posts the notification, the other instances in the stack also need to update.
uinavigationcontroller
nsnotificationcenter
nsnotifications
null
null
null
open
iOS notification receive: some can and the other can't === I use a <code>UINavigationController</code> to control the view controller change.Supposing I push A1 and A2 one by one. Both A1 and A2 is the instance of my custom View Controller A. A has registered a notification, and it will refresh the UI when it receive the notification. My problem is : when I post the notification in A2, and A2 can receive it. However, when I pop to A1, there is no change in A1. So could any one help me how to fix it? BTW,the reason why I use notification is that I may push several instances of A, and if any one posts the notification, the other instances in the stack also need to update.
0
5,229,289
03/08/2011 06:51:08
621,089
02/17/2011 09:32:45
12
3
Captured images from iphone camera and getting its RBG and passing it on to the webservice
Can anyone please help me out in the above question.
iphone
null
null
null
null
03/08/2011 07:43:20
not a real question
Captured images from iphone camera and getting its RBG and passing it on to the webservice === Can anyone please help me out in the above question.
1
4,858,650
02/01/2011 03:39:46
141,831
07/21/2009 07:47:37
924
27
C# - Programatically click a ListView Column
Is there a way to programatically click on a ListView column just as if you would normally click on it?
c#
listview
null
null
null
null
open
C# - Programatically click a ListView Column === Is there a way to programatically click on a ListView column just as if you would normally click on it?
0
5,843,904
04/30/2011 18:49:06
732,654
04/30/2011 18:38:03
1
0
what is the best field to adopt for a cs student who is weak in programming
how can i overcome my confusion over choosing the further studies of **ms** or **mba** after completing cse
database-design
null
null
null
null
04/30/2011 18:51:56
not a real question
what is the best field to adopt for a cs student who is weak in programming === how can i overcome my confusion over choosing the further studies of **ms** or **mba** after completing cse
1
1,562,087
10/13/2009 18:29:13
168,657
09/04/2009 17:02:39
2,556
119
What systems do not support WNOHANG option for waitpid?
I have a library for managing child processes that relies on passing the POSIX WNOHANG option to waitpid to perform a non-blocking wait on a process. It is said that not all systems support this option, but it has been a while since I have worked on any of those systems. What systems don't support this option? I'd like to know so that either I can try to find workarounds for those systems or so I can decide not to target those systems.
fork
waitpid
null
null
null
null
open
What systems do not support WNOHANG option for waitpid? === I have a library for managing child processes that relies on passing the POSIX WNOHANG option to waitpid to perform a non-blocking wait on a process. It is said that not all systems support this option, but it has been a while since I have worked on any of those systems. What systems don't support this option? I'd like to know so that either I can try to find workarounds for those systems or so I can decide not to target those systems.
0
8,676,937
12/30/2011 06:47:51
1,092,012
12/11/2011 07:35:16
41
1
How can I change the background color of a PHP block in eclipse PDT?
I've seen it done in some of the Aptana themes, but don't know how to do it with eclipse.
eclipse
themes
eclipse-pdt
pdt
null
null
open
How can I change the background color of a PHP block in eclipse PDT? === I've seen it done in some of the Aptana themes, but don't know how to do it with eclipse.
0
10,900,740
06/05/2012 16:02:12
1,158,895
01/19/2012 16:00:35
2,172
131
What's it called when people try to overuse Design Patterns?
There must be a name when people try to overuse Design Patterns. I know about the terms `anti-patterns` and `code-smell` (among others), but they just dont seem to apply to this situation. Dont get me wrong, I think patterns are quite useful and powerful, but too many times I see questions and code where people seem to try to force the use of a pattern just to say they used a pattern. More often than not simplicity is the absolute best way to go. I did a search and only came up with this: http://stackoverflow.com/q/466365/1158895 which I find interesting, but dont completely agree with. If the tag doesnt exist on Stack Overflow, I would at least like to reserve the right to create it please. Its not that often that you get to create a new tag :) Some ideas of what it could be called follow: - over patternizing - over patternized - design pattern overdose
oop
design-patterns
null
null
null
06/05/2012 18:32:38
off topic
What's it called when people try to overuse Design Patterns? === There must be a name when people try to overuse Design Patterns. I know about the terms `anti-patterns` and `code-smell` (among others), but they just dont seem to apply to this situation. Dont get me wrong, I think patterns are quite useful and powerful, but too many times I see questions and code where people seem to try to force the use of a pattern just to say they used a pattern. More often than not simplicity is the absolute best way to go. I did a search and only came up with this: http://stackoverflow.com/q/466365/1158895 which I find interesting, but dont completely agree with. If the tag doesnt exist on Stack Overflow, I would at least like to reserve the right to create it please. Its not that often that you get to create a new tag :) Some ideas of what it could be called follow: - over patternizing - over patternized - design pattern overdose
2
8,598,225
12/22/2011 00:50:10
751,444
05/12/2011 21:57:49
188
2
Move element to front of array based on index number in java
Lets say I have the array: int[] taco = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; How can I move an element based its index to the front? Example: Move element taco[5] to the front should produce this: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} // becomes {5, 0, 1, 2, 3, 4, 6, 7, 8, 9}
java
arrays
null
null
null
null
open
Move element to front of array based on index number in java === Lets say I have the array: int[] taco = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; How can I move an element based its index to the front? Example: Move element taco[5] to the front should produce this: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} // becomes {5, 0, 1, 2, 3, 4, 6, 7, 8, 9}
0
8,676,931
12/30/2011 06:45:50
561,208
01/03/2011 12:03:57
104
1
How to draw on screen for iphone
I want to draw line between dots. Give some guidelines to basic Drawing concepts on iphone.
iphone
ios4
core-graphics
null
null
12/30/2011 07:01:48
not a real question
How to draw on screen for iphone === I want to draw line between dots. Give some guidelines to basic Drawing concepts on iphone.
1
7,319,951
09/06/2011 12:30:54
518,674
11/24/2010 11:24:52
4
0
App Android Limit
I'm trying to attach a zip file to my project that contains app resorces. The size of this file is undetermined but may be large. There will be some problem of disk limitation? Thanks.
android
null
null
null
null
09/06/2011 13:41:13
not a real question
App Android Limit === I'm trying to attach a zip file to my project that contains app resorces. The size of this file is undetermined but may be large. There will be some problem of disk limitation? Thanks.
1
6,210,121
06/02/2011 03:42:26
167,454
09/02/2009 19:40:01
1,756
1
how i get an attribute from a xml using his name instead of iterate over all the attributes?
I'm using vb script and MSXML2.DOMDocument to parse a xml document , it is possible get a particular attribute using his name instead of iterate over all the attributes? Today I am doing this For x = 0 To (curNode.Attributes.length - 1) sAttrName = curNode.Attributes.Item(x).nodeName if sAttrName = 'customer' then avalue=curNode.Attributes.Item(x).nodeValue but i want do something like this avalue=curNode.Attributes.Item("customer").nodeValue
xml
vbscript
null
null
null
null
open
how i get an attribute from a xml using his name instead of iterate over all the attributes? === I'm using vb script and MSXML2.DOMDocument to parse a xml document , it is possible get a particular attribute using his name instead of iterate over all the attributes? Today I am doing this For x = 0 To (curNode.Attributes.length - 1) sAttrName = curNode.Attributes.Item(x).nodeName if sAttrName = 'customer' then avalue=curNode.Attributes.Item(x).nodeValue but i want do something like this avalue=curNode.Attributes.Item("customer").nodeValue
0
7,749,317
10/13/2011 03:59:59
427,686
08/22/2010 15:09:11
113
9
How to install official released iOS 5 on iPhone 4 installed with iOS 5 beta?
im an iPhone developer. I have my iPhone installed with iOS 5 beta. since now the official release of iOS 5 is out, how can i install that version instead? iTunes detect that my version is the latest already.
iphone
ios5
null
null
null
10/13/2011 14:58:52
off topic
How to install official released iOS 5 on iPhone 4 installed with iOS 5 beta? === im an iPhone developer. I have my iPhone installed with iOS 5 beta. since now the official release of iOS 5 is out, how can i install that version instead? iTunes detect that my version is the latest already.
2
7,471,626
09/19/2011 13:22:32
514,493
11/10/2010 14:12:50
599
2
How di I use the facebook sharer meta tags?
<!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> <meta property="og:title" content="Smith hails 'unique' Wable legacy" /> <meta property="og:description" content="John Smith claims beautiful football is the main legacy of Akhil Wable's decade at the club. " /> <meta property="og:image" content="http://www.onjd.com/design05/images/PH2/WableAFC205.jpg" /> <script src="http://connect.facebook.net/en_US/all.js"></script> <style type="text/css"> #test{background-color:#666;width:200px;} #test span{background:none;} </style> </head> <body> <a name="fb_share" type="icon_link" id="test" share_url="YOUR_URL">Compartir en Facebook</a> <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"> </script> </body> </html>
facebook
null
null
null
null
09/20/2011 21:47:13
not a real question
How di I use the facebook sharer meta tags? === <!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> <meta property="og:title" content="Smith hails 'unique' Wable legacy" /> <meta property="og:description" content="John Smith claims beautiful football is the main legacy of Akhil Wable's decade at the club. " /> <meta property="og:image" content="http://www.onjd.com/design05/images/PH2/WableAFC205.jpg" /> <script src="http://connect.facebook.net/en_US/all.js"></script> <style type="text/css"> #test{background-color:#666;width:200px;} #test span{background:none;} </style> </head> <body> <a name="fb_share" type="icon_link" id="test" share_url="YOUR_URL">Compartir en Facebook</a> <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"> </script> </body> </html>
1
2,198,224
02/04/2010 08:23:05
182,040
09/30/2009 18:37:21
41
3
Siebel integration with Java
i have applied for a position in a company that works with siebel CRM and its integration with Java....i wanted to known certain things about this position from people who might have worked in this field..what is the average salary..and how would the learning experience be for a fresh graduate....will i have a good future in this field...? Please let me know answers to these questions as i really need to be prepared with my dicision just in case they give me an offer..
crm
siebel
java
null
null
02/04/2010 12:23:24
off topic
Siebel integration with Java === i have applied for a position in a company that works with siebel CRM and its integration with Java....i wanted to known certain things about this position from people who might have worked in this field..what is the average salary..and how would the learning experience be for a fresh graduate....will i have a good future in this field...? Please let me know answers to these questions as i really need to be prepared with my dicision just in case they give me an offer..
2
8,985,284
01/24/2012 10:33:09
935,374
09/08/2011 17:12:22
1
0
NFC READ AND WRITE ANDROID Other than NFCDEMO and api level 10
HI i m new to android programming. i went through the NFc Demo Code of devloper.android.com the problem is that this code uses API level 9. and the intent filter is ACTION_TAG_DISCOVERED I want it to be in api level 10 and using NDEF_DISCOVERED.. is there some tutorial or link which will show me how to read and write ndef messages for api level 10 and beyond.. this are the links that i have tried.. http://developer.android.com/resources/samples/NFCDemo/index.html Thank You
android
nfc
null
null
null
01/24/2012 21:57:55
off topic
NFC READ AND WRITE ANDROID Other than NFCDEMO and api level 10 === HI i m new to android programming. i went through the NFc Demo Code of devloper.android.com the problem is that this code uses API level 9. and the intent filter is ACTION_TAG_DISCOVERED I want it to be in api level 10 and using NDEF_DISCOVERED.. is there some tutorial or link which will show me how to read and write ndef messages for api level 10 and beyond.. this are the links that i have tried.. http://developer.android.com/resources/samples/NFCDemo/index.html Thank You
2
5,307,689
03/15/2011 05:00:06
651,348
03/09/2011 10:30:33
19
1
How Read pdf file in android..
I had done so much effort for Pdf Reader in android But i m not success for my that problem. so i kindly request to you if you have good solution for my problem then send to me.. Thanks in andvance...........
android
null
null
null
null
03/15/2011 05:19:08
off topic
How Read pdf file in android.. === I had done so much effort for Pdf Reader in android But i m not success for my that problem. so i kindly request to you if you have good solution for my problem then send to me.. Thanks in andvance...........
2
10,232,886
04/19/2012 16:48:44
1,273,275
03/16/2012 05:20:00
1
1
The best way to receive data from server
I have a web site with some periodically updated information. Now, I want to create an android application, and I have to choose the way to synchronize my remote data on phone with data on the website. Should it be xml, soap, json, something else? What is the best way? note: it won't be asynchronius, one request - one response from time to time.
android
synchronization
null
null
null
04/21/2012 18:14:04
not a real question
The best way to receive data from server === I have a web site with some periodically updated information. Now, I want to create an android application, and I have to choose the way to synchronize my remote data on phone with data on the website. Should it be xml, soap, json, something else? What is the best way? note: it won't be asynchronius, one request - one response from time to time.
1
8,765,605
01/06/2012 23:00:18
272,096
02/12/2010 19:44:47
109
2
Django form: name 'self' is not defined
I have a form in Django that looks like this class FooForm(forms.ModelForm): foo_field = forms.ModelChoiceField(widget=FooWidget(def_arg=self.data)) Where I call `self.data`, Python throws the exception `name 'self' is not defined`. How can I access `self` there?
django
null
null
null
null
null
open
Django form: name 'self' is not defined === I have a form in Django that looks like this class FooForm(forms.ModelForm): foo_field = forms.ModelChoiceField(widget=FooWidget(def_arg=self.data)) Where I call `self.data`, Python throws the exception `name 'self' is not defined`. How can I access `self` there?
0
164,902
10/02/2008 22:28:24
4,977
09/07/2008 07:24:42
2,485
103
What's a good hosted project management solution?
I'm looking for a hosted project management solution that meets the following criteria: - No more than $15/mo - Can allow public access to all projects of a company (or at least list the public projects) - Public users can report issues, preferably put into a moderation queue - Easy interface for reordering tasks, moving them between milestones, etc (This is less important) Does anyone know of a service that will fit my needs? I've tried the following: Assembla, Zoho Projects, Comindwork, TeamworkPM, Basecamp.
project-management
null
null
null
null
05/25/2012 13:06:12
off topic
What's a good hosted project management solution? === I'm looking for a hosted project management solution that meets the following criteria: - No more than $15/mo - Can allow public access to all projects of a company (or at least list the public projects) - Public users can report issues, preferably put into a moderation queue - Easy interface for reordering tasks, moving them between milestones, etc (This is less important) Does anyone know of a service that will fit my needs? I've tried the following: Assembla, Zoho Projects, Comindwork, TeamworkPM, Basecamp.
2
8,179,663
11/18/2011 08:32:48
465,834
10/04/2010 12:54:31
22
9
JAVA EE Accessibility
I was going through the fundamentals of JAVA EE 6 and came to know that Accessibility is one of its prominent distinguishing feature from the JAVA SE. Please help with me to know what exactly this feature is and how it differs from SE.
java
java-ee
null
null
null
11/20/2011 00:15:30
off topic
JAVA EE Accessibility === I was going through the fundamentals of JAVA EE 6 and came to know that Accessibility is one of its prominent distinguishing feature from the JAVA SE. Please help with me to know what exactly this feature is and how it differs from SE.
2
5,595,022
04/08/2011 12:27:34
389,007
07/11/2010 19:20:06
3
0
Where is _mainViewController declared and initialized?
i recently updated my IDE to XCode 4.0 and saw a strange change in the Utillity-Application boiler-plate-code: First, the MainViewController.h-File: #import <UIKit/UIKit.h> @class MainViewController; @interface UtilityAppDelegate : NSObject <UIApplicationDelegate> { } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet MainViewController *mainViewController; @end Question 1: Where is "mainViewController" declared in the first place? I didn't find it anywhere. In the *.m-File there is a @synthesize mainViewController=_mainViewController; statement. So my second question: Where is "_mainViewController" hidden? Can't find a declaration anywhere. It comes somehow out of the main *.nib file I guess. But there is another problem: I did add a UINavigationController to one of my recent projects and have no need for mainViewController anymore. But when I delete @property and @synthesize out of MainViewController.m/.h , I can't run the app anymore because of this exception: setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key mainViewController.' occurring at this line int retVal = UIApplicationMain(argc, argv, nil, nil); in the main.m. Thx for your help.
iphone
xcode4
null
null
null
null
open
Where is _mainViewController declared and initialized? === i recently updated my IDE to XCode 4.0 and saw a strange change in the Utillity-Application boiler-plate-code: First, the MainViewController.h-File: #import <UIKit/UIKit.h> @class MainViewController; @interface UtilityAppDelegate : NSObject <UIApplicationDelegate> { } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet MainViewController *mainViewController; @end Question 1: Where is "mainViewController" declared in the first place? I didn't find it anywhere. In the *.m-File there is a @synthesize mainViewController=_mainViewController; statement. So my second question: Where is "_mainViewController" hidden? Can't find a declaration anywhere. It comes somehow out of the main *.nib file I guess. But there is another problem: I did add a UINavigationController to one of my recent projects and have no need for mainViewController anymore. But when I delete @property and @synthesize out of MainViewController.m/.h , I can't run the app anymore because of this exception: setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key mainViewController.' occurring at this line int retVal = UIApplicationMain(argc, argv, nil, nil); in the main.m. Thx for your help.
0
9,509,809
03/01/2012 02:32:08
396,089
07/19/2010 18:04:03
83
0
Open source Java based office suite
Is there any open sourced Java based office suite - which also includes a very good document editor. I am interested in something similar to Open Office but mostly written in Java. I recently looked at Open Office and found that it is mostly in C++. Why am I asking this? I want to see some designs (copy honestly) and incorporate into my own Java swing based document editor which I am working on. But if I like the project then I might very well end up working in it itself as a contributor as I would like to work in office productivity suite applications. Does anyone have any ideas on this?
java
open-source
null
null
null
03/05/2012 04:43:38
off topic
Open source Java based office suite === Is there any open sourced Java based office suite - which also includes a very good document editor. I am interested in something similar to Open Office but mostly written in Java. I recently looked at Open Office and found that it is mostly in C++. Why am I asking this? I want to see some designs (copy honestly) and incorporate into my own Java swing based document editor which I am working on. But if I like the project then I might very well end up working in it itself as a contributor as I would like to work in office productivity suite applications. Does anyone have any ideas on this?
2
5,280,857
03/12/2011 05:49:29
325,418
05/09/2009 15:50:29
10,693
355
Why Ruby on Rails books or references always say Update is by PUT and Destroy is by DELETE when it is not?
Because if I use Fiddler to monitor it, it is: CRUD Method Path With Idempotent? ---- ------ ---- ---- ----------- Create POST /foos/ No Retrieve GET /foos/:id Yes Update POST /foos/:id _method=put Yes Destroy POST /foos/:id _method=delete Yes so `PUT` and `DELETE` (as HTTP verb) are not actually used. But why do Rails books and references always say it is `PUT` and `DELETE`?
ruby-on-rails
ruby-on-rails-3
rest
null
null
null
open
Why Ruby on Rails books or references always say Update is by PUT and Destroy is by DELETE when it is not? === Because if I use Fiddler to monitor it, it is: CRUD Method Path With Idempotent? ---- ------ ---- ---- ----------- Create POST /foos/ No Retrieve GET /foos/:id Yes Update POST /foos/:id _method=put Yes Destroy POST /foos/:id _method=delete Yes so `PUT` and `DELETE` (as HTTP verb) are not actually used. But why do Rails books and references always say it is `PUT` and `DELETE`?
0
8,633,403
12/26/2011 06:18:07
1,115,929
12/26/2011 06:05:21
1
0
can some one help me please
Message=Conversion from string "" to type 'Integer' is not valid. (this error is associated to rates) Public Class registerclass Private rate As Integer Private con As New databaseconnector Property subrates() Get Return rate End Get Set(ByVal value) rate = value End Set End Property Private Sub ADDDATA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ADDDATA.Click re.subrates = rates.Text End Sub
c#
javascript
visual-studio-2010
null
null
12/28/2011 08:03:41
not a real question
can some one help me please === Message=Conversion from string "" to type 'Integer' is not valid. (this error is associated to rates) Public Class registerclass Private rate As Integer Private con As New databaseconnector Property subrates() Get Return rate End Get Set(ByVal value) rate = value End Set End Property Private Sub ADDDATA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ADDDATA.Click re.subrates = rates.Text End Sub
1
8,400,568
12/06/2011 13:20:04
859,154
07/23/2011 09:23:42
5,283
347
SQl server Logical File Name usages?
I'm restoring a Bak file RESTORE DATABASE WEbERP2 FROM DISK = 'c:\r\WEbERP_backup_201105210100.bak' WITH REPLACE , MOVE 'WEbERP' TO 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\WEbERP2.mdf', MOVE 'WEbERP_log' TO 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\WEbERP2_log.ldf',REPLACE Im restoring it AS **WEbERP2** //2 !!! and it works. the Db is opened as a new Db named :**WEbERP2** But the logical name is still : **WebErp.** I know that the functionality is fine . But still I'm having trouble to understand its usages. ![enter image description here][1] I know I can change it by : ALTER DATABASE xxx MODIFY FILE (NAME=N... But I want to understand its usages , and when its important to change it. [1]: http://i.stack.imgur.com/lVcRI.jpg
sql-server
null
null
null
null
12/06/2011 14:31:31
off topic
SQl server Logical File Name usages? === I'm restoring a Bak file RESTORE DATABASE WEbERP2 FROM DISK = 'c:\r\WEbERP_backup_201105210100.bak' WITH REPLACE , MOVE 'WEbERP' TO 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\WEbERP2.mdf', MOVE 'WEbERP_log' TO 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\WEbERP2_log.ldf',REPLACE Im restoring it AS **WEbERP2** //2 !!! and it works. the Db is opened as a new Db named :**WEbERP2** But the logical name is still : **WebErp.** I know that the functionality is fine . But still I'm having trouble to understand its usages. ![enter image description here][1] I know I can change it by : ALTER DATABASE xxx MODIFY FILE (NAME=N... But I want to understand its usages , and when its important to change it. [1]: http://i.stack.imgur.com/lVcRI.jpg
2
5,286,922
03/13/2011 02:00:22
260,127
01/27/2010 14:03:49
5,007
30
g++ template parameter error
I have GetContainer() function as follows. template<typename I,typename T,typename Container> Container& ObjCollection<I,T,Container>::GetContainer() { return mContainer; } When I use this function template<typename I,typename T> T& DynamicObjCollection<I,T>::Insert(T& t) { GetContainer().insert(&t); return t; } I got errors. error: there are no arguments to ‘GetContainer’ that depend on a template parameter, so a declaration of ‘GetContainer’ must be available error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) It works fine with MSVC, but g++ is not so permissive. What's wrong with the code?
c++
templates
g++
null
null
null
open
g++ template parameter error === I have GetContainer() function as follows. template<typename I,typename T,typename Container> Container& ObjCollection<I,T,Container>::GetContainer() { return mContainer; } When I use this function template<typename I,typename T> T& DynamicObjCollection<I,T>::Insert(T& t) { GetContainer().insert(&t); return t; } I got errors. error: there are no arguments to ‘GetContainer’ that depend on a template parameter, so a declaration of ‘GetContainer’ must be available error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) It works fine with MSVC, but g++ is not so permissive. What's wrong with the code?
0
836,065
05/07/2009 17:42:48
22,599
09/26/2008 08:45:20
365
13
How to write an Excel function which returns a value from an SQL database?
I want to write the following function which should be used in an Excel worksheet: =GetRecField("Foo Record Key", "FooField1") ...which will connect internally through ODBC to an SQL database, execute there an SELECT FooField1 FROM MyTable WHERE KEY_FIELD='Foo Record Key'; and will return the resulting value as the result of the function GetRecField. The above SQL is granted to return only one record (IOW KEY_FIELD has an unique constraint). Of course, the above function can be called multiple times in a worksheet so, please try to avoid a blind `QueryTables.Add` TIA.
excel
odbc
sql
null
null
null
open
How to write an Excel function which returns a value from an SQL database? === I want to write the following function which should be used in an Excel worksheet: =GetRecField("Foo Record Key", "FooField1") ...which will connect internally through ODBC to an SQL database, execute there an SELECT FooField1 FROM MyTable WHERE KEY_FIELD='Foo Record Key'; and will return the resulting value as the result of the function GetRecField. The above SQL is granted to return only one record (IOW KEY_FIELD has an unique constraint). Of course, the above function can be called multiple times in a worksheet so, please try to avoid a blind `QueryTables.Add` TIA.
0
7,292,622
09/03/2011 10:39:31
561,237
01/03/2011 12:51:24
78
0
retrieve deleted Mysql database from carbon copy cloner backup?
I'm running OSX snow leopard with MAMP installed. I use MAMP for a drupal 6 site. Now, the database of the site dissappeared suddenly. So I have this carbon copy cloner backup of the sites folder with the drupal project located on another drive. Obviously, you can't just copy the old sites folder and expect that to fix the situation, but I guess I can retrieve the database somehow, can't I? Thanks in advance.
mysql
drupal
backup
null
null
09/03/2011 18:52:07
off topic
retrieve deleted Mysql database from carbon copy cloner backup? === I'm running OSX snow leopard with MAMP installed. I use MAMP for a drupal 6 site. Now, the database of the site dissappeared suddenly. So I have this carbon copy cloner backup of the sites folder with the drupal project located on another drive. Obviously, you can't just copy the old sites folder and expect that to fix the situation, but I guess I can retrieve the database somehow, can't I? Thanks in advance.
2
7,412,008
09/14/2011 06:15:05
482,058
10/20/2010 17:38:13
37
0
how to set vertical align of uitextview from interface builder
I have a problem in my application design. I want to set vertical align middle of my UITextView. Please help me how to set vertical align of uitextview from interface builder. Thanks & REgards Shivam
iphone
objective-c
interface-builder
uitextview
null
null
open
how to set vertical align of uitextview from interface builder === I have a problem in my application design. I want to set vertical align middle of my UITextView. Please help me how to set vertical align of uitextview from interface builder. Thanks & REgards Shivam
0
6,739,164
07/18/2011 20:41:12
843,787
07/14/2011 02:36:57
30
1
Unterminated String Literal Error Message
I know its been asked hundreds of times, but in this specific case, after an hour of searching, i cant spot the reason behind the erro "untermiated string literal". Heres my code.. newRow.innerHTML = '<td>1</td><td><input type="text" name="quantity' + (num) + '" size="5" /></td><td><input type="text" name="description' + (num) + '" size="50"/></td><td>$<input type="text" name="price' + (num) + '" size="5" /></td><td><input type="text" name="catalognum' + (num) + '" onChange="addRow()"/></td><a class="removelink" onclick=\'removeElement(' + rowIdName + ')\'>Remove This File<
javascript
error-message
null
null
null
null
open
Unterminated String Literal Error Message === I know its been asked hundreds of times, but in this specific case, after an hour of searching, i cant spot the reason behind the erro "untermiated string literal". Heres my code.. newRow.innerHTML = '<td>1</td><td><input type="text" name="quantity' + (num) + '" size="5" /></td><td><input type="text" name="description' + (num) + '" size="50"/></td><td>$<input type="text" name="price' + (num) + '" size="5" /></td><td><input type="text" name="catalognum' + (num) + '" onChange="addRow()"/></td><a class="removelink" onclick=\'removeElement(' + rowIdName + ')\'>Remove This File<
0