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
9,501,389
02/29/2012 14:58:05
873,836
08/02/2011 04:15:53
559
33
Arabic text defaulting to default font
I have converted some open source ttfs from freearabicfonts.com into webfonts using fontsquirrel's webfont converter and gone through the usual css3 steps to get a webfont working (it's definitely there). However, when I try to use the font on arabic text it doesn't work. background check: db tables set to utf8, text saved in db as valid arabic, defaultcharset in htaccess set to utf-8, mysql connection: set names as utf-8 done, html5 meta tag set to utf-8, in view source the text is arabic, on the page, the text is arabic..... but the font is the ugly browser standard one... Anyone ever seen this... I'm pulling my hair out... Thanks very much indeed. A
css
utf-8
fonts
font-face
arabic
null
open
Arabic text defaulting to default font === I have converted some open source ttfs from freearabicfonts.com into webfonts using fontsquirrel's webfont converter and gone through the usual css3 steps to get a webfont working (it's definitely there). However, when I try to use the font on arabic text it doesn't work. background check: db tables set to utf8, text saved in db as valid arabic, defaultcharset in htaccess set to utf-8, mysql connection: set names as utf-8 done, html5 meta tag set to utf-8, in view source the text is arabic, on the page, the text is arabic..... but the font is the ugly browser standard one... Anyone ever seen this... I'm pulling my hair out... Thanks very much indeed. A
0
7,890,120
10/25/2011 13:36:39
1,012,800
10/25/2011 13:29:38
1
0
WCF Service in .NET 4.0 goes "to sleep" but ping wakes it back up
Good Morning, everyone. I am somewhat new to WCF and we have created a new WCF service. This service uses net.msmq bindings to transfer and receive messages from another WCF service. This all works GREAT. However, when we deploy the service to our servers, this new WCF service "falls asleep". I'll explain. I completely understand that the WCF Service doesn't run like a Windows service. What I mean is that, once we ping the service, it'll run fine for a few minutes. It monitors the MSMQ queues that it's supposed to and processes the messages just like it should. Send and receive work just fine. If there is a lull in the incoming data, the service just seems to stop listening. It will stay in this state until we ping the service by going to the URL exposed by the HTTP service that we had to put in place. We didn't build this to be a RESTful service, so I wouldn't expect that to be the issue. Anyone have any ideas? Thanks, Jim Evans, MCAD
vb.net
wcf
iis
msmq
null
null
open
WCF Service in .NET 4.0 goes "to sleep" but ping wakes it back up === Good Morning, everyone. I am somewhat new to WCF and we have created a new WCF service. This service uses net.msmq bindings to transfer and receive messages from another WCF service. This all works GREAT. However, when we deploy the service to our servers, this new WCF service "falls asleep". I'll explain. I completely understand that the WCF Service doesn't run like a Windows service. What I mean is that, once we ping the service, it'll run fine for a few minutes. It monitors the MSMQ queues that it's supposed to and processes the messages just like it should. Send and receive work just fine. If there is a lull in the incoming data, the service just seems to stop listening. It will stay in this state until we ping the service by going to the URL exposed by the HTTP service that we had to put in place. We didn't build this to be a RESTful service, so I wouldn't expect that to be the issue. Anyone have any ideas? Thanks, Jim Evans, MCAD
0
688,164
03/27/2009 01:17:38
64,223
02/09/2009 16:09:22
967
72
RegEx for replacing and adding attributes
Given the following code : <body> <img src="source.jpg" /> <p> <img src="source.jpg" id ="hello" /> <img src="source.jpg" id ="world" /> </p> </body> What's the best way - using a regular expression (or better?) - to replace it so it becomes this: <body> <img src="source.jpg" id="img_0" /> <p> <img src="source.jpg" id ="img_1" /> <img src="source.jpg" id ="img_2" /> </p> </body> In other words : - All the `<image />` tags all gets populated by an `id` attribute. - The `id` attribute should contain an incremented attribute (this is not really the problem though as its just part of the replace procedure) I guess two passes are needed, one to remove all the existent `id` attributes and another to populate with new ones ?
regex
php
actionscript-3
justforfun
problem
null
open
RegEx for replacing and adding attributes === Given the following code : <body> <img src="source.jpg" /> <p> <img src="source.jpg" id ="hello" /> <img src="source.jpg" id ="world" /> </p> </body> What's the best way - using a regular expression (or better?) - to replace it so it becomes this: <body> <img src="source.jpg" id="img_0" /> <p> <img src="source.jpg" id ="img_1" /> <img src="source.jpg" id ="img_2" /> </p> </body> In other words : - All the `<image />` tags all gets populated by an `id` attribute. - The `id` attribute should contain an incremented attribute (this is not really the problem though as its just part of the replace procedure) I guess two passes are needed, one to remove all the existent `id` attributes and another to populate with new ones ?
0
8,068,161
11/09/2011 16:30:41
281,180
02/25/2010 12:00:19
686
13
iis access error
I`m using IIS6.0. How can I correct the following error: I am having the error: > Access to the path 'c:\inetpub\wwwroot\global.asax' is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. > > Exception Details: System.UnauthorizedAccessException: Access to the > path 'c:\inetpub\wwwroot\global.asax' is denied. > > ASP.NET is not authorized to access the requested resource. Consider > granting access rights to the resource to the ASP.NET request > identity. ASP.NET has a base process identity (typically > {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and > the configured application pool identity on IIS 7.5) that is used if > the application is not impersonating. If the application is > impersonating via <identity impersonate="true"/>, the identity will be > the anonymous user (typically IUSR_MACHINENAME) or the authenticated > request user. > > To grant ASP.NET access to a file, right-click the file in Explorer, > choose "Properties" and select the Security tab. Click "Add" to add > the appropriate user or group. Highlight the ASP.NET account, and > check the boxes for the desired access. > > Source Error: > > An unhandled exception was generated during the execution of the > current web request. Information regarding the origin and location of > the exception can be identified using the exception stack trace below. > > > Stack Trace: > > > [UnauthorizedAccessException: Access to the path > 'c:\inetpub\wwwroot\global.asax' is denied.] > System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) > +9726046 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, > Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, > String msgPath, Boolean bFromProxy, Boolean useLongPath) +1142 > System.IO.FileStream..ctor(String path, FileMode mode, FileAccess > access, FileShare share) +83 > System.Web.Hosting.MapPathBasedVirtualFile.Open() +75 > System.Web.Hosting.VirtualPathProvider.OpenFile(String virtualPath) > +31 System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) +133 > System.Web.UI.TemplateParser.ParseInternal() +86 > System.Web.UI.TemplateParser.Parse() +160 > System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() > +110 System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider > buildProvider) +65 > System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() > +218 System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +40 System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean > isPrecompiledApp) +8973974 > System.Web.Compilation.BuildManager.CompileGlobalAsax() +50 > System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +265 > > [HttpException (0x80004005): Access to the path > 'c:\inetpub\wwwroot\global.asax' is denied.] > System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() > +62 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +421 > System.Web.Compilation.BuildManager.CallAppInitializeMethod() +31 > System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager > appManager, IApplicationHost appHost, IConfigMapPathFactory > configMapPathFactory, HostingEnvironmentParameters hostingParameters, > PolicyLevel policyLevel, Exception appDomainCreationException) +605 > > [HttpException (0x80004005): Access to the path > 'c:\inetpub\wwwroot\global.asax' is denied.] > System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8946484 > System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97 > System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) > +258 > > > > > -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:4.0.30319; > ASP.NET Version:4.0.30319.1
asp.net-mvc
asp.net-mvc-2
iis6
null
null
null
open
iis access error === I`m using IIS6.0. How can I correct the following error: I am having the error: > Access to the path 'c:\inetpub\wwwroot\global.asax' is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. > > Exception Details: System.UnauthorizedAccessException: Access to the > path 'c:\inetpub\wwwroot\global.asax' is denied. > > ASP.NET is not authorized to access the requested resource. Consider > granting access rights to the resource to the ASP.NET request > identity. ASP.NET has a base process identity (typically > {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and > the configured application pool identity on IIS 7.5) that is used if > the application is not impersonating. If the application is > impersonating via <identity impersonate="true"/>, the identity will be > the anonymous user (typically IUSR_MACHINENAME) or the authenticated > request user. > > To grant ASP.NET access to a file, right-click the file in Explorer, > choose "Properties" and select the Security tab. Click "Add" to add > the appropriate user or group. Highlight the ASP.NET account, and > check the boxes for the desired access. > > Source Error: > > An unhandled exception was generated during the execution of the > current web request. Information regarding the origin and location of > the exception can be identified using the exception stack trace below. > > > Stack Trace: > > > [UnauthorizedAccessException: Access to the path > 'c:\inetpub\wwwroot\global.asax' is denied.] > System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) > +9726046 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, > Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, > String msgPath, Boolean bFromProxy, Boolean useLongPath) +1142 > System.IO.FileStream..ctor(String path, FileMode mode, FileAccess > access, FileShare share) +83 > System.Web.Hosting.MapPathBasedVirtualFile.Open() +75 > System.Web.Hosting.VirtualPathProvider.OpenFile(String virtualPath) > +31 System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) +133 > System.Web.UI.TemplateParser.ParseInternal() +86 > System.Web.UI.TemplateParser.Parse() +160 > System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() > +110 System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider > buildProvider) +65 > System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() > +218 System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +40 System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean > isPrecompiledApp) +8973974 > System.Web.Compilation.BuildManager.CompileGlobalAsax() +50 > System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +265 > > [HttpException (0x80004005): Access to the path > 'c:\inetpub\wwwroot\global.asax' is denied.] > System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() > +62 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +421 > System.Web.Compilation.BuildManager.CallAppInitializeMethod() +31 > System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager > appManager, IApplicationHost appHost, IConfigMapPathFactory > configMapPathFactory, HostingEnvironmentParameters hostingParameters, > PolicyLevel policyLevel, Exception appDomainCreationException) +605 > > [HttpException (0x80004005): Access to the path > 'c:\inetpub\wwwroot\global.asax' is denied.] > System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8946484 > System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97 > System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) > +258 > > > > > -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:4.0.30319; > ASP.NET Version:4.0.30319.1
0
4,661
08/07/2008 12:51:38
274
08/04/2008 10:43:23
41
8
Can you apply more than one OpenID to a StackOverflow account
I have more than one OpenID as I have tried out numerous. As people take up OpenID different suppliers are going to emerge I may want to switch provinders. As all IDs are me, and all are authenticated against the same email address, shouldn't I be able to log into stack overflow with any of them and be able to hit the same account?
stackoverflow
openid
null
null
null
05/22/2012 19:21:26
off topic
Can you apply more than one OpenID to a StackOverflow account === I have more than one OpenID as I have tried out numerous. As people take up OpenID different suppliers are going to emerge I may want to switch provinders. As all IDs are me, and all are authenticated against the same email address, shouldn't I be able to log into stack overflow with any of them and be able to hit the same account?
2
10,796,297
05/29/2012 09:19:42
788,700
06/08/2011 06:55:18
686
37
find files with non-ascii chars
Is there a way I can `find` files with non-ascii chars? I could use a pipe of course - and filter the files with perl, but for efficiency I'd like to set it all in `find`. I tried the following: find . -type f -name '*[^[:ascii:]]*' it doesn't work at all.
find
non-ascii-chars
null
null
null
06/06/2012 12:37:13
off topic
find files with non-ascii chars === Is there a way I can `find` files with non-ascii chars? I could use a pipe of course - and filter the files with perl, but for efficiency I'd like to set it all in `find`. I tried the following: find . -type f -name '*[^[:ascii:]]*' it doesn't work at all.
2
11,628,717
07/24/2012 10:16:36
302,533
03/26/2010 13:14:24
2,018
48
Display pointers on Google Map from JSON
I'm attempting to build an application that using the Google Maps API will allow me to request a users location and once received query a database and pull back 10 records that are within say 10 miles of the users location. These 10 records will appear on the map as custom pointers showing the users avatar and the title of the record and can be clicked to view the record. An example of the returned JSON would be: { "id": "10", "title": "This is an example", "href": "http:\/\/website.com\/posts\/This_is_an_example-10", "location": { "latitude": "53.396432", "longitude": "-1.494141" }, "author": { "name": "John Doe", "avatar": "http:\/\/2.gravatar.com\/avatar\/767fc9c115a1b989744c755db47feb60?s=132&d=wavatar" } }, { "id": "320", "title": "This is another example", "href": "http:\/\/website.com\/posts\/This_is_another_example-320", "location": { "latitude": "53.396432", "longitude": "-1.494141" }, "author": { "name": "John Doe", "avatar": "http:\/\/2.gravatar.com\/avatar\/767fc9c115a1b989744c755db47feb60?s=132&d=wavatar" } } And the current implementation of the Google Map is as follows: <script src="http://maps.googleapis.com/maps/api/js?sensor=true"></script> <script> var map; function initialize() { var myOptions = { zoom: 15, panControl: false, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL }, mapTypeControl: false, scaleControl: false, streetViewControl: false, overviewMapControl: false, center: new google.maps.LatLng(-34.397, 150.644), mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('map'), myOptions); if (navigator.geolocation) { $('.map-notice').fadeOut().remove(); navigator.geolocation.getCurrentPosition(function (position) { var pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); var image = 'http://dl.dropbox.com/u/1597153/marker.png'; var marker = new google.maps.Marker({ animation: google.maps.Animation.DROP, position: pos, map: map, icon: image }); marker.setMap(map); var image = 'http://dl.dropbox.com/u/1597153/pin-white.png'; var marker = new google.maps.Marker({ animation: google.maps.Animation.DROP, position: pos, map: map, icon: image }); marker.setMap(map); // Center the map on the position passed from Geolocation map.setCenter(pos); }, function() { handleNoGeolocation(true); }); } else { handleNoGeolocation(false); } } function handleNoGeolocation(errorFlag) { if (errorFlag) { //alert('Error: The Geolocation service failed.'); $('.no-geo').fadeIn(); } else { alert('Error: Your browser doesn\'t support geolocation.'); } } google.maps.event.addDomListener(window, 'load', initialize); </script> <div class="home-map"> <div class="map-container"> <div class="TopLeft"></div> <div class="TopRight"></div> <div id="map" style="width:620px;height:778px;"></div> <div class="BottomLeft"></div> <div class="BottomRight"></div> </div> <div class="map-notice"> <span>Getting your current location</span> </div> <div class="no-geo" style="display:none;"> <p>Geolocation has been disabled...</p> </div> </div> <!-- // home-map --> The purpose of this question **IS NOT** to do the request on the database based on the current location. I will be doing this at a later date. What I hope to achieve is build the styling using the static JSON content above so I can get that part working first and then do the more complex bits afterwards. Can anyone help? I have managed to get the pin to appear on the map where the CURRENT user is, but need to replicate the same code to show the records in the JSON feed. An example of how it could look is below based on Foursquare... So instead of beer picture, it would be the user avatar and say in the box next to it on hover: `John Doe asked This is an example` and would be clickable to the url passed in the href part of the JSON. ![enter image description here][1] Hopefully someone can help me get in the right direction to show those two JSON items on the map thanks. I have Fiddle here to work with: http://jsfiddle.net/eGFCb/ [1]: http://i.stack.imgur.com/wHXJn.png
json
google-maps
null
null
null
07/24/2012 12:05:13
not a real question
Display pointers on Google Map from JSON === I'm attempting to build an application that using the Google Maps API will allow me to request a users location and once received query a database and pull back 10 records that are within say 10 miles of the users location. These 10 records will appear on the map as custom pointers showing the users avatar and the title of the record and can be clicked to view the record. An example of the returned JSON would be: { "id": "10", "title": "This is an example", "href": "http:\/\/website.com\/posts\/This_is_an_example-10", "location": { "latitude": "53.396432", "longitude": "-1.494141" }, "author": { "name": "John Doe", "avatar": "http:\/\/2.gravatar.com\/avatar\/767fc9c115a1b989744c755db47feb60?s=132&d=wavatar" } }, { "id": "320", "title": "This is another example", "href": "http:\/\/website.com\/posts\/This_is_another_example-320", "location": { "latitude": "53.396432", "longitude": "-1.494141" }, "author": { "name": "John Doe", "avatar": "http:\/\/2.gravatar.com\/avatar\/767fc9c115a1b989744c755db47feb60?s=132&d=wavatar" } } And the current implementation of the Google Map is as follows: <script src="http://maps.googleapis.com/maps/api/js?sensor=true"></script> <script> var map; function initialize() { var myOptions = { zoom: 15, panControl: false, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL }, mapTypeControl: false, scaleControl: false, streetViewControl: false, overviewMapControl: false, center: new google.maps.LatLng(-34.397, 150.644), mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('map'), myOptions); if (navigator.geolocation) { $('.map-notice').fadeOut().remove(); navigator.geolocation.getCurrentPosition(function (position) { var pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); var image = 'http://dl.dropbox.com/u/1597153/marker.png'; var marker = new google.maps.Marker({ animation: google.maps.Animation.DROP, position: pos, map: map, icon: image }); marker.setMap(map); var image = 'http://dl.dropbox.com/u/1597153/pin-white.png'; var marker = new google.maps.Marker({ animation: google.maps.Animation.DROP, position: pos, map: map, icon: image }); marker.setMap(map); // Center the map on the position passed from Geolocation map.setCenter(pos); }, function() { handleNoGeolocation(true); }); } else { handleNoGeolocation(false); } } function handleNoGeolocation(errorFlag) { if (errorFlag) { //alert('Error: The Geolocation service failed.'); $('.no-geo').fadeIn(); } else { alert('Error: Your browser doesn\'t support geolocation.'); } } google.maps.event.addDomListener(window, 'load', initialize); </script> <div class="home-map"> <div class="map-container"> <div class="TopLeft"></div> <div class="TopRight"></div> <div id="map" style="width:620px;height:778px;"></div> <div class="BottomLeft"></div> <div class="BottomRight"></div> </div> <div class="map-notice"> <span>Getting your current location</span> </div> <div class="no-geo" style="display:none;"> <p>Geolocation has been disabled...</p> </div> </div> <!-- // home-map --> The purpose of this question **IS NOT** to do the request on the database based on the current location. I will be doing this at a later date. What I hope to achieve is build the styling using the static JSON content above so I can get that part working first and then do the more complex bits afterwards. Can anyone help? I have managed to get the pin to appear on the map where the CURRENT user is, but need to replicate the same code to show the records in the JSON feed. An example of how it could look is below based on Foursquare... So instead of beer picture, it would be the user avatar and say in the box next to it on hover: `John Doe asked This is an example` and would be clickable to the url passed in the href part of the JSON. ![enter image description here][1] Hopefully someone can help me get in the right direction to show those two JSON items on the map thanks. I have Fiddle here to work with: http://jsfiddle.net/eGFCb/ [1]: http://i.stack.imgur.com/wHXJn.png
1
5,485,531
03/30/2011 11:12:01
141,957
07/21/2009 11:27:24
43
0
retrieving images from database in delphi
i want to store and retrieve images from sql database in delphiXE .
delphi-xe
null
null
null
null
01/20/2012 16:30:35
not a real question
retrieving images from database in delphi === i want to store and retrieve images from sql database in delphiXE .
1
11,720,533
07/30/2012 11:24:26
1,519,790
07/12/2012 05:55:50
1
0
regarding facebook application to like any page through sms
I wanted to build an application where I want to send sms to like any facebook page. Actually there will be particular sms number something like 2244 and when we type sms eg: like facebook_name and send to 2244 then it should like the page. How is this possible?? Please reply asap. thanks in advance.
facebook
null
null
null
null
07/30/2012 14:59:34
not a real question
regarding facebook application to like any page through sms === I wanted to build an application where I want to send sms to like any facebook page. Actually there will be particular sms number something like 2244 and when we type sms eg: like facebook_name and send to 2244 then it should like the page. How is this possible?? Please reply asap. thanks in advance.
1
386,977
12/22/2008 18:35:14
727
08/08/2008 12:16:17
709
35
Do I have to use Disable/EnableControls when using Locate in a TClientDataSet?
Or does it handle it by default?
delphi
null
null
null
null
null
open
Do I have to use Disable/EnableControls when using Locate in a TClientDataSet? === Or does it handle it by default?
0
5,615,934
04/11/2011 01:20:16
64,734
02/10/2009 19:53:12
214
10
Loading connection strings from class library in web application
I have a fairly straightforward problem that I imagine has a simple solution. However, it's not clear to me. Here's the problem: I have a web application that references a class library. That class library needs to access the connection strings in the web.config. From what I've read, this shouldn't be a problem. Here's the code that I'm using to access the connection strings: Dim connectionStrings As ConnectionStringSettingsCollection = ConfigurationManager.ConnectionStrings When I run this code in the web application, I get all of my connection strings back. However, when this **exact** same code is run in the class library (called from the web application), it reverts to the machine.config for some reason and gets the entry from there. i.e. data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true I'm not sure if it matters or not, but the web side of this is a WCF RIA services web site that backs a Silverlight application. I didn't see anything funny in the config that could justify this strange behavior. Any thoughts on why I'm seeing this behavior? Thanks, Matt
asp.net
configuration
.net-4.0
asp.net-4.0
null
null
open
Loading connection strings from class library in web application === I have a fairly straightforward problem that I imagine has a simple solution. However, it's not clear to me. Here's the problem: I have a web application that references a class library. That class library needs to access the connection strings in the web.config. From what I've read, this shouldn't be a problem. Here's the code that I'm using to access the connection strings: Dim connectionStrings As ConnectionStringSettingsCollection = ConfigurationManager.ConnectionStrings When I run this code in the web application, I get all of my connection strings back. However, when this **exact** same code is run in the class library (called from the web application), it reverts to the machine.config for some reason and gets the entry from there. i.e. data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true I'm not sure if it matters or not, but the web side of this is a WCF RIA services web site that backs a Silverlight application. I didn't see anything funny in the config that could justify this strange behavior. Any thoughts on why I'm seeing this behavior? Thanks, Matt
0
5,186,542
03/03/2011 21:06:26
294,225
03/15/2010 19:11:46
1
0
Where am I wrong about my project and these Javascript Frameworks?
First off, the barest bones of the project I wish to create is a wiki engine implemented as a single page web app. I plan on having a set of features available from the get-go with plenty of feature additions down the road. **Basic Features** - page creation (creates both wiki article and discussion forum for that article) - markup and WYSIWYG ala [markitup](http://markitup.jaysalvat.com/examples/markdown/) - on-the-fly conversion between markup / html / WYSIWYG - a side bar to quick navigate - a top toolbar for choosing edit/view **Advanced Features** - configurable side bar to navigate via different method - configurable toolbar (possibly add markup language of choice) - tags - editable todo's - drag and drop file uploads and image attachments The engine would originally consist of the most basic page creation, markup and WYSIWYG editing, and saving. I would eventually like to extend this basic engine with drag and drop image support, file uploads, live data graphs, and a sidebar for customizing views. I have done a fairly extensive search for a decent project from which to base my project off, but other than TiddlyWiki there does not seem to be any good javascript based wiki engines. I also considered applying Jquery on top of existing wiki engines but I believe I would end up rewriting it eventually anyway (Plus its just more exciting to add the features I want as I go). Either way I have arrived at implementing this beast with a javascript library + framework. I know that one cannot really compare some of these frameworks against each other as they are very much not apples to apples. I have tried to frame any comparison comments/questions against comparable pieces of the respective frameworks but I am open to being corrected. So here we go: Based on my own research and opinions I have narrowed the list down to the items below. I intentionally left out things such as SproutCore, corMVC, YUI, and others as I, in my limited capacity, thought the below items would be a better fit. **My Options** - jquery/UI + backbonejs - knockoutjs - javascriptMVC - Dojo - ExtJS - Cappuccino **The Discussion and Tradeoffs** - jquery/UI + backbonejs > From what I've read this combination is used and beloved by many and is very flexible and extensible. My major concern is that this combination is simply not the best jumping off point for developing the more desktop oriented UI interface. While jQueryUI might be competitive it certainly does not seem to be on-par with the UI capabilities of other frameworks. - javascriptMVC > JavascriptMVC to me looks like it is essentially jquery + MVC(jqueryMX) extensions, along with a few other apps for documenting(documentJS), functional tests(funcUnit), and code and dependency management(stealJS). Beyond the benefits of the additional module, I think the functional debate really comes down to backbonejs vs. jqueryMX Am I correct on this and has anyone worked with or compared both? - knockoutjs > My thoughts and concerns on this on this are very similar to the jquery + backbone comments. They both seem to offer similar features but just from a different perspective. An oft cited downside is that knockoutjs couples business logic and presentation too tightly with the data-bind's and that this binding method can break down for complex UI interaction but I would love to hear why that is a non-issue. - Dojo & ExtJS > I am going to combine the discussion Dojo and ExtJS because I know the least about them and they seem to play in nearly the same space. Most of the information on stackoverflow about these two seems to be out-of-date. From what I have seen is that they are both large frameworks that are good for desktop caliber app implementation. Dojo had been chided for poor documentation but that seems to be no longer the case. ExtJS of course has the commercial license, but it is really reasonable for what you get and I wouldn't hold that against it too much. The widgets in ExtJS seem to be somewhat more professionally done than Dojo, but I could certainly be corrected there. I would be interested to hear from anyone who has experience in both. - Cappuccino > And then there is Cappuccino. No CSS, no html, but also it could be tough to use existing javascript libraries. Objective-J doesn't seem to scary, especially considering that they tout being able to write plain javascript as well. The demos are impressive and seem to closely approach the UI needs for the wiki engine. The cocoa based API is a lot to take in for someone not familiar with it, but maybe it is worth it. I have heard the layout engine is not always easy to work with but a young and possibly disruptive tech like this will certainly have some shortcomings. I apologize for writing so much but hey, at least its not a x vs y vs z question hoping for tons of cheap answers. So what do you think? What should be the basis for my desktop like wiki engine, that will hopefully become more feature rich (read complex) over time?
javascript
frameworks
null
null
null
null
open
Where am I wrong about my project and these Javascript Frameworks? === First off, the barest bones of the project I wish to create is a wiki engine implemented as a single page web app. I plan on having a set of features available from the get-go with plenty of feature additions down the road. **Basic Features** - page creation (creates both wiki article and discussion forum for that article) - markup and WYSIWYG ala [markitup](http://markitup.jaysalvat.com/examples/markdown/) - on-the-fly conversion between markup / html / WYSIWYG - a side bar to quick navigate - a top toolbar for choosing edit/view **Advanced Features** - configurable side bar to navigate via different method - configurable toolbar (possibly add markup language of choice) - tags - editable todo's - drag and drop file uploads and image attachments The engine would originally consist of the most basic page creation, markup and WYSIWYG editing, and saving. I would eventually like to extend this basic engine with drag and drop image support, file uploads, live data graphs, and a sidebar for customizing views. I have done a fairly extensive search for a decent project from which to base my project off, but other than TiddlyWiki there does not seem to be any good javascript based wiki engines. I also considered applying Jquery on top of existing wiki engines but I believe I would end up rewriting it eventually anyway (Plus its just more exciting to add the features I want as I go). Either way I have arrived at implementing this beast with a javascript library + framework. I know that one cannot really compare some of these frameworks against each other as they are very much not apples to apples. I have tried to frame any comparison comments/questions against comparable pieces of the respective frameworks but I am open to being corrected. So here we go: Based on my own research and opinions I have narrowed the list down to the items below. I intentionally left out things such as SproutCore, corMVC, YUI, and others as I, in my limited capacity, thought the below items would be a better fit. **My Options** - jquery/UI + backbonejs - knockoutjs - javascriptMVC - Dojo - ExtJS - Cappuccino **The Discussion and Tradeoffs** - jquery/UI + backbonejs > From what I've read this combination is used and beloved by many and is very flexible and extensible. My major concern is that this combination is simply not the best jumping off point for developing the more desktop oriented UI interface. While jQueryUI might be competitive it certainly does not seem to be on-par with the UI capabilities of other frameworks. - javascriptMVC > JavascriptMVC to me looks like it is essentially jquery + MVC(jqueryMX) extensions, along with a few other apps for documenting(documentJS), functional tests(funcUnit), and code and dependency management(stealJS). Beyond the benefits of the additional module, I think the functional debate really comes down to backbonejs vs. jqueryMX Am I correct on this and has anyone worked with or compared both? - knockoutjs > My thoughts and concerns on this on this are very similar to the jquery + backbone comments. They both seem to offer similar features but just from a different perspective. An oft cited downside is that knockoutjs couples business logic and presentation too tightly with the data-bind's and that this binding method can break down for complex UI interaction but I would love to hear why that is a non-issue. - Dojo & ExtJS > I am going to combine the discussion Dojo and ExtJS because I know the least about them and they seem to play in nearly the same space. Most of the information on stackoverflow about these two seems to be out-of-date. From what I have seen is that they are both large frameworks that are good for desktop caliber app implementation. Dojo had been chided for poor documentation but that seems to be no longer the case. ExtJS of course has the commercial license, but it is really reasonable for what you get and I wouldn't hold that against it too much. The widgets in ExtJS seem to be somewhat more professionally done than Dojo, but I could certainly be corrected there. I would be interested to hear from anyone who has experience in both. - Cappuccino > And then there is Cappuccino. No CSS, no html, but also it could be tough to use existing javascript libraries. Objective-J doesn't seem to scary, especially considering that they tout being able to write plain javascript as well. The demos are impressive and seem to closely approach the UI needs for the wiki engine. The cocoa based API is a lot to take in for someone not familiar with it, but maybe it is worth it. I have heard the layout engine is not always easy to work with but a young and possibly disruptive tech like this will certainly have some shortcomings. I apologize for writing so much but hey, at least its not a x vs y vs z question hoping for tons of cheap answers. So what do you think? What should be the basis for my desktop like wiki engine, that will hopefully become more feature rich (read complex) over time?
0
8,302,597
11/28/2011 21:30:24
1,068,156
11/27/2011 17:57:50
15
0
Java - Swing JLabel updates to quickly?
In a method of a class I update the same lable twice. First time shows the user message to wait, second time shows the user completed message. Something like the following: MyClass{ myMethod(){ jLabel.setText("Please wait..."); //does calculation jLabel.setText("Completed successfully!"); } } When I run the app all I see is the Completed successfully message, is the JLabel updating too quickly? How do I control it? I tried using the following but no luck :( SwingUtilities.invokeLater(new Runnable() { @Override public void run() { jLabel.setText("Please wait..."); } });
java
multithreading
null
null
null
null
open
Java - Swing JLabel updates to quickly? === In a method of a class I update the same lable twice. First time shows the user message to wait, second time shows the user completed message. Something like the following: MyClass{ myMethod(){ jLabel.setText("Please wait..."); //does calculation jLabel.setText("Completed successfully!"); } } When I run the app all I see is the Completed successfully message, is the JLabel updating too quickly? How do I control it? I tried using the following but no luck :( SwingUtilities.invokeLater(new Runnable() { @Override public void run() { jLabel.setText("Please wait..."); } });
0
5,023,477
02/16/2011 23:28:59
439,356
09/03/2010 22:35:07
43
0
Binding WPF4 Datagrid to Empty Collection
I have a collection of objects which I am trying to bind to a DataGrid. When the collection has a lot of objects in it, it works fine. When the collection is empty, however, I see a blank row in the DataGrid, however, I cannot edit it. When I bind it to a collection which has an empty list, then two rows appear, and it is possible to edit the second row with the first empty, even though I have validation. I have tried both an ordinary List<>, and an ObservableCollection<>. How can I make it so that either the DataGrid can enter into an empty list, or that the DataGrid won't let the user enter into the second blank row?
wpf
datagrid
.net-4.0
wpfdatagrid
null
null
open
Binding WPF4 Datagrid to Empty Collection === I have a collection of objects which I am trying to bind to a DataGrid. When the collection has a lot of objects in it, it works fine. When the collection is empty, however, I see a blank row in the DataGrid, however, I cannot edit it. When I bind it to a collection which has an empty list, then two rows appear, and it is possible to edit the second row with the first empty, even though I have validation. I have tried both an ordinary List<>, and an ObservableCollection<>. How can I make it so that either the DataGrid can enter into an empty list, or that the DataGrid won't let the user enter into the second blank row?
0
1,382,931
09/05/2009 10:03:19
51,649
01/05/2009 13:47:38
170
4
Are the order of Checkboxes in the FORM and the POST array the same?
I have several checkboxes and I am trying to take a lazy approach of inserting them into the DB. So I wanted to know, would the order of the checkbox array (checkboxes[]) in the POST super array be in the order that they are in my html page? If not, then I will just stop being a lazy developer! Thanks for any help.
php
html
forms
checkbox
null
null
open
Are the order of Checkboxes in the FORM and the POST array the same? === I have several checkboxes and I am trying to take a lazy approach of inserting them into the DB. So I wanted to know, would the order of the checkbox array (checkboxes[]) in the POST super array be in the order that they are in my html page? If not, then I will just stop being a lazy developer! Thanks for any help.
0
5,737,945
04/20/2011 23:52:54
393,186
07/15/2010 20:12:27
87
6
Java: How to download chunked content correctly?
I have to download file which HTTP response is "Transfer-Encoding: Chunked", because of what I can't to «getContentLength» to allocate new bytes buffer for DataInputStream. Can you advice me how to do it correctly? Code example is very simple: <code><pre> try { dCon = (HttpURLConnection) new URL(torrentFileDownloadLink.absUrl("href")).openConnection(); dCon.setRequestProperty("Cookie", "session=" + cookies.get("session")); dCon.setInstanceFollowRedirects(false); dCon.setRequestMethod("GET"); dCon.setConnectTimeout(120000); dCon.setReadTimeout(120000); // byte[] downloadedFile == ??? DataInputStream br = new DataInputStream((dCon.getInputStream())); br.readFully(downloadedFile); System.out.println(downloadedFile); } catch(IOException ex) { Logger.getLogger(WhatCDWork.class.getName()).log(Level.SEVERE, null, ex); } </pre></code>
java
chunked-encoding
chunked
http-chunked
null
null
open
Java: How to download chunked content correctly? === I have to download file which HTTP response is "Transfer-Encoding: Chunked", because of what I can't to «getContentLength» to allocate new bytes buffer for DataInputStream. Can you advice me how to do it correctly? Code example is very simple: <code><pre> try { dCon = (HttpURLConnection) new URL(torrentFileDownloadLink.absUrl("href")).openConnection(); dCon.setRequestProperty("Cookie", "session=" + cookies.get("session")); dCon.setInstanceFollowRedirects(false); dCon.setRequestMethod("GET"); dCon.setConnectTimeout(120000); dCon.setReadTimeout(120000); // byte[] downloadedFile == ??? DataInputStream br = new DataInputStream((dCon.getInputStream())); br.readFully(downloadedFile); System.out.println(downloadedFile); } catch(IOException ex) { Logger.getLogger(WhatCDWork.class.getName()).log(Level.SEVERE, null, ex); } </pre></code>
0
7,870,715
10/24/2011 02:11:52
697,521
04/07/2011 20:10:23
1
0
How to aggregate two Strings and a List<byte[]> into a single byte[] and then extract them
I need to aggregate 2 Strings and a List<byte[]> into a single byte[] in order to send it through the network (using a special library that has a function send(byte[]). Then, on the other end, I need to get the 3 different objects back. I've done an ugly implementation of it, but it is very slow. Basically, what I do is public byte[] myserializer(String dataA, String dataB, List<byte[]> info) { byte[] header = (dataA +";" + dataB + ";").getBytes(); int numOfBytes = 0; for (byte[] bs : info) { numOfBytes += bs.length; } ByteArrayOutputStream b = new ByteArrayOutputStream(); ObjectOutputStream o; try { o = new ObjectOutputStream(b); o.writeObject(info); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } byte[] data = b.toByteArray(); int length = header.length + data.length; byte[] headerLength = (new Integer(header.length)).toString() .getBytes(); byte[] pattern = ";".getBytes(); int finalLength = headerLength.length + pattern.length + length; byte[] total = new byte[finalLength];enter code here total = // Copy headerLength, header and total into byte[] total return return; In essence I'm creating kind of a frame that looks like this HEADER INFO (-----------------------------------------------)(----------------------------------) HEADER_LENGHT;DATA_A;DATA_B;SERIALIZED_LIST_OBJECT Then, on the receiver side, I do the inverse process and that's "all". This works, but it is PRETTY inefficient and ugly. Suggestions? Best practices? Ideas? Oh...just one note more: this have to work for J2SE and Android too Thanks so much in advanced!!
java
android
sockets
io
bytearray
null
open
How to aggregate two Strings and a List<byte[]> into a single byte[] and then extract them === I need to aggregate 2 Strings and a List<byte[]> into a single byte[] in order to send it through the network (using a special library that has a function send(byte[]). Then, on the other end, I need to get the 3 different objects back. I've done an ugly implementation of it, but it is very slow. Basically, what I do is public byte[] myserializer(String dataA, String dataB, List<byte[]> info) { byte[] header = (dataA +";" + dataB + ";").getBytes(); int numOfBytes = 0; for (byte[] bs : info) { numOfBytes += bs.length; } ByteArrayOutputStream b = new ByteArrayOutputStream(); ObjectOutputStream o; try { o = new ObjectOutputStream(b); o.writeObject(info); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } byte[] data = b.toByteArray(); int length = header.length + data.length; byte[] headerLength = (new Integer(header.length)).toString() .getBytes(); byte[] pattern = ";".getBytes(); int finalLength = headerLength.length + pattern.length + length; byte[] total = new byte[finalLength];enter code here total = // Copy headerLength, header and total into byte[] total return return; In essence I'm creating kind of a frame that looks like this HEADER INFO (-----------------------------------------------)(----------------------------------) HEADER_LENGHT;DATA_A;DATA_B;SERIALIZED_LIST_OBJECT Then, on the receiver side, I do the inverse process and that's "all". This works, but it is PRETTY inefficient and ugly. Suggestions? Best practices? Ideas? Oh...just one note more: this have to work for J2SE and Android too Thanks so much in advanced!!
0
7,973,060
11/01/2011 21:19:44
118,154
06/05/2009 17:08:56
1,950
25
Visual studio repoints my references to the GAC?
I have visual studio 2010. I used to store dlls in a folder and point to them there. Now visual studio rewrites them so I would have to of had them in the system folder. How can i put these in my computer so visual studio 2010 will recognize them if there is no path?
c#
asp.net
visual-studio-2010
null
null
11/01/2011 23:51:38
not a real question
Visual studio repoints my references to the GAC? === I have visual studio 2010. I used to store dlls in a folder and point to them there. Now visual studio rewrites them so I would have to of had them in the system folder. How can i put these in my computer so visual studio 2010 will recognize them if there is no path?
1
3,811,064
09/28/2010 08:46:47
267,831
10/08/2009 15:56:25
689
3
Python: regular expression for string between two strings?
Sorry, I know this is probably a duplicate but having searched for 'python regular expression match between' I haven't found anything that answers my question! The document I'm searching has a whole bunch of strings in it that look like this link: '/Hidden/SidebySideGreen/dei1=1204970159862'}; link: '/Hidden/SidebySideYellow/dei1=1204970159862'}; I want to extract the links (i.e. everything between quotes within these strings) - e.g. `/Hidden/SidebySideYellow/dei1=1204970159862` To get the links, I know I need to start with: re.matchall(regexp, doc_sting) But what should `regexp` be?
python
regex
null
null
null
null
open
Python: regular expression for string between two strings? === Sorry, I know this is probably a duplicate but having searched for 'python regular expression match between' I haven't found anything that answers my question! The document I'm searching has a whole bunch of strings in it that look like this link: '/Hidden/SidebySideGreen/dei1=1204970159862'}; link: '/Hidden/SidebySideYellow/dei1=1204970159862'}; I want to extract the links (i.e. everything between quotes within these strings) - e.g. `/Hidden/SidebySideYellow/dei1=1204970159862` To get the links, I know I need to start with: re.matchall(regexp, doc_sting) But what should `regexp` be?
0
10,641,631
05/17/2012 18:41:32
1,401,725
05/17/2012 18:35:18
1
0
How to create video recorder using Drupal?
I need to build an application, which can record videos and put a log and a watermark on the bottom right hand corner of the video. Is it possible to build this app in Drupal? Also, there is supposed to be a iphone/android phone version of app which can record video using integrated camera and upload to Drupal website. If you have worked on something similar please share your suggestions and thoughts
php
android
iphone
drupal
video
05/17/2012 21:04:35
not a real question
How to create video recorder using Drupal? === I need to build an application, which can record videos and put a log and a watermark on the bottom right hand corner of the video. Is it possible to build this app in Drupal? Also, there is supposed to be a iphone/android phone version of app which can record video using integrated camera and upload to Drupal website. If you have worked on something similar please share your suggestions and thoughts
1
5,770,682
04/24/2011 13:13:28
689,465
04/03/2011 03:02:48
1
0
Java-I simply CAN'T grasp the concept of classes/objects/(default)constructors/accessors/etc
I'm taking my first CS class and we're at classes and objects and I simply can't understand how to use objects, classes, default constructors, non-default constructors, accessors, mutators, etc. I have notes written down from lecture, TAs can't help me understand, I don't understand it when I read my textbook, and guides online won't help. And when I have a sample class, I don't know how to use it in my main. I remember being this hopelessly lost when I learned methods but now I know how to write them, call them, use what they return, etc. Hopefully it will be the same when I get advice from you guys. The first example the lecturer showed us was a Circle class with radius and getArea() or something. Thanks for helping me clear up on this matter.
java
class
object
constructor
null
04/24/2011 13:36:51
not a real question
Java-I simply CAN'T grasp the concept of classes/objects/(default)constructors/accessors/etc === I'm taking my first CS class and we're at classes and objects and I simply can't understand how to use objects, classes, default constructors, non-default constructors, accessors, mutators, etc. I have notes written down from lecture, TAs can't help me understand, I don't understand it when I read my textbook, and guides online won't help. And when I have a sample class, I don't know how to use it in my main. I remember being this hopelessly lost when I learned methods but now I know how to write them, call them, use what they return, etc. Hopefully it will be the same when I get advice from you guys. The first example the lecturer showed us was a Circle class with radius and getArea() or something. Thanks for helping me clear up on this matter.
1
10,597,578
05/15/2012 09:13:20
1,348,023
04/21/2012 07:54:22
5
0
jQuery FullCalendar sample insert/delete events
Anyone have an example for read/write events from calendar and json data ? thanks
jquery
fullcalendar
null
null
null
05/18/2012 16:17:29
not a real question
jQuery FullCalendar sample insert/delete events === Anyone have an example for read/write events from calendar and json data ? thanks
1
5,926,731
05/08/2011 09:53:06
22,702
09/26/2008 13:58:52
1,324
31
In Orchard CMS, how do I customize the Blog widget?
I'm still new to Orchard and don't quite understand how it fits together. The home page shows a blog post list, which is what I want. Except that right on top of the list is a *summary* of the blog. I only want the blog entries to show and not the general blog summary/header. How do I customize the Blog widgets(?) to not show the summary/header? I am using a custom derivative of the "TheThemeMachine" theme.
orchardcms
null
null
null
null
05/08/2011 11:10:22
off topic
In Orchard CMS, how do I customize the Blog widget? === I'm still new to Orchard and don't quite understand how it fits together. The home page shows a blog post list, which is what I want. Except that right on top of the list is a *summary* of the blog. I only want the blog entries to show and not the general blog summary/header. How do I customize the Blog widgets(?) to not show the summary/header? I am using a custom derivative of the "TheThemeMachine" theme.
2
645,778
03/14/2009 11:18:21
12,828
09/16/2008 15:50:32
896
25
What are the advantages and disadvantages of separating declaration and definition as in C++?
In C++, declaration and definition of functions, variables and constants can be separated like so: function someFunc(); function someFunc() { //Implementation. } In fact, in the definition of classes, this is often the case. A class is usually declared with it's members in a .h file, and these are then defined in a corresponding .C file. What are the advantages & disadvantages of this approach?
c++
language-design
definition
declaration
null
null
open
What are the advantages and disadvantages of separating declaration and definition as in C++? === In C++, declaration and definition of functions, variables and constants can be separated like so: function someFunc(); function someFunc() { //Implementation. } In fact, in the definition of classes, this is often the case. A class is usually declared with it's members in a .h file, and these are then defined in a corresponding .C file. What are the advantages & disadvantages of this approach?
0
3,670,309
09/08/2010 17:23:29
58,207
01/23/2009 07:42:07
60
1
Why does NSOperationQueue on iPhone OS 3.1 hold on to long-cancelled (and released) operations?
I have an app that uses NSOperations to manage service calls to a web API (the calls are based on [CURLOperation in Jon Wight's touchcode][1]). There is a certain call that downloads map locations when the center of a map view changes significantly; since these can stack up so quickly, if you move the map around, I try to aggressively cancel stale operations. It works great on 4.0. However, on 3.1, it seems that in certain cases the operation queue will hold on to cancelled (and released) operations, causing a crash when it reaches the place they should be in the queue. Here is an illustration. I begin with a relatively heavyweight service call in the queue: 1. MyLongRunningOp 0x1 The user navigates to the map. The queue now looks like this: 1. MyLongRunningOp 0x1 2. MyMapOp 0x2 They move the map, which cancels MyMapOp 0x2 and adds MyMapOp 0x3: 1. MyLongRunningOp 0x1 3. MyMapOp 0x3 MyMapOp 0x3 is now released, as it has been removed from the queue. Now MyLongRunningOp 0x1 finishes. In the KVO callbacks for setting the isFinished key on MyLongRunningOp, I see the operation queue handle the notification and try to add the MyMapOp 0x2 to some NSArray. Naturally, with NSZombies enabled, `[MyMapOp retain]: message sent to deallocated instance 0x2` It appears that the NSOperationQueue is somehow hanging on to a pointer to the cancelled/released operation, and attempting to activate it after the prior operation finishes. I haven't been able to reproduce this behavior on 4.0, so I believe it's a 3.1 bug. I'm having a lot of trouble working around it—as far as I can tell, the only workaround is to never cancel my operations, which makes for a suboptimal experience when the network gets iffy. Has anyone else experienced this? Any ideas? [1]: http://github.com/schwa/TouchFoundation/blob/master/Source/CURLOperation.m
iphone
networking
crash
nsoperation
iphone-sdk-3.1
null
open
Why does NSOperationQueue on iPhone OS 3.1 hold on to long-cancelled (and released) operations? === I have an app that uses NSOperations to manage service calls to a web API (the calls are based on [CURLOperation in Jon Wight's touchcode][1]). There is a certain call that downloads map locations when the center of a map view changes significantly; since these can stack up so quickly, if you move the map around, I try to aggressively cancel stale operations. It works great on 4.0. However, on 3.1, it seems that in certain cases the operation queue will hold on to cancelled (and released) operations, causing a crash when it reaches the place they should be in the queue. Here is an illustration. I begin with a relatively heavyweight service call in the queue: 1. MyLongRunningOp 0x1 The user navigates to the map. The queue now looks like this: 1. MyLongRunningOp 0x1 2. MyMapOp 0x2 They move the map, which cancels MyMapOp 0x2 and adds MyMapOp 0x3: 1. MyLongRunningOp 0x1 3. MyMapOp 0x3 MyMapOp 0x3 is now released, as it has been removed from the queue. Now MyLongRunningOp 0x1 finishes. In the KVO callbacks for setting the isFinished key on MyLongRunningOp, I see the operation queue handle the notification and try to add the MyMapOp 0x2 to some NSArray. Naturally, with NSZombies enabled, `[MyMapOp retain]: message sent to deallocated instance 0x2` It appears that the NSOperationQueue is somehow hanging on to a pointer to the cancelled/released operation, and attempting to activate it after the prior operation finishes. I haven't been able to reproduce this behavior on 4.0, so I believe it's a 3.1 bug. I'm having a lot of trouble working around it—as far as I can tell, the only workaround is to never cancel my operations, which makes for a suboptimal experience when the network gets iffy. Has anyone else experienced this? Any ideas? [1]: http://github.com/schwa/TouchFoundation/blob/master/Source/CURLOperation.m
0
11,511,534
07/16/2012 19:50:57
574,686
01/13/2011 18:15:25
1,111
98
OAuth: what to do if user refuses to share his data
I'm trying to implement OAuth login. After a user is redirected to login-provider and suggested to share his data, he can refuse. The question is where shall I be redirected and how do I know that user refused to share his data? Thank you in advance!
php
oauth
null
null
null
07/17/2012 08:36:40
too localized
OAuth: what to do if user refuses to share his data === I'm trying to implement OAuth login. After a user is redirected to login-provider and suggested to share his data, he can refuse. The question is where shall I be redirected and how do I know that user refused to share his data? Thank you in advance!
3
11,272,582
06/30/2012 08:10:42
1,463,542
06/18/2012 11:41:49
41
1
How can i make a slider for levels like in Angry Birds in Corona?
How can i make a slider for levels like in Angry Birds in Corona or like Samsung Galaxy S2 mainpage? When i drag the scene, it brings the other parts of the scene. How can i do that in Corona? Thanks.
drag
slide
corona
scene
levels
null
open
How can i make a slider for levels like in Angry Birds in Corona? === How can i make a slider for levels like in Angry Birds in Corona or like Samsung Galaxy S2 mainpage? When i drag the scene, it brings the other parts of the scene. How can i do that in Corona? Thanks.
0
6,769,026
07/20/2011 21:54:55
84,206
03/29/2009 08:18:55
4,052
291
Auto-enable macrow ith digital cert?
So will a digital certificate that is issued from a trusted signing authority, when used to sign an Excel document, allow the document to automatically run macros? Does it make a difference whether the signature is self signed or signed by a certificate authority in terms of what the user sees? Similar to when you use a verisign issued certificate on a webpage, the machine usually autmatically trusted certificates issued by that authority. I am wondering if the behavior in Excel is similar. I am basically trying to address the issue of distributing Excel forms which are dependent upon a macro to function properly.
excel
digital-signature
digital-certificate
null
null
null
open
Auto-enable macrow ith digital cert? === So will a digital certificate that is issued from a trusted signing authority, when used to sign an Excel document, allow the document to automatically run macros? Does it make a difference whether the signature is self signed or signed by a certificate authority in terms of what the user sees? Similar to when you use a verisign issued certificate on a webpage, the machine usually autmatically trusted certificates issued by that authority. I am wondering if the behavior in Excel is similar. I am basically trying to address the issue of distributing Excel forms which are dependent upon a macro to function properly.
0
11,487,763
07/14/2012 22:12:18
398,939
07/22/2010 10:00:21
1,229
74
PHP functions added since version
Is there a resource that allows me to see the PHP functions added/changed since a certain version release?
php
null
null
null
null
07/16/2012 12:28:08
not constructive
PHP functions added since version === Is there a resource that allows me to see the PHP functions added/changed since a certain version release?
4
7,258,324
08/31/2011 14:18:50
619,741
02/16/2011 13:43:33
177
0
colorblind, lookin for help
I have a div with the color #0063dc which is a bluish color. i have my page designed so that when a div is hovered over it turns color to look like it's a button being depressed. only problem is, i've been told that my color isn't exactly right looking. the hover color is background-color:#3355ff; any suggestions as to a color that would look more suitable? thanks
css
null
null
null
null
08/31/2011 14:21:23
not constructive
colorblind, lookin for help === I have a div with the color #0063dc which is a bluish color. i have my page designed so that when a div is hovered over it turns color to look like it's a button being depressed. only problem is, i've been told that my color isn't exactly right looking. the hover color is background-color:#3355ff; any suggestions as to a color that would look more suitable? thanks
4
9,379,917
02/21/2012 15:09:59
647,670
03/07/2011 05:46:47
642
8
Where do I have to declare variables when making a loop for in javascript?
I see two differents way for declaring variables when making a "for loop" in javascript: First way: for (var i = 0, l = [].length; i < l; i += 1) { // make something } Second way: var i; var l; for (i = 0, l = [].length; i < l; i += 1) { // make something } Is there some reason to prefer one of these?
javascript
null
null
null
null
null
open
Where do I have to declare variables when making a loop for in javascript? === I see two differents way for declaring variables when making a "for loop" in javascript: First way: for (var i = 0, l = [].length; i < l; i += 1) { // make something } Second way: var i; var l; for (i = 0, l = [].length; i < l; i += 1) { // make something } Is there some reason to prefer one of these?
0
10,794,914
05/29/2012 07:38:40
1,141,641
01/10/2012 19:34:42
7
0
calculating position of pixel in opengl
How do we calculate the position of pixel assuming you know the pixel? I need to calculate the position of all of pixels in the window and I made the for loop. But I'm stuck at calculating position. Can any one help me? Thank you.
c++
opengl
null
null
null
05/30/2012 20:05:10
not a real question
calculating position of pixel in opengl === How do we calculate the position of pixel assuming you know the pixel? I need to calculate the position of all of pixels in the window and I made the for loop. But I'm stuck at calculating position. Can any one help me? Thank you.
1
5,848,134
05/01/2011 11:43:46
730,077
04/28/2011 20:40:27
1
0
Any Idea for Showing Latest News in a Website
What is the best way for presenting latest news in the website? Is there any template such as JQuery or Javascript for that?
javascript
jquery
null
null
null
05/01/2011 12:11:39
not a real question
Any Idea for Showing Latest News in a Website === What is the best way for presenting latest news in the website? Is there any template such as JQuery or Javascript for that?
1
518,609
02/06/2009 00:21:04
56,555
01/19/2009 04:24:38
177
7
How can I become a better C# programmer?
When you can create classes and do the simple stuff (GUI, reading text files, etc...), where do I go from here? I've started reading Code Complete 2nd Edition which is great but is more of a general programming book. What topics should I learn next?
c#
null
null
null
null
03/04/2012 05:37:01
not constructive
How can I become a better C# programmer? === When you can create classes and do the simple stuff (GUI, reading text files, etc...), where do I go from here? I've started reading Code Complete 2nd Edition which is great but is more of a general programming book. What topics should I learn next?
4
9,801,246
03/21/2012 08:49:46
1,274,380
03/16/2012 15:28:56
9
0
How to show entire page in a Pop up(Jquery)
I want to show whole page in a pop up of size 300*300.Is it possible? If yes then how can i do this.please revert back with your valuable answer. Thanks!!!
jquery
null
null
null
null
03/21/2012 18:06:00
not a real question
How to show entire page in a Pop up(Jquery) === I want to show whole page in a pop up of size 300*300.Is it possible? If yes then how can i do this.please revert back with your valuable answer. Thanks!!!
1
8,978,284
01/23/2012 20:44:22
656,925
08/12/2010 02:22:36
1,872
43
Fixing the 12030 Ajax Error
I have intermittent 12030 errors when using ajax. The solutions I've seen after googling it are to just repeat the request. My guess is there is a better way than duck taping it. Does anyone have a solution to this or can someone help me find the JQuery implementation of ajax so I can step through their code and see how they handle ajax calls. SO is pulling up 3 12030 questions with no answers that I can see in the "Questions with Similar Titles". Thanks
javascript
ajax
jqeury
null
null
01/23/2012 21:11:24
not a real question
Fixing the 12030 Ajax Error === I have intermittent 12030 errors when using ajax. The solutions I've seen after googling it are to just repeat the request. My guess is there is a better way than duck taping it. Does anyone have a solution to this or can someone help me find the JQuery implementation of ajax so I can step through their code and see how they handle ajax calls. SO is pulling up 3 12030 questions with no answers that I can see in the "Questions with Similar Titles". Thanks
1
6,352,553
06/15/2011 02:57:27
798,836
11/08/2009 20:05:39
1
0
Facebook - Allow User to specify username
I am creating a site that I want to use FB login soley for convenience. People coming to my site will want to be anonymous and not use their real names. I used FB connect on a site in the last 6 months that asked me to input a username after I filled in my FB login credentials (It was still in the FB connect box). I have not seen it since and am trying to explain it to a developer. Does anybody know about this, or how to acheive it?
facebook
username
null
null
null
06/15/2011 03:59:20
not a real question
Facebook - Allow User to specify username === I am creating a site that I want to use FB login soley for convenience. People coming to my site will want to be anonymous and not use their real names. I used FB connect on a site in the last 6 months that asked me to input a username after I filled in my FB login credentials (It was still in the FB connect box). I have not seen it since and am trying to explain it to a developer. Does anybody know about this, or how to acheive it?
1
3,551,460
08/23/2010 20:34:43
349,268
05/24/2010 19:40:23
11
2
Organizing Selenium tests in Eclipse for batch execution
This is an organizational question - I have a set of "Java Projects" within the same workspace in Eclipse, comprising of a series of Selenium tests (pretty much each it's own Java Project). They are all within a same package. Now, in an effort towards automated execution, I need to batch execute these. Any ideas on how to better organize the scripts to do this? Can I execute a series of scripts via Eclipse itself? Thanks.
eclipse
selenium
null
null
null
null
open
Organizing Selenium tests in Eclipse for batch execution === This is an organizational question - I have a set of "Java Projects" within the same workspace in Eclipse, comprising of a series of Selenium tests (pretty much each it's own Java Project). They are all within a same package. Now, in an effort towards automated execution, I need to batch execute these. Any ideas on how to better organize the scripts to do this? Can I execute a series of scripts via Eclipse itself? Thanks.
0
5,408,984
03/23/2011 17:07:11
165,050
08/28/2009 19:02:24
158
30
bluetooth mac-to-mac file exchange limits
I have two physically adjacent macbook pro machines. One has a 3.8GB file (XCode 3.2.5 installer) that I want to copy it to the other macbook. (That file is no longer available from iOS Dev connection). I've connected the machines by bluetooth, and initiated the file send. But it appears to hang. Can someone explain why this is doomed, and what would be a faster way? I'm considering ftp to my web server, and ftp it back to the other mac. Thanks.
osx
bluetooth
null
null
null
03/24/2011 13:26:34
off topic
bluetooth mac-to-mac file exchange limits === I have two physically adjacent macbook pro machines. One has a 3.8GB file (XCode 3.2.5 installer) that I want to copy it to the other macbook. (That file is no longer available from iOS Dev connection). I've connected the machines by bluetooth, and initiated the file send. But it appears to hang. Can someone explain why this is doomed, and what would be a faster way? I'm considering ftp to my web server, and ftp it back to the other mac. Thanks.
2
6,599,686
07/06/2011 16:18:48
78,385
03/15/2009 22:26:47
638
22
How do you specify the shebang line of a command script created by setuptools
I am pretty new to packaging, but it seemed very straight-ahead for my simple little utility that needs to be installed as a script. However I have run into an issue because the "placeholder" script that is created by setuptools when using console_entry specifies #!/usr/env python, when I need it to point to /opt/bin/python. Oddly enough, the script does correctly install in /opt/bin/python (this is a CentOS machine with an existing 2.4 installation that can't be touched). Is there a way to specify that shebang line in the script without hacking too far into the code?
python
packaging
setuptools
null
null
null
open
How do you specify the shebang line of a command script created by setuptools === I am pretty new to packaging, but it seemed very straight-ahead for my simple little utility that needs to be installed as a script. However I have run into an issue because the "placeholder" script that is created by setuptools when using console_entry specifies #!/usr/env python, when I need it to point to /opt/bin/python. Oddly enough, the script does correctly install in /opt/bin/python (this is a CentOS machine with an existing 2.4 installation that can't be touched). Is there a way to specify that shebang line in the script without hacking too far into the code?
0
8,283,644
11/27/2011 04:26:41
259,130
01/26/2010 10:08:00
580
109
Is there a way to examine mach binaries under linux?
To tell what symbols the have(ala nm) and what libraries they link against(ala ldd) and so on(I'm trying to see of mac skype uses qt)
mach
null
null
null
null
11/27/2011 16:18:07
off topic
Is there a way to examine mach binaries under linux? === To tell what symbols the have(ala nm) and what libraries they link against(ala ldd) and so on(I'm trying to see of mac skype uses qt)
2
8,808,020
01/10/2012 17:55:21
983,125
10/06/2011 22:43:10
10
0
How to display an external image in SSRS?
I'm trying to display an external image within a SSRS 2005 report, however I can't accomplish that. I've tried a lot of things but they just don't work. I have a table in my report that displays a dynamic image based on code, I thought the error was in the code however it wasn't because I can see the image in BIDS, however when I try to display it on the report server or within an ASP.NET webpage it doesn't show up. My Code is as follows: Function ShowImage(value as Object) As String Dim strImg as String If value < 0 strImg= "http://icons.iconarchive.com/icons/fatcow/farm-fresh/24/traffic-lights-green-icon.png" ElseIf value > 0 strImg= "http://icons.iconarchive.com/icons/fatcow/farm-fresh/24/traffic-lights-red-icon.png" Else strImg= "http://icons.iconarchive.com/icons/fatcow/farm-fresh/24/traffic-lights-yellow-icon.png" End If Return strImg End Function The value in my image control is as follows: =Code.ShowStatusImage(Fields!Diferencia_Entre_Importes.Value) When I see the preview in BIDS it shows up the way it's supposed to be, but it doesn't happen in the report server. As you see the images don't need any kind of authentication, besides that, I tried configuring the Execution Account with the same result (I just get a horrible X instead of the image) I also tried setting the image's value as http://icons.iconarchive.com/icons/fatcow/farm-fresh/24/traffic-lights-green-icon.png But had no success, also I tried using an image in the server in this way: file:ImagePath And had the same problem, using all of these solutions I can see the image in BIDS, but not in the Report Server. Thank you very much
reporting-services
reportingservices-2005
null
null
null
null
open
How to display an external image in SSRS? === I'm trying to display an external image within a SSRS 2005 report, however I can't accomplish that. I've tried a lot of things but they just don't work. I have a table in my report that displays a dynamic image based on code, I thought the error was in the code however it wasn't because I can see the image in BIDS, however when I try to display it on the report server or within an ASP.NET webpage it doesn't show up. My Code is as follows: Function ShowImage(value as Object) As String Dim strImg as String If value < 0 strImg= "http://icons.iconarchive.com/icons/fatcow/farm-fresh/24/traffic-lights-green-icon.png" ElseIf value > 0 strImg= "http://icons.iconarchive.com/icons/fatcow/farm-fresh/24/traffic-lights-red-icon.png" Else strImg= "http://icons.iconarchive.com/icons/fatcow/farm-fresh/24/traffic-lights-yellow-icon.png" End If Return strImg End Function The value in my image control is as follows: =Code.ShowStatusImage(Fields!Diferencia_Entre_Importes.Value) When I see the preview in BIDS it shows up the way it's supposed to be, but it doesn't happen in the report server. As you see the images don't need any kind of authentication, besides that, I tried configuring the Execution Account with the same result (I just get a horrible X instead of the image) I also tried setting the image's value as http://icons.iconarchive.com/icons/fatcow/farm-fresh/24/traffic-lights-green-icon.png But had no success, also I tried using an image in the server in this way: file:ImagePath And had the same problem, using all of these solutions I can see the image in BIDS, but not in the Report Server. Thank you very much
0
3,847,712
10/02/2010 22:13:04
226,256
12/07/2009 10:28:39
46
4
CakePHP SignBox Component
I'm trying to implement a simple login box to my web application, just a regular username and password field if no session is detected and a welcome message if there is one, i started with the following: 1. I thought a simple element will do the job, but i realized than i can't include css or js(not inline) from an element because the $scripts_for_layout would be already sent to the output buffer. 2. I'm now thinking of implementing it as a component, not sure if this would be the right architecture(is it?) but i can definitely add the js/css and output them in the head tag from there. The question is now where should i place the markup for the login box, an element or view maybe, and how do i inject them to the view? a simple $this->set('x', htmlmarkup) in the component and another echo in the view. What's right way to do it. Thanks. Yehia
mvc
cakephp
null
null
null
null
open
CakePHP SignBox Component === I'm trying to implement a simple login box to my web application, just a regular username and password field if no session is detected and a welcome message if there is one, i started with the following: 1. I thought a simple element will do the job, but i realized than i can't include css or js(not inline) from an element because the $scripts_for_layout would be already sent to the output buffer. 2. I'm now thinking of implementing it as a component, not sure if this would be the right architecture(is it?) but i can definitely add the js/css and output them in the head tag from there. The question is now where should i place the markup for the login box, an element or view maybe, and how do i inject them to the view? a simple $this->set('x', htmlmarkup) in the component and another echo in the view. What's right way to do it. Thanks. Yehia
0
3,832,398
09/30/2010 15:54:31
34,910
11/06/2008 00:20:57
567
21
sysopen permission denied
I'm trying to fix an intermittent bug in [git-svn][1]. The problem is happening in Windows XP only, with both Cygwin git (perl v5.10.1) and msysGit (perl v5.8.8). With any operation that involves a fetch, I'm able to get partway through and then the operation dies with a message similar to >Couldn't open .git/svn/refs/remotes/trunk/.rev_map.cc05479a-e8ea-436f-8d71-e07493b7796c.lock: Device or resource busy > at /usr/lib/git-core/git-svn line 5240 However, the exact lock file and line number are not always the same. I've tracked the actual problem to line 3679 sysopen(my $fh, $db_lock, O_RDWR | O_CREAT) This is creating a new .lock file, and I tried the equivalent to no avail. open(my $fh, ">", $db_lock) I checked the permissions of the directory, and it is drwxr-xr-x, so there shouldn't be any problems, or if they were, they wouldn't be so inconsistent. Could this be because the script is creating and renaming this file so many times in quick succession that XP can't handle it? [1]: http://git.kernel.org/?p=git/git.git;a=blob;f=git-svn.perl;h=9b046b693fe82c992b3844bf6e8f79214dfa7a59;hb=HEADBlockquote
windows
perl
git
git-svn
null
null
open
sysopen permission denied === I'm trying to fix an intermittent bug in [git-svn][1]. The problem is happening in Windows XP only, with both Cygwin git (perl v5.10.1) and msysGit (perl v5.8.8). With any operation that involves a fetch, I'm able to get partway through and then the operation dies with a message similar to >Couldn't open .git/svn/refs/remotes/trunk/.rev_map.cc05479a-e8ea-436f-8d71-e07493b7796c.lock: Device or resource busy > at /usr/lib/git-core/git-svn line 5240 However, the exact lock file and line number are not always the same. I've tracked the actual problem to line 3679 sysopen(my $fh, $db_lock, O_RDWR | O_CREAT) This is creating a new .lock file, and I tried the equivalent to no avail. open(my $fh, ">", $db_lock) I checked the permissions of the directory, and it is drwxr-xr-x, so there shouldn't be any problems, or if they were, they wouldn't be so inconsistent. Could this be because the script is creating and renaming this file so many times in quick succession that XP can't handle it? [1]: http://git.kernel.org/?p=git/git.git;a=blob;f=git-svn.perl;h=9b046b693fe82c992b3844bf6e8f79214dfa7a59;hb=HEADBlockquote
0
1,740,644
11/16/2009 07:33:51
69,803
02/23/2009 08:38:02
1,193
45
Text extraction of speech from video and audio files
What are the best libraries for doing this. And is the quality good enouch to rely on. It will not be possible to train the system with the speakers voice or use a dictionary of terms to improve results.
speech-recognition
null
null
null
null
null
open
Text extraction of speech from video and audio files === What are the best libraries for doing this. And is the quality good enouch to rely on. It will not be possible to train the system with the speakers voice or use a dictionary of terms to improve results.
0
9,234,399
02/10/2012 20:30:04
1,200,425
02/09/2012 18:56:25
3
0
Hosting WCF Service in Azure and Consuming Them
I have some unclear questions about hosting a WCF service in Azure: I will have only a web service (no web pages), just a web service through with more clients will be able to save data to SQL Azure. I created the web service on my local machine. Question 1, hosting the service: What is the best way to host it, keeping in mind that there are no web pages? I thought about hosting it in a worker role and using Queues storage for storing the requests from clients ... is this fine? Is it maybe better using a WCF hosting role for the service, queues storage to store the work and the worker role that will pull out tasks from queue (first in - first out) ..? What do you recommend guys? Question 2, do you have guys any sample code how to serialize an object and send it to the WCF service and then deserialize it? I am having some issues with this, can't get it work. Question3, I am getting stuck with the security of this service using certificates. I have posted another question here: <http://stackoverflow.com/questions/9217125/best-practices-wcf-service-windows-azure> but I am quite at the beginning with Azure. Thanks and I will really appreciate any help!
wcf
azure
null
null
null
02/11/2012 15:13:16
not a real question
Hosting WCF Service in Azure and Consuming Them === I have some unclear questions about hosting a WCF service in Azure: I will have only a web service (no web pages), just a web service through with more clients will be able to save data to SQL Azure. I created the web service on my local machine. Question 1, hosting the service: What is the best way to host it, keeping in mind that there are no web pages? I thought about hosting it in a worker role and using Queues storage for storing the requests from clients ... is this fine? Is it maybe better using a WCF hosting role for the service, queues storage to store the work and the worker role that will pull out tasks from queue (first in - first out) ..? What do you recommend guys? Question 2, do you have guys any sample code how to serialize an object and send it to the WCF service and then deserialize it? I am having some issues with this, can't get it work. Question3, I am getting stuck with the security of this service using certificates. I have posted another question here: <http://stackoverflow.com/questions/9217125/best-practices-wcf-service-windows-azure> but I am quite at the beginning with Azure. Thanks and I will really appreciate any help!
1
1,565,154
10/14/2009 09:17:21
137,916
07/14/2009 07:51:31
14
1
Validity of the Java Code
double ABC = - UTIL_COMMON.fnChkDouble(lStr); above statement, it is valid or not ? Thanks
operators
null
null
null
null
10/16/2009 05:25:00
not a real question
Validity of the Java Code === double ABC = - UTIL_COMMON.fnChkDouble(lStr); above statement, it is valid or not ? Thanks
1
11,265,865
06/29/2012 16:52:51
1,003,387
10/19/2011 14:38:43
59
18
Ruby Last Iteration of Each Loop
I am attempting to insert a comma at the end of each line in an each loop in ruby. I don't want the comma on the last line. I know about the array.join(',') feature but I am a little confused in this circumstance. How can I refactor my first attempt to do what I require? **Important Lines** @headers.each do |header| file.puts "`#{table[:source_database]}`.`#{table[:current_name]}`.`#{header[:current_name]}` AS `#{header[:magi_name]}`#{("," unless @headers.last == header)}" if header[:table_id] == table[:id] end **Full Class** class Table < ActiveRecord::Base has_many :headers #--------------------------------------------------------------------------------------------------# def self.generate @tables = Table.select([:id, :source_database, :current_name, :magi_name]) @headers = Header.select([:id, :table_id, :current_name, :magi_name]) File.new("magi_generation.sql", "w") @tables.each do |table| File.open("magi_generation.sql", "a+") do |file| file.puts "#Drops current view #{table[:magi_name]} and then recreates it using updated columns" file.puts "DROP VIEW IF EXISTS `#{table[:magi_name]}`;" file.puts "CREATE ALGORITHM=UNDEFINED DEFINER=`fed_write`@`127.0.0.1` SQL SECURITY DEFINER VIEW `#{table[:magi_name]}`" file.puts "AS select" @headers.each do |header| file.puts "`#{table[:source_database]}`.`#{table[:current_name]}`.`#{header[:current_name]}` AS `#{header[:magi_name]}`#{("," unless @headers.last == header)}" if header[:table_id] == table[:id] end file.puts "FROM `#{table[:source_database]}`.`#{table[:current_name]}`;" file.puts "" end end end end
ruby
null
null
null
null
null
open
Ruby Last Iteration of Each Loop === I am attempting to insert a comma at the end of each line in an each loop in ruby. I don't want the comma on the last line. I know about the array.join(',') feature but I am a little confused in this circumstance. How can I refactor my first attempt to do what I require? **Important Lines** @headers.each do |header| file.puts "`#{table[:source_database]}`.`#{table[:current_name]}`.`#{header[:current_name]}` AS `#{header[:magi_name]}`#{("," unless @headers.last == header)}" if header[:table_id] == table[:id] end **Full Class** class Table < ActiveRecord::Base has_many :headers #--------------------------------------------------------------------------------------------------# def self.generate @tables = Table.select([:id, :source_database, :current_name, :magi_name]) @headers = Header.select([:id, :table_id, :current_name, :magi_name]) File.new("magi_generation.sql", "w") @tables.each do |table| File.open("magi_generation.sql", "a+") do |file| file.puts "#Drops current view #{table[:magi_name]} and then recreates it using updated columns" file.puts "DROP VIEW IF EXISTS `#{table[:magi_name]}`;" file.puts "CREATE ALGORITHM=UNDEFINED DEFINER=`fed_write`@`127.0.0.1` SQL SECURITY DEFINER VIEW `#{table[:magi_name]}`" file.puts "AS select" @headers.each do |header| file.puts "`#{table[:source_database]}`.`#{table[:current_name]}`.`#{header[:current_name]}` AS `#{header[:magi_name]}`#{("," unless @headers.last == header)}" if header[:table_id] == table[:id] end file.puts "FROM `#{table[:source_database]}`.`#{table[:current_name]}`;" file.puts "" end end end end
0
5,776,319
04/25/2011 07:42:33
698,047
04/08/2011 05:33:29
6
0
add tooltip to image using jquery
i have an image inside div tag and i want to add tooptip onmousehover on image using jquery.how to do this.
jquery
null
null
null
null
04/27/2011 03:22:06
not a real question
add tooltip to image using jquery === i have an image inside div tag and i want to add tooptip onmousehover on image using jquery.how to do this.
1
771,064
04/21/2009 04:40:28
33,581
10/25/2008 04:08:22
64
8
good books / sites on set theory
I'm trying to understand E.F.Codd's "A Relational Model of Data for Large Shared Data Banks" paper. I would like some suggestions on books / sites on set theory.
rdbms
sets
database
null
null
09/27/2011 14:57:42
not constructive
good books / sites on set theory === I'm trying to understand E.F.Codd's "A Relational Model of Data for Large Shared Data Banks" paper. I would like some suggestions on books / sites on set theory.
4
2,578,534
04/05/2010 13:17:19
309,210
04/05/2010 13:17:19
1
0
How to bind a Canvas to a collection of items in Silverlight
**Background** I've got a collection of objects which I want to draw on a canvas. Each of these object has a DateTime property, which determines the position of that object along the x-axis on the canvas. Each object also has some other properties which determine the image that need to be drawn on the canvas. The most important feature that I want to implement is that as time passes by the second, these images representing the objects would move along the x-axis. In other words, the right vertical boundary of the canvas would always represent the current time (e.g. DateTime.Now), and objects in the collection would need to update their position on the canvas relative to that boundary. I am very new to Silverlight and hence I have quite a few questions including the following. In addition, I also have the requirement to follow the MVVM framework. **Questions** What should I use in the XAML to achive the above? I thought about using ItemsControl with Canvas as the Panel, but I am not sure how to do it or even whether it is the best way. Any actual XAML code would be great. How should I bind the collection of objects to the canvas? And if so, how do I move them along the x-axis as time passes? That is, I would like the canvas to update whenever: - there are objects added to the collection; or - objects removed from the collection; or - existing object changing (e.g. some property changed and hence need to change the image that get shown on the canvas) in the collection; or - even if there are no changes to the collection as mentioned above, these objects will need to move every second. Sorry if I have use the wrong terms for anything as I am still new to Silverlight. Thanks.
silverlight
canvas
data-binding
null
null
null
open
How to bind a Canvas to a collection of items in Silverlight === **Background** I've got a collection of objects which I want to draw on a canvas. Each of these object has a DateTime property, which determines the position of that object along the x-axis on the canvas. Each object also has some other properties which determine the image that need to be drawn on the canvas. The most important feature that I want to implement is that as time passes by the second, these images representing the objects would move along the x-axis. In other words, the right vertical boundary of the canvas would always represent the current time (e.g. DateTime.Now), and objects in the collection would need to update their position on the canvas relative to that boundary. I am very new to Silverlight and hence I have quite a few questions including the following. In addition, I also have the requirement to follow the MVVM framework. **Questions** What should I use in the XAML to achive the above? I thought about using ItemsControl with Canvas as the Panel, but I am not sure how to do it or even whether it is the best way. Any actual XAML code would be great. How should I bind the collection of objects to the canvas? And if so, how do I move them along the x-axis as time passes? That is, I would like the canvas to update whenever: - there are objects added to the collection; or - objects removed from the collection; or - existing object changing (e.g. some property changed and hence need to change the image that get shown on the canvas) in the collection; or - even if there are no changes to the collection as mentioned above, these objects will need to move every second. Sorry if I have use the wrong terms for anything as I am still new to Silverlight. Thanks.
0
11,244,451
06/28/2012 12:16:50
417,266
08/11/2010 13:11:50
131
0
Activate Passive Arp learning
I want to enable my linux-kernel to passively listen (learn) the arp request broadcasted in the lan segment (arp request in the network not destined for me). Is there any configuration available?
linux
networking
network-programming
linux-kernel
arp
06/29/2012 01:52:50
off topic
Activate Passive Arp learning === I want to enable my linux-kernel to passively listen (learn) the arp request broadcasted in the lan segment (arp request in the network not destined for me). Is there any configuration available?
2
10,144,490
04/13/2012 16:12:48
765,647
05/23/2011 08:13:26
15
0
Function that returns a pointer to a pointer variable?
Say I have a linked list node class class node { private: node *next_node; public: node *next() const; }; node *node::next() const { return next_node; } Does next() return a node **next_node or node *next_node. Also what is the significance of either in implementing the list class functions (ie. insert, remove, find)?
c++
pointers
null
null
null
04/14/2012 19:48:39
too localized
Function that returns a pointer to a pointer variable? === Say I have a linked list node class class node { private: node *next_node; public: node *next() const; }; node *node::next() const { return next_node; } Does next() return a node **next_node or node *next_node. Also what is the significance of either in implementing the list class functions (ie. insert, remove, find)?
3
10,216,193
04/18/2012 19:04:55
198,502
10/28/2009 22:48:24
16
0
Why does Google Earth show incorrect images when using google hosted images
Earth often seems to load random images instead of the ones specified in kml. For example load the kml sample from the kml documentation for IconStyle (https://developers.google.com/kml/documentation/kmlreference#iconstyle) It specifies the image at http://maps.google.com/mapfiles/kml/pal3/icon21.png which when viewed in a browser is a building on a green field, but in earth shows up as mountains. Seems almost as though earth is hard coded to use an internal palette whenever a google hosted image is found and the palettes have gotten out of sync. (Earth version is 6.2.1.6014 (beta))
kml
google-earth
google-earth-plugin
null
null
null
open
Why does Google Earth show incorrect images when using google hosted images === Earth often seems to load random images instead of the ones specified in kml. For example load the kml sample from the kml documentation for IconStyle (https://developers.google.com/kml/documentation/kmlreference#iconstyle) It specifies the image at http://maps.google.com/mapfiles/kml/pal3/icon21.png which when viewed in a browser is a building on a green field, but in earth shows up as mountains. Seems almost as though earth is hard coded to use an internal palette whenever a google hosted image is found and the palettes have gotten out of sync. (Earth version is 6.2.1.6014 (beta))
0
10,267,023
04/22/2012 10:04:06
1,348,721
04/21/2012 19:30:44
1
0
hide form scrollbar in C#
maybe this question don't be NEW! but unfortunately my problem wasn't solved. I want show special position on the form without using scrollbar. I wait for your useful replies!
c#
forms
scrollbar
hide
null
04/23/2012 08:58:08
not a real question
hide form scrollbar in C# === maybe this question don't be NEW! but unfortunately my problem wasn't solved. I want show special position on the form without using scrollbar. I wait for your useful replies!
1
4,453,226
12/15/2010 17:56:30
543,721
12/15/2010 17:56:30
1
0
Iphone application
how can we track sms,photo gallery, videos application in backgroud ,and keep the track on server,,..?
java
iphone
c++
c
sql-server-2005
12/15/2010 18:20:15
not a real question
Iphone application === how can we track sms,photo gallery, videos application in backgroud ,and keep the track on server,,..?
1
1,559,568
10/13/2009 11:10:47
94,911
04/23/2009 11:21:36
1
1
AutoHeight IFrame
i want to make a iframe page that loading a page from other site. I have try "jQuery iFrame Sizing" to set auto height in iframe... but it is failed. What's the problem...? This is my code : ------------- on Head < script type="text/javascript" src="js/jquery.js" ></ script > < script type="text/javascript" src="js/iframe.js"></script > on Body < iframe scrolling="no" frameborder="0" width="1025" src="http://mydomain.com"/ ></ iframe > ------------- thanks
jquery
automatic
height
null
null
null
open
AutoHeight IFrame === i want to make a iframe page that loading a page from other site. I have try "jQuery iFrame Sizing" to set auto height in iframe... but it is failed. What's the problem...? This is my code : ------------- on Head < script type="text/javascript" src="js/jquery.js" ></ script > < script type="text/javascript" src="js/iframe.js"></script > on Body < iframe scrolling="no" frameborder="0" width="1025" src="http://mydomain.com"/ ></ iframe > ------------- thanks
0
3,959,333
10/18/2010 12:56:10
205,783
11/07/2009 21:27:27
192
17
integration of flex/ssrs (Flex based UI for reports created in SSRS)
We have an application which is created in **asp.net/flex** front end, ms **sql/ssas** as data source. We are in phase of creating a new reporting module. so for consistency of graphs and ui we want to use flex as front end and SSAS as backend for reporting module. My understanding is: *Flex based UI (reports/parameters) SSRS Reports (standard or fixed/ custom) should be shown inside an iframe asp.net page to pass the paremeters to reportviewer control.* We need to finilize the approach, it could be any third party component (shold be comparable to ssrs) or the approach i suggested above is okay. *Please share your experiance...*
.net
reporting-services
flex3
reporting
ssrs-2008
null
open
integration of flex/ssrs (Flex based UI for reports created in SSRS) === We have an application which is created in **asp.net/flex** front end, ms **sql/ssas** as data source. We are in phase of creating a new reporting module. so for consistency of graphs and ui we want to use flex as front end and SSAS as backend for reporting module. My understanding is: *Flex based UI (reports/parameters) SSRS Reports (standard or fixed/ custom) should be shown inside an iframe asp.net page to pass the paremeters to reportviewer control.* We need to finilize the approach, it could be any third party component (shold be comparable to ssrs) or the approach i suggested above is okay. *Please share your experiance...*
0
8,539,301
12/16/2011 19:40:45
28,486
10/16/2008 07:01:04
619
4
Speedup LocalSessionFactoryBean dropDatabaseSchema, createDatabaseSchema
I am wondering how I can speedup my unit tests. I am using JUnit and before each test I am dropping the database schema and then recreating it. Since my schema is somewhat large, this can take quite a long time considering I have over 1000 tests. To give you an understanding of my setup: Spring 3 hibernate3.LocalSessionFactoryBean which is using the HSQL dialect. I am using the JUnit's Suite runner to run a list of classes. I noticed that Spring has a SpringJunit4ClassRunner that understands Transaction annotation, but not the suite annotations. I got around this issue and now rollbacks are being attempted, but they seem to cause an infinite recursion which leads to a StackOverflow. I'm relatively new to Spring and all it's magic, but I was just wondering if anyone has any ideas in regard to the StackOverflow, or any other ideas in speeding up the testing? Maybe I could write to a file the clean state of the DB and continuously reload that after each test, though I'm not sure if this is possible. Thanks in advance.
hibernate
spring
junit
hsqldb
null
null
open
Speedup LocalSessionFactoryBean dropDatabaseSchema, createDatabaseSchema === I am wondering how I can speedup my unit tests. I am using JUnit and before each test I am dropping the database schema and then recreating it. Since my schema is somewhat large, this can take quite a long time considering I have over 1000 tests. To give you an understanding of my setup: Spring 3 hibernate3.LocalSessionFactoryBean which is using the HSQL dialect. I am using the JUnit's Suite runner to run a list of classes. I noticed that Spring has a SpringJunit4ClassRunner that understands Transaction annotation, but not the suite annotations. I got around this issue and now rollbacks are being attempted, but they seem to cause an infinite recursion which leads to a StackOverflow. I'm relatively new to Spring and all it's magic, but I was just wondering if anyone has any ideas in regard to the StackOverflow, or any other ideas in speeding up the testing? Maybe I could write to a file the clean state of the DB and continuously reload that after each test, though I'm not sure if this is possible. Thanks in advance.
0
10,465,636
05/05/2012 20:18:31
1,232,035
02/25/2012 03:24:34
11
1
Double axes in flot
I want to create a graph with four quadrants using flot. I need to have labels on both the left and right-hand sides of the graph - with the same ticks. Here is my code: $.plot($("#placeholder"), [ [<%=points%>] ], { series: {lines: { show: false }, points: { show: true }}, yaxes: [{ ticks:[[0,"Left"]],max: 100, min:-100 }, { position: "Right",ticks:[[0,"Right"]], max:100, min: -100 }], xaxis: { ticks:[[0,"Bottom"]], max: 100, min:-100 } }); I get the "Left" and "Bottom" labels but nothing on the right-hand side. Thanks in advance for any help you can provide.
flot
null
null
null
null
null
open
Double axes in flot === I want to create a graph with four quadrants using flot. I need to have labels on both the left and right-hand sides of the graph - with the same ticks. Here is my code: $.plot($("#placeholder"), [ [<%=points%>] ], { series: {lines: { show: false }, points: { show: true }}, yaxes: [{ ticks:[[0,"Left"]],max: 100, min:-100 }, { position: "Right",ticks:[[0,"Right"]], max:100, min: -100 }], xaxis: { ticks:[[0,"Bottom"]], max: 100, min:-100 } }); I get the "Left" and "Bottom" labels but nothing on the right-hand side. Thanks in advance for any help you can provide.
0
10,767,447
05/26/2012 15:22:39
1,394,184
05/14/2012 16:02:20
1
0
Weather databases
So I am trying to develop a app that lets you see the current weather like accuweather etc... but I can't find a database to get the current weather data So please if anybody of you knows wheere to get them answer
android
weather
null
null
null
05/26/2012 21:31:37
not a real question
Weather databases === So I am trying to develop a app that lets you see the current weather like accuweather etc... but I can't find a database to get the current weather data So please if anybody of you knows wheere to get them answer
1
9,954,664
03/31/2012 09:24:26
596,137
01/30/2011 22:44:11
1,723
101
Paper.js drawing tools
Is there something like a toolbar for drawing tools available somewhere for [paper.js][1]? There are [a lot possibilities][2] to draw lines, circles etc. by code and I need to give the user this abilities (like select "draw circle" in the toolbar, then click and drag in the drawing surface and the circle is painted and filled by previously selected color). [1]: http://paperjs.org/ [2]: http://paperjs.org/tutorials/interaction/mouse-tool-events/
javascript
paperjs
null
null
null
04/09/2012 13:42:47
not constructive
Paper.js drawing tools === Is there something like a toolbar for drawing tools available somewhere for [paper.js][1]? There are [a lot possibilities][2] to draw lines, circles etc. by code and I need to give the user this abilities (like select "draw circle" in the toolbar, then click and drag in the drawing surface and the circle is painted and filled by previously selected color). [1]: http://paperjs.org/ [2]: http://paperjs.org/tutorials/interaction/mouse-tool-events/
4
6,286,693
06/09/2011 00:07:29
261,997
01/29/2010 17:17:38
713
49
Refresh dependencies raises: Could Not Be Completed. App called interface marshalled for different thread.
Out of the blue I can no longer rebuild the deployment project related a visual studio 2010 desktop c# application. Nothing new has been added since the last time it worked. The only thing I can think is that I was having errors related to a DevExpress assembly which I fixed by refreshing the assembly and running the project conversion tool that DevExpress comes with based on [this advice][1]. References include CrystalDecisions, DevExpress, and a few System Assemblies. Like I said, they have all been there for several weeks, and building the deployment project has always worked before. Full error text: The operation could not be completed. The application called an interface that was marshalled for a different thread. Any ideas? [1]: http://www.devexpress.com/Support/Center/p/Q265903.aspx
c#
visual-studio-2010
deployment
devexpress
null
10/03/2011 11:10:46
too localized
Refresh dependencies raises: Could Not Be Completed. App called interface marshalled for different thread. === Out of the blue I can no longer rebuild the deployment project related a visual studio 2010 desktop c# application. Nothing new has been added since the last time it worked. The only thing I can think is that I was having errors related to a DevExpress assembly which I fixed by refreshing the assembly and running the project conversion tool that DevExpress comes with based on [this advice][1]. References include CrystalDecisions, DevExpress, and a few System Assemblies. Like I said, they have all been there for several weeks, and building the deployment project has always worked before. Full error text: The operation could not be completed. The application called an interface that was marshalled for a different thread. Any ideas? [1]: http://www.devexpress.com/Support/Center/p/Q265903.aspx
3
7,550,636
09/26/2011 04:23:54
911,468
08/25/2011 07:42:45
1
0
Android - onTabChanged not being invoked upon selecting a different tab
Thanks for checking out my inquiry! I have implemented a tab environment as illustrated below. It seems to work as I expected except that it never executes the onTabChanged method. I have found several posts about this type of situation but have not been able to get my code to work the way I expected. Advice? Thanks, Chip public class TestTabActivity extends TabActivity implements OnTabChangeListener { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Resources res = getResources(); // Resource object to get Drawables TabHost tabHost = getTabHost(); // The activity TabHost TabHost.TabSpec spec; // Resusable TabSpec for each tab Intent intent; // Reusable Intent for each tab intent = new Intent().setClass(this, Page1Activity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); spec = tabHost.newTabSpec("page1").setIndicator("Page 1", res.getDrawable(R.drawable.ic_tab_page1)) .setContent(intent); tabHost.addTab(spec); intent = new Intent().setClass(this, Page2Activity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); spec = tabHost.newTabSpec("page2").setIndicator("Page 2", res.getDrawable(R.drawable.ic_tab_page2)) .setContent(intent); tabHost.addTab(spec); intent = new Intent().setClass(this, Page2Activity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); spec = tabHost.newTabSpec("page3").setIndicator("Page 3", res.getDrawable(R.drawable.ic_tab_page3)) .setContent(intent); tabHost.addTab(spec); tabHost.setCurrentTab(0); } public void onTabChanged(String tabId) { Log.d("Tab Changed", "Changed a Tab"); } }
android
android-tabhost
null
null
null
null
open
Android - onTabChanged not being invoked upon selecting a different tab === Thanks for checking out my inquiry! I have implemented a tab environment as illustrated below. It seems to work as I expected except that it never executes the onTabChanged method. I have found several posts about this type of situation but have not been able to get my code to work the way I expected. Advice? Thanks, Chip public class TestTabActivity extends TabActivity implements OnTabChangeListener { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Resources res = getResources(); // Resource object to get Drawables TabHost tabHost = getTabHost(); // The activity TabHost TabHost.TabSpec spec; // Resusable TabSpec for each tab Intent intent; // Reusable Intent for each tab intent = new Intent().setClass(this, Page1Activity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); spec = tabHost.newTabSpec("page1").setIndicator("Page 1", res.getDrawable(R.drawable.ic_tab_page1)) .setContent(intent); tabHost.addTab(spec); intent = new Intent().setClass(this, Page2Activity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); spec = tabHost.newTabSpec("page2").setIndicator("Page 2", res.getDrawable(R.drawable.ic_tab_page2)) .setContent(intent); tabHost.addTab(spec); intent = new Intent().setClass(this, Page2Activity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); spec = tabHost.newTabSpec("page3").setIndicator("Page 3", res.getDrawable(R.drawable.ic_tab_page3)) .setContent(intent); tabHost.addTab(spec); tabHost.setCurrentTab(0); } public void onTabChanged(String tabId) { Log.d("Tab Changed", "Changed a Tab"); } }
0
11,219,060
06/27/2012 03:37:48
152,825
08/08/2009 01:01:42
648
11
why doesn't EVERYTHING default to UTF-8?
I'm just curious that there are modern systems out there that default to something other than UTF-8. I've had a person block for an entire day on the multiple locations that a mysql system can have different encoding. Very frustrating. Is there any good reason not to use utf-8 as a default (and storage space seems like not a good reason)? Not trying to be argumentitive, just curious. thx
php
python
mysql
ruby-on-rails
utf-8
06/27/2012 04:55:57
not constructive
why doesn't EVERYTHING default to UTF-8? === I'm just curious that there are modern systems out there that default to something other than UTF-8. I've had a person block for an entire day on the multiple locations that a mysql system can have different encoding. Very frustrating. Is there any good reason not to use utf-8 as a default (and storage space seems like not a good reason)? Not trying to be argumentitive, just curious. thx
4
5,622,754
04/11/2011 14:26:52
125,030
06/18/2009 11:18:09
35
2
Monitoring End of an Item in AV Foundation Framework (Notification in wrong thread)
when playing video with AVPlayer(AVQueuePlayer) I am trying to monitor when the video(AVPlayerItem) is done playing. I tried to add an observer for the AVPlayerItemDidPlayToEndTimeNotification with NSNotificationCenter. But I don't always get the notification. The [documentation tells][1]: > Important: This notification may be posted on a different thread than the one on which the observer was registered. I know only the notifications posted in the same thread as the observer was registered can be fetched. But how am I suposed to solve this. Im registering the observer om the main thread but since I do not always get the posted notification i guess that it is because the AVPlayerItem sometimes post the notification in a different thread. The documentation warns me, but I can't find any information of how to handle this. If I posted the notification in my own code I could use performSelectorOnMainThread. But it's not like i can modify AVPlayerItem class. Nether do I see a smart way of extending the AVPlayerItem with categories nor subclassing it to post a notification in the right thread. [1]: http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVPlayerItem_Class/Reference/Reference.html#//apple_ref/c/data/AVPlayerItemDidPlayToEndTimeNotification
objective-c
ios
avfoundation
nsnotifications
avplayer
null
open
Monitoring End of an Item in AV Foundation Framework (Notification in wrong thread) === when playing video with AVPlayer(AVQueuePlayer) I am trying to monitor when the video(AVPlayerItem) is done playing. I tried to add an observer for the AVPlayerItemDidPlayToEndTimeNotification with NSNotificationCenter. But I don't always get the notification. The [documentation tells][1]: > Important: This notification may be posted on a different thread than the one on which the observer was registered. I know only the notifications posted in the same thread as the observer was registered can be fetched. But how am I suposed to solve this. Im registering the observer om the main thread but since I do not always get the posted notification i guess that it is because the AVPlayerItem sometimes post the notification in a different thread. The documentation warns me, but I can't find any information of how to handle this. If I posted the notification in my own code I could use performSelectorOnMainThread. But it's not like i can modify AVPlayerItem class. Nether do I see a smart way of extending the AVPlayerItem with categories nor subclassing it to post a notification in the right thread. [1]: http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVPlayerItem_Class/Reference/Reference.html#//apple_ref/c/data/AVPlayerItemDidPlayToEndTimeNotification
0
4,834,884
01/29/2011 03:03:36
315,725
04/13/2010 17:02:14
32
3
Getting bank account information from a bank and displaying on a website
I am looking for a way to get bank account information (transactions and balance) from a financial institution and display it on a website. The question is vague intentionally.... Everything is open. I haven't chosen a bank, serverside technology or front end technology. The idea is to have a script run automatically periodically (once or twice a day) and get the latest account information from the bank server automatically. Probably something in the direction of OFX (Open financial exchange), HBCI (home banking c.. interface), fnts or something like it. Even working over a closed source API is not out of question: Wesabe or Mint or something. **Paypal is not an option because it won't work in India or Pakistan.** cheers [Flexi Comment Box][1] [1]: http://www.alimsyed.com
api
onlinebanking
ofx
null
null
01/29/2011 11:55:20
off topic
Getting bank account information from a bank and displaying on a website === I am looking for a way to get bank account information (transactions and balance) from a financial institution and display it on a website. The question is vague intentionally.... Everything is open. I haven't chosen a bank, serverside technology or front end technology. The idea is to have a script run automatically periodically (once or twice a day) and get the latest account information from the bank server automatically. Probably something in the direction of OFX (Open financial exchange), HBCI (home banking c.. interface), fnts or something like it. Even working over a closed source API is not out of question: Wesabe or Mint or something. **Paypal is not an option because it won't work in India or Pakistan.** cheers [Flexi Comment Box][1] [1]: http://www.alimsyed.com
2
5,004,233
02/15/2011 13:28:57
528,370
12/02/2010 17:50:50
170
11
jQuery ajax post, request for an example...
I want to use ajax to send data to a database. But how? I know that you can post and get a callback, but how? How should the js code look like? How should the form look like? How should the php code look like? How should the callback look like? Can someone give me an example? Greetings
jquery
ajax
post
null
null
07/20/2012 13:26:19
not a real question
jQuery ajax post, request for an example... === I want to use ajax to send data to a database. But how? I know that you can post and get a callback, but how? How should the js code look like? How should the form look like? How should the php code look like? How should the callback look like? Can someone give me an example? Greetings
1
8,339,625
12/01/2011 10:13:47
905,585
08/22/2011 09:30:22
114
6
XAML UserControl Triggers
Been stuck on this one for quite a while, not sure where I'm going wrong. I get the message Triggers collection members must be of type EventTrigger. I think my knowledge of triggers is correct and it is this type of trigger I need not an event trigger. This is my mark-up <UserControl.Triggers> <Trigger SourceName="MainGrid" Property="Grid.IsMouseOver" Value="true"> <Setter TargetName="DeleteButton" Property="TextBlock.Foreground" Value="#FF222222" /> </Trigger> </UserControl.Triggers>
xaml
null
null
null
null
null
open
XAML UserControl Triggers === Been stuck on this one for quite a while, not sure where I'm going wrong. I get the message Triggers collection members must be of type EventTrigger. I think my knowledge of triggers is correct and it is this type of trigger I need not an event trigger. This is my mark-up <UserControl.Triggers> <Trigger SourceName="MainGrid" Property="Grid.IsMouseOver" Value="true"> <Setter TargetName="DeleteButton" Property="TextBlock.Foreground" Value="#FF222222" /> </Trigger> </UserControl.Triggers>
0
11,554,181
07/19/2012 04:57:30
1,516,428
07/11/2012 02:11:53
1
0
How to efficiently and quickly delete a large mount of file on Windows?
How to efficiently and quickly delete a large mount of file (about 1 billion) on Windows? I have tried to delete them manually or through the command line: rmdir /s/q FOLDER_PATH, but they also need a long time to delete them. Any way better or tools can do it?
java
null
null
null
null
07/19/2012 14:57:30
off topic
How to efficiently and quickly delete a large mount of file on Windows? === How to efficiently and quickly delete a large mount of file (about 1 billion) on Windows? I have tried to delete them manually or through the command line: rmdir /s/q FOLDER_PATH, but they also need a long time to delete them. Any way better or tools can do it?
2
2,044,823
01/11/2010 20:50:25
214,751
11/19/2009 16:31:47
20
1
Could not Open a Site after installing SP2 for MOSS 2007
I have installed WSS SP2 and MOSS SP2 recently. But the configuration failed with the following error: ----------------------------------------------------------------------- <p> Failed to install the application content files. An exception of type System.NullReferenceException was thrown. Additional exception information: Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Administration.SPAspConfigurationFile.ApplyActionToXmlDocument(XmlDocument xdAction, XmlDocument xd, String sourceFileName) at Microsoft.SharePoint.Administration.SPAspConfigurationFile.MergeWebConfig(XmlDocument xdWebConfig, String fileMask) at Microsoft.SharePoint.Administration.SPAspConfigurationFile.MergeWebConfig(XmlDocument xdWebConfig) at Microsoft.SharePoint.Administration.SPWebService.ApplyApplicationContentToLocalServer() at Microsoft.SharePoint.PostSetupConfiguration.ApplicationContentTask.Run() at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask() </p> ------------------------------------------------------------------------------------------- Now I could not access some sites. The weird thing is that now I could only see the URL on left side but I could not see the properties of the sites like URL,Title,Description,Primary administrator, E-mail address and Database Name when I open Central Administration>Application Management>Site Collection List When I try to open the sites using the Url I see the following error: HTTP 500 Internal Server Error. The website cannot display the page. Can anyone help me with this? Thanks Carol
sharepoint2007
null
null
null
null
01/02/2012 01:13:40
off topic
Could not Open a Site after installing SP2 for MOSS 2007 === I have installed WSS SP2 and MOSS SP2 recently. But the configuration failed with the following error: ----------------------------------------------------------------------- <p> Failed to install the application content files. An exception of type System.NullReferenceException was thrown. Additional exception information: Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Administration.SPAspConfigurationFile.ApplyActionToXmlDocument(XmlDocument xdAction, XmlDocument xd, String sourceFileName) at Microsoft.SharePoint.Administration.SPAspConfigurationFile.MergeWebConfig(XmlDocument xdWebConfig, String fileMask) at Microsoft.SharePoint.Administration.SPAspConfigurationFile.MergeWebConfig(XmlDocument xdWebConfig) at Microsoft.SharePoint.Administration.SPWebService.ApplyApplicationContentToLocalServer() at Microsoft.SharePoint.PostSetupConfiguration.ApplicationContentTask.Run() at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask() </p> ------------------------------------------------------------------------------------------- Now I could not access some sites. The weird thing is that now I could only see the URL on left side but I could not see the properties of the sites like URL,Title,Description,Primary administrator, E-mail address and Database Name when I open Central Administration>Application Management>Site Collection List When I try to open the sites using the Url I see the following error: HTTP 500 Internal Server Error. The website cannot display the page. Can anyone help me with this? Thanks Carol
2
9,892,082
03/27/2012 14:56:45
1,295,853
03/27/2012 14:49:18
1
0
Joomla site hacked
I have a old one joomla 10.0.15 that was hacked a week ago, I don't have a backup because we are planning to migrate, but I need to know what happen. After fix permissions, reinstall all core files, still have two problems, the first one is still have malicious code: <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct ="UA-xxxxxxx-x"; urchinTracker(); </script> <script src="http://equate22motorde.rr.nu/nl.php?p=d"></script> </body> The url change with every reload. I can't find where the code is. I checked the template, and other files, but nothing. ¿any ideas about where can I check? The another issue is with the file and folder access, even when the permissions are OK, this joomla installation is unable to write in folders or modify any file. Thanks in advance.
security
joomla
null
null
null
03/28/2012 03:07:18
off topic
Joomla site hacked === I have a old one joomla 10.0.15 that was hacked a week ago, I don't have a backup because we are planning to migrate, but I need to know what happen. After fix permissions, reinstall all core files, still have two problems, the first one is still have malicious code: <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct ="UA-xxxxxxx-x"; urchinTracker(); </script> <script src="http://equate22motorde.rr.nu/nl.php?p=d"></script> </body> The url change with every reload. I can't find where the code is. I checked the template, and other files, but nothing. ¿any ideas about where can I check? The another issue is with the file and folder access, even when the permissions are OK, this joomla installation is unable to write in folders or modify any file. Thanks in advance.
2
6,327
08/08/2008 19:56:57
396
08/05/2008 12:46:44
101
9
What are your programming excercises?
Do you have any programming "exercises" that you do in order to hone your programming skills? Anything from FizzBuzz to more complicated problems to get you thinking about real-life scenarios that you may encounter?
homework
test
fizzbuzz
null
null
12/10/2011 05:59:25
not constructive
What are your programming excercises? === Do you have any programming "exercises" that you do in order to hone your programming skills? Anything from FizzBuzz to more complicated problems to get you thinking about real-life scenarios that you may encounter?
4
9,666,276
03/12/2012 11:34:16
1,239,881
02/29/2012 09:35:12
25
1
Google position changing on different computers
My new site which went live last Saturday and I have found it has completely different search rankings when I’m in two locations (very similar distance apart). I get position 3 for ‘Sound Plaza’ for google.co.uk at home and nonexistent search result on google.co.uk at work. The domain for the site is www.soundplaza.co.uk From reading this old post it seems that Google not only uses your Google log in information, but also uses your browser history, cookies and cache to create the right search results. - http://www.warriorforum.com/main-internet-marketing-discussion-forum/147383-google-rank-two-different-computers.html They recommend CCleaner however I would prefer to have my internet history, cookies etc Does anyone know if there is a way of browsing the internet with completely neutral search results? If not, does anyone know any reliable free software which can check your search engine ranking? So far I have tried the following quite helpful. http://www.seocentro.com/tools/search-engines/keyword-position.html http://www.searchenginegenie.com/google-rank-checker.html Thanks
seo
serp
google-ranking
null
null
03/19/2012 02:09:37
off topic
Google position changing on different computers === My new site which went live last Saturday and I have found it has completely different search rankings when I’m in two locations (very similar distance apart). I get position 3 for ‘Sound Plaza’ for google.co.uk at home and nonexistent search result on google.co.uk at work. The domain for the site is www.soundplaza.co.uk From reading this old post it seems that Google not only uses your Google log in information, but also uses your browser history, cookies and cache to create the right search results. - http://www.warriorforum.com/main-internet-marketing-discussion-forum/147383-google-rank-two-different-computers.html They recommend CCleaner however I would prefer to have my internet history, cookies etc Does anyone know if there is a way of browsing the internet with completely neutral search results? If not, does anyone know any reliable free software which can check your search engine ranking? So far I have tried the following quite helpful. http://www.seocentro.com/tools/search-engines/keyword-position.html http://www.searchenginegenie.com/google-rank-checker.html Thanks
2
7,467,252
09/19/2011 06:35:57
841,847
07/13/2011 02:03:06
41
3
I need advice on choosing the right database for Large many-to-many dataset
i need an advice choosing between mysql and mongodb. basically i need 7 tables Artists, Tracks, Albums, Clips, Tags, Ratings, Users the databases i looked at are myqsl and mongodb, and i need help choosing the right one for this project. the problem i see with mysql is the ugly unmaintanable code the complex joins i will have to do to bring the content the way i want it, plus i will have to create more than 7 tables for the relationships. on the other hand with mongo i can just reference artist tracks from within its document. wich one should i choose?
mysql
mongodb
many-to-many
null
null
09/19/2011 06:47:29
off topic
I need advice on choosing the right database for Large many-to-many dataset === i need an advice choosing between mysql and mongodb. basically i need 7 tables Artists, Tracks, Albums, Clips, Tags, Ratings, Users the databases i looked at are myqsl and mongodb, and i need help choosing the right one for this project. the problem i see with mysql is the ugly unmaintanable code the complex joins i will have to do to bring the content the way i want it, plus i will have to create more than 7 tables for the relationships. on the other hand with mongo i can just reference artist tracks from within its document. wich one should i choose?
2
4,743,799
01/20/2011 05:38:53
466,594
10/05/2010 08:41:49
217
30
Connect SQL Deployed Database over the Internet
Can anyone tell me how to connect SQL Server database over the internet which is located at one of the Web hosting services like GoDaddy. Language is **C#** Sql Server 2005
c#
sql-server
null
null
null
null
open
Connect SQL Deployed Database over the Internet === Can anyone tell me how to connect SQL Server database over the internet which is located at one of the Web hosting services like GoDaddy. Language is **C#** Sql Server 2005
0
9,283,138
02/14/2012 19:40:12
1,127,128
01/03/2012 03:05:41
1
0
Amazon EC2 vs Others like (Heroku, engine yard)
I need advice on selecting my hosting environment. I checked Heroku - that great, I also checked Amazon EC2. Now for software engineer, don't need any support developer can manage all stuffs like ruby, rails, db installation and configuration. My understanding is if heavy traffic and need more cpu processing I think go with Amazon EC2 is best. So my question is - If I will go with Amazon EC2, is that better approach? I am comfortable with system task. Thanks Patrick
ruby-on-rails
ruby
heroku
amazon-ec2
hosting
02/14/2012 22:36:49
not constructive
Amazon EC2 vs Others like (Heroku, engine yard) === I need advice on selecting my hosting environment. I checked Heroku - that great, I also checked Amazon EC2. Now for software engineer, don't need any support developer can manage all stuffs like ruby, rails, db installation and configuration. My understanding is if heavy traffic and need more cpu processing I think go with Amazon EC2 is best. So my question is - If I will go with Amazon EC2, is that better approach? I am comfortable with system task. Thanks Patrick
4
7,089,007
08/17/2011 07:01:52
733,323
05/01/2011 13:43:10
240
1
Disable jQuery validation with class = cancel on button not working
Why jQuery validation not canceled when i set `class = cancel` ? <button name="submit" class="cancel" value="Back">Back</button> Any thoughts?
jquery
jquery-validate
null
null
null
null
open
Disable jQuery validation with class = cancel on button not working === Why jQuery validation not canceled when i set `class = cancel` ? <button name="submit" class="cancel" value="Back">Back</button> Any thoughts?
0
8,260,473
11/24/2011 17:04:02
732,516
04/30/2011 15:30:52
9
0
Comparison of SSL Certificates
My web application most definately needs an SSL certificate I was looking into godaddy's: http://www.godaddy.com/ssl/ssl-certificates.aspx The `standard` doesn't appear to have the lock in the URL bar, which a lot of users might not consider secure... How true is this? The Standard has `https://` obviously in the bar, but is that enough to persuade users to want to enter in confidential information?? I'd appreciate any experience anyone has had with this. or any alterates they've dealt with. Is $100/year really the going rate for an SSL cert that has the lock in the url bar? Thanks SO!
security
ssl
ssl-certificate
secure-gateway
null
11/25/2011 06:29:51
off topic
Comparison of SSL Certificates === My web application most definately needs an SSL certificate I was looking into godaddy's: http://www.godaddy.com/ssl/ssl-certificates.aspx The `standard` doesn't appear to have the lock in the URL bar, which a lot of users might not consider secure... How true is this? The Standard has `https://` obviously in the bar, but is that enough to persuade users to want to enter in confidential information?? I'd appreciate any experience anyone has had with this. or any alterates they've dealt with. Is $100/year really the going rate for an SSL cert that has the lock in the url bar? Thanks SO!
2
10,858,844
06/02/2012 00:22:43
1,204,749
02/12/2012 05:57:33
30
3
Creating DDL scripts from JPA/Hibernate Annotation Classes Using ANT
I would like to generate SQL DDL scripts from Hibernate/JPA Annotation Classes using ANT. Below is the ANT script that I wrote based on Hibernate Dev Docs URL: http://docs.jboss.org/hibernate/orm/4.1/devguide/en-US/html_single/ <?xml version="1.0" encoding="UTF-8"?> <project name="changeme" default="all" basedir="."> <target name="ddl_generation"> <!-- paths to required jars --> <path location="web/WEB-INF/lib/hibernate-annotations.jar" /> <path location="web/WEB-INF/lib/ejb3-persistence.jar" /> <path location="web/WEB-INF/lib/hibernate-entitymanager.jar" /> <path location="web/WEB-INF/lib/javaassist.jar" /> <path location="web/WEB-INF/lib/hibernate-tools.jar" id="hibernate-tools"/> <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" > <classpath path="${build.dir}/web/WEB-INF/lib"/> </taskdef> <hibernatetool destdir="${build.dir}"> <!-- were the annotation beans files are located--> <classpath> <path location="${build.dir}/web/WEB-INF/classes/com/yourmarketnet/beans" /> </classpath> <!-- list exporters here --> <hbm2ddl export="false" update="false" drop="true" create="true" outputfilename="myApps.ddl" delimiter=";" format="false" haltonerror="true"/> </hibernatetool> </target> </project> Im getting ERROR taskdef class org.hibernate.tool.ant.HibernateToolTask cannot be found using the classloader AntClassLoader[]
sql
hibernate
java-ee
orm
ant
null
open
Creating DDL scripts from JPA/Hibernate Annotation Classes Using ANT === I would like to generate SQL DDL scripts from Hibernate/JPA Annotation Classes using ANT. Below is the ANT script that I wrote based on Hibernate Dev Docs URL: http://docs.jboss.org/hibernate/orm/4.1/devguide/en-US/html_single/ <?xml version="1.0" encoding="UTF-8"?> <project name="changeme" default="all" basedir="."> <target name="ddl_generation"> <!-- paths to required jars --> <path location="web/WEB-INF/lib/hibernate-annotations.jar" /> <path location="web/WEB-INF/lib/ejb3-persistence.jar" /> <path location="web/WEB-INF/lib/hibernate-entitymanager.jar" /> <path location="web/WEB-INF/lib/javaassist.jar" /> <path location="web/WEB-INF/lib/hibernate-tools.jar" id="hibernate-tools"/> <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" > <classpath path="${build.dir}/web/WEB-INF/lib"/> </taskdef> <hibernatetool destdir="${build.dir}"> <!-- were the annotation beans files are located--> <classpath> <path location="${build.dir}/web/WEB-INF/classes/com/yourmarketnet/beans" /> </classpath> <!-- list exporters here --> <hbm2ddl export="false" update="false" drop="true" create="true" outputfilename="myApps.ddl" delimiter=";" format="false" haltonerror="true"/> </hibernatetool> </target> </project> Im getting ERROR taskdef class org.hibernate.tool.ant.HibernateToolTask cannot be found using the classloader AntClassLoader[]
0
10,956,710
06/08/2012 22:25:09
460,733
09/28/2010 14:43:24
48
0
regular expression change
i'm not very good at regular expressions.. how would I add a ".tile" (without quotes) to this regular expression pattern: private static final Pattern JSP_PathPattern = Pattern.compile("(.+\\/)(\\w+)(\\.(jsp|.?htm.?|.?xslt,.?xsl))$", Pattern.CASE_INSENSITIVE); thanks in advance.
java
regex
null
null
null
null
open
regular expression change === i'm not very good at regular expressions.. how would I add a ".tile" (without quotes) to this regular expression pattern: private static final Pattern JSP_PathPattern = Pattern.compile("(.+\\/)(\\w+)(\\.(jsp|.?htm.?|.?xslt,.?xsl))$", Pattern.CASE_INSENSITIVE); thanks in advance.
0
5,035,654
02/17/2011 22:47:35
512,646
11/18/2010 19:43:25
25
0
Kohana ORM Result - How to display?
Maybe something really simple, I got really big problem with... ORM result. I'm loading object with relation using with(). It generates following query: SELECT `article`.`id` AS `article:id`, `article`.`name` AS `article:name` Now's my question... how to display article name in the view? Sorry for dumb question, I really can't beliebe I'm asking it. Cheers!
string
kohana
null
null
null
null
open
Kohana ORM Result - How to display? === Maybe something really simple, I got really big problem with... ORM result. I'm loading object with relation using with(). It generates following query: SELECT `article`.`id` AS `article:id`, `article`.`name` AS `article:name` Now's my question... how to display article name in the view? Sorry for dumb question, I really can't beliebe I'm asking it. Cheers!
0
345,056
12/05/2008 20:41:55
33,226
10/31/2008 21:53:12
701
44
Diagnosing Programming Errors
We've all hit those errors that take hours/days to debug, only to find it was because of a misplaced assumption, wrong input data, or some other unseemly error. As an example, I just spent 6 hours trying to find an error in a stored procedure. It fired fine in Query Analyzer, but failed in code. The end result was a space that didn't get trimmed and thus failed a string match in the stored procedure*. <em>*Obviously good coding practice will eliminate a lot of errors like this - however there are still instances were we aren't debugging our own code.</em> <li>What are some of these errors that you've come across? (or dare I say caused?) <li>How did you go about finding them? <li>What good practice exists to prevent that error in the future?
error
polls
anomaly
null
null
09/20/2011 12:05:24
off topic
Diagnosing Programming Errors === We've all hit those errors that take hours/days to debug, only to find it was because of a misplaced assumption, wrong input data, or some other unseemly error. As an example, I just spent 6 hours trying to find an error in a stored procedure. It fired fine in Query Analyzer, but failed in code. The end result was a space that didn't get trimmed and thus failed a string match in the stored procedure*. <em>*Obviously good coding practice will eliminate a lot of errors like this - however there are still instances were we aren't debugging our own code.</em> <li>What are some of these errors that you've come across? (or dare I say caused?) <li>How did you go about finding them? <li>What good practice exists to prevent that error in the future?
2
7,979,567
11/02/2011 11:27:15
662,645
03/16/2011 14:20:12
324
28
PHP: Convert any string to UTF-8 without knowing the original character set, or at least try
I have an application that deals with clients from all over the world, and, naturally, I want everything going into my databases to be UTF-8 encoded. The main problem for me is that I don't know what encoding the source of any string is going to be - it could be from a text box (using `<form accept-charset="utf-8">` is only useful if the user is actually submitted the form), or it could be from an uploaded text file, so I really have no control over the input. What I need is a function or class that makes sure the stuff going into my database is, as far as is possible, UTF-8 encoded. I've tried `iconv(mb_detect_encoding($text), "UTF-8", $text);` but that has problems (if the input is 'fiancée' it returns 'fianc'). I've tried a lot of things =/ For file uploads, I like the idea of asking the end user to specify the encoding they use, and show them previews of what the output will look like, but this doesn't help against nasty hackers (in fact, it could make their life a little easier). I've read the other SO questions on the subject, but they seem to all have subtle differences like "I need to parse RSS feeds" or "I scrape data from websites" (or, indeed, "You can't"). But there must be something that at least has a good *try*! Sorry about the excessive question length.
php
utf-8
character-encoding
null
null
null
open
PHP: Convert any string to UTF-8 without knowing the original character set, or at least try === I have an application that deals with clients from all over the world, and, naturally, I want everything going into my databases to be UTF-8 encoded. The main problem for me is that I don't know what encoding the source of any string is going to be - it could be from a text box (using `<form accept-charset="utf-8">` is only useful if the user is actually submitted the form), or it could be from an uploaded text file, so I really have no control over the input. What I need is a function or class that makes sure the stuff going into my database is, as far as is possible, UTF-8 encoded. I've tried `iconv(mb_detect_encoding($text), "UTF-8", $text);` but that has problems (if the input is 'fiancée' it returns 'fianc'). I've tried a lot of things =/ For file uploads, I like the idea of asking the end user to specify the encoding they use, and show them previews of what the output will look like, but this doesn't help against nasty hackers (in fact, it could make their life a little easier). I've read the other SO questions on the subject, but they seem to all have subtle differences like "I need to parse RSS feeds" or "I scrape data from websites" (or, indeed, "You can't"). But there must be something that at least has a good *try*! Sorry about the excessive question length.
0
9,304,315
02/16/2012 01:39:14
296,003
03/17/2010 20:00:11
2,430
73
Rails float as ID in URI seems to lose decimal when converting from string
Is it wrong/impossible to pass a float as an id in RAILS? http://mysite.com/clientversioncheck/1.1 controller: def clientversioncheck current_version = 1.1 client_version = params[:id].to_f if client_version && current_version > client_version render :text => "update url" else render :text => "no update " + current_version.to_s + "server vs. " + client_version.to_s, :status => 404 end end If I'm comparing a whole number it's always fine but if I pass a float as a string the conversion always seems to drop the decimal portion. So if current_version = 1.0 and I pass 1.0 in the url everything is fine if current_version = 1.1 and I pass 1.1 in the url client_version evals as 1.0. I thought . does not need to be escaped in URIs
ruby-on-rails
null
null
null
null
null
open
Rails float as ID in URI seems to lose decimal when converting from string === Is it wrong/impossible to pass a float as an id in RAILS? http://mysite.com/clientversioncheck/1.1 controller: def clientversioncheck current_version = 1.1 client_version = params[:id].to_f if client_version && current_version > client_version render :text => "update url" else render :text => "no update " + current_version.to_s + "server vs. " + client_version.to_s, :status => 404 end end If I'm comparing a whole number it's always fine but if I pass a float as a string the conversion always seems to drop the decimal portion. So if current_version = 1.0 and I pass 1.0 in the url everything is fine if current_version = 1.1 and I pass 1.1 in the url client_version evals as 1.0. I thought . does not need to be escaped in URIs
0
9,563,829
03/05/2012 08:49:30
733,287
05/01/2011 13:00:26
1,966
159
best way to remove specific index from all arrays in a multidimentional array PHP
hi i have multidimensional array in `php` i want to remove an index from every array , my array is like this Array ( [0] => Array ( [ProfilePrivacySettingDefaultID] => 1 [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) [1] => Array ( [ProfilePrivacySettingDefaultID] => 2 [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) [2] => Array ( [ProfilePrivacySettingDefaultID] => 3 [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) [3] => Array ( [ProfilePrivacySettingDefaultID] => 4 [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) ); i want index `ProfilePrivacySettingDefaultID` from all arrays , so the final result will be like this Array ( [0] => Array ( [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) [1] => Array ( [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) [2] => Array ( [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) [3] => Array ( [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) ); what is the best way to do this , thank you very much..............
php
arrays
php5
codeigniter
multidimensional-array
null
open
best way to remove specific index from all arrays in a multidimentional array PHP === hi i have multidimensional array in `php` i want to remove an index from every array , my array is like this Array ( [0] => Array ( [ProfilePrivacySettingDefaultID] => 1 [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) [1] => Array ( [ProfilePrivacySettingDefaultID] => 2 [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) [2] => Array ( [ProfilePrivacySettingDefaultID] => 3 [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) [3] => Array ( [ProfilePrivacySettingDefaultID] => 4 [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) ); i want index `ProfilePrivacySettingDefaultID` from all arrays , so the final result will be like this Array ( [0] => Array ( [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) [1] => Array ( [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) [2] => Array ( [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) [3] => Array ( [UserType] => 2 [Type] => 1 [EntityID] => 0 [PrivacySettingPublic] => 1 [PrivacySettingElephantiUser] => 1 [PrivacySettingFriend] => 1 [IsValid] => 1 [CreatedOn] => 1330580809 [CreatedBy] => 0 [UpdatedOn] => 0 [UpdatedBy] => 0 ) ); what is the best way to do this , thank you very much..............
0
4,449,437
12/15/2010 11:34:25
543,292
12/15/2010 11:34:25
1
0
java programming
how to get table structre of a database in java?
java
null
null
null
null
12/16/2010 02:45:32
not a real question
java programming === how to get table structre of a database in java?
1
5,552,470
04/05/2011 13:17:39
692,890
04/05/2011 12:45:33
1
0
Using the $.widget factory to override jQuery UI Autocomplete options
I decided to write a custom widget that extends and overrides the standard Autocomplete widget. [The official documentation for the $.widget factory][1] mentions inheritance, but it doesn't look like it's possibile to override the original widget options (i.e. not just add to them). For example, I wasn't able to redefine the *source* option (that defaults to null) with this code: $.widget("ui.productSearch", $.ui.autocomplete, { bla: 15, source: ["apples", "oranges", "bananas"], minLength: 2 }); I tried out the above code [on JS Bin][2]. If you inspect the resulting widget you can see that *bla* is added to the options, but both *source* and *minLength* still reflect the default values defined in $.ui.autocomplete. What am I doing wrong? And if this is the expected behavior of $.widget, what is the best way to override an option? [1]: http://wiki.jqueryui.com/w/page/12138135/Widget-factory [2]: http://jsbin.com/uzobo4/2/
javascript
jquery-ui
widget
override
null
null
open
Using the $.widget factory to override jQuery UI Autocomplete options === I decided to write a custom widget that extends and overrides the standard Autocomplete widget. [The official documentation for the $.widget factory][1] mentions inheritance, but it doesn't look like it's possibile to override the original widget options (i.e. not just add to them). For example, I wasn't able to redefine the *source* option (that defaults to null) with this code: $.widget("ui.productSearch", $.ui.autocomplete, { bla: 15, source: ["apples", "oranges", "bananas"], minLength: 2 }); I tried out the above code [on JS Bin][2]. If you inspect the resulting widget you can see that *bla* is added to the options, but both *source* and *minLength* still reflect the default values defined in $.ui.autocomplete. What am I doing wrong? And if this is the expected behavior of $.widget, what is the best way to override an option? [1]: http://wiki.jqueryui.com/w/page/12138135/Widget-factory [2]: http://jsbin.com/uzobo4/2/
0
1,763,497
11/19/2009 14:06:12
181,272
09/29/2009 16:41:31
21
1
Online Exam System
i want to build a simple online exam system web application where students can give exam. Exam will be evaluated by the course teacher. I choose the entities: 1. student 2. teacher 3. course 4. question 5. Exam 6. result Please suggest that if this is ok or not. Another problem is that how can i store my questions in the database? there will be both MCQ and written in the same question. what will be most efficient. Thanks in advance
database
null
null
null
null
null
open
Online Exam System === i want to build a simple online exam system web application where students can give exam. Exam will be evaluated by the course teacher. I choose the entities: 1. student 2. teacher 3. course 4. question 5. Exam 6. result Please suggest that if this is ok or not. Another problem is that how can i store my questions in the database? there will be both MCQ and written in the same question. what will be most efficient. Thanks in advance
0
6,607,694
07/07/2011 08:18:00
361,247
06/08/2010 10:30:35
463
44
Deselecting a row in table view does not animate
I have a view controller that manages a table view. My understanding is that a table cell will be deselected automatically if I push another viewcontroller and then pop back to the table view. However, in the same class (that I use a few times), there is one instance of the class when the cell is deselected but not animated (it'll just turn blue and then back to normal without animating). Why did this happen? I have a few instances of this class but it only happens to one of them. What might be causing this?
iphone
cocoa-touch
uitableview
uikit
core-animation
null
open
Deselecting a row in table view does not animate === I have a view controller that manages a table view. My understanding is that a table cell will be deselected automatically if I push another viewcontroller and then pop back to the table view. However, in the same class (that I use a few times), there is one instance of the class when the cell is deselected but not animated (it'll just turn blue and then back to normal without animating). Why did this happen? I have a few instances of this class but it only happens to one of them. What might be causing this?
0
5,135,752
02/27/2011 20:33:34
466,229
10/04/2010 21:16:05
3
1
Preg Replace on video object code - only works for first instance
Can anyone help me decipher why the following code only works on the first instance of width / height in an object code. I need to replace both the style which use "height: xxx ; width : xxx" and then also replace the actual embed's height = "xxx" and width = "xxx" here's the preg replace: $vid_object = preg_replace('~((width)\s?[=:]\s?[\'"]?)[0-9]+~i','${1}600',$vid_object); $vid_object = preg_replace('~((height)\s?[=:]\s?[\'"]?)[0-9]+~i','${1}364',$vid_object); here's the video output: <object style="height: 364px; width: 600px"><param name="movie" value="http://www.youtube.com/v/UF06-2Q0-G0?version=3"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/UF06-2Q0-G0?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"></object> I think it has something to do with the replacement part of the code '${1}600' or that the results are limited to first instance. Any help is greatly appreciated. Wasted too much time hunting when regex isn't my specialty. Thanks nicholas
object
video
embed
preg-replace
dimensions
null
open
Preg Replace on video object code - only works for first instance === Can anyone help me decipher why the following code only works on the first instance of width / height in an object code. I need to replace both the style which use "height: xxx ; width : xxx" and then also replace the actual embed's height = "xxx" and width = "xxx" here's the preg replace: $vid_object = preg_replace('~((width)\s?[=:]\s?[\'"]?)[0-9]+~i','${1}600',$vid_object); $vid_object = preg_replace('~((height)\s?[=:]\s?[\'"]?)[0-9]+~i','${1}364',$vid_object); here's the video output: <object style="height: 364px; width: 600px"><param name="movie" value="http://www.youtube.com/v/UF06-2Q0-G0?version=3"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/UF06-2Q0-G0?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"></object> I think it has something to do with the replacement part of the code '${1}600' or that the results are limited to first instance. Any help is greatly appreciated. Wasted too much time hunting when regex isn't my specialty. Thanks nicholas
0
186,798
10/09/2008 11:18:27
6,400
09/15/2008 09:03:41
836
41
How to determine what log level to use?
The log levels WARN, ERROR and FATAL are pretty clear. But when is something DEBUG, and when INFO? I've seen some projects that are annoyingly verbose on the INFO level, but I've also seen code that favors the DEBUG level too much. In both cases, useful information is hidden in the noise. What are the criteria for determining log levels?
logging
language-agnostic
verbosity
null
null
01/23/2012 14:00:25
not constructive
How to determine what log level to use? === The log levels WARN, ERROR and FATAL are pretty clear. But when is something DEBUG, and when INFO? I've seen some projects that are annoyingly verbose on the INFO level, but I've also seen code that favors the DEBUG level too much. In both cases, useful information is hidden in the noise. What are the criteria for determining log levels?
4
2,334,325
02/25/2010 13:43:12
106,528
05/13/2009 18:13:53
158
5
Walkingthrough of my project C# application?
I am planning to develop a C# application for my client. I need advices from well experienced dot net guys with restpect to SDLC. I want the walk thorugh of the project , which are the different steps that needs to be followed? Application is to parse the body of the email and put the filterd data into the excel file. Please advice me experts !! :-)
c#
console-application
.net
sdlc
null
01/22/2012 20:33:31
not a real question
Walkingthrough of my project C# application? === I am planning to develop a C# application for my client. I need advices from well experienced dot net guys with restpect to SDLC. I want the walk thorugh of the project , which are the different steps that needs to be followed? Application is to parse the body of the email and put the filterd data into the excel file. Please advice me experts !! :-)
1
3,033,682
06/13/2010 19:55:42
191,808
09/15/2008 19:01:49
1,127
3
When do you need to use a view controller?
I'm diving into iPhone development and one of the core concepts im trying to get my head around is view controllers. If you look at the GLPaint example on the apple dev site, you'll see a project that has... 1. An app delegate class 2. A uiwindow subclass 3. And a uiview subclass And the uiview subclass implements all the core graphics painting logic and handles the touch events. My questions are, why is there no view controller implemented to handle that view logic? Could you use a view controller to implement that logic or does it have to be implemented in the uiview subclass? And last, when should you use a view controller to implement the view logic code? Thanks so much in advance for your help!
iphone
uiview
uiviewcontroller
null
null
null
open
When do you need to use a view controller? === I'm diving into iPhone development and one of the core concepts im trying to get my head around is view controllers. If you look at the GLPaint example on the apple dev site, you'll see a project that has... 1. An app delegate class 2. A uiwindow subclass 3. And a uiview subclass And the uiview subclass implements all the core graphics painting logic and handles the touch events. My questions are, why is there no view controller implemented to handle that view logic? Could you use a view controller to implement that logic or does it have to be implemented in the uiview subclass? And last, when should you use a view controller to implement the view logic code? Thanks so much in advance for your help!
0
10,991,227
06/12/2012 05:57:53
1,447,872
06/10/2012 22:03:36
1
0
Can access files in jar, but not when the jar is loaded in a browser
I have spent the last several days trying to figure out my Java problem. I've gone through dozens of websites and posts about this issue. I think my question has already been answered on stackoverflow, but I'm sorry that I don't understand the answers. I hope you will please be patient with me. I have a music theory GUI, and among other things, it plays MP3s from inside the jar. Everything works perfectly when I run the program from NetBeans or the command line, but I get a null-pointer exception when I run the program in a browser. The suspicious line of code is: String notePath = "notes/0.mp3"; Player player = Manager.createPlayer(new MediaLocator(this.getClass().getResource(notePath).toExternalForm())); Thank you in advance.
browser
jar
null
null
null
null
open
Can access files in jar, but not when the jar is loaded in a browser === I have spent the last several days trying to figure out my Java problem. I've gone through dozens of websites and posts about this issue. I think my question has already been answered on stackoverflow, but I'm sorry that I don't understand the answers. I hope you will please be patient with me. I have a music theory GUI, and among other things, it plays MP3s from inside the jar. Everything works perfectly when I run the program from NetBeans or the command line, but I get a null-pointer exception when I run the program in a browser. The suspicious line of code is: String notePath = "notes/0.mp3"; Player player = Manager.createPlayer(new MediaLocator(this.getClass().getResource(notePath).toExternalForm())); Thank you in advance.
0
10,760,690
05/25/2012 20:02:16
531,203
12/05/2010 13:04:01
304
6
Identify object calling draw() method with OpenGL
Is there a way to identify which object is calling the draw method. The calling code: [joint.model draw]; The draw method: -(void)draw { glBindVertexArrayOES(_boxVAO); glDrawArrays(GL_TRIANGLES, 0, 7055*3); } How can i receive the `joint` object in my draw method? If more class info is necessary i can attach, but i did not assume since theres not much more.
objective-c
opengl-es
opengl-es-2.0
null
null
null
open
Identify object calling draw() method with OpenGL === Is there a way to identify which object is calling the draw method. The calling code: [joint.model draw]; The draw method: -(void)draw { glBindVertexArrayOES(_boxVAO); glDrawArrays(GL_TRIANGLES, 0, 7055*3); } How can i receive the `joint` object in my draw method? If more class info is necessary i can attach, but i did not assume since theres not much more.
0
10,315,759
04/25/2012 12:36:23
775,042
05/29/2011 10:26:49
1
1
Data section size in "size" command on Mac
Given the following output of the "size" command on Mac OS X 10.5 on an small executable, what is the value under __DATA? Is it the uninitialized data segment size or initialized data segment size? What I find confounding is that this value (nor the rest of the values) does not seem to change whether I initialize (the one and only) global array in the program or not. I guess this command works differently on Linux and Mac? __TEXT __DATA __OBJC others dec hex 4096 4096 0 4294971392 4294979584 100003000
linux
osx
size
osx-leopard
unix-utils
null
open
Data section size in "size" command on Mac === Given the following output of the "size" command on Mac OS X 10.5 on an small executable, what is the value under __DATA? Is it the uninitialized data segment size or initialized data segment size? What I find confounding is that this value (nor the rest of the values) does not seem to change whether I initialize (the one and only) global array in the program or not. I guess this command works differently on Linux and Mac? __TEXT __DATA __OBJC others dec hex 4096 4096 0 4294971392 4294979584 100003000
0
11,290,192
07/02/2012 08:31:25
343,623
05/18/2010 02:49:46
996
118
Wifi cannot turn on SII
When I turn on wifi on my Samsung Galaxy SII device, wifi cannot fully turn on and look half way just like attach screen. Then screen is closed when screen-timeout reach. After all, screen is black (dead) and cannot open my phone again. That's why remove battery and open it.![enter image description here][1] [1]: http://i.stack.imgur.com/keYh8.png
android
null
null
null
null
07/03/2012 13:51:44
off topic
Wifi cannot turn on SII === When I turn on wifi on my Samsung Galaxy SII device, wifi cannot fully turn on and look half way just like attach screen. Then screen is closed when screen-timeout reach. After all, screen is black (dead) and cannot open my phone again. That's why remove battery and open it.![enter image description here][1] [1]: http://i.stack.imgur.com/keYh8.png
2
7,527,526
09/23/2011 10:20:10
867,895
07/28/2011 16:20:29
399
23
How create a snycronized voting service?
I have a project i am working on. What i want to do is have a voting service. That people with the application installed can vote on a article or an item. and it will sync with other's application to see how many times it was voted. or could i implement a like on facebook and it would be easier?
java
android
null
null
null
09/23/2011 17:38:51
not a real question
How create a snycronized voting service? === I have a project i am working on. What i want to do is have a voting service. That people with the application installed can vote on a article or an item. and it will sync with other's application to see how many times it was voted. or could i implement a like on facebook and it would be easier?
1
2,596,507
04/07/2010 23:06:08
290,128
03/10/2010 01:20:36
117
6
Splits and windows in vim/emacs/etc.: can we have buffer-specific splits?
I'm using Charles Campbell's MPage[0] plugin to get multiple pages open, so I have vertical splits open for one buffer. My question is: can I have another display without splits open for another buffer, and switch back to the display with splits, without opening another instance of vim? It's easy to do so using tmux or the like, but I want to do this within one instance of vim. Also, I know that we can have two-column editing in Emacs, but can we introduce multiple (i.e. more than two columns) splits (vertical) for one open file which both: (a) flow through the file continuously à la MPage, (b) cycle through different files that have different splittings? Are there any other editors that can do this? REFERENCES: [0] http://www.mail-archive.com/[email protected]/msg04908.html
emacs
vim
editor
split
display
null
open
Splits and windows in vim/emacs/etc.: can we have buffer-specific splits? === I'm using Charles Campbell's MPage[0] plugin to get multiple pages open, so I have vertical splits open for one buffer. My question is: can I have another display without splits open for another buffer, and switch back to the display with splits, without opening another instance of vim? It's easy to do so using tmux or the like, but I want to do this within one instance of vim. Also, I know that we can have two-column editing in Emacs, but can we introduce multiple (i.e. more than two columns) splits (vertical) for one open file which both: (a) flow through the file continuously à la MPage, (b) cycle through different files that have different splittings? Are there any other editors that can do this? REFERENCES: [0] http://www.mail-archive.com/[email protected]/msg04908.html
0