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
8,414,206
12/07/2011 10:57:57
1,061,798
11/23/2011 11:34:22
1
0
rejectValue and use in jsp. spring3 mvc; jsp;
My application has a register page with compulsory check boxes. If the form is submitted without the check boxes being ticked, I want an error message shown when trying to submit the form. In my controller, I have: if(req.getParameter("tcCheck")==null) result.rejectValue("tcCheck","Check.tc", "Need to accept terms and conditions"); my jsp: <form:form modelAttribute="user" method="post"> ... <form:errors path=tcCheck/> ... </form:form> At runtime, I get this error: > Error 500: org.springframework.beans.NotReadablePropertyException: > Invalid property 'tcCheck' of bean class > [com.domgen.recupl.domain.User]: Bean property 'tcCheck' is not > readable or has an invalid getter method: Does the return type of the > getter match the parameter type of the setter? The User domain object does not have tcCheck as one of its instance variables and of course it should not go in the User bean. I am wondering how I can display my error message without editing the User bean? Thanks. A
jsp
spring-mvc
spring-3
null
null
null
open
rejectValue and use in jsp. spring3 mvc; jsp; === My application has a register page with compulsory check boxes. If the form is submitted without the check boxes being ticked, I want an error message shown when trying to submit the form. In my controller, I have: if(req.getParameter("tcCheck")==null) result.rejectValue("tcCheck","Check.tc", "Need to accept terms and conditions"); my jsp: <form:form modelAttribute="user" method="post"> ... <form:errors path=tcCheck/> ... </form:form> At runtime, I get this error: > Error 500: org.springframework.beans.NotReadablePropertyException: > Invalid property 'tcCheck' of bean class > [com.domgen.recupl.domain.User]: Bean property 'tcCheck' is not > readable or has an invalid getter method: Does the return type of the > getter match the parameter type of the setter? The User domain object does not have tcCheck as one of its instance variables and of course it should not go in the User bean. I am wondering how I can display my error message without editing the User bean? Thanks. A
0
10,123,607
04/12/2012 12:30:21
1,329,079
04/12/2012 12:23:19
1
0
mysql,sql query.issue on selecting values
I have 2 tables.first one is user table and other user_entry. I need to select the user info from user table and user_entry table on the bases of user_id. Now the case is : user_entry may or may contain the user row. while selecting the user info from both the table i need to select a column from the user_entry table.if user row exist in user_entry table the column contain any value from user_entry table again that user else return null or blank. Thanks
mysql
sql
null
null
null
null
open
mysql,sql query.issue on selecting values === I have 2 tables.first one is user table and other user_entry. I need to select the user info from user table and user_entry table on the bases of user_id. Now the case is : user_entry may or may contain the user row. while selecting the user info from both the table i need to select a column from the user_entry table.if user row exist in user_entry table the column contain any value from user_entry table again that user else return null or blank. Thanks
0
8,080,364
11/10/2011 13:40:08
38,940
11/19/2008 14:04:14
2,334
34
How to programmatically log in into phpBB forum?
I have a forum using phpBB. Now i would like to do something like this from source code: login("user", "password") How to do this in phpBB?
php
mysql
integration
phpbb
null
null
open
How to programmatically log in into phpBB forum? === I have a forum using phpBB. Now i would like to do something like this from source code: login("user", "password") How to do this in phpBB?
0
5,628,975
04/12/2011 00:11:55
703,132
04/12/2011 00:11:55
1
0
How can I have the user set the amount of time they want on a timer app in android?
beginner here with a question. I'm trying to build a timer app for a friend, and am aware of hander.postDelayed to set a timer for a specified amount of time. However I was wondering if there was a way to let the user decided how much time they want to countdown from, and if so, let them choose through the XML. I appreciate any help and hope this is a clear enough question.
android
xml
timer
null
null
null
open
How can I have the user set the amount of time they want on a timer app in android? === beginner here with a question. I'm trying to build a timer app for a friend, and am aware of hander.postDelayed to set a timer for a specified amount of time. However I was wondering if there was a way to let the user decided how much time they want to countdown from, and if so, let them choose through the XML. I appreciate any help and hope this is a clear enough question.
0
5,375,866
03/21/2011 09:38:32
669,149
03/21/2011 09:24:52
1
0
[XPath Query] how to use value of one node as a node itself
I am new to XPath. I have a situation in which I need to do following Exmaple XML <root> <node1>value1</node1> <node2>smomething</node2> <smomething>somevalue</smomething> <root> I want to form a XPath which would fetch the value 'somevalue' The tag **smomething** is it-self a value of <node2> In future <node2> may have some different value say anything Which would ultimately result in having **anything** as a tag as shown below <node2>anything</node2> <anything>somevalue</anything> something/anything tags would be there depending on value of <node2> Any idea on how to form XPath for above case ? Thanks in advance....
xml
xpath
null
null
null
null
open
[XPath Query] how to use value of one node as a node itself === I am new to XPath. I have a situation in which I need to do following Exmaple XML <root> <node1>value1</node1> <node2>smomething</node2> <smomething>somevalue</smomething> <root> I want to form a XPath which would fetch the value 'somevalue' The tag **smomething** is it-self a value of <node2> In future <node2> may have some different value say anything Which would ultimately result in having **anything** as a tag as shown below <node2>anything</node2> <anything>somevalue</anything> something/anything tags would be there depending on value of <node2> Any idea on how to form XPath for above case ? Thanks in advance....
0
10,585,090
05/14/2012 14:15:12
1,379,421
05/07/2012 09:43:38
11
0
Monitoring multiple folders in one 'syncFolderItems' operation?
Is it possible to monitor several folders in one 'syncFolderItems' operation? I tried it, but It doesn't seem to work. For example, this: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"> <soap:Body> <SyncFolderItems xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"> <ItemShape> <t:BaseShape>Default</t:BaseShape> </ItemShape> <SyncFolderId> <t:DistinguishedFolderId Id="drafts"/> <t:DistinguishedFolderId Id="inbox"/> </SyncFolderId> <MaxChangesReturned>500</MaxChangesReturned> </SyncFolderItems> </soap:Body> </soap:Envelope> doesn't work :( is it possible? Thanks :)
soap
exchange
ews
exchange2007
null
null
open
Monitoring multiple folders in one 'syncFolderItems' operation? === Is it possible to monitor several folders in one 'syncFolderItems' operation? I tried it, but It doesn't seem to work. For example, this: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"> <soap:Body> <SyncFolderItems xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"> <ItemShape> <t:BaseShape>Default</t:BaseShape> </ItemShape> <SyncFolderId> <t:DistinguishedFolderId Id="drafts"/> <t:DistinguishedFolderId Id="inbox"/> </SyncFolderId> <MaxChangesReturned>500</MaxChangesReturned> </SyncFolderItems> </soap:Body> </soap:Envelope> doesn't work :( is it possible? Thanks :)
0
6,780,625
07/21/2011 18:09:14
993,179
12/22/2009 10:14:15
277
15
Reversing of _PrepareMenuWindow() subroutine
Can some one help me with reversing of _PrepareMenuWindow() subroutine? I am trying to find the signature of the method. __text:000639A7 _PrepareMenuWindow proc near ; CODE XREF: DrawTheMenu(MenuSelectData *,__CFArray **,uchar,uchar *)+274p __text:000639A7 ; PopUpMenuSelectCore(MenuData *,Point,double,Point,ushort,uint,Rect const*,ushort,ulong,Rect const*,Rect const*,__CFString const*,OpaqueMenuRef **,ushort *)+528p __text:000639A7 __text:000639A7 var_44 = dword ptr -44h __text:000639A7 var_40 = dword ptr -40h __text:000639A7 var_3C = dword ptr -3Ch __text:000639A7 var_34 = dword ptr -34h __text:000639A7 var_30 = dword ptr -30h __text:000639A7 var_2C = dword ptr -2Ch __text:000639A7 var_28 = dword ptr -28h __text:000639A7 var_24 = word ptr -24h __text:000639A7 var_20 = dword ptr -20h __text:000639A7 var_1A = word ptr -1Ah __text:000639A7 arg_0 = dword ptr 8 __text:000639A7 arg_4 = dword ptr 0Ch __text:000639A7 arg_8 = dword ptr 10h __text:000639A7 __text:000639A7 push ebp __text:000639A8 mov ebp, esp __text:000639AA push edi __text:000639AB push esi __text:000639AC push ebx __text:000639AD sub esp, 5Ch __text:000639B0 xor edi, edi __text:000639B2 mov eax, [ebp+arg_0] __text:000639B5 test eax, eax __text:000639B7 jz short loc_639C6 __text:000639B9 mov eax, [ebp+arg_0] __text:000639BC mov [esp], eax __text:000639BF call __ZNK8HIObject13GetEncodedRefEv ; HIObject::GetEncodedRef(void) __text:000639C4 mov edi, eax __text:000639C6 __text:000639C6 loc_639C6: ; CODE XREF: _PrepareMenuWindow+10j __text:000639C6 mov ecx, [ebp+arg_4] __text:000639C9 mov eax, [ecx] __text:000639CB mov edx, [ecx+4] __text:000639CE mov [ebp+var_2C], eax __text:000639D1 mov [ebp+var_28], edx __text:000639D4 lea eax, [ebp+var_1A] __text:000639D7 mov [ebp+var_40], eax __text:000639DA mov [esp+4], eax __text:000639DE mov [esp], edi __text:000639E1 call _GetMenuType __text:000639E6 mov dword ptr [esp+4], 0 __text:000639EE mov [esp], edi __text:000639F1 call _IsMenuItemEnabled __text:000639F6 movzx edx, [ebp+var_1A] __text:000639FA or dh, 1 __text:000639FD test al, al __text:000639FF movzx ebx, [ebp+var_1A] __text:00063A03 cmovz ebx, edx __text:00063A06 mov [ebp+var_1A], bx __text:00063A0A mov eax, [ebp+arg_8] __text:00063A0D mov [esp+0Ch], eax __text:00063A11 lea ecx, [ebp+var_2C] __text:00063A14 mov [ebp+var_44], ecx __text:00063A17 mov [esp+8], ecx __text:00063A1B mov eax, [ebp+arg_4] __text:00063A1E mov [esp+4], eax __text:00063A22 mov [esp], edi __text:00063A25 call __AddOpenMenu __text:00063A2A mov ecx, [ebp+var_44] __text:00063A2D mov [esp], ecx __text:00063A30 call _EmptyRect __text:00063A35 test al, al __text:00063A37 jnz loc_63B94 __text:00063A3D mov [esp], edi __text:00063A40 call __Z11GetMenuDataP13OpaqueMenuRef ; GetMenuData(OpaqueMenuRef *) __text:00063A45 mov [ebp+var_3C], eax __text:00063A48 call _NewRgn __text:00063A4D mov esi, eax __text:00063A4F test eax, eax __text:00063A51 jz loc_63BDD __text:00063A57 movzx ebx, bx __text:00063A5A mov eax, [ebp+var_3C] __text:00063A5D mov eax, [eax+40h] __text:00063A60 test eax, eax __text:00063A62 jnz loc_63B23 __text:00063A68 mov [ebp+var_1A], 0 __text:00063A6E mov eax, [ebp+var_2C] __text:00063A71 mov edx, [ebp+var_28] __text:00063A74 mov [ebp+var_34], eax __text:00063A77 mov [ebp+var_30], edx __text:00063A7A mov ecx, [ebp+var_40] __text:00063A7D mov [esp+10h], ecx __text:00063A81 mov dword ptr [esp+0Ch], 0 __text:00063A89 lea eax, [ebp+var_34] __text:00063A8C mov [esp+8], eax __text:00063A90 mov dword ptr [esp+4], 7 __text:00063A98 mov eax, [ebp+var_3C] __text:00063A9B mov [esp], eax __text:00063A9E call __Z12_CallMenuDefP8MenuDatasP4Rect5PointPs ; _CallMenuDef(MenuData *,short,Rect *,Point,short *) __text:00063AA3 cmp [ebp+var_1A], 7473h __text:00063AA9 jz short loc_63ADC __text:00063AAB add word ptr [ebp+var_2C], 3 __text:00063AB0 mov dword ptr [esp+8], 0FFFFFFFCh __text:00063AB8 mov dword ptr [esp+4], 0FFFFFFFCh __text:00063AC0 mov ecx, [ebp+var_44] __text:00063AC3 mov [esp], ecx __text:00063AC6 call _InsetRect __text:00063ACB mov eax, [ebp+var_44] __text:00063ACE mov [esp+4], eax __text:00063AD2 mov [esp], esi __text:00063AD5 call _RectRgn __text:00063ADA jmp short loc_63B23 __text:00063ADC ; --------------------------------------------------------------------------- __text:00063ADC __text:00063ADC loc_63ADC: ; CODE XREF: _PrepareMenuWindow+102j __text:00063ADC lea eax, [ebp+var_24] __text:00063ADF mov [esp+8], eax __text:00063AE3 lea eax, [ebp+var_20] __text:00063AE6 mov [esp+4], eax __text:00063AEA mov [esp], edi __text:00063AED call __GetMenuCallout __text:00063AF2 movsx eax, [ebp+var_24] __text:00063AF6 mov [esp+10h], eax __text:00063AFA mov eax, [ebp+var_20] __text:00063AFD mov [esp+0Ch], eax __text:00063B01 mov [esp+8], esi __text:00063B05 mov [esp+4], ebx __text:00063B09 mov ecx, [ebp+var_44] __text:00063B0C mov [esp], ecx __text:00063B0F call __GetThemeMenuBackgroundRegionWithCallout __text:00063B14 mov eax, [ebp+var_44] __text:00063B17 mov [esp+4], eax __text:00063B1B mov [esp], esi __text:00063B1E call _GetRegionBounds __text:00063B23 __text:00063B23 loc_63B23: ; CODE XREF: _PrepareMenuWindow+BBj __text:00063B23 ; _PrepareMenuWindow+133j __text:00063B23 mov [esp+0Ch], esi __text:00063B27 mov ecx, [ebp+var_44] __text:00063B2A mov [esp+8], ecx __text:00063B2E mov [esp+4], ebx __text:00063B32 mov [esp], edi __text:00063B35 call __ZL13GetMenuWindowP13OpaqueMenuReftPK4RectP15OpaqueRgnHandle ; GetMenuWindow(OpaqueMenuRef *,ushort,Rect const*,OpaqueRgnHandle *) __text:00063B3A test eax, eax __text:00063B3C jz short loc_63BA1 __text:00063B3E mov [esp], eax __text:00063B41 call _GetWindowPort __text:00063B46 mov [esp], eax __text:00063B49 call _SetPortWrapper __text:00063B4E mov [esp], esi __text:00063B51 call _SetClipWrapper __text:00063B56 mov [esp], esi __text:00063B59 call _DisposeRgn __text:00063B5E mov eax, [ebp+var_3C] __text:00063B61 mov eax, [eax+40h] __text:00063B64 test eax, eax __text:00063B66 jnz short loc_63BDD __text:00063B68 mov dword ptr [esp+14h], 0 __text:00063B70 mov dword ptr [esp+10h], 0 __text:00063B78 mov [esp+0Ch], ebx __text:00063B7C mov ecx, [ebp+arg_4] __text:00063B7F mov [esp+8], ecx __text:00063B83 mov eax, [ebp+var_44] __text:00063B86 mov [esp+4], eax __text:00063B8A mov [esp], edi __text:00063B8D call __Z18DrawMenuBackgroundP13OpaqueMenuRefRK4RectS3_thPv ; DrawMenuBackground(OpaqueMenuRef *,Rect const&,Rect const&,ushort,uchar,void *) __text:00063B92 jmp short loc_63BDD __text:00063B94 ; --------------------------------------------------------------------------- __text:00063B94 __text:00063B94 loc_63B94: ; CODE XREF: _PrepareMenuWindow+90j __text:00063B94 mov ecx, [ebp+arg_0] __text:00063B97 mov [esp], ecx __text:00063B9A call _DisposeMenuWindow __text:00063B9F jmp short loc_63BDD __text:00063BA1 ; --------------------------------------------------------------------------- __text:00063BA1 __text:00063BA1 loc_63BA1: ; CODE XREF: _PrepareMenuWindow+195j __text:00063BA1 mov eax, [ebp+arg_0] __text:00063BA4 mov [esp], eax __text:00063BA7 call __Z11FindMBEntryP8MenuData ; FindMBEntry(MenuData *) __text:00063BAC mov ecx, eax __text:00063BAE test eax, eax __text:00063BB0 jz short loc_63BD5 __text:00063BB2 mov word ptr [eax+1Eh], 0 __text:00063BB8 mov word ptr [eax+1Ch], 0 __text:00063BBE mov word ptr [eax+1Ah], 0 __text:00063BC4 mov word ptr [eax+18h], 0 __text:00063BCA mov eax, [eax+18h] __text:00063BCD mov edx, [ecx+1Ch] __text:00063BD0 mov [ecx], eax __text:00063BD2 mov [ecx+4], edx __text:00063BD5 __text:00063BD5 loc_63BD5: ; CODE XREF: _PrepareMenuWindow+209j __text:00063BD5 mov [esp], esi __text:00063BD8 call _DisposeRgn __text:00063BDD __text:00063BDD loc_63BDD: ; CODE XREF: _PrepareMenuWindow+AAj __text:00063BDD ; _PrepareMenuWindow+1BFj ... __text:00063BDD xor eax, eax __text:00063BDF add esp, 5Ch __text:00063BE2 pop ebx __text:00063BE3 pop esi __text:00063BE4 pop edi __text:00063BE5 leave __text:00063BE6 retn __text:00063BE6 _PrepareMenuWindow endp
osx
reverse-engineering
carbon
disassembling
null
null
open
Reversing of _PrepareMenuWindow() subroutine === Can some one help me with reversing of _PrepareMenuWindow() subroutine? I am trying to find the signature of the method. __text:000639A7 _PrepareMenuWindow proc near ; CODE XREF: DrawTheMenu(MenuSelectData *,__CFArray **,uchar,uchar *)+274p __text:000639A7 ; PopUpMenuSelectCore(MenuData *,Point,double,Point,ushort,uint,Rect const*,ushort,ulong,Rect const*,Rect const*,__CFString const*,OpaqueMenuRef **,ushort *)+528p __text:000639A7 __text:000639A7 var_44 = dword ptr -44h __text:000639A7 var_40 = dword ptr -40h __text:000639A7 var_3C = dword ptr -3Ch __text:000639A7 var_34 = dword ptr -34h __text:000639A7 var_30 = dword ptr -30h __text:000639A7 var_2C = dword ptr -2Ch __text:000639A7 var_28 = dword ptr -28h __text:000639A7 var_24 = word ptr -24h __text:000639A7 var_20 = dword ptr -20h __text:000639A7 var_1A = word ptr -1Ah __text:000639A7 arg_0 = dword ptr 8 __text:000639A7 arg_4 = dword ptr 0Ch __text:000639A7 arg_8 = dword ptr 10h __text:000639A7 __text:000639A7 push ebp __text:000639A8 mov ebp, esp __text:000639AA push edi __text:000639AB push esi __text:000639AC push ebx __text:000639AD sub esp, 5Ch __text:000639B0 xor edi, edi __text:000639B2 mov eax, [ebp+arg_0] __text:000639B5 test eax, eax __text:000639B7 jz short loc_639C6 __text:000639B9 mov eax, [ebp+arg_0] __text:000639BC mov [esp], eax __text:000639BF call __ZNK8HIObject13GetEncodedRefEv ; HIObject::GetEncodedRef(void) __text:000639C4 mov edi, eax __text:000639C6 __text:000639C6 loc_639C6: ; CODE XREF: _PrepareMenuWindow+10j __text:000639C6 mov ecx, [ebp+arg_4] __text:000639C9 mov eax, [ecx] __text:000639CB mov edx, [ecx+4] __text:000639CE mov [ebp+var_2C], eax __text:000639D1 mov [ebp+var_28], edx __text:000639D4 lea eax, [ebp+var_1A] __text:000639D7 mov [ebp+var_40], eax __text:000639DA mov [esp+4], eax __text:000639DE mov [esp], edi __text:000639E1 call _GetMenuType __text:000639E6 mov dword ptr [esp+4], 0 __text:000639EE mov [esp], edi __text:000639F1 call _IsMenuItemEnabled __text:000639F6 movzx edx, [ebp+var_1A] __text:000639FA or dh, 1 __text:000639FD test al, al __text:000639FF movzx ebx, [ebp+var_1A] __text:00063A03 cmovz ebx, edx __text:00063A06 mov [ebp+var_1A], bx __text:00063A0A mov eax, [ebp+arg_8] __text:00063A0D mov [esp+0Ch], eax __text:00063A11 lea ecx, [ebp+var_2C] __text:00063A14 mov [ebp+var_44], ecx __text:00063A17 mov [esp+8], ecx __text:00063A1B mov eax, [ebp+arg_4] __text:00063A1E mov [esp+4], eax __text:00063A22 mov [esp], edi __text:00063A25 call __AddOpenMenu __text:00063A2A mov ecx, [ebp+var_44] __text:00063A2D mov [esp], ecx __text:00063A30 call _EmptyRect __text:00063A35 test al, al __text:00063A37 jnz loc_63B94 __text:00063A3D mov [esp], edi __text:00063A40 call __Z11GetMenuDataP13OpaqueMenuRef ; GetMenuData(OpaqueMenuRef *) __text:00063A45 mov [ebp+var_3C], eax __text:00063A48 call _NewRgn __text:00063A4D mov esi, eax __text:00063A4F test eax, eax __text:00063A51 jz loc_63BDD __text:00063A57 movzx ebx, bx __text:00063A5A mov eax, [ebp+var_3C] __text:00063A5D mov eax, [eax+40h] __text:00063A60 test eax, eax __text:00063A62 jnz loc_63B23 __text:00063A68 mov [ebp+var_1A], 0 __text:00063A6E mov eax, [ebp+var_2C] __text:00063A71 mov edx, [ebp+var_28] __text:00063A74 mov [ebp+var_34], eax __text:00063A77 mov [ebp+var_30], edx __text:00063A7A mov ecx, [ebp+var_40] __text:00063A7D mov [esp+10h], ecx __text:00063A81 mov dword ptr [esp+0Ch], 0 __text:00063A89 lea eax, [ebp+var_34] __text:00063A8C mov [esp+8], eax __text:00063A90 mov dword ptr [esp+4], 7 __text:00063A98 mov eax, [ebp+var_3C] __text:00063A9B mov [esp], eax __text:00063A9E call __Z12_CallMenuDefP8MenuDatasP4Rect5PointPs ; _CallMenuDef(MenuData *,short,Rect *,Point,short *) __text:00063AA3 cmp [ebp+var_1A], 7473h __text:00063AA9 jz short loc_63ADC __text:00063AAB add word ptr [ebp+var_2C], 3 __text:00063AB0 mov dword ptr [esp+8], 0FFFFFFFCh __text:00063AB8 mov dword ptr [esp+4], 0FFFFFFFCh __text:00063AC0 mov ecx, [ebp+var_44] __text:00063AC3 mov [esp], ecx __text:00063AC6 call _InsetRect __text:00063ACB mov eax, [ebp+var_44] __text:00063ACE mov [esp+4], eax __text:00063AD2 mov [esp], esi __text:00063AD5 call _RectRgn __text:00063ADA jmp short loc_63B23 __text:00063ADC ; --------------------------------------------------------------------------- __text:00063ADC __text:00063ADC loc_63ADC: ; CODE XREF: _PrepareMenuWindow+102j __text:00063ADC lea eax, [ebp+var_24] __text:00063ADF mov [esp+8], eax __text:00063AE3 lea eax, [ebp+var_20] __text:00063AE6 mov [esp+4], eax __text:00063AEA mov [esp], edi __text:00063AED call __GetMenuCallout __text:00063AF2 movsx eax, [ebp+var_24] __text:00063AF6 mov [esp+10h], eax __text:00063AFA mov eax, [ebp+var_20] __text:00063AFD mov [esp+0Ch], eax __text:00063B01 mov [esp+8], esi __text:00063B05 mov [esp+4], ebx __text:00063B09 mov ecx, [ebp+var_44] __text:00063B0C mov [esp], ecx __text:00063B0F call __GetThemeMenuBackgroundRegionWithCallout __text:00063B14 mov eax, [ebp+var_44] __text:00063B17 mov [esp+4], eax __text:00063B1B mov [esp], esi __text:00063B1E call _GetRegionBounds __text:00063B23 __text:00063B23 loc_63B23: ; CODE XREF: _PrepareMenuWindow+BBj __text:00063B23 ; _PrepareMenuWindow+133j __text:00063B23 mov [esp+0Ch], esi __text:00063B27 mov ecx, [ebp+var_44] __text:00063B2A mov [esp+8], ecx __text:00063B2E mov [esp+4], ebx __text:00063B32 mov [esp], edi __text:00063B35 call __ZL13GetMenuWindowP13OpaqueMenuReftPK4RectP15OpaqueRgnHandle ; GetMenuWindow(OpaqueMenuRef *,ushort,Rect const*,OpaqueRgnHandle *) __text:00063B3A test eax, eax __text:00063B3C jz short loc_63BA1 __text:00063B3E mov [esp], eax __text:00063B41 call _GetWindowPort __text:00063B46 mov [esp], eax __text:00063B49 call _SetPortWrapper __text:00063B4E mov [esp], esi __text:00063B51 call _SetClipWrapper __text:00063B56 mov [esp], esi __text:00063B59 call _DisposeRgn __text:00063B5E mov eax, [ebp+var_3C] __text:00063B61 mov eax, [eax+40h] __text:00063B64 test eax, eax __text:00063B66 jnz short loc_63BDD __text:00063B68 mov dword ptr [esp+14h], 0 __text:00063B70 mov dword ptr [esp+10h], 0 __text:00063B78 mov [esp+0Ch], ebx __text:00063B7C mov ecx, [ebp+arg_4] __text:00063B7F mov [esp+8], ecx __text:00063B83 mov eax, [ebp+var_44] __text:00063B86 mov [esp+4], eax __text:00063B8A mov [esp], edi __text:00063B8D call __Z18DrawMenuBackgroundP13OpaqueMenuRefRK4RectS3_thPv ; DrawMenuBackground(OpaqueMenuRef *,Rect const&,Rect const&,ushort,uchar,void *) __text:00063B92 jmp short loc_63BDD __text:00063B94 ; --------------------------------------------------------------------------- __text:00063B94 __text:00063B94 loc_63B94: ; CODE XREF: _PrepareMenuWindow+90j __text:00063B94 mov ecx, [ebp+arg_0] __text:00063B97 mov [esp], ecx __text:00063B9A call _DisposeMenuWindow __text:00063B9F jmp short loc_63BDD __text:00063BA1 ; --------------------------------------------------------------------------- __text:00063BA1 __text:00063BA1 loc_63BA1: ; CODE XREF: _PrepareMenuWindow+195j __text:00063BA1 mov eax, [ebp+arg_0] __text:00063BA4 mov [esp], eax __text:00063BA7 call __Z11FindMBEntryP8MenuData ; FindMBEntry(MenuData *) __text:00063BAC mov ecx, eax __text:00063BAE test eax, eax __text:00063BB0 jz short loc_63BD5 __text:00063BB2 mov word ptr [eax+1Eh], 0 __text:00063BB8 mov word ptr [eax+1Ch], 0 __text:00063BBE mov word ptr [eax+1Ah], 0 __text:00063BC4 mov word ptr [eax+18h], 0 __text:00063BCA mov eax, [eax+18h] __text:00063BCD mov edx, [ecx+1Ch] __text:00063BD0 mov [ecx], eax __text:00063BD2 mov [ecx+4], edx __text:00063BD5 __text:00063BD5 loc_63BD5: ; CODE XREF: _PrepareMenuWindow+209j __text:00063BD5 mov [esp], esi __text:00063BD8 call _DisposeRgn __text:00063BDD __text:00063BDD loc_63BDD: ; CODE XREF: _PrepareMenuWindow+AAj __text:00063BDD ; _PrepareMenuWindow+1BFj ... __text:00063BDD xor eax, eax __text:00063BDF add esp, 5Ch __text:00063BE2 pop ebx __text:00063BE3 pop esi __text:00063BE4 pop edi __text:00063BE5 leave __text:00063BE6 retn __text:00063BE6 _PrepareMenuWindow endp
0
1,667,264
11/03/2009 13:12:06
50,049
12/30/2008 02:30:04
5,152
339
Quantis QRNG - any reviews?
I am thinking about getting [one of these][1] (PCI) to set up an internal entropy pool similar to [this service][2] who incidentally brought us [fun captcha challenges][3]. Prior to lightening my wallet, I'm hoping to gather feedback from people who may be using this device. As there is no possible 'correct' answer, I am making this CW and tagging it as subjective. I'm undertaking a project to help write Monte Carlo simulations for a [non profit][4] that distributes mosquito nets in Malaria stricken areas. The idea is to model areas to determine the best place to distribute mosquito nets. During development, I expect to consume gigs if not more of the RNG output. We really need our own source. This is not a spamvertisement, I'm helping out of pocket and I really, really want to know if such a large purchase will bear fruit. I can't afford to build a HRNG based on radioactive decay, this looks like the next best thing. Any comments are appreciated. I will earn zero rep for this, please do not vote to close. This is no different than questions regarding the utilization of some branded GPU for some odd purpose. [1]: http://www.idquantique.com/products/quantis.htm [2]: http://random.irb.hr/ [3]: http://random.irb.hr/signup.php [4]: http://nettingnations.org
random
null
null
null
null
08/13/2011 19:30:39
not constructive
Quantis QRNG - any reviews? === I am thinking about getting [one of these][1] (PCI) to set up an internal entropy pool similar to [this service][2] who incidentally brought us [fun captcha challenges][3]. Prior to lightening my wallet, I'm hoping to gather feedback from people who may be using this device. As there is no possible 'correct' answer, I am making this CW and tagging it as subjective. I'm undertaking a project to help write Monte Carlo simulations for a [non profit][4] that distributes mosquito nets in Malaria stricken areas. The idea is to model areas to determine the best place to distribute mosquito nets. During development, I expect to consume gigs if not more of the RNG output. We really need our own source. This is not a spamvertisement, I'm helping out of pocket and I really, really want to know if such a large purchase will bear fruit. I can't afford to build a HRNG based on radioactive decay, this looks like the next best thing. Any comments are appreciated. I will earn zero rep for this, please do not vote to close. This is no different than questions regarding the utilization of some branded GPU for some odd purpose. [1]: http://www.idquantique.com/products/quantis.htm [2]: http://random.irb.hr/ [3]: http://random.irb.hr/signup.php [4]: http://nettingnations.org
4
3,563,575
08/25/2010 07:10:19
460,995
09/28/2009 21:07:20
52
2
Databases for easy comparison
We have an application which has metadata information stored in database (some tables with relations between). The metadata can be edited through web app or directly manipulating values in SQL Server database. **The problem**: metadata changes and needs to be merged between different environments (test, staging, production, etc.). There are tools (e.g. RedGate) that help but it is still quite a lot of work to compare databases if autogenerated ID's are being used (as it is now in our DB, and yes, one way is to use natural keys to make comparison easier). However, our metadata may be stored not necessarily in SQL database - it could be stored as documents in NOSQL databases (MongoDB, CouchDB, RavenDB) or even simple XML databases (maybe Berkeley DB XML?). Storing as XML file seems would work (as it easier to compare and merge files rather than databases) but may not be a good option as there needs to some concurrency mechanisms, some degree of transaction support. We do not need replication to other servers, there is no need for high availability, etc. The requirements to store data: - some kind of ACID - Should run on Windows - Easy comparison (bi-directional sync) - (optional) GUI to see what is in database - (optional) export to file (JSON, XML) What are the options?
database
synchronization
nosql
null
null
null
open
Databases for easy comparison === We have an application which has metadata information stored in database (some tables with relations between). The metadata can be edited through web app or directly manipulating values in SQL Server database. **The problem**: metadata changes and needs to be merged between different environments (test, staging, production, etc.). There are tools (e.g. RedGate) that help but it is still quite a lot of work to compare databases if autogenerated ID's are being used (as it is now in our DB, and yes, one way is to use natural keys to make comparison easier). However, our metadata may be stored not necessarily in SQL database - it could be stored as documents in NOSQL databases (MongoDB, CouchDB, RavenDB) or even simple XML databases (maybe Berkeley DB XML?). Storing as XML file seems would work (as it easier to compare and merge files rather than databases) but may not be a good option as there needs to some concurrency mechanisms, some degree of transaction support. We do not need replication to other servers, there is no need for high availability, etc. The requirements to store data: - some kind of ACID - Should run on Windows - Easy comparison (bi-directional sync) - (optional) GUI to see what is in database - (optional) export to file (JSON, XML) What are the options?
0
1,756,722
11/18/2009 15:19:25
13,995
09/16/2008 21:39:17
604
40
How to improve Clojures error messages
I've been playing a bit with Clojure and so far is fairly impressed, but one thing that I keep running into is wierd error messages from Clojure. This comes in two forms: Java errors, like null pointer exceptions and in clojure syntax errors, like missing parenthesis. I was wondering if anyone know of a way to get better error messages? Part of it is of course from learning a new language, but improving the error messages can never hurt :)
clojure
null
null
null
null
null
open
How to improve Clojures error messages === I've been playing a bit with Clojure and so far is fairly impressed, but one thing that I keep running into is wierd error messages from Clojure. This comes in two forms: Java errors, like null pointer exceptions and in clojure syntax errors, like missing parenthesis. I was wondering if anyone know of a way to get better error messages? Part of it is of course from learning a new language, but improving the error messages can never hurt :)
0
9,942,028
03/30/2012 11:25:50
991,788
10/12/2011 15:59:26
693
34
Adding images and text to an old Excel game
I wanted to update an old VBA Excel application with new images. The application can be found at https://sourceforge.net/projects/shag/. I figured out how to update the images: by tediously selecting each of the 64 images and selecting 'change picture' in the Game sheet. But when I change the name in the Data sheet and then click on that name in the Match sheet I get an error saying that "the item with the specified name wasn't found". Any idea how I might fix this? Thanks, Sachin
excel
vba
null
null
null
05/03/2012 19:51:21
not a real question
Adding images and text to an old Excel game === I wanted to update an old VBA Excel application with new images. The application can be found at https://sourceforge.net/projects/shag/. I figured out how to update the images: by tediously selecting each of the 64 images and selecting 'change picture' in the Game sheet. But when I change the name in the Data sheet and then click on that name in the Match sheet I get an error saying that "the item with the specified name wasn't found". Any idea how I might fix this? Thanks, Sachin
1
638,867
03/12/2009 14:30:33
48,127
12/21/2008 12:30:42
33
1
Considerations in building a Secure string type
I have begun building a secure string type - which i call [SecureStringV2][1] - to extend the existing SecureString type in the .Net framework. This new type is going to add some basic functionality (checking for equality, comparing etc) to the existing type but still maintain the security provided by the SecureString type, that is clear everything out of memory after the types' use. I plan to achieve these features using the Marshal class and hash algorithms. Pointers on how to get this done and done right would be appreciated. Does any of you see any problems with my ideas of implementing this? Thank you :) [1]: http://gogoled.blogspot.com/2009/03/securestringv2.html
securestring
null
null
null
null
null
open
Considerations in building a Secure string type === I have begun building a secure string type - which i call [SecureStringV2][1] - to extend the existing SecureString type in the .Net framework. This new type is going to add some basic functionality (checking for equality, comparing etc) to the existing type but still maintain the security provided by the SecureString type, that is clear everything out of memory after the types' use. I plan to achieve these features using the Marshal class and hash algorithms. Pointers on how to get this done and done right would be appreciated. Does any of you see any problems with my ideas of implementing this? Thank you :) [1]: http://gogoled.blogspot.com/2009/03/securestringv2.html
0
800,219
04/28/2009 23:05:13
97,406
04/28/2009 22:40:51
1
0
Qt vs WPF/.NET
My company is trying to make the decision between using Qt/C++ for our GUI framework or migrating to .NET and using WPF. We have up to this point been using MFC. It seems that .NET/WPF is technically the most advanced and feature-rich platform. I do, however, have several concerns. These include: - Platform support - Framework longevity (i.e. future-proofing) - Performance and overhead For this application we are willing to sacrifice support for Windows 2000, Macs, and Linux. But, the issue is more related to Microsoft's commitment to the framework and their extant platforms. It seems like Microsoft has a bad habit of coming up with something new, hyping it for a few years, and then relegating it to the waste-bin essentially abandoning the developers who chose it. First it was MFC and VB6, then Windows Forms, and now there's WPF. Also with .NET, versions of Windows were progressively nicked off the support list. Looks like WPF could be here to stay for a while, but since its not open source its really in Microsoft's hands. I'm also concerned about the overhead and performance of WPF since some of our applications involve processing large amounts of information and doing real-time data capture. Qt seems like a really good option, but it doesn't have all the features of WPF/.NET couldn't use languages like C#. Basically, what does the community think about Microsoft's commitment to WPF compared with previous frameworks? Are the performance considerations significant enough to avoid using it for a realtime app? And, how significant are the benefits of WPF/.NET in terms of productivity and features compared to Qt?
qt
wpf
.net
mfc
c++
12/01/2011 14:49:12
not constructive
Qt vs WPF/.NET === My company is trying to make the decision between using Qt/C++ for our GUI framework or migrating to .NET and using WPF. We have up to this point been using MFC. It seems that .NET/WPF is technically the most advanced and feature-rich platform. I do, however, have several concerns. These include: - Platform support - Framework longevity (i.e. future-proofing) - Performance and overhead For this application we are willing to sacrifice support for Windows 2000, Macs, and Linux. But, the issue is more related to Microsoft's commitment to the framework and their extant platforms. It seems like Microsoft has a bad habit of coming up with something new, hyping it for a few years, and then relegating it to the waste-bin essentially abandoning the developers who chose it. First it was MFC and VB6, then Windows Forms, and now there's WPF. Also with .NET, versions of Windows were progressively nicked off the support list. Looks like WPF could be here to stay for a while, but since its not open source its really in Microsoft's hands. I'm also concerned about the overhead and performance of WPF since some of our applications involve processing large amounts of information and doing real-time data capture. Qt seems like a really good option, but it doesn't have all the features of WPF/.NET couldn't use languages like C#. Basically, what does the community think about Microsoft's commitment to WPF compared with previous frameworks? Are the performance considerations significant enough to avoid using it for a realtime app? And, how significant are the benefits of WPF/.NET in terms of productivity and features compared to Qt?
4
11,374,176
07/07/2012 10:23:50
1,280,753
03/20/2012 11:26:00
68
1
Android: How can View as Observer cleverly treat variables from Observed Models?
I want to implement an MVP-like pattern on my Android app, and in my own pattern, View is an Activity and it is notified by Models of their member variables being changed. **My abstract Model**. public abstract class Model extends Observable {} **My implemented Model**. I add `notifyObservers()` to every `setBlah()` methods, even if it looks repetitive, since by doing so, I could easily prevent some variables that View doesn't need from being notified of. In this case, notDisplay is such variable. public class ExModel extends Model { protected int i; protected String s; protected double notDisplay; public void setI(int i) { this.i = i; this.setChanged(); this.notifyObservers(i); } public void setS(String s) { this.s = s; this.setChanged(); this.notifyObservers(s); } public void setNotDisplay(double notDisplay) { this.notDisplay = notDisplay; } } **My Activity aka View**. public class AndroidMVPActivity extends Activity implements Observer { protected Presenter p; protected TextView txtI; protected TextView txtS; protected TextView txtD; public AndroidMVPActivity() { // call a Presenter. } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.main); // I know within onCreate isn't the best place to findViews, // and it should be an interface called by a Presenter. txtI = (TextView) this.findViewById(R.id.txtI); txtS = (TextView) this.findViewById(R.id.txtS); txtD = (TextView) this.findViewById(R.id.txtD); } @Override public void update(Observable observable, Object data) { // HERE IS WHERE MY ISSUE ARISES. // I want to write something like... // viewInstance.setText(observable.date); // but... } } I guess my Presenter is omittable, unless we go in a more P-central MVP pattern (I mean, when Model is updated, it notifies Presenter which later notifies View). At least 99 percent of what I want to View do by the `update()` method is `TextView.setText()`, so the class I'd want to cast the Observable instance is clear. TextView, that is. But how could we specify instances? (in this case, how to refer to txtI or txtS?). Is there any clever way?
android
mvp
observer-pattern
null
null
null
open
Android: How can View as Observer cleverly treat variables from Observed Models? === I want to implement an MVP-like pattern on my Android app, and in my own pattern, View is an Activity and it is notified by Models of their member variables being changed. **My abstract Model**. public abstract class Model extends Observable {} **My implemented Model**. I add `notifyObservers()` to every `setBlah()` methods, even if it looks repetitive, since by doing so, I could easily prevent some variables that View doesn't need from being notified of. In this case, notDisplay is such variable. public class ExModel extends Model { protected int i; protected String s; protected double notDisplay; public void setI(int i) { this.i = i; this.setChanged(); this.notifyObservers(i); } public void setS(String s) { this.s = s; this.setChanged(); this.notifyObservers(s); } public void setNotDisplay(double notDisplay) { this.notDisplay = notDisplay; } } **My Activity aka View**. public class AndroidMVPActivity extends Activity implements Observer { protected Presenter p; protected TextView txtI; protected TextView txtS; protected TextView txtD; public AndroidMVPActivity() { // call a Presenter. } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.main); // I know within onCreate isn't the best place to findViews, // and it should be an interface called by a Presenter. txtI = (TextView) this.findViewById(R.id.txtI); txtS = (TextView) this.findViewById(R.id.txtS); txtD = (TextView) this.findViewById(R.id.txtD); } @Override public void update(Observable observable, Object data) { // HERE IS WHERE MY ISSUE ARISES. // I want to write something like... // viewInstance.setText(observable.date); // but... } } I guess my Presenter is omittable, unless we go in a more P-central MVP pattern (I mean, when Model is updated, it notifies Presenter which later notifies View). At least 99 percent of what I want to View do by the `update()` method is `TextView.setText()`, so the class I'd want to cast the Observable instance is clear. TextView, that is. But how could we specify instances? (in this case, how to refer to txtI or txtS?). Is there any clever way?
0
8,566,840
12/19/2011 20:02:32
1,015,002
10/26/2011 16:25:20
49
1
Building a menu in Android
I'm writing an Android application that needs a menu like this: ![enter image description here][1] [1]: http://i.stack.imgur.com/ZY76K.png Please note, this activity has a background and 4 menu items, where each menu item has two parts: Bottom text that should be aligned to left and Right text that should be aligned to right. Would you please tell me how I can implement it? Should I use LinearLayout for each menu item? Thanks for your help.
android
menu
null
null
null
05/08/2012 12:51:34
not a real question
Building a menu in Android === I'm writing an Android application that needs a menu like this: ![enter image description here][1] [1]: http://i.stack.imgur.com/ZY76K.png Please note, this activity has a background and 4 menu items, where each menu item has two parts: Bottom text that should be aligned to left and Right text that should be aligned to right. Would you please tell me how I can implement it? Should I use LinearLayout for each menu item? Thanks for your help.
1
7,548,303
09/25/2011 20:15:23
330,604
05/01/2010 23:33:50
521
32
Running a query using ADODB Connection randomly takes a long time to execute
I have come across an issue that seems to be somehow connected to a web server configuration, and resulting in queries randomly taking a long time to execute. The application is created using old plain Classic ASP and ADODB Connection is used. The scenario goes as follows: - there is a single connection opened in a script at the beginning of processing each HTTP request - this connection is used to execute a query against a SQL Server, that resides on a separate box. conn.Execute is used. Connection is NOT closed afterwards - there are usually a few to a few dozens of conn.Execute in a single ASP page All has been working well until recently, when some of the conn.Execute started to take much longer to execute, totally on random. - the difference is e.g. 15ms normal execution time vs. 2000ms long execution time - on the SQL Server side, Profiler does not show longer query execution times, so there must be something blocking the conn.Execute request When a proper practice of closing a connection after each conn.Execute has been implemented, the issue goes away. However, as I have stated before, all has been working flawlessly until recently. This web app is a fairly large one and rewriting it to close and reopen connections properly will take some time. And I need a short-term solution. My guess is that it could have something to do with the connection pool size, however this is not ADO.NET, therefore I am not sure, whether a connection pool issue should be taken into the consideration at all. On the SQL Server side, there is no limit on the number of concurrent connections to the server. I need some hints. Brainstorming possible ideas.
sql-server
asp-classic
adodb
null
null
null
open
Running a query using ADODB Connection randomly takes a long time to execute === I have come across an issue that seems to be somehow connected to a web server configuration, and resulting in queries randomly taking a long time to execute. The application is created using old plain Classic ASP and ADODB Connection is used. The scenario goes as follows: - there is a single connection opened in a script at the beginning of processing each HTTP request - this connection is used to execute a query against a SQL Server, that resides on a separate box. conn.Execute is used. Connection is NOT closed afterwards - there are usually a few to a few dozens of conn.Execute in a single ASP page All has been working well until recently, when some of the conn.Execute started to take much longer to execute, totally on random. - the difference is e.g. 15ms normal execution time vs. 2000ms long execution time - on the SQL Server side, Profiler does not show longer query execution times, so there must be something blocking the conn.Execute request When a proper practice of closing a connection after each conn.Execute has been implemented, the issue goes away. However, as I have stated before, all has been working flawlessly until recently. This web app is a fairly large one and rewriting it to close and reopen connections properly will take some time. And I need a short-term solution. My guess is that it could have something to do with the connection pool size, however this is not ADO.NET, therefore I am not sure, whether a connection pool issue should be taken into the consideration at all. On the SQL Server side, there is no limit on the number of concurrent connections to the server. I need some hints. Brainstorming possible ideas.
0
714,323
04/03/2009 15:03:15
75,882
03/09/2009 22:49:24
50
1
I want to attach an event to a link dynamically.. But the onclick attach didnt work.
So I'm coding a Greasemonkey script for this website.. Anyway, my problem is I can't attach the onclick event into my newly created anchor. I don't know what's wrong, maybe because I'm in Greasemonkey thats why It didn't work as expected? function createButton() { var a = document.createElement('a'); var css = document.createElement('style'); css.type = 'text/css'; css.innerHTML = '#prt { position:absolute; right:3em; top: 6em; font-family: Arial,Helvetica,sans-serif; font-weight:bold; font-size:125%; background: #777777 none repeat scroll 0 0; color: white; padding: 6px 12px;}' a.href = '#'; a.innerHTML = 'Print Topic'; a.id = 'prt'; a.onclick = getTopic; // DOESN'T WORK document.body.insertBefore(a, document.body.lastChild); document.body.appendChild(css); } I tried the other technique like setAttribute a.setAttribute('onclick', function() { alert("hey"); }); setAttribute also didn't work.. How come??
greasemonkey
javascript
null
null
null
null
open
I want to attach an event to a link dynamically.. But the onclick attach didnt work. === So I'm coding a Greasemonkey script for this website.. Anyway, my problem is I can't attach the onclick event into my newly created anchor. I don't know what's wrong, maybe because I'm in Greasemonkey thats why It didn't work as expected? function createButton() { var a = document.createElement('a'); var css = document.createElement('style'); css.type = 'text/css'; css.innerHTML = '#prt { position:absolute; right:3em; top: 6em; font-family: Arial,Helvetica,sans-serif; font-weight:bold; font-size:125%; background: #777777 none repeat scroll 0 0; color: white; padding: 6px 12px;}' a.href = '#'; a.innerHTML = 'Print Topic'; a.id = 'prt'; a.onclick = getTopic; // DOESN'T WORK document.body.insertBefore(a, document.body.lastChild); document.body.appendChild(css); } I tried the other technique like setAttribute a.setAttribute('onclick', function() { alert("hey"); }); setAttribute also didn't work.. How come??
0
6,800,016
07/23/2011 11:17:16
859,238
07/23/2011 11:17:16
1
0
Please help? programming language based on the common purpose
I'm Currently a PHP programmer, and I want to learn some new and challenging(And worth) language And two guys comes to mind, Java, And C++( Or the C Family ) But, I need to know the common purpose of the language, and ( Please forgive me as I am confused of how to show my point clearly ) I mean, What's basically / COMMONLY people use Java For, like maybe game programming, Or is it Mobile programming, and C++ or C# respectively. So that I can have a grasp of what to choose as my new hobby :) Thanks
c#
java
c++
c
null
07/23/2011 11:21:25
not constructive
Please help? programming language based on the common purpose === I'm Currently a PHP programmer, and I want to learn some new and challenging(And worth) language And two guys comes to mind, Java, And C++( Or the C Family ) But, I need to know the common purpose of the language, and ( Please forgive me as I am confused of how to show my point clearly ) I mean, What's basically / COMMONLY people use Java For, like maybe game programming, Or is it Mobile programming, and C++ or C# respectively. So that I can have a grasp of what to choose as my new hobby :) Thanks
4
11,518,112
07/17/2012 07:46:26
1,493,974
07/01/2012 07:20:07
3
0
Need a php function
I have a string with some word separated by (,) like this <br> word1, word2,word3,word5, word5 I need a php function which take this string as a argument and output all of them as a link separated by (,) like this <br> <a href="?s=word1">word1</a>,<a href="?s=word2">word2</a>, <a href="?s=word3">word3</a>,<a href="?s=word4">word4</a>,<a href="?s=word5">word5</a> Please someone help me to do that ...
php
null
null
null
null
07/17/2012 07:50:32
not a real question
Need a php function === I have a string with some word separated by (,) like this <br> word1, word2,word3,word5, word5 I need a php function which take this string as a argument and output all of them as a link separated by (,) like this <br> <a href="?s=word1">word1</a>,<a href="?s=word2">word2</a>, <a href="?s=word3">word3</a>,<a href="?s=word4">word4</a>,<a href="?s=word5">word5</a> Please someone help me to do that ...
1
9,147,247
02/05/2012 05:55:52
840,629
07/12/2011 11:49:27
36
7
Design of online folder system
Which will be the best design of an online folder system?</br> Use case is like this.</br> User can upload a folder(.zip as folder upload is not supported). Then he can add more files/folder or remove some files/folder. Will it be a good design if i do this by copying directly to the server file system(am concerned of possible perfomance issue, though this approach is the simplest one). Or should i save the files into the DB? If DB is the case, which is the best design for this? Note im using mysql, servlets and glass fish for the development
java
mysql
java-ee
tomcat
servlets
02/07/2012 09:46:06
not constructive
Design of online folder system === Which will be the best design of an online folder system?</br> Use case is like this.</br> User can upload a folder(.zip as folder upload is not supported). Then he can add more files/folder or remove some files/folder. Will it be a good design if i do this by copying directly to the server file system(am concerned of possible perfomance issue, though this approach is the simplest one). Or should i save the files into the DB? If DB is the case, which is the best design for this? Note im using mysql, servlets and glass fish for the development
4
7,624,127
10/02/2011 01:47:27
950,907
09/18/2011 04:40:10
104
6
Finding the owner and group of a file (as a string)
I am trying to get a C string of the owner and group of a file, After I do a `stat()` I get the user ID and group ID, but how do I get the name?
c
linux
null
null
null
null
open
Finding the owner and group of a file (as a string) === I am trying to get a C string of the owner and group of a file, After I do a `stat()` I get the user ID and group ID, but how do I get the name?
0
11,163,861
06/22/2012 20:45:01
1,361,315
04/27/2012 14:12:23
109
0
How to create a simple json result set?
I want to return a simple json result, something like: { 12323: true } Or if I can't have a boolean value, then 1 or 0. My spring controller is like: @ReqeustMapping("/getResultFor") @ResponseBody public String getResultForXXXX(HttpServletRequest request, ...) { userId = 123; bool isSaved = true; // ????????? create object and convert to json // return someJson; } So I have my userId and bool variable, I need to wrap in in a structure and convert that to json. I don't want to create a new class/type for this structure (preferrably).
java
json
spring
spring-mvc
null
null
open
How to create a simple json result set? === I want to return a simple json result, something like: { 12323: true } Or if I can't have a boolean value, then 1 or 0. My spring controller is like: @ReqeustMapping("/getResultFor") @ResponseBody public String getResultForXXXX(HttpServletRequest request, ...) { userId = 123; bool isSaved = true; // ????????? create object and convert to json // return someJson; } So I have my userId and bool variable, I need to wrap in in a structure and convert that to json. I don't want to create a new class/type for this structure (preferrably).
0
6,557,024
07/02/2011 12:37:48
578,272
01/17/2011 08:49:22
91
5
creating social commerce site with Play! or Icefaces?or JVM based language?
i want to build a social commerce site who can manage customers and buyers can meet their need and can do transaction in that site..i want to create it using java,but i confuse about framework i want to use.. in fact i have using icefaces but,you know,not a lightweight one,but i the component is so good,.. how about play farmework,they say play! is good and fast and lightweight,but is good enough to handle large users and the security? or maybe a jvm based language,like scala or clojure,is that good? iam sorry,but i kind of confuse about this thing..thanks for your response and sorry for my bad english..thanks..
e-commerce
social-networking
playframework
icefaces
null
07/04/2011 01:46:20
not constructive
creating social commerce site with Play! or Icefaces?or JVM based language? === i want to build a social commerce site who can manage customers and buyers can meet their need and can do transaction in that site..i want to create it using java,but i confuse about framework i want to use.. in fact i have using icefaces but,you know,not a lightweight one,but i the component is so good,.. how about play farmework,they say play! is good and fast and lightweight,but is good enough to handle large users and the security? or maybe a jvm based language,like scala or clojure,is that good? iam sorry,but i kind of confuse about this thing..thanks for your response and sorry for my bad english..thanks..
4
1,010,665
06/18/2009 03:39:46
108,308
05/17/2009 03:08:35
45
0
report page setup problem?
select * from ........ this query out put are sn id name fatherName 1 1 A Asssss 2 2 B ABssss 3 3 C ABCsss 4 4 D ABCDss show **RDLC** report on basis of SN .Each SN print on each page. After print on row information rest of page must be blank...... like : > page 1 `1 1 A Asssss` rest of page blank > page 2 2 2 B ABssss` all are same as.....i have four **SN** so i must get the four page and each page just have one row information........which property or which condition help me to do?
rdlc
null
null
null
null
null
open
report page setup problem? === select * from ........ this query out put are sn id name fatherName 1 1 A Asssss 2 2 B ABssss 3 3 C ABCsss 4 4 D ABCDss show **RDLC** report on basis of SN .Each SN print on each page. After print on row information rest of page must be blank...... like : > page 1 `1 1 A Asssss` rest of page blank > page 2 2 2 B ABssss` all are same as.....i have four **SN** so i must get the four page and each page just have one row information........which property or which condition help me to do?
0
7,922,804
10/27/2011 21:42:58
1,017,371
10/27/2011 21:30:11
1
0
code challenge questions for a game during lunch
So, I will be hosting a lunch and I am looking for an interesting activity. I remember having seen a google tech talk video that, in the beginning, had a series of "what will this code do" puzzles in c or c++, and I thought it would be a good idea to do something similar. Do you know which that video was, as I cannot find it again? Do you know of any site from which I could get some puzzles like that? I would prefer if they were in C/C++ Thanks :)
c++
c
puzzle
null
null
10/28/2011 02:06:40
too localized
code challenge questions for a game during lunch === So, I will be hosting a lunch and I am looking for an interesting activity. I remember having seen a google tech talk video that, in the beginning, had a series of "what will this code do" puzzles in c or c++, and I thought it would be a good idea to do something similar. Do you know which that video was, as I cannot find it again? Do you know of any site from which I could get some puzzles like that? I would prefer if they were in C/C++ Thanks :)
3
3,682,813
09/10/2010 07:10:48
444,102
09/10/2010 07:10:48
1
0
Partial Screen Capture using C#
I need to create an application in C# that captures part of the screen when certain part of the same screen changes. Thank you all.
screenshot
c#-to-vb.net
null
null
null
null
open
Partial Screen Capture using C# === I need to create an application in C# that captures part of the screen when certain part of the same screen changes. Thank you all.
0
5,198,551
03/04/2011 19:52:25
645,342
03/04/2011 19:50:34
1
0
Java package naming scheme: Is the TLD really that important?
Is it just me, or is the TLD in the Java package naming convention pretty extraneous? I mean, if you -did- have namespace collision between `com.example.package` and `org.example.package`, without the TLD, then with the TLD you have confusion anyway. Why trade-off confusion for namespace collision? Surely the compiler spitting out an error/warning is better than it prancing merrily along trying to compile a program someone imported the wrong package for? Just my two cents on the convention. Frankly you're not really going to have namespace collision between org. and com. anyway as it's pretty unlikely two identically-named java packages are going to be written by two companies with the same domain but different tlds.
java
namespaces
tld
null
null
03/05/2011 02:22:05
not constructive
Java package naming scheme: Is the TLD really that important? === Is it just me, or is the TLD in the Java package naming convention pretty extraneous? I mean, if you -did- have namespace collision between `com.example.package` and `org.example.package`, without the TLD, then with the TLD you have confusion anyway. Why trade-off confusion for namespace collision? Surely the compiler spitting out an error/warning is better than it prancing merrily along trying to compile a program someone imported the wrong package for? Just my two cents on the convention. Frankly you're not really going to have namespace collision between org. and com. anyway as it's pretty unlikely two identically-named java packages are going to be written by two companies with the same domain but different tlds.
4
10,974,371
06/11/2012 04:00:17
833,139
07/07/2011 08:30:15
576
2
creating half star rating in ASP.NET
I'm using C#,VS2010 to develop my ASP.NET web app, I want to create a rating system in which user can select his rate by stars, something like AjaxControlToolkit rating, I've used this control, but is there any way that user can select half stars? for instance I have 5 stars and user can select 0.5, 1, 1.5, 2 and ... up to 5? what about telerik or other custom controls? I'm looking for the ability to select and display half stars, is it possible? I've seen several sites that display half stars in addition to stars
asp.net
rating
null
null
null
null
open
creating half star rating in ASP.NET === I'm using C#,VS2010 to develop my ASP.NET web app, I want to create a rating system in which user can select his rate by stars, something like AjaxControlToolkit rating, I've used this control, but is there any way that user can select half stars? for instance I have 5 stars and user can select 0.5, 1, 1.5, 2 and ... up to 5? what about telerik or other custom controls? I'm looking for the ability to select and display half stars, is it possible? I've seen several sites that display half stars in addition to stars
0
4,142,471
11/10/2010 08:24:40
502,930
11/10/2010 08:24:40
1
0
CSS multi-level dropdown menu positioning
I am developing a website [link text][1] with 3-level dropdown menus (main, and 2 sublevels). I'm developing with MODx cms and Wayfinder for menu-creation. The CSS is picked somewhere, higly modified and works, but I do not understand 1 detail. When you look to the site's menu: rightmost main-menu item ("**links**") --> **Links 1.2** , the 2nd level submenu of "**Links 1.2**" nicely pops up to the left of the 1st level submenu (inside the lighter contentbody. The 2nd level submenus are positioned by a "**Left: 120px** (1 item width): which offsets it and shifts it to the right. See e.g. "beeld & geluid" --> "Audio" --> 2nd level submenu For this rightmost submenu popping up inside the content it works by **shifting it to the left** by using a negative offset: **Left: -240px;** (which is the width of **2** items) What I miss is: why this negative offset has to be 240px 2 items in stead of 1 item of 120px. The last is what I expected. The CSS contains comments and the involved lines are 155 -161 in the css-file (you have to get it from the site since as a new user I'm unable to add a 2nd link because new users are limited to 1 link at max) Question: Can anyone explain this to me? The negative offset of 2 in stead of 1 item? Best regards, Hans Troost [1]: http://www.janwillemtroost.nl/dev "development site"
css
menu
drop-down-menu
positioning
null
null
open
CSS multi-level dropdown menu positioning === I am developing a website [link text][1] with 3-level dropdown menus (main, and 2 sublevels). I'm developing with MODx cms and Wayfinder for menu-creation. The CSS is picked somewhere, higly modified and works, but I do not understand 1 detail. When you look to the site's menu: rightmost main-menu item ("**links**") --> **Links 1.2** , the 2nd level submenu of "**Links 1.2**" nicely pops up to the left of the 1st level submenu (inside the lighter contentbody. The 2nd level submenus are positioned by a "**Left: 120px** (1 item width): which offsets it and shifts it to the right. See e.g. "beeld & geluid" --> "Audio" --> 2nd level submenu For this rightmost submenu popping up inside the content it works by **shifting it to the left** by using a negative offset: **Left: -240px;** (which is the width of **2** items) What I miss is: why this negative offset has to be 240px 2 items in stead of 1 item of 120px. The last is what I expected. The CSS contains comments and the involved lines are 155 -161 in the css-file (you have to get it from the site since as a new user I'm unable to add a 2nd link because new users are limited to 1 link at max) Question: Can anyone explain this to me? The negative offset of 2 in stead of 1 item? Best regards, Hans Troost [1]: http://www.janwillemtroost.nl/dev "development site"
0
6,257,620
06/06/2011 20:26:20
405,658
07/29/2010 12:28:12
63
1
How to obtain self-updating prices of oil in excel 2007?
I would love to have actual oil price in one of my excel spreadsheet cell. How can i make such self-actualizing creation? Best wishes all
excel
null
null
null
null
06/06/2011 21:22:03
off topic
How to obtain self-updating prices of oil in excel 2007? === I would love to have actual oil price in one of my excel spreadsheet cell. How can i make such self-actualizing creation? Best wishes all
2
10,700,107
05/22/2012 10:20:16
846,381
07/15/2011 11:44:38
160
1
Encypt Mac Folder to CDROM for use with windows
I have been trying to work out how this is possible to very little avail. I'm on MAC OS X Lion and needing to encrpyt CD-R for windows user. All I want to do is encrypt a folder containing important website files to CD-R so that I can safely send the files via the post on a CD.
osx
encryption
osx-lion
null
null
05/22/2012 13:33:18
off topic
Encypt Mac Folder to CDROM for use with windows === I have been trying to work out how this is possible to very little avail. I'm on MAC OS X Lion and needing to encrpyt CD-R for windows user. All I want to do is encrypt a folder containing important website files to CD-R so that I can safely send the files via the post on a CD.
2
5,586,049
04/07/2011 18:51:11
697,390
04/07/2011 18:39:43
1
0
I want to create a image slider that automaticly slides all similar images in a folder
Let's say I have a bunch of images with date based file names like these: url/images/top20110326.png url/images/top20110327.png url/images/top20110328.png url/images/top20110329.png url/images/top20110330.png url/images/top20110331.png url/images/top20110401.png url/images/top20110402.png I would like to find some type of code or tool or plugin that would give me these functions: 1. automatically loads the images given all the url addresses of the images. 2. give the user a slider to quickly slide through the images in the order of the dates 3. give the user an option to automatically slide the images (without any effect, simply replace one with the other). Preferably with adjustable speeds. 4. the box that display the image's size should be adjustable in the code, and the image should resize or stretch to fit the box if needed. PS: the server is a PHP server
php
javascript
ajax
image
slider
04/08/2011 09:15:20
off topic
I want to create a image slider that automaticly slides all similar images in a folder === Let's say I have a bunch of images with date based file names like these: url/images/top20110326.png url/images/top20110327.png url/images/top20110328.png url/images/top20110329.png url/images/top20110330.png url/images/top20110331.png url/images/top20110401.png url/images/top20110402.png I would like to find some type of code or tool or plugin that would give me these functions: 1. automatically loads the images given all the url addresses of the images. 2. give the user a slider to quickly slide through the images in the order of the dates 3. give the user an option to automatically slide the images (without any effect, simply replace one with the other). Preferably with adjustable speeds. 4. the box that display the image's size should be adjustable in the code, and the image should resize or stretch to fit the box if needed. PS: the server is a PHP server
2
2,821,412
05/12/2010 17:52:02
334,369
05/06/2010 11:37:11
130
3
give css for for <div> , it should be dispayed 90% of width in any size of monitor
give css for for div , it should be occupy 90% of screen in any size of monitor
css
null
null
null
null
null
open
give css for for <div> , it should be dispayed 90% of width in any size of monitor === give css for for div , it should be occupy 90% of screen in any size of monitor
0
9,025,741
01/26/2012 21:37:47
1,172,260
01/26/2012 21:23:55
1
0
Python error No JSON object could be decoded
Windows 7 - Python26 - IDLE - Android SDK - Hello World AVD for the host emulator loaded import android droid = android.Android() droid.makeToast("ssssssss") Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> droid.makeToast("ssssssss") File "C:\Python26\android.py", line 58, in rpc_call return self._rpc(name, *args) File "C:\Python26\android.py", line 49, in _rpc result = json.loads(response) File "C:\Python26\lib\json\__init__.py", line 307, in loads return _default_decoder.decode(s) File "C:\Python26\lib\json\decoder.py", line 319, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python26\lib\json\decoder.py", line 338, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Have looked everywhere to find an answer to this. Anybody know what is causing this?
android
python
null
null
null
01/27/2012 22:16:14
not a real question
Python error No JSON object could be decoded === Windows 7 - Python26 - IDLE - Android SDK - Hello World AVD for the host emulator loaded import android droid = android.Android() droid.makeToast("ssssssss") Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> droid.makeToast("ssssssss") File "C:\Python26\android.py", line 58, in rpc_call return self._rpc(name, *args) File "C:\Python26\android.py", line 49, in _rpc result = json.loads(response) File "C:\Python26\lib\json\__init__.py", line 307, in loads return _default_decoder.decode(s) File "C:\Python26\lib\json\decoder.py", line 319, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python26\lib\json\decoder.py", line 338, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Have looked everywhere to find an answer to this. Anybody know what is causing this?
1
7,484,475
09/20/2011 11:38:45
643,095
03/03/2011 13:53:06
16
0
Interesting Algorithm
I have a problem of this kind: there are objects, or just elements of the array with the parameter, in this case weight. And there is a box or container that can hold a certain amount of weight. I need to find the optimal path, which would place the items in the container. I mean, fill it out completely, or as much as possible. Please help with the implementation of such an algorithm. for example: elements with weight - 15, 10, 8, 7, 6, 3 a box can contain a 20kg. So I should use the 10, 7 and 3, not 15 and 3, or not a 1-, 6 and 3.
c++
algorithm
null
null
null
09/20/2011 11:58:04
not a real question
Interesting Algorithm === I have a problem of this kind: there are objects, or just elements of the array with the parameter, in this case weight. And there is a box or container that can hold a certain amount of weight. I need to find the optimal path, which would place the items in the container. I mean, fill it out completely, or as much as possible. Please help with the implementation of such an algorithm. for example: elements with weight - 15, 10, 8, 7, 6, 3 a box can contain a 20kg. So I should use the 10, 7 and 3, not 15 and 3, or not a 1-, 6 and 3.
1
5,545,762
04/05/2011 00:12:07
692,016
04/05/2011 00:12:07
1
0
Can someone get this MD5 decrypted please?
This is the md5 a774e81975a7d369f7591e8a9a903fc1 THANKS!
md5
null
null
null
null
04/05/2011 00:41:13
too localized
Can someone get this MD5 decrypted please? === This is the md5 a774e81975a7d369f7591e8a9a903fc1 THANKS!
3
5,745,945
04/21/2011 15:04:48
702,656
04/11/2011 17:51:27
28
5
metrics for algorithms
Can anyone provide a complete list of metrics for rating an algorithm? For example, my list starts with: - elegance - readability - computational efficiency - space efficiency - correctness This list is not in order and my suspicion is that it isn't near complete. Can anyone provide a more complete list?
performance
complexity
metrics
code-elegance
null
04/30/2012 20:05:56
not constructive
metrics for algorithms === Can anyone provide a complete list of metrics for rating an algorithm? For example, my list starts with: - elegance - readability - computational efficiency - space efficiency - correctness This list is not in order and my suspicion is that it isn't near complete. Can anyone provide a more complete list?
4
6,890,151
07/31/2011 14:54:03
1,296,678
09/26/2010 14:22:43
44
2
Tip: How to avoid opening "Issue Navigator" in Xcode4
It really annoyed me, that every time an error was raised, when running a build in XCode4, the left sidebar swapped to "Issue Navigator" tab. And every time you had to click on "Project Navigator" to get back to the class file hierarchy. (as the console output is more useful to me for debugging.) Well, i finally found out how to change that behavior, so maybe someone else is also interested in that: Menu **Xcode** >> **Preferences** >> choose **Behavioirs** Tab >> choose **Build generates new issues** >> change behavior in **"Show navigator"** section.
objective-c
xcode
xcode4
tips-and-tricks
null
03/21/2012 23:40:48
not a real question
Tip: How to avoid opening "Issue Navigator" in Xcode4 === It really annoyed me, that every time an error was raised, when running a build in XCode4, the left sidebar swapped to "Issue Navigator" tab. And every time you had to click on "Project Navigator" to get back to the class file hierarchy. (as the console output is more useful to me for debugging.) Well, i finally found out how to change that behavior, so maybe someone else is also interested in that: Menu **Xcode** >> **Preferences** >> choose **Behavioirs** Tab >> choose **Build generates new issues** >> change behavior in **"Show navigator"** section.
1
10,020,451
04/04/2012 22:58:15
1,312,861
04/04/2012 12:38:28
1
0
algorithm to extract simple sentences from complex(mixed) sentences?
Is there an algorithm that can be used to extract simple sentences from paragraphs? My ultimate goal is to later run another algorithm on the resulted simple sentence to determine the author's sentiment. I've researched this from sources such as Chae-Deug Park but none discuss preparing simple sentences as training data. Thanks in advance
extraction
text-mining
text-extraction
information-extraction
training-data
null
open
algorithm to extract simple sentences from complex(mixed) sentences? === Is there an algorithm that can be used to extract simple sentences from paragraphs? My ultimate goal is to later run another algorithm on the resulted simple sentence to determine the author's sentiment. I've researched this from sources such as Chae-Deug Park but none discuss preparing simple sentences as training data. Thanks in advance
0
8,132,230
11/15/2011 06:15:03
976,694
10/03/2011 12:46:42
16
0
iPhone Development guide to design dynamic view
I have to design a view which will shows the question-answer quiz. All the questions, answers and required data come from database. But the main problem is that number of answers for particular question are varying depends upon question and answers may be images, buttons, range, etc. One more thing is that for questions whose options are in range format I need Slider control to choose the one answer such and many more cases are there. To represent some options I need different controls like radio button, UIButton, UIImage, etc. Once I choose a particular option for a particular question the next particular question should be displayed. I have to manage all these things on a single view. Otherwise I should create 4000+ views for all questions and its very painful when I adds the new question to quiz. Or is there any other option that I can do. Please suggest me. I am very confused.
iphone
uiview
sqlite3
null
null
11/15/2011 22:19:00
not a real question
iPhone Development guide to design dynamic view === I have to design a view which will shows the question-answer quiz. All the questions, answers and required data come from database. But the main problem is that number of answers for particular question are varying depends upon question and answers may be images, buttons, range, etc. One more thing is that for questions whose options are in range format I need Slider control to choose the one answer such and many more cases are there. To represent some options I need different controls like radio button, UIButton, UIImage, etc. Once I choose a particular option for a particular question the next particular question should be displayed. I have to manage all these things on a single view. Otherwise I should create 4000+ views for all questions and its very painful when I adds the new question to quiz. Or is there any other option that I can do. Please suggest me. I am very confused.
1
8,964,077
01/22/2012 19:44:49
1,157,011
01/18/2012 19:28:48
1
0
an integer linear programing
I want to know if I have an integer variable that I want to use in an ILP. How can I express the constraint “v = 0 or v = 2” by linear constraints? The main problem is to forbid the intermediate value 1 without explicitly saying “or”. any one knows?
optimization
null
null
null
null
01/23/2012 02:34:17
not a real question
an integer linear programing === I want to know if I have an integer variable that I want to use in an ILP. How can I express the constraint “v = 0 or v = 2” by linear constraints? The main problem is to forbid the intermediate value 1 without explicitly saying “or”. any one knows?
1
2,371,993
03/03/2010 14:22:43
48,082
12/21/2008 03:44:34
15,439
808
Windows Live Messenger Activity SDK: Is it possible to use jQuery?
There's an SDK that lets developers build "activities" and games for use in Windows Live Messenger. The basic approach is to build a web app, that gets approved and hosted by Microsoft. questions 1. Anyone done this? 2. Can you use jQuery in that web app? 3. how do you deubg the thing, running within Windows Live Messenger?
msn-messenger
jquery
null
null
null
null
open
Windows Live Messenger Activity SDK: Is it possible to use jQuery? === There's an SDK that lets developers build "activities" and games for use in Windows Live Messenger. The basic approach is to build a web app, that gets approved and hosted by Microsoft. questions 1. Anyone done this? 2. Can you use jQuery in that web app? 3. how do you deubg the thing, running within Windows Live Messenger?
0
8,916,095
01/18/2012 19:27:37
956,134
09/21/2011 04:51:31
11
0
Computer Screen Time
I am not entirely sure if this is strictly a programming related question, but I would imagine a lot of programmers might have thought about this at some point. **Question:** I spend a lot of time at the computer doing one of two things: 1. Reading documentation. 2. Writing code. What are some ways I could carry out these activities without looking into the computer screen so that I don't strain my eyes so much? **Background:** For (1), I've tried printing out pages, but there is a lot of documentation out there, and whereas sometimes I read large contiguous chunks, other times I really just need bits and pieces. Printing out all the documentation I need really isn't an option. For (2), I've picked up the habit of writing more detailed layout of the code before starting, but you can only get so detailed before you start wanting to test some of it. Something that might be cool, is if there was a way to write code on paper (maybe using a set of symbols easy for a computer to analyze), and I could run the code after just scanning it in. I've read about refreshable braille displays (I am willing to learn braille, or any other new interesting skill : en.wikipedia.org/wiki/Refreshable_Braille_display), but the braille displays I've found online seem to go for over a thousand dollars, and I'm not sure I have the budget. I've also looked into voice recognition and display readers, but I haven't really found anything satisfactory. But if there were some good voice recognition and/or display reader software, that would be really promising (although free would be preferable, I would be willing to pay for quality software). In case this is relevant, I am currently using an iMac, but I also have windows and linux machines available.
time
screen
voice
reader
recognition
01/18/2012 19:49:58
off topic
Computer Screen Time === I am not entirely sure if this is strictly a programming related question, but I would imagine a lot of programmers might have thought about this at some point. **Question:** I spend a lot of time at the computer doing one of two things: 1. Reading documentation. 2. Writing code. What are some ways I could carry out these activities without looking into the computer screen so that I don't strain my eyes so much? **Background:** For (1), I've tried printing out pages, but there is a lot of documentation out there, and whereas sometimes I read large contiguous chunks, other times I really just need bits and pieces. Printing out all the documentation I need really isn't an option. For (2), I've picked up the habit of writing more detailed layout of the code before starting, but you can only get so detailed before you start wanting to test some of it. Something that might be cool, is if there was a way to write code on paper (maybe using a set of symbols easy for a computer to analyze), and I could run the code after just scanning it in. I've read about refreshable braille displays (I am willing to learn braille, or any other new interesting skill : en.wikipedia.org/wiki/Refreshable_Braille_display), but the braille displays I've found online seem to go for over a thousand dollars, and I'm not sure I have the budget. I've also looked into voice recognition and display readers, but I haven't really found anything satisfactory. But if there were some good voice recognition and/or display reader software, that would be really promising (although free would be preferable, I would be willing to pay for quality software). In case this is relevant, I am currently using an iMac, but I also have windows and linux machines available.
2
4,955,426
02/10/2011 09:41:33
196,458
10/26/2009 06:21:34
295
24
Access denied exception while creating sub site in a SharePoint site collection using SharePoint web service
I have a following requirement Requirement : "Create Site collection programatically on a web application which is hosted on a remote server and then create Sub site in it" I am able to successfully create Site collection using Admin.asmx web service. But, for Sub sit when i use following code - it throws an exception "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" Uri site = new Uri("http://SharePoint2010Site/"); string webServicePath = "_vti_bin/Sites.asmx"; string webServiceUrl = Path.Combine(site.AbsoluteUri, webServicePath); Sites webService = new Sites(); webService.Credentials = CredentialCache.DefaultNetworkCredentials; webService.Url = webServiceUrl; //the following line creates the sub site string result = webService.CreateWeb("Sub Site", "Sub Site", "Sub Site Desc", "STS#0", 1033, true, 1033, true, 1033, true, true, true, true, true, true, true); What can be the reason for Access denied exception?
sharepoint
sharepoint2010
null
null
null
null
open
Access denied exception while creating sub site in a SharePoint site collection using SharePoint web service === I have a following requirement Requirement : "Create Site collection programatically on a web application which is hosted on a remote server and then create Sub site in it" I am able to successfully create Site collection using Admin.asmx web service. But, for Sub sit when i use following code - it throws an exception "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" Uri site = new Uri("http://SharePoint2010Site/"); string webServicePath = "_vti_bin/Sites.asmx"; string webServiceUrl = Path.Combine(site.AbsoluteUri, webServicePath); Sites webService = new Sites(); webService.Credentials = CredentialCache.DefaultNetworkCredentials; webService.Url = webServiceUrl; //the following line creates the sub site string result = webService.CreateWeb("Sub Site", "Sub Site", "Sub Site Desc", "STS#0", 1033, true, 1033, true, 1033, true, true, true, true, true, true, true); What can be the reason for Access denied exception?
0
7,552,399
09/26/2011 08:20:49
964,621
09/26/2011 07:53:55
1
0
Nginx http push module install errorr
I want install Nginx http push module! Please help :( root@murat-VirtualBox:/var# ./configure --add-module=/var/nginx_http_push_module-0.692 bash: ./configure: No such file or directory root@murat-VirtualBox:var# cd nginx_http_push_module-0.692 root@murat-VirtualBox:var/nginx_http_push_module-0.692# ./configure --add- module=/var/nginx_http_push_module-0.692 bash: ./configure: No such file or directory
nginx
ubuntu-11.04
null
null
null
09/26/2011 14:38:32
off topic
Nginx http push module install errorr === I want install Nginx http push module! Please help :( root@murat-VirtualBox:/var# ./configure --add-module=/var/nginx_http_push_module-0.692 bash: ./configure: No such file or directory root@murat-VirtualBox:var# cd nginx_http_push_module-0.692 root@murat-VirtualBox:var/nginx_http_push_module-0.692# ./configure --add- module=/var/nginx_http_push_module-0.692 bash: ./configure: No such file or directory
2
5,425,283
03/24/2011 20:44:30
545,490
12/17/2010 00:21:22
103
5
Help implementing simple / custom MembershipProvider
I have been follow Steve Sandersons MVC2 book and have implemented a simple / custom MembershipProvider. You will not that a valid user has been hardcoded. My question is how do I get this to validate against my "Profiles" SQLServer table? PS - I am using EF 4.1 Code First Please see below: public class Profile { [Key] public int UserId { get; set; } [Required] public string UserName { get; set; } [Required] public string Password { get; set; } } public class SimpleMembershipProvider : MembershipProvider { private static List<Profile> Members = new List<Profile> { new Profile { UserId = 1, UserName = "admin", Password = "qwerty123" } }; public override bool ValidateUser(string username, string password) { return Members.Exists(m => (m.UserName == username) && (m.Password == password)); }
asp.net-mvc
asp.net-mvc-3
membership-provider
code-first
ef-code-first
null
open
Help implementing simple / custom MembershipProvider === I have been follow Steve Sandersons MVC2 book and have implemented a simple / custom MembershipProvider. You will not that a valid user has been hardcoded. My question is how do I get this to validate against my "Profiles" SQLServer table? PS - I am using EF 4.1 Code First Please see below: public class Profile { [Key] public int UserId { get; set; } [Required] public string UserName { get; set; } [Required] public string Password { get; set; } } public class SimpleMembershipProvider : MembershipProvider { private static List<Profile> Members = new List<Profile> { new Profile { UserId = 1, UserName = "admin", Password = "qwerty123" } }; public override bool ValidateUser(string username, string password) { return Members.Exists(m => (m.UserName == username) && (m.Password == password)); }
0
3,264,224
07/16/2010 11:14:52
373,142
11/24/2009 14:05:08
49
1
Mobile technology products using PHP/Javascript/jquery
I wanted to know the mobile technology products which are developed using PHP/Javascript/jquery. Which are latest mobile products are available in market developed using above mentioned langauges. Are iphone,blackberry,nokia and etc uses these above technologies to develop product and which are those products. If anyone has any reference for above question please share their ideas. Thanks in advance
php
javascript
jquery
null
null
null
open
Mobile technology products using PHP/Javascript/jquery === I wanted to know the mobile technology products which are developed using PHP/Javascript/jquery. Which are latest mobile products are available in market developed using above mentioned langauges. Are iphone,blackberry,nokia and etc uses these above technologies to develop product and which are those products. If anyone has any reference for above question please share their ideas. Thanks in advance
0
9,731,110
03/16/2012 02:41:16
415,693
08/10/2010 01:54:31
1
0
Is there a function like "bcadd" except it performs multiplication?
I'm hoping to do some math operations on numbers being represented as strings. So far, I haven't found anything that could do multiplication. Thanks!
php
null
null
null
null
null
open
Is there a function like "bcadd" except it performs multiplication? === I'm hoping to do some math operations on numbers being represented as strings. So far, I haven't found anything that could do multiplication. Thanks!
0
3,139,962
06/29/2010 10:55:01
282,887
02/27/2010 23:52:52
287
34
Should a programmer design User Interfaces?
Programmers often serves as a designer of user interfaces. You could argue whether it is good or not. However, especially in small companies, it is a reality that does not change. <br> What do you think personally as a programmer, is it our work to design UI? Personally I think that not, especially when you are going to work on Web Applications, where they made you to design UI also. <br> ****Correct me if I am wrong.****
gui-designer
null
null
null
null
06/30/2010 12:49:04
not constructive
Should a programmer design User Interfaces? === Programmers often serves as a designer of user interfaces. You could argue whether it is good or not. However, especially in small companies, it is a reality that does not change. <br> What do you think personally as a programmer, is it our work to design UI? Personally I think that not, especially when you are going to work on Web Applications, where they made you to design UI also. <br> ****Correct me if I am wrong.****
4
11,477,407
07/13/2012 19:51:11
97,363
04/28/2009 21:03:31
2,364
98
F# - Is there a way to do a multiple value comparison inline?
I feel silly for even asking this because it seems so trivial but my brain is failing me. If I had the following: let a, b, c = 1, 1, 1 Is there an eligant way to determine if a, b, and c all hold the same value. Something like: let result = (a = b = c) This fails because the expression `a = b` returns true and the next expression results in `true = c` and complains that it was expecting int, not bool. The only thing I can think of is: a = b && a = c && b = c which won't work when I want to add more variables.
f#
comparison
null
null
null
null
open
F# - Is there a way to do a multiple value comparison inline? === I feel silly for even asking this because it seems so trivial but my brain is failing me. If I had the following: let a, b, c = 1, 1, 1 Is there an eligant way to determine if a, b, and c all hold the same value. Something like: let result = (a = b = c) This fails because the expression `a = b` returns true and the next expression results in `true = c` and complains that it was expecting int, not bool. The only thing I can think of is: a = b && a = c && b = c which won't work when I want to add more variables.
0
10,021,779
04/05/2012 02:10:01
979,155
10/04/2011 19:25:52
64
3
Getting Parent of Parent Using JQuery
I have an disappearing delete animation code and I want to get the entire div "parent_parent" to disappear. Here is the HTML <div class="parent_parent"> <div class="parent"> <a href="?delete=1" class="delete_link"></a> </div> </div> And here is part of the jquery code that makes the parent_parent div disappear: success: function() { $(this).parent().parent()slideUp.(300,function() { parent.remove(); }); But so far no animation happens, but if I just call one parent then the inside div does disappear. I don't get any error messages either.
jquery
null
null
null
null
null
open
Getting Parent of Parent Using JQuery === I have an disappearing delete animation code and I want to get the entire div "parent_parent" to disappear. Here is the HTML <div class="parent_parent"> <div class="parent"> <a href="?delete=1" class="delete_link"></a> </div> </div> And here is part of the jquery code that makes the parent_parent div disappear: success: function() { $(this).parent().parent()slideUp.(300,function() { parent.remove(); }); But so far no animation happens, but if I just call one parent then the inside div does disappear. I don't get any error messages either.
0
7,160,260
08/23/2011 11:27:13
751,929
05/13/2011 07:14:59
1
0
PHP File upload
I used the search form and I didn't find any similar post, so please bear with me. I'm coding a script to get a directory name as input, scan the directory for files, validate the file(s)(extension, e.t.c) and upload the files to a web server. I have finished coding the script(I used ftp_put, I know I can use cURL too). The issue now is, the script works fine on my localhost. But then, I remembered the script will be hosted online, then I have to figure how to resolve the path where the files to be uploaded will be taken from(I mean it's not like I can type C:/blahblah as the directory name). Thank you very much guys. In anticipation.
php
null
null
null
null
08/29/2011 07:35:33
not constructive
PHP File upload === I used the search form and I didn't find any similar post, so please bear with me. I'm coding a script to get a directory name as input, scan the directory for files, validate the file(s)(extension, e.t.c) and upload the files to a web server. I have finished coding the script(I used ftp_put, I know I can use cURL too). The issue now is, the script works fine on my localhost. But then, I remembered the script will be hosted online, then I have to figure how to resolve the path where the files to be uploaded will be taken from(I mean it's not like I can type C:/blahblah as the directory name). Thank you very much guys. In anticipation.
4
8,826,751
01/11/2012 21:16:02
269,763
02/09/2010 19:21:31
69
1
How To Create Dynamic Dashboards
I have a form as Dashboards. I want to automatically refresh data without the data being read from the database and the user are shown. What is the best late for this scenario? I did this using a timer, but the best for this scenario is late?
c#
.net
vb.net
null
null
01/13/2012 01:34:59
not a real question
How To Create Dynamic Dashboards === I have a form as Dashboards. I want to automatically refresh data without the data being read from the database and the user are shown. What is the best late for this scenario? I did this using a timer, but the best for this scenario is late?
1
8,467,003
12/11/2011 19:59:52
1,092,659
12/11/2011 19:57:07
1
0
Query: Developing a Malware Detection App
I was intending to have a MSc student investigate the detection of Malware for example Botnet activity on Android. My intension is to have the student develop and test his/her botnet simulation and botnet detector/mitigation app using the Android Emulator in Eclipse. From reading posts about rooting the emulator, there seems to be conflicting statements that say it can be rooted or it can't be rooted. One may adopt an approach where by iptables maybe used as part of the botnet mitigation process perhaps blocking IRC ports or filtering for layer-7 strings. I have seen some threads with respect to rooting the emulator in eclipse (for iptables) and there seems to be an issue with it. I want to be sure that the Android Emulator in the Eclipse IDE may be used to develop an app to, for example detect various IRC ports and perhaps have iptables block such ports or block certain IRC commands using iptables string match etc. All comments are welcome, Patrick
android
null
null
null
null
null
open
Query: Developing a Malware Detection App === I was intending to have a MSc student investigate the detection of Malware for example Botnet activity on Android. My intension is to have the student develop and test his/her botnet simulation and botnet detector/mitigation app using the Android Emulator in Eclipse. From reading posts about rooting the emulator, there seems to be conflicting statements that say it can be rooted or it can't be rooted. One may adopt an approach where by iptables maybe used as part of the botnet mitigation process perhaps blocking IRC ports or filtering for layer-7 strings. I have seen some threads with respect to rooting the emulator in eclipse (for iptables) and there seems to be an issue with it. I want to be sure that the Android Emulator in the Eclipse IDE may be used to develop an app to, for example detect various IRC ports and perhaps have iptables block such ports or block certain IRC commands using iptables string match etc. All comments are welcome, Patrick
0
5,811,188
04/27/2011 22:06:01
713,873
04/18/2011 17:40:02
28
1
vim and notepad++
So a lot of my programmer buddies have urged me to switch from (g)vim to a "real" text editor like notepad++. My opinion has always been that they simply don't understand how to use vim. Lately, I've been hearing more and more people talking about notepad++ and I got to wondering... Does notepad++ actually have any features that Vim doesn't or vice versa? Nobody has actually been able to give me any legitimate reason to make the switch other than that they like it more. What are your thoughts?
vim
notepad++
null
null
null
04/27/2011 22:24:28
not constructive
vim and notepad++ === So a lot of my programmer buddies have urged me to switch from (g)vim to a "real" text editor like notepad++. My opinion has always been that they simply don't understand how to use vim. Lately, I've been hearing more and more people talking about notepad++ and I got to wondering... Does notepad++ actually have any features that Vim doesn't or vice versa? Nobody has actually been able to give me any legitimate reason to make the switch other than that they like it more. What are your thoughts?
4
1,301,526
08/19/2009 17:45:55
126,196
06/20/2009 14:31:21
272
0
How do I allow my app to have drag and drop toolboxes like Visual Studio?
How do I allow my app to have drag and drop toolboxes like Visual Studio?
c#
visual-studio
visual-studio-2008
null
null
null
open
How do I allow my app to have drag and drop toolboxes like Visual Studio? === How do I allow my app to have drag and drop toolboxes like Visual Studio?
0
4,802,381
01/26/2011 08:00:12
159,793
08/20/2009 06:28:39
1,252
20
Why 4 spaces are used as the unit of indentation in Java?
Java code conventions [1] say that "four spaces should be used as the unit of indentation", but it doesn't have any explanation why spaces are preferred. If I type space 4 times instead of pressing tab just once, I have to do 3 key presses more than just one. That means a lot of more work, because coders must write a lot of code in one day. So where this convention come from, and are there any valid reasons to do more work? [1] http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html
java
code-convention
null
null
null
01/28/2011 02:08:25
not constructive
Why 4 spaces are used as the unit of indentation in Java? === Java code conventions [1] say that "four spaces should be used as the unit of indentation", but it doesn't have any explanation why spaces are preferred. If I type space 4 times instead of pressing tab just once, I have to do 3 key presses more than just one. That means a lot of more work, because coders must write a lot of code in one day. So where this convention come from, and are there any valid reasons to do more work? [1] http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html
4
1,063,780
06/30/2009 13:46:23
50,468
12/31/2008 11:26:41
467
24
Free multiple selection calendar
Does anybody know a free ASP.NET control that allow to select multiple dates ? I'd like something like the [classic ASP.NET DateTime picker][1] but with multiple selection. [1]: http://msdn2.microsoft.com/en-us/library/bz9tc508.aspx
asp.net
calendar
null
null
null
null
open
Free multiple selection calendar === Does anybody know a free ASP.NET control that allow to select multiple dates ? I'd like something like the [classic ASP.NET DateTime picker][1] but with multiple selection. [1]: http://msdn2.microsoft.com/en-us/library/bz9tc508.aspx
0
5,190,776
03/04/2011 07:09:00
369,240
06/17/2010 09:44:10
464
3
How can I access a multidimentional php array in javascript?
The code is like this: <SCRIPT LANGUAGE="JavaScript"> function showReview(){ //javascript stuff <?php $http="obj.href ='http://localhost/PROJECT1/thispage.php'"; if (array_key_exists(0, $arr)){ $http .= "+'&PQID={$arr[0]['ID']}'+ '&PQNo={$arr[0]['QNo']}'+ '&PNextSWF={$arr[0]['NextSWF']}';"; } echo $http; ?> } </SCRIPT> But I can't access `$arr` array. I tried to declare it global or use the `$GLOBALS` variable. Show Review is called during onclick. `$arr` is set in the main php code. I tried just accessing the array in the main php code and passing the resulting string to the javascript which is the '?&PQID=ar&PQno=1...' part of the URL but it doesn't pass successfully. I tried passing the array itself to the javascript but js but I couldn't access the contents.
php
javascript
null
null
null
null
open
How can I access a multidimentional php array in javascript? === The code is like this: <SCRIPT LANGUAGE="JavaScript"> function showReview(){ //javascript stuff <?php $http="obj.href ='http://localhost/PROJECT1/thispage.php'"; if (array_key_exists(0, $arr)){ $http .= "+'&PQID={$arr[0]['ID']}'+ '&PQNo={$arr[0]['QNo']}'+ '&PNextSWF={$arr[0]['NextSWF']}';"; } echo $http; ?> } </SCRIPT> But I can't access `$arr` array. I tried to declare it global or use the `$GLOBALS` variable. Show Review is called during onclick. `$arr` is set in the main php code. I tried just accessing the array in the main php code and passing the resulting string to the javascript which is the '?&PQID=ar&PQno=1...' part of the URL but it doesn't pass successfully. I tried passing the array itself to the javascript but js but I couldn't access the contents.
0
7,547,936
09/25/2011 19:18:05
547,794
12/19/2010 16:18:00
386
8
PHP while loop - exclude most recent row?
I have a PHP while loop that loads user comments - I need to exclude the most recent row in the database. $i=1; while ($row = mysql_fetch_assoc($result)) { echo "<div class=\"commentDivs\">" . $row['time'] ."<br><br> " . $row['username'] . "<div class=\"userPostedComments\">" . $row['comment'] . "</div></div>"; }
php
null
null
null
null
09/26/2011 04:42:34
not constructive
PHP while loop - exclude most recent row? === I have a PHP while loop that loads user comments - I need to exclude the most recent row in the database. $i=1; while ($row = mysql_fetch_assoc($result)) { echo "<div class=\"commentDivs\">" . $row['time'] ."<br><br> " . $row['username'] . "<div class=\"userPostedComments\">" . $row['comment'] . "</div></div>"; }
4
7,123,692
08/19/2011 15:14:21
230
08/03/2008 19:32:46
5,959
62
Inserting parent and children with NHibernate at the same time
I am attempting to save(insert) a Parent entity with list Child entities. Both entites use a Guid as primary keys. The keys are none nullable and there is no key relationship set up in the db. The save doesn't work, an exception is thrown claiming - that I am trying to save a null into Parent foreign key in the Child table. When I debug the `session.Save` call the Child entites dont have there Parent property populated. I was expecting nhibernate to create a key for the Parent and let its Child objects know about it. Is this a limitation of NHibernate or of using Guids as primary keys? This [answer][1] suggests you have to set the parent manully, is this really the only way? Here are my mappings for reference: Parent mapping: HasMany(x => x.Children).KeyColumn("ParentKey").Inverse().Cascade.All(); Child mapping: References(x => x.Parent).Not.Nullable().Column("ParentKey"); [1]: http://stackoverflow.com/questions/721363/nhibernate-persist-an-object-with-children
nhibernate
fluent-nhibernate
null
null
null
null
open
Inserting parent and children with NHibernate at the same time === I am attempting to save(insert) a Parent entity with list Child entities. Both entites use a Guid as primary keys. The keys are none nullable and there is no key relationship set up in the db. The save doesn't work, an exception is thrown claiming - that I am trying to save a null into Parent foreign key in the Child table. When I debug the `session.Save` call the Child entites dont have there Parent property populated. I was expecting nhibernate to create a key for the Parent and let its Child objects know about it. Is this a limitation of NHibernate or of using Guids as primary keys? This [answer][1] suggests you have to set the parent manully, is this really the only way? Here are my mappings for reference: Parent mapping: HasMany(x => x.Children).KeyColumn("ParentKey").Inverse().Cascade.All(); Child mapping: References(x => x.Parent).Not.Nullable().Column("ParentKey"); [1]: http://stackoverflow.com/questions/721363/nhibernate-persist-an-object-with-children
0
693,076
03/28/2009 16:46:19
72,583
03/02/2009 00:04:44
78
11
How to force delete a file?
How can i force Windows XP to delete file that is currently being used by some application?
windows
batch
null
null
null
04/01/2011 12:49:18
off topic
How to force delete a file? === How can i force Windows XP to delete file that is currently being used by some application?
2
7,857,089
10/22/2011 02:44:24
1,008,089
10/22/2011 02:39:05
1
0
IOError: [Errno 13] Permission denied {Python}
I'm making a file injection program via FTP {User runs program, ftp downloads another program to a distant folder and runs that program} When I try to make a zip file in my system 32 fold python yells at me and says YOU CANT DO THAT! Is there a module I can use to get around this? Thanks here is my code `l_zipfile = open("C:\\Program Files\\"+zipfilename, 'w'`
python
windows
restrict
system32
null
null
open
IOError: [Errno 13] Permission denied {Python} === I'm making a file injection program via FTP {User runs program, ftp downloads another program to a distant folder and runs that program} When I try to make a zip file in my system 32 fold python yells at me and says YOU CANT DO THAT! Is there a module I can use to get around this? Thanks here is my code `l_zipfile = open("C:\\Program Files\\"+zipfilename, 'w'`
0
7,197,213
08/25/2011 21:09:04
912,973
08/25/2011 21:03:23
1
0
Facebook Comments plugin "Warning: This Message Contains Blocked Content"
I have fb comments social plugin installed in a client's website. 2 days ago an error message was shown to all users trying to post a comment, including myself(Admin). Warning: This Message Contains Blocked Content Some content in this message has been reported as abusive by Facebook users. Now few users are able to post comment and everyone is able to reply to their comments, however, admins and many other users are not able to post comments. I get many emails regarding this issue. Tried contacting facebook 4 days ago, no response yet. Have anyone experienced this issue ? Have you found any solution ? I did some search, saw very few forum posts relevant, all of them unanswered.
facebook
plugins
comments
warnings
message
04/09/2012 13:49:16
too localized
Facebook Comments plugin "Warning: This Message Contains Blocked Content" === I have fb comments social plugin installed in a client's website. 2 days ago an error message was shown to all users trying to post a comment, including myself(Admin). Warning: This Message Contains Blocked Content Some content in this message has been reported as abusive by Facebook users. Now few users are able to post comment and everyone is able to reply to their comments, however, admins and many other users are not able to post comments. I get many emails regarding this issue. Tried contacting facebook 4 days ago, no response yet. Have anyone experienced this issue ? Have you found any solution ? I did some search, saw very few forum posts relevant, all of them unanswered.
3
8,748,900
01/05/2012 19:57:50
774,786
05/29/2011 01:15:27
66
5
iOS development on non-Mac
What is technical reason(compiling,formatting stuff etc) why you can't build iOS apps on Windows/Ubuntu with objective-c(just build it and upload it to your own iPhone, not app store)?
iphone
ios
windows
ubuntu
apple
01/19/2012 23:54:15
not constructive
iOS development on non-Mac === What is technical reason(compiling,formatting stuff etc) why you can't build iOS apps on Windows/Ubuntu with objective-c(just build it and upload it to your own iPhone, not app store)?
4
8,061,048
11/09/2011 06:10:05
846,180
07/15/2011 09:38:43
237
4
Application in Android Market not compatible with device
I've upload my application to Android Market, but my developer's device is not compatible with it. Is there a way to know what happens and what is missing?
android
android-manifest
android-market
null
null
11/10/2011 03:38:00
not a real question
Application in Android Market not compatible with device === I've upload my application to Android Market, but my developer's device is not compatible with it. Is there a way to know what happens and what is missing?
1
6,030,483
05/17/2011 12:03:20
431,620
08/26/2010 08:36:28
318
11
Mining the Social Web (Facebook, Twitter,YouTube,MySpace,Google,Amazon e.t.c) in Erlang?
<a href="http://erlang.org"><b>Erlang/OTP</b></a> has to me proved to be the best Platform for developing Web applications. With <a href="http://yaws.hyber.org/appmods.yaws"><b>Yaws appmods and Yaws yapps</b></a>, yaws is the most stable yet highly available web server in the world in which the performance of REST services are redefined. <br> Check this post on <a href="http://www.infoq.com/articles/vinoski-erlang-rest"><b>Building Sick REST services with Yaws Web Server</b></a>. Considering frameworks such as <a href="http://nitrogenproject.com"><b>Nitrogen</b></a>, <a href="https://github.com/ngerakines/mochiweb"><b>Mochiweb/MochiMedia</b></a>, <a href="http://webmachine.basho.com/"><b>Web Machine</b></a>, and many others not forgetting <a href="https://github.com/yariv/erlyweb"><b>ErlyWeb</b></a> and <a href="http://www.erlang-web.org/"><b>Erlang Web</b></a>, you discover that they use the massive concurrency, availability, elegance and side-effect free nature of the Language Erlang!! Now, recently we developed a Powerful RESTFUL application using <a href="http://www.sencha.com"><b>Ext Js</b></a> for its front end and Yaws Appmods as the backend running ofcourse on top of a cluster of Mnesia Nodes running. The performance of Yaws (in this case Yaws-1.89) is so amazing that old PHP-Apache-MySQL apps just cannot be compared. The application is SOA (service Oriented) in nature and the whole app was stress tested against concurrent service requests in orders of thousands using the HTTP/1.1 capable client <a href="https://github.com/cstar/ibrowse"><b>Ibrowse</b></a> (Which too, is implemented in Erlang/OTP). We have therefor come to discover that Yaws can take Service Oriented Web apps to the next level. I grabbed a <a href="http://www.4shared.com/document/zu1P384f/Mining_the_Social_Web.html"><b>book which shows how to mine the social web</b></a>, and it was using a lot of Python here and there. <a href="http://lib.dnu.dp.ua:8001/l/%D0%9A%D0%BE%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80%D1%8B%D0%98%D1%81%D0%B5%D1%82%D0%B8/Mining/Mining.the.Social.Web.pdf"><b>In this book</b></a>, Python scripts use HTTP Communication to access <a href="http://apiwiki.twitter.com/w/page/22554648/FrontPage"><b>Twitter APIs</b></a>, <a href="http://developers.facebook.com/docs/reference/api/"><b>Facebook Graph API</b></a>, <a href="http://code.google.com/apis/youtube/overview.html"><b>Youtube APIs</b></a> and many others from Amazon, MySpace, Linked-In, Google, Yahoo, Bing e.t.c. With Erlang's potential, i am looking out for a framework or library which uses cloud services and APIs such as the ones mentioned above. If anyone knows of such libraries in Erlang/OTP you could direct me. Thanks in advance.
erlang
mnesia
mochiweb
yaws
nitrogen
05/17/2011 15:56:54
not a real question
Mining the Social Web (Facebook, Twitter,YouTube,MySpace,Google,Amazon e.t.c) in Erlang? === <a href="http://erlang.org"><b>Erlang/OTP</b></a> has to me proved to be the best Platform for developing Web applications. With <a href="http://yaws.hyber.org/appmods.yaws"><b>Yaws appmods and Yaws yapps</b></a>, yaws is the most stable yet highly available web server in the world in which the performance of REST services are redefined. <br> Check this post on <a href="http://www.infoq.com/articles/vinoski-erlang-rest"><b>Building Sick REST services with Yaws Web Server</b></a>. Considering frameworks such as <a href="http://nitrogenproject.com"><b>Nitrogen</b></a>, <a href="https://github.com/ngerakines/mochiweb"><b>Mochiweb/MochiMedia</b></a>, <a href="http://webmachine.basho.com/"><b>Web Machine</b></a>, and many others not forgetting <a href="https://github.com/yariv/erlyweb"><b>ErlyWeb</b></a> and <a href="http://www.erlang-web.org/"><b>Erlang Web</b></a>, you discover that they use the massive concurrency, availability, elegance and side-effect free nature of the Language Erlang!! Now, recently we developed a Powerful RESTFUL application using <a href="http://www.sencha.com"><b>Ext Js</b></a> for its front end and Yaws Appmods as the backend running ofcourse on top of a cluster of Mnesia Nodes running. The performance of Yaws (in this case Yaws-1.89) is so amazing that old PHP-Apache-MySQL apps just cannot be compared. The application is SOA (service Oriented) in nature and the whole app was stress tested against concurrent service requests in orders of thousands using the HTTP/1.1 capable client <a href="https://github.com/cstar/ibrowse"><b>Ibrowse</b></a> (Which too, is implemented in Erlang/OTP). We have therefor come to discover that Yaws can take Service Oriented Web apps to the next level. I grabbed a <a href="http://www.4shared.com/document/zu1P384f/Mining_the_Social_Web.html"><b>book which shows how to mine the social web</b></a>, and it was using a lot of Python here and there. <a href="http://lib.dnu.dp.ua:8001/l/%D0%9A%D0%BE%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80%D1%8B%D0%98%D1%81%D0%B5%D1%82%D0%B8/Mining/Mining.the.Social.Web.pdf"><b>In this book</b></a>, Python scripts use HTTP Communication to access <a href="http://apiwiki.twitter.com/w/page/22554648/FrontPage"><b>Twitter APIs</b></a>, <a href="http://developers.facebook.com/docs/reference/api/"><b>Facebook Graph API</b></a>, <a href="http://code.google.com/apis/youtube/overview.html"><b>Youtube APIs</b></a> and many others from Amazon, MySpace, Linked-In, Google, Yahoo, Bing e.t.c. With Erlang's potential, i am looking out for a framework or library which uses cloud services and APIs such as the ones mentioned above. If anyone knows of such libraries in Erlang/OTP you could direct me. Thanks in advance.
1
6,488,158
06/27/2011 02:47:49
805,065
06/19/2011 04:40:45
6
0
How to create own custom row layout using simple adapter and listview
I need help in creating a custom listview that allows me to have 2 strings/textviews per row. I have been researching a lot, but I cannot seem to understand how to do this. Any sample code and help would be appreciated. I know how to use simple_list_item_1, but not my own layout. Thank YOU.
java
android
list
null
null
null
open
How to create own custom row layout using simple adapter and listview === I need help in creating a custom listview that allows me to have 2 strings/textviews per row. I have been researching a lot, but I cannot seem to understand how to do this. Any sample code and help would be appreciated. I know how to use simple_list_item_1, but not my own layout. Thank YOU.
0
3,031,794
06/13/2010 09:55:19
365,340
06/12/2010 18:05:57
1
0
Lowest possible context switch time
Is it possible to tell the processor that has the best context switch time ?
multithreading
embedded
processor
rtos
context-switch
06/13/2010 13:34:09
not a real question
Lowest possible context switch time === Is it possible to tell the processor that has the best context switch time ?
1
11,695,292
07/27/2012 20:35:09
68,287
02/19/2009 09:43:26
2,095
39
Visual Studio Intellisense bug or feature?
I don't know it's a bug or feature in Visual Studio but I found atleast on my VS 2010 that if I have a class say: public class Person { public int Age { get; set; } public string Name { get; set; } } and then I have `List<Person>` and I want to do collection initialization like below: public static List<Person> Persons = new List<Person> { new }; as you see it does not come up with `Person` object initializer, even if I press ctrl + space it doesn't come up. Any clue about this.
c#
visual-studio
null
null
null
07/29/2012 18:14:44
not constructive
Visual Studio Intellisense bug or feature? === I don't know it's a bug or feature in Visual Studio but I found atleast on my VS 2010 that if I have a class say: public class Person { public int Age { get; set; } public string Name { get; set; } } and then I have `List<Person>` and I want to do collection initialization like below: public static List<Person> Persons = new List<Person> { new }; as you see it does not come up with `Person` object initializer, even if I press ctrl + space it doesn't come up. Any clue about this.
4
11,700,282
07/28/2012 10:39:59
1,387,769
05/10/2012 17:14:47
20
2
Javascript global variables issue
The below snippet doesn't get me the value of the global var id displayed in my console. Where am I going wrong? var id; function set_id(myid){ id=myid; } function get_id(){ return id; } $("#btn").click(function(){ $.post("....", function(data){ //data reurns a JSON set_id(id); //success!! } } $("#show").click(function()[ console.log(get_id()); //doesn't work, how do I get this workin.. Where am I going wrong }
javascript
jquery
null
null
null
null
open
Javascript global variables issue === The below snippet doesn't get me the value of the global var id displayed in my console. Where am I going wrong? var id; function set_id(myid){ id=myid; } function get_id(){ return id; } $("#btn").click(function(){ $.post("....", function(data){ //data reurns a JSON set_id(id); //success!! } } $("#show").click(function()[ console.log(get_id()); //doesn't work, how do I get this workin.. Where am I going wrong }
0
7,906,452
10/26/2011 17:26:45
997,578
10/16/2011 07:08:26
1
0
How to switch back to an activity
Ok so I'm inside in my game,I play a little bit and then I press the BACK button on my phone.After that,my game menu will popup. My question is how do I switch back to my game Activity? Because If i start a new activity,I will lose the ingame progress
activity
null
null
null
null
10/26/2011 17:30:07
not a real question
How to switch back to an activity === Ok so I'm inside in my game,I play a little bit and then I press the BACK button on my phone.After that,my game menu will popup. My question is how do I switch back to my game Activity? Because If i start a new activity,I will lose the ingame progress
1
11,006,787
06/13/2012 00:40:12
1,421,767
05/28/2012 13:07:16
59
0
mysqli causes courseid to not be found at all
I have a problem with my code below. When the code below was old mysql code, it worked perfectly as the user is able to enter in a courseid in a textbox and if the courseid in the textbox matches with a courseid in the database, it will display the courseid and course name else if it is not in the database, then it will display a message stating it can't find the course id. But since I tried changing the code from mysql to mysqli, then no matter if the courseid I enter into the textbox is correct or not, it keeps stating the message that the courseid cannot be found, why is this? Below is the code (I obviously connected to the database: <? foreach (array('courseid') as $varname) { $$varname = (isset($_POST[$varname])) ? $_POST[$varname] : ''; } ?> <h1>CREATING A NEW SESSION</h1> <form action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post"> <p>Course ID: <input type="text" name="courseid" /><input id="courseSubmit" type="submit" value="Submit" name="submit" /></p> <!-- Enter User Id here--> </form> <?php if (isset($_POST['submit'])) { $query = " SELECT cm.CourseId, cm.ModuleId, c.CourseName, m.ModuleName FROM Course c INNER JOIN Course_Module cm ON c.CourseId = cm.CourseId JOIN Module m ON cm.ModuleId = m.ModuleId WHERE (c.CourseId = ?) ORDER BY c.CourseName, m.ModuleId "; $qrystmt=$mysqli->prepare($query); // You only need to call bind_param once $qrystmt->bind_param("ss",$courseid); // get result and assign variables (prefix with db) $qrystmt->bind_result($dbCourseId,$dbModuleId,$dbCourseName,$dbModuleName); $num = $qrystmt->num_rows($result = $qrystmt->execute()); if($num ==0){ echo "<p>Sorry, No Course was found with this Course ID '$courseid'</p>"; } else { $dataArray = array(); while ($row = $qrystmt->fetch()) { $dataArray[$row['CourseId']]['CourseName'] = $row['CourseName']; $dataArray[$row['CourseId']]['Modules'][$row['ModuleId']]['ModuleName'] = $row['ModuleName']; $_SESSION['idcourse'] = $row['CourseId']; $_SESSION['namecourse'] = $row['CourseName']; } ?>
php
mysqli
null
null
null
null
open
mysqli causes courseid to not be found at all === I have a problem with my code below. When the code below was old mysql code, it worked perfectly as the user is able to enter in a courseid in a textbox and if the courseid in the textbox matches with a courseid in the database, it will display the courseid and course name else if it is not in the database, then it will display a message stating it can't find the course id. But since I tried changing the code from mysql to mysqli, then no matter if the courseid I enter into the textbox is correct or not, it keeps stating the message that the courseid cannot be found, why is this? Below is the code (I obviously connected to the database: <? foreach (array('courseid') as $varname) { $$varname = (isset($_POST[$varname])) ? $_POST[$varname] : ''; } ?> <h1>CREATING A NEW SESSION</h1> <form action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post"> <p>Course ID: <input type="text" name="courseid" /><input id="courseSubmit" type="submit" value="Submit" name="submit" /></p> <!-- Enter User Id here--> </form> <?php if (isset($_POST['submit'])) { $query = " SELECT cm.CourseId, cm.ModuleId, c.CourseName, m.ModuleName FROM Course c INNER JOIN Course_Module cm ON c.CourseId = cm.CourseId JOIN Module m ON cm.ModuleId = m.ModuleId WHERE (c.CourseId = ?) ORDER BY c.CourseName, m.ModuleId "; $qrystmt=$mysqli->prepare($query); // You only need to call bind_param once $qrystmt->bind_param("ss",$courseid); // get result and assign variables (prefix with db) $qrystmt->bind_result($dbCourseId,$dbModuleId,$dbCourseName,$dbModuleName); $num = $qrystmt->num_rows($result = $qrystmt->execute()); if($num ==0){ echo "<p>Sorry, No Course was found with this Course ID '$courseid'</p>"; } else { $dataArray = array(); while ($row = $qrystmt->fetch()) { $dataArray[$row['CourseId']]['CourseName'] = $row['CourseName']; $dataArray[$row['CourseId']]['Modules'][$row['ModuleId']]['ModuleName'] = $row['ModuleName']; $_SESSION['idcourse'] = $row['CourseId']; $_SESSION['namecourse'] = $row['CourseName']; } ?>
0
2,014,464
01/06/2010 16:34:09
233,421
12/17/2009 00:41:31
125
0
What technologies does Rightmove.co.uk use? PHP? Ruby? Python? Mysql?
Does anyone know how rightmove.co.uk is made? What technologies, databases, programming languages are they using? PHP? Ruby? Python? I can see that it is using Apache. I would really love to know what database they use? Thank you in advance;-)
php
ruby-on-rails
python
mysql
.net
07/25/2012 18:27:19
off topic
What technologies does Rightmove.co.uk use? PHP? Ruby? Python? Mysql? === Does anyone know how rightmove.co.uk is made? What technologies, databases, programming languages are they using? PHP? Ruby? Python? I can see that it is using Apache. I would really love to know what database they use? Thank you in advance;-)
2
10,745,187
05/24/2012 20:59:07
1,113,216
12/23/2011 10:10:28
13
0
What is the purpose of 'this' keyword in Javascript
Differently from the other language, in JavaScript `this` always refers to the “owner” of the function we're executing, or rather, to the object that a function is a method of. What is the advantage/purpose of this behaviour compered with other languages?
javascript
null
null
null
null
05/24/2012 21:14:06
not constructive
What is the purpose of 'this' keyword in Javascript === Differently from the other language, in JavaScript `this` always refers to the “owner” of the function we're executing, or rather, to the object that a function is a method of. What is the advantage/purpose of this behaviour compered with other languages?
4
6,658,997
07/12/2011 02:49:49
839,530
07/11/2011 19:37:59
6
0
RabbitMQ and Serialization weird error
I have two apps, app1.cs and app2.cs (codes below). In addition I also have a dll I extracted from refer.cs(code below). When I compile app1.cs(which sends a measurement object) I get the following exception: Unhandled Exception: RabbitMQ.Client.Exceptions.OperationInterruptioedException I can't see how the connection is interrupted. Do you see where the problem is caused at? Regards, Demi //refer.cs from which refer.dll is created using System; using System.IO; using System.Collections.Generic; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Reflection; [assembly: AssemblyVersion("1.0.0.0")] namespace refer { //start alternate serialization public static class AltSerialization { public static byte[] AltSerialize(Measurement m) { using (var ms = new MemoryStream()) { var bf = new BinaryFormatter(); bf.AssemblyFormat = System.Runtime.Serialization.Formatters.FormatterAssemblyStyle.Simple; bf.Serialize(ms, m); return ms.GetBuffer(); } } public static Measurement AltDeSerialize(byte[] seriM) { using (var stream = new MemoryStream( seriM )) { BinaryFormatter bf = new BinaryFormatter(); bf.AssemblyFormat = System.Runtime.Serialization.Formatters.FormatterAssemblyStyle.Simple; return (Measurement)bf.Deserialize(stream); } } } //end alternte serialization [Serializable] //This attribute sets class to be serialized public class Measurement : ISerializable { [NonSerialized] public int id; public int time; //timestamp public double value; public Measurement() { id = 1; time = 12; value = 0.01; } public Measurement(int _id, int _time, double _value) { id = _id; time = _time; value = _value; } //Deserialization constructor public Measurement(SerializationInfo info, StreamingContext ctxt) { //Assign the values from info to the approporiate properties Console.WriteLine("DeSerialization construtor called."); time = (int)info.GetValue("MeasurementTime", typeof(int)); value = (double)info.GetValue("MeasurementValue", typeof(double)); } //Serialization function public void GetObjectData(SerializationInfo info, StreamingContext ctxt) { // Custom name-value pair // Values must be read with the same name they're written info.AddValue("MeasurementTime", time); info.AddValue("MeasurementValue", value); } } } public class MainClass { public static void Main() { } } //app1.cs using System; using System.IO; using System.Collections.Generic; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using refer; using System.Reflection; using RabbitMQ.Client; using RabbitMQ.Client.Events; [assembly: AssemblyVersion("1.0.0.0")] public class MainClass { public static void Main() { //Create a new Measurement message Measurement m1 = new Measurement(2, 2345, 23.456); System.Console.WriteLine("\nm1.id = {0}", m1.id); System.Console.WriteLine("m1.time = {0}", m1.time); System.Console.WriteLine("m1.value = {0}", m1.value); /*byte[] bArray = AltSerialization.AltSerialize( m1 ); Measurement m2 = new Measurement(); m2 = AltSerialization.AltDeSerialize(bArray); System.Console.WriteLine("\nm2.id = {0}", m2.id); System.Console.WriteLine("m2.time = {0}", m2.time); System.Console.WriteLine("m2.value = {0}", m2.value);*/ ConnectionFactory factory = new ConnectionFactory(); factory.HostName = "localhost"; using (IConnection connection = factory.CreateConnection()) using (IModel channel = connection.CreateModel()) { channel.QueueDeclare("hello", true, false, false, null); byte[] body = refer.AltSerialization.AltSerialize( m1 ); channel.BasicPublish("", "hello", null, body); Console.WriteLine(" [x] Sent "); } } } //app2.cs using System; using System.IO; using System.Collections.Generic; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using refer; using RabbitMQ.Client; using RabbitMQ.Client.Events; using System.Reflection; [assembly: AssemblyVersion("1.0.0.0")] public class MainClass { public static void Main() { /*/Create a new Measurement message Measurement m1 = new Measurement(2, 2345, 23.456); System.Console.WriteLine("\nm1.id = {0}", m1.id); System.Console.WriteLine("m1.time = {0}", m1.time); System.Console.WriteLine("m1.value = {0}", m1.value); byte[] bArray = AltSerialization.AltSerialize( m1 );*/ Measurement m2 = new Measurement(); ConnectionFactory factory = new ConnectionFactory(); factory.HostName = "localhost"; using (IConnection connection = factory.CreateConnection()) using (IModel channel = connection.CreateModel()) { channel.QueueDeclare("hello", false, false, false, null); QueueingBasicConsumer consumer = new QueueingBasicConsumer(channel); channel.BasicConsume("hello", true, consumer); System.Console.WriteLine(" [*] Waiting for messages." + "To exit press CTRL+C"); BasicDeliverEventArgs ea = (BasicDeliverEventArgs)consumer.Queue.Dequeue(); m2 = refer.AltSerialization.AltDeSerialize(ea.Body); System.Console.WriteLine(" \n[x] Received "); System.Console.WriteLine("\nm2.id = {0}", m2.id); System.Console.WriteLine("m2.time = {0}", m2.time); System.Console.WriteLine("m2.value = {0}", m2.value); } } }
c#
serialization
rabbitmq
amqp
binary-deserialization
null
open
RabbitMQ and Serialization weird error === I have two apps, app1.cs and app2.cs (codes below). In addition I also have a dll I extracted from refer.cs(code below). When I compile app1.cs(which sends a measurement object) I get the following exception: Unhandled Exception: RabbitMQ.Client.Exceptions.OperationInterruptioedException I can't see how the connection is interrupted. Do you see where the problem is caused at? Regards, Demi //refer.cs from which refer.dll is created using System; using System.IO; using System.Collections.Generic; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Reflection; [assembly: AssemblyVersion("1.0.0.0")] namespace refer { //start alternate serialization public static class AltSerialization { public static byte[] AltSerialize(Measurement m) { using (var ms = new MemoryStream()) { var bf = new BinaryFormatter(); bf.AssemblyFormat = System.Runtime.Serialization.Formatters.FormatterAssemblyStyle.Simple; bf.Serialize(ms, m); return ms.GetBuffer(); } } public static Measurement AltDeSerialize(byte[] seriM) { using (var stream = new MemoryStream( seriM )) { BinaryFormatter bf = new BinaryFormatter(); bf.AssemblyFormat = System.Runtime.Serialization.Formatters.FormatterAssemblyStyle.Simple; return (Measurement)bf.Deserialize(stream); } } } //end alternte serialization [Serializable] //This attribute sets class to be serialized public class Measurement : ISerializable { [NonSerialized] public int id; public int time; //timestamp public double value; public Measurement() { id = 1; time = 12; value = 0.01; } public Measurement(int _id, int _time, double _value) { id = _id; time = _time; value = _value; } //Deserialization constructor public Measurement(SerializationInfo info, StreamingContext ctxt) { //Assign the values from info to the approporiate properties Console.WriteLine("DeSerialization construtor called."); time = (int)info.GetValue("MeasurementTime", typeof(int)); value = (double)info.GetValue("MeasurementValue", typeof(double)); } //Serialization function public void GetObjectData(SerializationInfo info, StreamingContext ctxt) { // Custom name-value pair // Values must be read with the same name they're written info.AddValue("MeasurementTime", time); info.AddValue("MeasurementValue", value); } } } public class MainClass { public static void Main() { } } //app1.cs using System; using System.IO; using System.Collections.Generic; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using refer; using System.Reflection; using RabbitMQ.Client; using RabbitMQ.Client.Events; [assembly: AssemblyVersion("1.0.0.0")] public class MainClass { public static void Main() { //Create a new Measurement message Measurement m1 = new Measurement(2, 2345, 23.456); System.Console.WriteLine("\nm1.id = {0}", m1.id); System.Console.WriteLine("m1.time = {0}", m1.time); System.Console.WriteLine("m1.value = {0}", m1.value); /*byte[] bArray = AltSerialization.AltSerialize( m1 ); Measurement m2 = new Measurement(); m2 = AltSerialization.AltDeSerialize(bArray); System.Console.WriteLine("\nm2.id = {0}", m2.id); System.Console.WriteLine("m2.time = {0}", m2.time); System.Console.WriteLine("m2.value = {0}", m2.value);*/ ConnectionFactory factory = new ConnectionFactory(); factory.HostName = "localhost"; using (IConnection connection = factory.CreateConnection()) using (IModel channel = connection.CreateModel()) { channel.QueueDeclare("hello", true, false, false, null); byte[] body = refer.AltSerialization.AltSerialize( m1 ); channel.BasicPublish("", "hello", null, body); Console.WriteLine(" [x] Sent "); } } } //app2.cs using System; using System.IO; using System.Collections.Generic; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using refer; using RabbitMQ.Client; using RabbitMQ.Client.Events; using System.Reflection; [assembly: AssemblyVersion("1.0.0.0")] public class MainClass { public static void Main() { /*/Create a new Measurement message Measurement m1 = new Measurement(2, 2345, 23.456); System.Console.WriteLine("\nm1.id = {0}", m1.id); System.Console.WriteLine("m1.time = {0}", m1.time); System.Console.WriteLine("m1.value = {0}", m1.value); byte[] bArray = AltSerialization.AltSerialize( m1 );*/ Measurement m2 = new Measurement(); ConnectionFactory factory = new ConnectionFactory(); factory.HostName = "localhost"; using (IConnection connection = factory.CreateConnection()) using (IModel channel = connection.CreateModel()) { channel.QueueDeclare("hello", false, false, false, null); QueueingBasicConsumer consumer = new QueueingBasicConsumer(channel); channel.BasicConsume("hello", true, consumer); System.Console.WriteLine(" [*] Waiting for messages." + "To exit press CTRL+C"); BasicDeliverEventArgs ea = (BasicDeliverEventArgs)consumer.Queue.Dequeue(); m2 = refer.AltSerialization.AltDeSerialize(ea.Body); System.Console.WriteLine(" \n[x] Received "); System.Console.WriteLine("\nm2.id = {0}", m2.id); System.Console.WriteLine("m2.time = {0}", m2.time); System.Console.WriteLine("m2.value = {0}", m2.value); } } }
0
3,243,586
07/14/2010 05:28:35
206,613
11/09/2009 04:59:02
102
4
Website Fonts not same on windows and mac
Why is it that my website appears different on Mac and Windows? Words on my website when viewed on Mac are more clear, while on Windows they aren't very legible. The font I am using is Georgia sans-serif. If its some rendering technique difference, can anybody suggest some font which looks same on both. Regards
fonts
null
null
null
null
07/14/2010 06:03:01
off topic
Website Fonts not same on windows and mac === Why is it that my website appears different on Mac and Windows? Words on my website when viewed on Mac are more clear, while on Windows they aren't very legible. The font I am using is Georgia sans-serif. If its some rendering technique difference, can anybody suggest some font which looks same on both. Regards
2
11,514,772
07/17/2012 01:12:19
452,069
09/19/2010 18:12:13
82
0
linked list insert function - passing a list by pointer
Im trying to create linked-list insert function that takes a list (or more correctly a pointer to it) then inserts the value to the end of the list. void ll_insert(struct ll **l, int n){ struct ll *temp=NULL; while ( (*l) != NULL){ temp= (*l); (*l) = (*l)->next; } (*l)= (struct ll*)malloc(sizeof(struct ll)); (*l)->n=n; (*l)->next=NULL; if (temp) temp->next= (*l); } int main(void){ struct ll *l=NULL; ll_insert(&l, 1); printf("%d ", l->n); ll_insert(&l, 1); ll_insert(&l, 2); ll_insert(&l, 3); printf("%d ", l->n); } The output after running the code above is 1 3. This is no surprise, since (*l) = (*l)->next; updates the list to point to to the end node, and every time I run insert(...) the list's head is updated to point to the end (if im not wrong). What's the way around this?
c
pointers
data-structures
linked-list
null
null
open
linked list insert function - passing a list by pointer === Im trying to create linked-list insert function that takes a list (or more correctly a pointer to it) then inserts the value to the end of the list. void ll_insert(struct ll **l, int n){ struct ll *temp=NULL; while ( (*l) != NULL){ temp= (*l); (*l) = (*l)->next; } (*l)= (struct ll*)malloc(sizeof(struct ll)); (*l)->n=n; (*l)->next=NULL; if (temp) temp->next= (*l); } int main(void){ struct ll *l=NULL; ll_insert(&l, 1); printf("%d ", l->n); ll_insert(&l, 1); ll_insert(&l, 2); ll_insert(&l, 3); printf("%d ", l->n); } The output after running the code above is 1 3. This is no surprise, since (*l) = (*l)->next; updates the list to point to to the end node, and every time I run insert(...) the list's head is updated to point to the end (if im not wrong). What's the way around this?
0
9,712,138
03/14/2012 23:59:25
364,914
10/03/2009 05:04:00
1,194
14
Does nodejs use less resources than Play framework?
Are there any benchmarks other than http://www.subbu.org/blog/2011/03/nodejs-vs-play-for-front-end-apps that compares how much resources nodejs uses compared to play framework?
java
node.js
playframework
null
null
03/15/2012 12:49:23
not constructive
Does nodejs use less resources than Play framework? === Are there any benchmarks other than http://www.subbu.org/blog/2011/03/nodejs-vs-play-for-front-end-apps that compares how much resources nodejs uses compared to play framework?
4
10,316,308
04/25/2012 13:05:16
1,356,094
04/25/2012 11:57:25
1
0
DataBase Design for large traffic Website above million rows
i am designing a DataBase for my Movie Website hosted on Godaddy shared hosting with PHP+Mysql. I have read a lot on DB normalization, and DB performance/Scalability, but couldn't find the answer to my current need. <p>i am starting my website from scratch, so Zero users today, i will be importing 1million Movie entry to the DB. then the users can send me XLS or CSV templates that i will insert thru a script. so by default all the users on the website are in Read only mode. here is the current design of my DB tables: table_name: <p>id - int <p>name - var char(45) <p>table_production_year: <p>id <p>year <p>table_gender: <p>id <p>gender <p>table_rate: <p>id <p>rate <p>table_producer: <p>id <p>producer <p>table_actor: <p>id <p>actor <p>etc... <p> it is a fully normalized design (i think its 4NF) now, in the Table_name table, i will have above 1M row. while in table_gender i will only have few. <p>My PHP website, will enable users to lookup for Movie names, and see all the associated tags. but i want them also to be able to lookup by year (say 2012, the movies of this year), or by actor. <p>here is my questions: <p>1-isn't that gonna be a messy PHP code, and DB intensive query, especially when i just want to list a simple content such as "all the info of the movies in 2012"? <p>2- for a simple page view,such as list of movies of category W, i would need to query all the tables!! how should i optimize my queries? Should i create a View? <p>3-how should i optimize my Design and queries considering the fact i want them to be able to lookup by movie-prodcution-year, and by actor? thanks for the help
php
mysql
performance
optimization
traffic
04/26/2012 17:22:31
not a real question
DataBase Design for large traffic Website above million rows === i am designing a DataBase for my Movie Website hosted on Godaddy shared hosting with PHP+Mysql. I have read a lot on DB normalization, and DB performance/Scalability, but couldn't find the answer to my current need. <p>i am starting my website from scratch, so Zero users today, i will be importing 1million Movie entry to the DB. then the users can send me XLS or CSV templates that i will insert thru a script. so by default all the users on the website are in Read only mode. here is the current design of my DB tables: table_name: <p>id - int <p>name - var char(45) <p>table_production_year: <p>id <p>year <p>table_gender: <p>id <p>gender <p>table_rate: <p>id <p>rate <p>table_producer: <p>id <p>producer <p>table_actor: <p>id <p>actor <p>etc... <p> it is a fully normalized design (i think its 4NF) now, in the Table_name table, i will have above 1M row. while in table_gender i will only have few. <p>My PHP website, will enable users to lookup for Movie names, and see all the associated tags. but i want them also to be able to lookup by year (say 2012, the movies of this year), or by actor. <p>here is my questions: <p>1-isn't that gonna be a messy PHP code, and DB intensive query, especially when i just want to list a simple content such as "all the info of the movies in 2012"? <p>2- for a simple page view,such as list of movies of category W, i would need to query all the tables!! how should i optimize my queries? Should i create a View? <p>3-how should i optimize my Design and queries considering the fact i want them to be able to lookup by movie-prodcution-year, and by actor? thanks for the help
1
4,354,534
12/04/2010 16:35:54
99,923
05/02/2009 17:30:50
1,761
104
Tricks for shortening PHP code?
I am looking for neat tricks that can be used to compress PHP code while working on a fun [project][1]. Let me share some of the ones I know so far. Using straight conditionals with no brackets if(TRUE)yes();else no(); You can acquire and validate variables in one line if(!($value=function($input)||empty($value->foo))return FALSE; You can check a value (and default) using the [Ternary Operator][2] in PHP 5.3 $foo = $bar?:NULL; Return boolean values for conditions return!$foo; And one I place at the top of my PHP classes to protect them from direct access - straight boolean checks: defined('BASE_DIR')||die(); **What is the most valuable PHP trick you have learned to reduce space used?** [1]: https://github.com/Xeoncross/1kb-PHP-MVC-Framework [2]: http://www.php.net/manual/en/language.operators.comparison.php
php
tips-and-tricks
null
null
null
12/04/2010 16:50:20
not constructive
Tricks for shortening PHP code? === I am looking for neat tricks that can be used to compress PHP code while working on a fun [project][1]. Let me share some of the ones I know so far. Using straight conditionals with no brackets if(TRUE)yes();else no(); You can acquire and validate variables in one line if(!($value=function($input)||empty($value->foo))return FALSE; You can check a value (and default) using the [Ternary Operator][2] in PHP 5.3 $foo = $bar?:NULL; Return boolean values for conditions return!$foo; And one I place at the top of my PHP classes to protect them from direct access - straight boolean checks: defined('BASE_DIR')||die(); **What is the most valuable PHP trick you have learned to reduce space used?** [1]: https://github.com/Xeoncross/1kb-PHP-MVC-Framework [2]: http://www.php.net/manual/en/language.operators.comparison.php
4
5,874,105
05/03/2011 18:39:42
238,469
12/25/2009 03:50:24
607
17
How to compare the pairs of coordinates most efficiently without using nested loops in Matlab?
If I have 20 pairs of coordinates, whose x and y values are say : x y 27 182 180 81 154 52 183 24 124 168 146 11 16 90 184 153 138 133 122 79 192 183 39 25 194 63 129 107 115 161 33 14 47 65 65 2 1 124 93 79 Now if I randomly generate 15 pairs of coordinates (x,y) and want to compare with these 20 pairs of coordinates given above, how can I do that most efficiently without nested loops?
matlab
comparison
coordinates
memory-efficient
null
null
open
How to compare the pairs of coordinates most efficiently without using nested loops in Matlab? === If I have 20 pairs of coordinates, whose x and y values are say : x y 27 182 180 81 154 52 183 24 124 168 146 11 16 90 184 153 138 133 122 79 192 183 39 25 194 63 129 107 115 161 33 14 47 65 65 2 1 124 93 79 Now if I randomly generate 15 pairs of coordinates (x,y) and want to compare with these 20 pairs of coordinates given above, how can I do that most efficiently without nested loops?
0
11,675,025
07/26/2012 17:47:20
1,513,272
07/09/2012 22:50:03
6
0
Send Simple Strings from Java to HTTP Server
Is there a way to send multiple strings from a Java (specifically android) program to an http server without having to use JSON?
java
php
android
http
server
07/28/2012 03:41:21
not a real question
Send Simple Strings from Java to HTTP Server === Is there a way to send multiple strings from a Java (specifically android) program to an http server without having to use JSON?
1
3,816,829
09/28/2010 20:34:28
461,069
09/28/2010 20:34:26
1
0
SMTP server to be used for Email Marketing Service
I am trying to build a email marketing service company. I am a .net programmer and I have played around trying to build a custom SMTP server but a lot of problems came up when domain keys into play. I am on the next step where I am looking for a professional that I could implement with .Net to send emails. It should provide full reporting. So I would be able to tell customers why their emails are bouncing and other other report such as other companies out there. Just keep in mind I am not looking for check SMTP server used by spammers or any way like that. I am looking a way to implement a service like streamsend, mailchimp or constant contact and other well-known companies out there. Please any reference or pointing me on the right way would be appreciated. Looking also for people that have experience on his field to collaborate or mentor me. Thanks in advance
.net
email
smtp
email-integration
null
07/11/2012 00:58:14
not constructive
SMTP server to be used for Email Marketing Service === I am trying to build a email marketing service company. I am a .net programmer and I have played around trying to build a custom SMTP server but a lot of problems came up when domain keys into play. I am on the next step where I am looking for a professional that I could implement with .Net to send emails. It should provide full reporting. So I would be able to tell customers why their emails are bouncing and other other report such as other companies out there. Just keep in mind I am not looking for check SMTP server used by spammers or any way like that. I am looking a way to implement a service like streamsend, mailchimp or constant contact and other well-known companies out there. Please any reference or pointing me on the right way would be appreciated. Looking also for people that have experience on his field to collaborate or mentor me. Thanks in advance
4
3,202,228
07/08/2010 09:28:57
196,963
10/26/2009 23:08:24
200
8
JBoss Portal, Spring and JMX MBeans
I'm trying to use the Spring JMX Exporter to define a MBean in my JBoss Portal Server (2.7.0) which is built on a JBoss AS 4.2.3. The MBean is exported correctly but I want to trigger some of the PortalEvents now here comes my problem: If I declare a service in my `jboss-service.xml` I have to define a dependency for this MBean. <mbean code="org.jboss.portal.core.event.PortalEventListenerServiceImpl" name="portal:service=ListenerService,type=login_event" xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean"> <xmbean/> <depends optional-attribute-name="Registry" proxy-type="attribute">portal:service=ListenerRegistry</depends> <attribute name="RegistryId">login_event</attribute> <attribute name="ListenerClassName"> de.ac.m.login.PortalSessionEventLogin </attribute> </mbean> Is there a possibility to define such a dependency in my Spring JMX Exporter too? Reason for exporting via spring is, that I want to access my dao layer too from this MBean. And I dont want a double packaging. One export as war and one as jar, so that my MBean class is available for the portal.
java
spring
jboss
jmx
null
null
open
JBoss Portal, Spring and JMX MBeans === I'm trying to use the Spring JMX Exporter to define a MBean in my JBoss Portal Server (2.7.0) which is built on a JBoss AS 4.2.3. The MBean is exported correctly but I want to trigger some of the PortalEvents now here comes my problem: If I declare a service in my `jboss-service.xml` I have to define a dependency for this MBean. <mbean code="org.jboss.portal.core.event.PortalEventListenerServiceImpl" name="portal:service=ListenerService,type=login_event" xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean"> <xmbean/> <depends optional-attribute-name="Registry" proxy-type="attribute">portal:service=ListenerRegistry</depends> <attribute name="RegistryId">login_event</attribute> <attribute name="ListenerClassName"> de.ac.m.login.PortalSessionEventLogin </attribute> </mbean> Is there a possibility to define such a dependency in my Spring JMX Exporter too? Reason for exporting via spring is, that I want to access my dao layer too from this MBean. And I dont want a double packaging. One export as war and one as jar, so that my MBean class is available for the portal.
0
2,384,461
03/05/2010 03:50:45
286,812
03/05/2010 03:50:45
1
0
Bluetooth support on Android Emulator
I wanna know if the developer team wich made the emulator have some information to make bluetooth works in the android emulator, indicate some links about it, if they have some date for release or if they'll make it works in the future. Thanks.
bluetooth
android-emulator
null
null
null
null
open
Bluetooth support on Android Emulator === I wanna know if the developer team wich made the emulator have some information to make bluetooth works in the android emulator, indicate some links about it, if they have some date for release or if they'll make it works in the future. Thanks.
0
9,549,085
03/03/2012 19:20:37
754,487
05/15/2011 13:19:35
156
0
Why is this function so slow?
I can't seem to figure out why it's so slow so I was hoping someone else might know :/. chunk_vertices and chunk_indices are lists. public void get_cube_at_position(int x, int y, int z,Color colour) { int length; if (y > y_size - 2) { chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y + 1, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y + 1, 1 + z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } else if (blocks[x, y + 1, z] == 0) { chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y + 1, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y + 1, 1 + z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } if ( y != 0 && blocks[x, y - 1, z] == 0) { chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y, 1 + z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } if (x > x_size - 2) { } else if (blocks[x + 1, y, z] == 0) { chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, 1 + y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, 1 + y, 1 + z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } if (x != 0 && blocks[x - 1, y, z] == 0) { chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, 1 + z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } if (z > z_size - 2) { } else if (blocks[x, y, z + 1] == 0) { chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y + 1, 1 + z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } if (z != 0 && blocks[x, y, z - 1] == 0) { chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y + 1, z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } }
c#
xna
null
null
null
03/04/2012 07:36:33
too localized
Why is this function so slow? === I can't seem to figure out why it's so slow so I was hoping someone else might know :/. chunk_vertices and chunk_indices are lists. public void get_cube_at_position(int x, int y, int z,Color colour) { int length; if (y > y_size - 2) { chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y + 1, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y + 1, 1 + z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } else if (blocks[x, y + 1, z] == 0) { chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y + 1, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y + 1, 1 + z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } if ( y != 0 && blocks[x, y - 1, z] == 0) { chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y, 1 + z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } if (x > x_size - 2) { } else if (blocks[x + 1, y, z] == 0) { chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, 1 + y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, 1 + y, 1 + z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } if (x != 0 && blocks[x - 1, y, z] == 0) { chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, 1 + z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } if (z > z_size - 2) { } else if (blocks[x, y, z + 1] == 0) { chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y, 1 + z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y + 1, 1 + z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } if (z != 0 && blocks[x, y, z - 1] == 0) { chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(x, y + 1, z), colour)); chunk_vertices.Add(new VertexPositionColor(new Vector3(1 + x, y + 1, z), colour)); length = chunk_vertices.Count - 4; chunk_indices.Add(0 + length); chunk_indices.Add(1 + length); chunk_indices.Add(2 + length); chunk_indices.Add(3 + length); chunk_indices.Add(2 + length); chunk_indices.Add(1 + length); } }
3
2,065,880
01/14/2010 16:55:28
32,154
10/28/2008 18:38:10
763
27
Javascript: Hijack Copy?
I was just reading the Times online and I wanted to copy a bit of text from the article and IM it to a friend, but I noticed when I did so, it automatically appended the link back to the article in what I had copied. This is not a feature of my IM client, so I assume this happened because of some javascript on Times website. How would I accomplish this if I wanted to implement it on my site? Basically, I would have to hijack the copy operation and append the URL of the article to the end of the copied content, right? Thoughts? Here's the article I was reading, for reference: http://www.time.com/time/health/article/0,8599,1914857,00.html
javascript
null
null
null
null
null
open
Javascript: Hijack Copy? === I was just reading the Times online and I wanted to copy a bit of text from the article and IM it to a friend, but I noticed when I did so, it automatically appended the link back to the article in what I had copied. This is not a feature of my IM client, so I assume this happened because of some javascript on Times website. How would I accomplish this if I wanted to implement it on my site? Basically, I would have to hijack the copy operation and append the URL of the article to the end of the copied content, right? Thoughts? Here's the article I was reading, for reference: http://www.time.com/time/health/article/0,8599,1914857,00.html
0
28,975
08/26/2008 19:55:29
2,745
08/24/2008 20:58:00
1
1
Anyone using CouchDB?
I've followed the [CouchDB](http://incubator.apache.org/couchdb/index.html) project with interest over the last couple of years, and see it is now an Apache Incubator project. Prior to that, the CouchDB web site was full of *do not use for production code* type disclaimers, so I'd done no more than keep an eye on it. I'd be interested to know your experiences if you've been using CouchDB either for a live project, or a technology pilot.
database
server
technologies
null
null
null
open
Anyone using CouchDB? === I've followed the [CouchDB](http://incubator.apache.org/couchdb/index.html) project with interest over the last couple of years, and see it is now an Apache Incubator project. Prior to that, the CouchDB web site was full of *do not use for production code* type disclaimers, so I'd done no more than keep an eye on it. I'd be interested to know your experiences if you've been using CouchDB either for a live project, or a technology pilot.
0
2,972,672
06/04/2010 08:54:45
301,107
03/24/2010 18:28:59
15
0
Python, MySQL and Daemon Problem in Ubuntu 10.04
I have a script which runs inside a while loop and monitors a mysql data source every 2 seconds. If I run if from the command line, it runs and works fine. But If I attach it to a daemon, it throws an error saying "MySQL has gone" or something similar. I checked and found MySQL up and running. I could even execute queries from other tools. I badly need help. I am running Ubuntu 10.04.
python
mysql
ubuntu
daemon
null
null
open
Python, MySQL and Daemon Problem in Ubuntu 10.04 === I have a script which runs inside a while loop and monitors a mysql data source every 2 seconds. If I run if from the command line, it runs and works fine. But If I attach it to a daemon, it throws an error saying "MySQL has gone" or something similar. I checked and found MySQL up and running. I could even execute queries from other tools. I badly need help. I am running Ubuntu 10.04.
0
1,789,794
11/24/2009 12:33:01
217,780
11/24/2009 12:29:32
1
0
Unity IOC, AOP & Interface Interception
I've been playing around with Unity to do some AOP stuff, setting up via IOC like: ioc.RegisterType<ICustomerService, CustomerService>().Configure<Interception>().SetInterceptorFor<ICustomerService>(new InterfaceInterceptor()); ... and then having an ICallHandler on the ICustomerService interface's methods. For teh time being i want to just get the method called, the class it's in, and the namespace for that class. So... inside the... public IMethodReturn Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext) ...method of the ICallHandler, i can access the method name via input.MethodBase.Name... if i use input.MethodBase.DeclaringType.Name i get the interface ICustomerService... BUT... how would i go about getting the implementing class "CustomerService" rather than the interface? I've been told to use input.Target.. but that just returns "DynamicModule.ns.Wrapped_ICustomerService_4f2242e5e00640ab84e4bc9e05ba0a13" Any help on this folks?
unity
aop
ioc
.net
c#
null
open
Unity IOC, AOP & Interface Interception === I've been playing around with Unity to do some AOP stuff, setting up via IOC like: ioc.RegisterType<ICustomerService, CustomerService>().Configure<Interception>().SetInterceptorFor<ICustomerService>(new InterfaceInterceptor()); ... and then having an ICallHandler on the ICustomerService interface's methods. For teh time being i want to just get the method called, the class it's in, and the namespace for that class. So... inside the... public IMethodReturn Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext) ...method of the ICallHandler, i can access the method name via input.MethodBase.Name... if i use input.MethodBase.DeclaringType.Name i get the interface ICustomerService... BUT... how would i go about getting the implementing class "CustomerService" rather than the interface? I've been told to use input.Target.. but that just returns "DynamicModule.ns.Wrapped_ICustomerService_4f2242e5e00640ab84e4bc9e05ba0a13" Any help on this folks?
0
7,122,237
08/19/2011 13:24:23
740,018
05/05/2011 13:27:03
370
2
jQuery newbie: how to change the HTML elements dynamically in my case?
I have a group of radio buttons on my page: <form ...> <input type="radio" name="people" checked> Student <input type="radio" name="people"> Teacher <input type="radio" name="people"> Assistant <!-- Here is the dynamic content, could be check boxes or radio buttons--> </form> The feature I would like to implement is: Based on the selection of the radio buttons, the **content** after the radio buttons will change **dynamically**. (The radio buttons and the content are inside a form.) for example: -if "**student**" is selected, the dynamic content part is (check boxes): <input type="checkbox" name="name" /> Name <br /> <input type="checkbox" name="Age" /> Age <br /> <input type="checkbox" name="grade" /> Grade <br /> -if "**Teacher**" is selected, the dynamic content part is (check boxes & radio buttons): <input type="checkbox" name="subject" /> Subject <br /> <input type="radio" name="code" checked> 111 <input type="radio" name="code"> 222 <input type="radio" name="code"> 333 -if "**Assistant**" is selected, the dynamic content part is other check boxes. How to implement this **dynamic content change** in **jQuery**?
jquery
html
jquery-ui
jquery-selectors
jquery-validate
null
open
jQuery newbie: how to change the HTML elements dynamically in my case? === I have a group of radio buttons on my page: <form ...> <input type="radio" name="people" checked> Student <input type="radio" name="people"> Teacher <input type="radio" name="people"> Assistant <!-- Here is the dynamic content, could be check boxes or radio buttons--> </form> The feature I would like to implement is: Based on the selection of the radio buttons, the **content** after the radio buttons will change **dynamically**. (The radio buttons and the content are inside a form.) for example: -if "**student**" is selected, the dynamic content part is (check boxes): <input type="checkbox" name="name" /> Name <br /> <input type="checkbox" name="Age" /> Age <br /> <input type="checkbox" name="grade" /> Grade <br /> -if "**Teacher**" is selected, the dynamic content part is (check boxes & radio buttons): <input type="checkbox" name="subject" /> Subject <br /> <input type="radio" name="code" checked> 111 <input type="radio" name="code"> 222 <input type="radio" name="code"> 333 -if "**Assistant**" is selected, the dynamic content part is other check boxes. How to implement this **dynamic content change** in **jQuery**?
0
10,180,362
04/16/2012 19:26:06
1,199,882
02/09/2012 14:42:02
981
48
Is there a way in grep to find out how many lines matched the grep result?
Suppose I write a grep query to find out the occurrence of a method call on an object like this - grep -nr "[[:alnum:]]\.[[:alnum:]](.*)" . // might not be accurate, but irrelevant This would give many results. How to find out how many such results are obtained?
grep
null
null
null
null
null
open
Is there a way in grep to find out how many lines matched the grep result? === Suppose I write a grep query to find out the occurrence of a method call on an object like this - grep -nr "[[:alnum:]]\.[[:alnum:]](.*)" . // might not be accurate, but irrelevant This would give many results. How to find out how many such results are obtained?
0
9,218,112
02/09/2012 20:18:13
685,292
03/31/2011 07:56:28
21
3
Combining layout_weight and maxHeight?
I have the following "button bar" layout setup: <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <RelativeLayout android:id="@+id/button_bar" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="0.1" android:maxHeight="86px" android:orientation="horizontal"> <Button android:id="@+id/home_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentLeft="true"/> <Button android:id="@+id/level_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_toRightOf="@+id/home_button"/> <Button android:id="@+id/help_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_toRightOf="@+id/level_button"/> <Button android:id="@+id/sound_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true"/> </RelativeLayout> <View android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="0.9"/> </LinearLayout> I want the button bar (the RelativeLayout) height to be 10% of the screen height, so I used layout_weight="0.1" + layout_weight="0.9", but no more than 86 pixels, so I tried to use maxHeight="86px", but this doesn't work. Do you have any clue how to achiveve 10% height combined with constant maximum height layout restriction, please?
android
layout
weight
max-height
null
null
open
Combining layout_weight and maxHeight? === I have the following "button bar" layout setup: <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <RelativeLayout android:id="@+id/button_bar" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="0.1" android:maxHeight="86px" android:orientation="horizontal"> <Button android:id="@+id/home_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentLeft="true"/> <Button android:id="@+id/level_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_toRightOf="@+id/home_button"/> <Button android:id="@+id/help_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_toRightOf="@+id/level_button"/> <Button android:id="@+id/sound_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true"/> </RelativeLayout> <View android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="0.9"/> </LinearLayout> I want the button bar (the RelativeLayout) height to be 10% of the screen height, so I used layout_weight="0.1" + layout_weight="0.9", but no more than 86 pixels, so I tried to use maxHeight="86px", but this doesn't work. Do you have any clue how to achiveve 10% height combined with constant maximum height layout restriction, please?
0
4,909,775
02/05/2011 21:28:42
329,637
04/30/2010 09:27:00
6,626
296
Remove outliers while mapping one range to another?
I asked [this question][1] on how to map a range between 0 and n to 0 to 9. I use this solution and it works: private int MapValue(int value, int n) { int output = (int)Math.Round((10.0 / (n - 1) * (value - 1)) - 0.5, 0); if (output == -1) return 0; else return output; } Now I encountered another problem. I one example I have the range 0 to 1116. However most values or between 0 and 50 or maybe 0 and 100. So nevertheless most values are mapped to the same color. How can i avoid that such outliers tamper with my mapping? [1]: http://stackoverflow.com/questions/4907134/map-an-unbounded-range-of-values-to-10-colors
c#
.net
null
null
null
null
open
Remove outliers while mapping one range to another? === I asked [this question][1] on how to map a range between 0 and n to 0 to 9. I use this solution and it works: private int MapValue(int value, int n) { int output = (int)Math.Round((10.0 / (n - 1) * (value - 1)) - 0.5, 0); if (output == -1) return 0; else return output; } Now I encountered another problem. I one example I have the range 0 to 1116. However most values or between 0 and 50 or maybe 0 and 100. So nevertheless most values are mapped to the same color. How can i avoid that such outliers tamper with my mapping? [1]: http://stackoverflow.com/questions/4907134/map-an-unbounded-range-of-values-to-10-colors
0
8,810,085
01/10/2012 20:30:25
113,416
05/27/2009 21:38:41
663
5
Reference the current items Content Type in CAML Query
I am building a simple CAML Query (not in C#). Please see below: <Where> <Eq> <FieldRef Name='SectionName' /> <Value Type='Text'>Name-of-section</Value> </Eq> </Where> What I would like to do is replace "Name-of-section" with this.ContentType (I understand that this.ContentType is made up, I am just using that as sudo code to explain that I would like to reference the current item's content type). If I am unable to do that, can I do something similar like this.SomeOtherColumnInCurrentItem? To clarify further, I am using the SharePoint 2010 Filtered Lookup Column solution from codeplex (http://sp2010filteredlookup.codeplex.com/).
sharepoint
caml
null
null
null
null
open
Reference the current items Content Type in CAML Query === I am building a simple CAML Query (not in C#). Please see below: <Where> <Eq> <FieldRef Name='SectionName' /> <Value Type='Text'>Name-of-section</Value> </Eq> </Where> What I would like to do is replace "Name-of-section" with this.ContentType (I understand that this.ContentType is made up, I am just using that as sudo code to explain that I would like to reference the current item's content type). If I am unable to do that, can I do something similar like this.SomeOtherColumnInCurrentItem? To clarify further, I am using the SharePoint 2010 Filtered Lookup Column solution from codeplex (http://sp2010filteredlookup.codeplex.com/).
0
11,012,186
06/13/2012 09:41:30
870,925
07/30/2011 18:02:45
301
11
Starting with NFC and and Android
I am very new to NFC but good hands on Android.I had found some definition of it on `Stackoverflow Google and WikiPedia`.I have downloaded the Android SDK for NFC. I have few queries in mind that could n't be solved after a lot of googling - What is difference between NFC and other Wireless(Bluetooth WiFi) - I have HTC Phone with me and on [Wikipedia][1],i found that my phone doesn't support NFC.Can I use NFC SDK for Android that can act as NFC phone? - There is concept of tag in NFC,I didn't get that. - What NFC gives us? I mean is it coding API,a library? - What can i do to make my mobile NFC enable? Any one who had worked on NFC.For a beginner these questions are very important to understand Thank you in meekness [1]: http://en.wikipedia.org/wiki/List_of_NFC_enabled_handsets
android
bluetooth
wifi
nfc
android-wireless
06/14/2012 12:54:44
not a real question
Starting with NFC and and Android === I am very new to NFC but good hands on Android.I had found some definition of it on `Stackoverflow Google and WikiPedia`.I have downloaded the Android SDK for NFC. I have few queries in mind that could n't be solved after a lot of googling - What is difference between NFC and other Wireless(Bluetooth WiFi) - I have HTC Phone with me and on [Wikipedia][1],i found that my phone doesn't support NFC.Can I use NFC SDK for Android that can act as NFC phone? - There is concept of tag in NFC,I didn't get that. - What NFC gives us? I mean is it coding API,a library? - What can i do to make my mobile NFC enable? Any one who had worked on NFC.For a beginner these questions are very important to understand Thank you in meekness [1]: http://en.wikipedia.org/wiki/List_of_NFC_enabled_handsets
1
8,787,374
01/09/2012 11:00:36
1,124,914
01/01/2012 07:09:31
11
0
How can we write a function to swap to enum variables?
How can we write a function which swap enum variables? Also are these variables standard and working with them doesn't matter in a project? How do C++ complier use them and put them in the RAM?
c++
variables
null
null
null
null
open
How can we write a function to swap to enum variables? === How can we write a function which swap enum variables? Also are these variables standard and working with them doesn't matter in a project? How do C++ complier use them and put them in the RAM?
0
4,436,690
12/14/2010 06:58:57
538,255
12/10/2010 19:08:18
1
0
Exporting contacts
Can someone tell me how the contacts.apk application does the "export" functionality. Does it read each and every row of the contacts.db using cursors and then convert them into .vcf. This seems to be painfully slow, but the application seems to be doing this much faster. It would be great if someone can point me to the code that does the "export" functionality.
android
null
null
null
null
null
open
Exporting contacts === Can someone tell me how the contacts.apk application does the "export" functionality. Does it read each and every row of the contacts.db using cursors and then convert them into .vcf. This seems to be painfully slow, but the application seems to be doing this much faster. It would be great if someone can point me to the code that does the "export" functionality.
0
9,796,926
03/21/2012 00:20:27
716,082
04/19/2011 22:06:10
522
24
RSpec Request Spec Testing Model Attribute
I have the following Rspec file: describe "Cart" do before do @user = FactoryGirl.create(:user) @cart = @user.carts.create! end describe "using stripe" do before do @sport = FactoryGirl.create(:sport) end describe "user adds sport to cart" do before do visit sports_path click_link "Add to Cart" end it "should be checkout page" do page.should have_content("Total") end describe "user clicks checkout" do before do click_button "Checkout" end it "should redirect user to sign in form" do page.should have_selector('h2', text: "Sign in") end describe "user logs on" do before do fill_in "Email", with: @user.email fill_in "Password", with: @user.password click_button "Sign in" end it "should be on checkout page" do page.should have_selector('h2', text: "Checkout") end describe "user fills in form", js: true, driver: :webkit do describe "everything valid" do before do fill_in "card-number", with: 4242424242424242 fill_in "card-expiry-month", with: 12 fill_in "card-expiry-year", with: 2015 fill_in "card-cvc", with: 123 click_button "Submit Payment" end it "should redirect to confirmation page" do page.should have_content("Confirmation") end it "should have the total price listed" do page.should have_content(@cart.total_price) end it "should create a stripe customer and save that to the stripe_customer_id of the user" do @user.stripe_customer_id.should_not be_nil end describe "should allow user authorize charge" do before do click_button "Confirm and Purchase" end it "should be back to sports page" do page.should have_content("Select a Sport") end end end end end end end end So a user (created by FactoryGirl) buys something from my site. The `should create a stripe customer and save that to the stripe_customer_id of the user` is failing (`@user.stripe_customer_id` is `nil`). The controller has this method: def confirmation @cart = current_cart customer = Stripe::Customer.create(description: current_user.email, card: params[:stripeToken]) current_user.update_attributes(stripe_customer_id: customer.id) end I know the current_user (the same user from FactoryGirl for the tests) is being updated with the `stripe_customer_id` because the other tests are working. I assumed I would have to update the model somehow, because I was directly affecting the database (@user and current_user reference the same db entry, but are not the same object). So I tried calling `@user.reload` before checking if the `stripe_customer_id` was nil, but the test still failed. 2 questions: Should I even be checking model attributes in a request spec? And, is there a way I can get the failing test to pass? Thanks
ruby-on-rails
testing
model
rspec
null
null
open
RSpec Request Spec Testing Model Attribute === I have the following Rspec file: describe "Cart" do before do @user = FactoryGirl.create(:user) @cart = @user.carts.create! end describe "using stripe" do before do @sport = FactoryGirl.create(:sport) end describe "user adds sport to cart" do before do visit sports_path click_link "Add to Cart" end it "should be checkout page" do page.should have_content("Total") end describe "user clicks checkout" do before do click_button "Checkout" end it "should redirect user to sign in form" do page.should have_selector('h2', text: "Sign in") end describe "user logs on" do before do fill_in "Email", with: @user.email fill_in "Password", with: @user.password click_button "Sign in" end it "should be on checkout page" do page.should have_selector('h2', text: "Checkout") end describe "user fills in form", js: true, driver: :webkit do describe "everything valid" do before do fill_in "card-number", with: 4242424242424242 fill_in "card-expiry-month", with: 12 fill_in "card-expiry-year", with: 2015 fill_in "card-cvc", with: 123 click_button "Submit Payment" end it "should redirect to confirmation page" do page.should have_content("Confirmation") end it "should have the total price listed" do page.should have_content(@cart.total_price) end it "should create a stripe customer and save that to the stripe_customer_id of the user" do @user.stripe_customer_id.should_not be_nil end describe "should allow user authorize charge" do before do click_button "Confirm and Purchase" end it "should be back to sports page" do page.should have_content("Select a Sport") end end end end end end end end So a user (created by FactoryGirl) buys something from my site. The `should create a stripe customer and save that to the stripe_customer_id of the user` is failing (`@user.stripe_customer_id` is `nil`). The controller has this method: def confirmation @cart = current_cart customer = Stripe::Customer.create(description: current_user.email, card: params[:stripeToken]) current_user.update_attributes(stripe_customer_id: customer.id) end I know the current_user (the same user from FactoryGirl for the tests) is being updated with the `stripe_customer_id` because the other tests are working. I assumed I would have to update the model somehow, because I was directly affecting the database (@user and current_user reference the same db entry, but are not the same object). So I tried calling `@user.reload` before checking if the `stripe_customer_id` was nil, but the test still failed. 2 questions: Should I even be checking model attributes in a request spec? And, is there a way I can get the failing test to pass? Thanks
0