Search Results

Search found 2802 results on 113 pages for 'steve thomas'.

Page 69/113 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • CodePage ID to CodaPage name: GetEncoding equivalent in Delphi?

    - by Steve
    Hello all, I'm looking for a Win32 equivalent of the .Net Encoding.GetEncoding Method to be used in Delphi7. What I would like to achieve is to convert a Codepage ID (ie.: 28592) to a Codapage name (iso-8859-2 in this case). I've found a Win32 function called GetCPInfoEx, but that returns a long CodePage name, and I need the short one, like the ones listed on this page: (see Name column) http://msdn.microsoft.com/en-us/library/system.text.encoding.aspx Thank you!

    Read the article

  • Must all Concurrent Data Store (CDB) locks be explicitly released when closing a Berkeley DB?

    - by Steve Emmerson
    I have an application that comprises multiple processes each accessing a single Berkeley DB Concurrent Data Store (CDB) database. Each process is single-threaded and does no explicit locking of the database. When each process terminates normally, it calls DB-close() and DB_ENV-close(). When all processes have terminated, there should be no locks on the database. Episodically, however, the database behaves as if some process was holding a write-lock on it even though all processes have terminated normally. Does each process need to explicitly release all locks before calling DB_ENV-close()? If so, how does the process obtain the "locker" parameter for the call to DB_ENV-loc_vec()?

    Read the article

  • O'Reilly Safari Books Alternatives?

    - by Steve
    I have a subscription to the whole library, which I find incredibly useful. Are there any similar products out there with as comprehensive a library? I think I'm paying about $40/month and I'm happy with the service, but if there are any cheaper alternatives out there, I'd like to take a look. Thanks.

    Read the article

  • How to set Delphi WebBrowser Base directory different that HTML location

    - by Steve
    I have a Delphi program that creates HTML files. Later when a button is pressed a TWebBrowser is created and a WebBrowser.Navigate causes the html page to display. Is there anyway to set the WebBrowser "default directory" so it will always be the location of the Delphi executable not the HTML file? I do not want to set the Base value in the HTML to a hardcoded value because then when the HTML is ran from another Delphi exe they are not found. for example: if the exe is run from D:\data\delphi\pgm.exe then the base location D:\data\delphi\ and the jpgs are at D:\data\delphi\jpgs\ but if the exe is run from: C:\stuff\pgm.exe i want the base location to be C:\stuff\ and the jpgs to be at C:\stuff\jpgs\ So I cannot write a line in the HTML with the base location since when it is ran from another exe it would point to wrong location for that exe. So I either need to set the base location when I create the webbrowser and before I read the HTML or I need a way to pass into the webbrowser the location where I can then set the base location. Sorry for being so long-winded but I could not figure out how to saw what I needed.

    Read the article

  • When building a web application project, TFS 2008 builds two separate projects in _PublishedFolder.

    - by Steve Johnson
    I am trying to perform build automation on one of my web application projects built using VS 2008. The _PublishedWebSites contains two folders: Web and Deploy. I want TFS 2008 to generate only the deploy folder and not the web folder. Here is my TFSBuild.proj file: <Project ToolsVersion="3.5" DefaultTargets="Compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets" /> <ItemGroup> <SolutionToBuild Include="$(BuildProjectFolderPath)/../../Development/Main/MySoftware.sln"> <Targets></Targets> <Properties></Properties> </SolutionToBuild> </ItemGroup> <ItemGroup> <ConfigurationToBuild Include="Release|AnyCPU"> <FlavorToBuild>Release</FlavorToBuild> <PlatformToBuild>Any CPU</PlatformToBuild> </ConfigurationToBuild> </ItemGroup> <!--<ItemGroup> <SolutionToBuild Include="$(BuildProjectFolderPath)/../../Development/Main/MySoftware.sln"> <Targets></Targets> <Properties></Properties> </SolutionToBuild> </ItemGroup> <ItemGroup> <ConfigurationToBuild Include="Release|x64"> <FlavorToBuild>Release</FlavorToBuild> <PlatformToBuild>x64</PlatformToBuild> </ConfigurationToBuild> </ItemGroup>--> <ItemGroup> <AdditionalReferencePath Include="C:\3PR" /> </ItemGroup> <Target Name="GetCopyToOutputDirectoryItems" Outputs="@(AllItemsFullPathWithTargetPath)" DependsOnTargets="AssignTargetPaths;_SplitProjectReferencesByFileExistence"> <!-- Get items from child projects first. --> <MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="GetCopyToOutputDirectoryItems" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)" Condition="'@(_MSBuildProjectReferenceExistent)'!=''"> <Output TaskParameter="TargetOutputs" ItemName="_AllChildProjectItemsWithTargetPathNotFiltered"/> </MSBuild> <!-- Remove duplicates. --> <RemoveDuplicates Inputs="@(_AllChildProjectItemsWithTargetPathNotFiltered)"> <Output TaskParameter="Filtered" ItemName="_AllChildProjectItemsWithTargetPath"/> </RemoveDuplicates> <!-- Target outputs must be full paths because they will be consumed by a different project. --> <CreateItem Include="@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')" Exclude= "$(BuildProjectFolderPath)/../../Development/Main/Web/Bin*.pdb; *.refresh; *.vshost.exe; *.manifest; *.compiled; $(BuildProjectFolderPath)/../../Development/Main/Web/Auth/MySoftware.dll; $(BuildProjectFolderPath)/../../Development/Main/Web/BinApp_Web_*.dll;" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always' or '%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'" > <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/> <Output TaskParameter="Include" ItemName="_SourceItemsToCopyToOutputDirectoryAlways" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always'"/> <Output TaskParameter="Include" ItemName="_SourceItemsToCopyToOutputDirectory" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/> </CreateItem> </Target> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.WebDeployment.targets. <Target Name="BeforeBuild"> </Target> <Target Name="BeforeMerge"> </Target> <Target Name="AfterMerge"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> I want to build everything that the builtin Deploy project is doing for me. But I don't want the generated web project as it contains App_Web_xxxx.dll assemblies instead of a single compiled assembly. How can I do this?

    Read the article

  • logins with cURL

    - by steve
    I'm looking to use cURL to login to Blackboard, a course management system used a many universities. (For example, http://blackboard.unh.edu) How would I do this? Blackboard uses HTTPS certificates and cookies too I believe. Thanks!

    Read the article

  • PHP regex help with preg_match_all

    - by Steve
    Hi, I am trying to refine a preg_match_all by finding the second occurrence of a period then a space: <?php $str = "East Winds 20 knots. Gusts to 25 knots. Waters a moderate chop. Slight chance of showers."; preg_match_all ('/(^)((.|\n)+?)(\.\s{2})/',$str, $matches); $dataarray=$matches[2]; foreach ($dataarray as $value) { echo $value; } ?> But it does not work: the {2} occurrence is incorrect. I have to use preg_match_all because I a scraping dynamic HTML. I want to capture this from the string: East Winds 20 knots. Gusts to 25 knots. Any ideas? Thx

    Read the article

  • gcc problem with explicit template instantiation?

    - by steve jaffe
    It is my understanding that either a declaration or typedef of a specialization ought to cause a template class to be instantiated, but this does not appear to be happening with gcc. E.g. I have a template class, template class Foo {}; I write class Foo<double>; or typedef Foo<double> DoubleFoo; but after compilation the symbol table of the resulting object file does not contain the members of Foo. If I create an instance: Foo<double> aFoo; then of course the symbols are all generated. Has anyone else experienced this and/or have an explanation?

    Read the article

  • Creating an HTTP-Redirected Virtual Directopry in IIS 6.0 without specifying physical path & WMI/ADS

    - by Steve Johnson
    My question is : Is it possible to create a working IIS 6.0 Virtual Directory with providing Physical Path of the Virtual Directory.? I know that manually, it is not possible via IIS but programmatically such a virtual directory can be created. If an HTTPRedirect is set on that virtual directory but the site physical path is not specified, then will it work? Simply stated, how to create an HTTp-redirected Virtual Directory , directly without specifying any physical path to a folder or network share. Here is my code. Try If Directory.Exists(HomeDirectory) = False And Path.StartsWith("http://") = False Then Directory.CreateDirectory(HomeDirectory) End If Dim website As DirectoryEntry website = New DirectoryEntry("IIS://" & IISServer & "/W3SVC/" & WebsiteId & "/Root") Dim NewVDir As DirectoryEntry = website.Children.Add(VDirName, "IIsWebVirtualDir") If Path.StartsWith("http://") = False Then NewVDir.Properties("Path")(0) = Path NewVDir.Properties("HttpRedirect").Clear() Else NewVDir.Properties("HttpRedirect")(0) = Path End If If ((Perm And Permission.Read) = Permission.Read) Then NewVDir.Properties("AccessRead")(0) = True End If If ((Perm And Permission.Write) = Permission.Write) Then NewVDir.Properties("AccessWrite")(0) = True End If If ((Perm And Permission.DirBrowse) = Permission.DirBrowse) Then NewVDir.Properties("EnableDirBrowsing")(0) = True End If If ((Perm And Permission.CreatetApplication) = Permission.CreatetApplication) Then NewVDir.Invoke("AppCreate", True) End If If ((Perm And Permission.ScriptOnly) = Permission.ScriptOnly) Then NewVDir.Properties("AccessScript")(0) = True End If If ((Perm And Permission.ScriptNExecute) = Permission.ScriptNExecute) Then NewVDir.Properties("AccessExecute")(0) = True End If NewVDir.Properties("AuthAnonymous")(0) = True NewVDir.Properties("AuthNTLM")(0) = True NewVDir.Properties("AnonymousUserName")(0) = AnonUserName NewVDir.Properties("AnonymousUserPass")(0) = AnonPassword NewVDir.Properties("AppFriendlyName")(0) = AppFriendlyName NewVDir.CommitChanges() website.CommitChanges() NewVDir.Close() website.Close() Success = True Catch Err As Exception Throw New Exception("My Custom Exception Here: " & Err.Message) End Try

    Read the article

  • web2py error while using distinct in the queries

    - by Steve
    Hi, I am using web2py with GAE. While using some of the queries which has a distinct clause, GAE throws out an error.I have pasted the Traceback. Can someone please help me out with this. In FILE: /base/data/home/apps/panneersoda/1.341206242889687944/applications/init/controllers/default.py Traceback (most recent call last): File "/base/data/home/apps/panneersoda/1.341206242889687944/gluon/restricted.py", line 173, in restricted exec ccode in environment File "/base/data/home/apps/panneersoda/1.341206242889687944/applications/init/controllers/default.py:profileview", line 263, in <module> File "/base/data/home/apps/panneersoda/1.341206242889687944/gluon/globals.py", line 96, in <lambda> self._caller = lambda f: f() File "/base/data/home/apps/panneersoda/1.341206242889687944/applications/init/controllers/default.py:profileview", line 97, in profileview File "/base/data/home/apps/panneersoda/1.341206242889687944/gluon/contrib/gql.py", line 675, in select (items, tablename, fields) = self._select(*fields, **attributes) File "/base/data/home/apps/panneersoda/1.341206242889687944/gluon/contrib/gql.py", line 624, in _select raise SyntaxError, 'invalid select attribute: %s' % key SyntaxError: invalid select attribute: distinct Thanks

    Read the article

  • SQL 2005: Select top N, group by ID with joins

    - by Suzy Fresh
    I'm having real difficulty with a query involving 3 tables. I need to get the 3 newest users per department grouped by department names. The groups should be sorted by the users.dateadded so the department with the newest activity is first. The users can exist in multiple departments so Im using a lookup table that just contains the userID and deptID. My tables are as follows. Department - depID|name Users - userID|name|dateadded DepUsers - depID|userID The output I need would be Receiving John Doe - 4/23/2010 Bill Smith - 4/22/2010 Accounting Steve Jones - 4/22/2010 John Doe - 4/21/2010 Auditing Steve Jones - 4/21/2010 Bill Smith - 4/21/2010

    Read the article

  • Detecting if a browser is using Private Browsing mode

    - by Steve
    I'm building an extranet for a company paranoid about security. They want to make sure that (among other things) their users are browsing the site with the Private Browsing mode switched on in their web browser so that no cookies or history is kept. I found only this http://jeremiahgrossman.blogspot.com/2009/03/detecting-private-browsing-mode.html and http://serverfault.com/questions/18966/force-safari-to-operate-in-private-mode-and-detect-that-state-from-a-webserver The ideal solution would use no or minimal javascript. Would attempting to set a unique cookie work for all browsers and platforms? Anyone done this before? thanks!

    Read the article

  • How to suppress jqgrid from initially loading data?

    - by Steve Johnston
    I have a page that has a couple of jqGrids on it, along with a few other fields. I want to make one AJAX call myself that pulls back a JSON object that has the data that should be used to fill the entire page. So, I would like to make the call myself, populate the "other fields" and then pull a couple of collections off of the main JSON object that was returned and populate each of the jqGrids with those collections "manually". I have this much working, but I can't get jqGrid to stop attempting to make an AJAX request itself. Shouldn't there be a way to tell jqGrid to NOT attempt an AJAX call when it is initialized? I found a similar question asked here: http://stackoverflow.com/questions/1850159/how-to-suppress-jqgrid-from-initially-loading-data But I don't have the option that solved it for the poster. It seems pretty logical to me that some people may want to use this plugin without having the table attempt to get its own data upon initialization. Am I missing an option somewhere in the documentation (wiki - options)? Thanks.

    Read the article

  • If terminating a hung thread is a good idea, how do I do it safely?

    - by Steve
    My Delphi program relies heavily on Outlook automation. Outlook versions prior to 2007-SP2 tend to get stuck in memory due to badly written addins and badly written Outlook code. If Outlook is stuck, calling CreateOleObject('Outlook.Application') or GetActiveObject ... doesn't return and keeps my application hanging till Outlook.exe is closed in the task manager. I've thought of a solution, but I'm unsure whether it's good practice or not. I'd start Outlook with CreateOleObject in a separate thread, wait 10 seconds in my main thread and if Outlook hangs (CreateOleObject doesn't return), offer the user to kill the Outlook.exe process from my program. But since I don't want to force the user to kill the Outlook.exe process, as an alternative I also need a way to kill the new thread in my program which keeps hanging now. Is this good practice? How can I terminate a hanging thread in Delphi without leaking memory?

    Read the article

  • Learning a new language coding 1 program

    - by Steve
    This is not really a programming question Question : Sometimes you have to learn a new language consider this situation for example : you have been programming in C# for some years and then one day you need to code in java. Now being a programmer you already know the programming concepts its just the syntax you need to get used to. Can you think some program to code which covers every(or most) aspect of a programming language? like say you make a desktop search program...it can cover file reading writing, threads maybe interacting with db like sqllite so you get familiar with those topics and the syntax of the new language Just want to know your thoughts about what is the fastest way to go about learning a new language skipping all the basic stuff

    Read the article

  • Infopath form publishing and root content type ?

    - by Steve B
    Hi, I have several infopath 2010 form template that I want to publish to a form library in SharePoint 2010 Server with enterprise CaL. All of this forms have a common part (a template part actually). Is it possible to define a common "parent" content type of this forms ? In fact, I want : Form content type (SP OOB) My root form content type, with standard columns "requester", "process name", etc. Form 1 Form 2 etc. other unrelated form 1 other unrelated form 2 Instead of the standard behavior : Form content type (SP OOB) Form 1 Form 2 other unrelated form 1 other unrelated form 2 etc. Behind this question I want to be able to create a dashboard of all form request using a content query web, by simply specifying the content type ... One last word: the idea is to allow a customer (assuming its knowledge is limited to IP 2010 basic form design). So I can't accept answers like "extract files, use a text editor and hack the xsf file"... thx in advance

    Read the article

  • Entity Framework RC1 DbContext query issue

    - by Steve
    I'm trying to implement the repository pattern using entity framework code first rc 1. The problem I am running into is with creating the DbContext. I have an ioc container resolving the IRepository and it has a contextprovider which just news up a new DbContext with a connection string in a windsor.config file. With linq2sql this part was no problem but EF seems to be choking. I'll describe the problem below with an example. I've pulled out the code to simplify things a bit so that is why you don't see any repository pattern stuff here. just sorta what is happening without all the extra code and classes. using (var context = new PlssContext()) { var x = context.Set<User>(); var y = x.Where(u => u.UserName == LogOnModel.UserName).FirstOrDefault(); } using (var context2 = new DbContext(@"Data Source=.\SQLEXPRESS;Initial Catalog=PLSS.Models.PlssContext;Integrated Security=True;MultipleActiveResultSets=True")) { var x = context2.Set<User>(); var y = x.Where(u => u.UserName == LogOnModel.UserName).FirstOrDefault(); } PlssContext is where I am creating my DbContext class. The repository pattern doesn't know anything about PlssContext. The best I thought I could do was create a DbContext with the connection string to the sqlexpress database and query the data that way. The connection string in the var context2 was grabbed from the context after newing up the PlssContext object. So they are pointing at the same sqlexpress database. The first query works. The second query fails miserably with this error: The model backing the 'DbContext' context has changed since the database was created. Either manually delete/update the database, or call Database.SetInitializer with an IDatabaseInitializer instance. For example, the DropCreateDatabaseIfModelChanges strategy will automatically delete and recreate the database, and optionally seed it with new data. on this line var y = x.Where(u => u.UserName == LogOnModel.UserName).FirstOrDefault(); Here is my DbContext namespace PLSS.Models { public class PlssContext : DbContext { public DbSet<User> Users { get; set; } public DbSet<Corner> Corners { get; set; } public DbSet<Lookup_County> Lookup_County { get; set; } public DbSet<Lookup_Accuracy> Lookup_Accuracy { get; set; } public DbSet<Lookup_MonumentStatus> Lookup_MonumentStatus { get; set; } public DbSet<Lookup_CoordinateSystem> Lookup_CoordinateSystem { get; set; } public class Initializer : DropCreateDatabaseAlways<PlssContext> { protected override void Seed(PlssContext context) { I've tried all of the Initializer strategies with the same errors. I don't think the database is changing. If I remove the modelBuilder.Conventions.Remove<IncludeMetadataConvention>(); Then the error returns is The entity type User is not part of the model for the current context. Which sort of makes sense. But how do you bring this all together?

    Read the article

  • What's wrong with C#?

    - by Steve M
    Asking the same of Java yielded some very interesting responses, so I thought it would be only fair to ask the same thing of C#, probably Java's closest rival. I actually like this sort of question because it's a lot less subjective than "why should I choose this language" or "why is this language so great." So.. what's wrong with C#?

    Read the article

  • Atomic swap in GNU C++

    - by Steve
    I want to verify that my understanding is correct. This kind of thing is tricky so I'm almost sure I am missing something. I have a program consisting of a real-time thread and a non-real-time thread. I want the non-RT thread to be able to swap a pointer to memory that is used by the RT thread. From the docs, my understanding is that this can be accomplished in g++ with: // global Data *rt_data; Data *swap_data(Data *new_data) { #ifdef __GNUC__ // Atomic pointer swap. Data *old_d = __sync_lock_test_and_set(&rt_data, new_data); #else // Non-atomic, cross your fingers. Data *old_d = rt_data; rt_data = new_data; #endif return old_d; } This is the only place in the program (other than initial setup) where rt_data is modified. When rt_data is used in the real-time context, it is copied to a local pointer. For old_d, later on when it is sure that the old memory is not used, it will be freed in the non-RT thread. Is this correct? Do I need volatile anywhere? Are there other synchronization primitives I should be calling? By the way I am doing this in C++, although I'm interested in whether the answer differs for C. Thanks ahead of time.

    Read the article

  • How do i know what unixtime a php session will expire?

    - by Steve
    Hi How do I know how many seconds it will be until a php session expires? I'm building a web application where users might spend a lot of time typing into big text fields, but for security reasons I still want sessions to time out after a reasonably short period. I want to warn them if their session is about to expire so they can save or take some other action to keep it alive. Any tips? thanks!

    Read the article

  • Live wallpaper settings not applying

    - by Steve
    I have added settings to my live wallpaper but they are not being applied when changed. I would greatly appreciate it if someone could tell me why my settings are not being applied when changed. Here is my code: settings.xml <PreferenceCategory android:title="@string/more"> <PreferenceScreen android:title="@string/more"> <intent android:action="android.intent.action.VIEW" android:data="market://search?q=pub:PSP Demo Center" /> </PreferenceScreen> <ListPreference android:persistent="true" android:enabled="true" android:entries="@array/settings_light_number_options" android:title="@string/settings_light_number" android:key="light_power" android:summary="@string/settings_light_number_summary" android:defaultValue="3" android:entryValues="@array/settings_light_number_optionvalues" /> <ListPreference android:persistent="true" android:enabled="false" android:entries="@array/settings_speed_number_options" android:title="@string/settings_speed_number" android:key="speed" android:summary="@string/settings_speed_number_summary" android:defaultValue="10" android:entryValues="@array/settings_speed_number_optionvalues" /> <ListPreference android:persistent="true" android:enabled="false" android:entries="@array/settings_rotate_number_options" android:title="@string/settings_rotate_number" android:key="rotate" android:summary="@string/settings_rotate_number_summary" android:defaultValue="8000" android:entryValues="@array/settings_rotate_number_optionvalues" /> </PreferenceCategory> </PreferenceScreen> Settings.java public class GraffitiLWPSettings extends PreferenceActivity implements SharedPreferences .OnSharedPreferenceChangeListener { public static final String SHARED_PREFS_NAME = "wallpaper_settings"; protected void onCreate(Bundle icicle) { super.onCreate(icicle); getPreferenceManager(). setSharedPreferencesName(GraffitiLWP.SHARED_PREFS_NAME); addPreferencesFromResource(R.xml.settings); getPreferenceManager().getSharedPreferences(). registerOnSharedPreferenceChangeListener(this); } protected void onResume() { super.onResume(); } protected void onDestroy() { getPreferenceManager().getSharedPreferences() .unregisterOnSharedPreferenceChangeListener(this); super.onDestroy(); } public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { } } wallpaper.java public class GraffitiLWP extends Wallpaper { private GraffitiLWPRenderer mRenderer; public static final String SHARED_PREFS_NAME = "wallpaper_settings"; public Engine onCreateEngine() { mRenderer = new GraffitiLWPRenderer(this); return new WallpaperEngine( this.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE), getBaseContext(), mRenderer); } } renderer.java public class GraffitiLWPRenderer extends RajawaliRenderer { private Animation3D mAnim; private BaseObject3D mCan; private SettingsUpdater settingsUpdater; //private SharedPreferences preferences; public GraffitiLWPRenderer(Context context) { super(context); setFrameRate(20); } public class SettingsUpdater implements SharedPreferences .OnSharedPreferenceChangeListener { private GraffitiLWPRenderer renderer; public SettingsUpdater(GraffitiLWPRenderer renderer) { this.renderer = renderer; } public void onSharedPreferenceChanged( SharedPreferences sharedPreferences, String key) { preferences.getInt("wallpaper_settings", 0); renderer.setSharedPreferences(preferences); } } public void initScene() { System.gc(); ALight light = new DirectionalLight(); light.setPower(this.preferences.getLong("light_power", 3)); light.setPosition(0, 0, -10); mCamera.setPosition(0, -1, -7); mCamera.setLookAt(0, 2, 0); mCamera.setFarPlane(1000); ObjParser parser = new ObjParser(mContext .getResources(), mTextureManager, R.raw.spraycan_obj); parser.parse(); mCan = parser.getParsedObject(); mCan.addLight(light); mCan.setScale(1.2f); addChild(mCan); Number3D axis = new Number3D(0, this.preferences.getLong("speed", 10), 0); axis.normalize(); mAnim = new RotateAnimation3D(axis, 360); mAnim.setDuration(this.preferences.getLong("rotate", 8000)); mAnim.setRepeatCount(Animation3D.INFINITE); mAnim.setInterpolator(new AccelerateDecelerateInterpolator()); mAnim.setTransformable3D(mCan); setSkybox(R.drawable.posz, R.drawable.posx, R.drawable.negz, R.drawable.negx, R.drawable.posy, R.drawable.negy); } public void onSurfaceCreated(GL10 gl, EGLConfig config) { settingsUpdater = new SettingsUpdater(this); this.preferences.registerOnSharedPreferenceChangeListener( settingsUpdater); settingsUpdater.onSharedPreferenceChanged(preferences, null); super.onSurfaceCreated(gl, config); mAnim.start(); } public void onDrawFrame(GL10 glUnused) { super.onDrawFrame(glUnused); mSkybox.setRotY(mSkybox.getRotY() + .5f); } } I know the code is long but I would greatly appreciate any help that someone could give me. Thank you.

    Read the article

  • OpenID Authentication using AuthLogic

    - by Steve
    Hi, I am trying to implement openid authentication using authlogic. I have installed the open_id_authentication in the process but when I entered rake open_id_authentication:db:create --trace I get the following error (in /Users/felix/login) rake aborted! Don't know how to build task 'open_id_authentication:db:create' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1728:in `[]' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>' /usr/local/bin/rake:19:in `load' /usr/local/bin/rake:19:in `<main>' Can someone tell what am i doing incorrectly Thanks

    Read the article

  • Problems with blocking reads using libudev on Linux

    - by Steve Hawkins
    We are using the following routine (on Linux, with libudev) to read data from a PIC microcontroller configured as a USB HID device. The data is sent only when a button connected to the PIC microcontroller is pressed or released. The routine is missing messages from the PIC controller, and I suspect that this is because the call to poll below is not behaving as it should. The call to poll will reliably block for 1 second util the first message is read. As soon as the first message is read, the call to poll returns immediately instead of blocking for 1 second (1000 milliseconds) like it should. I have worked around this problem by closing and re-opening the device after each read. This makes poll behave correctly, but I think that closing and re-opening the device may be the reason for the lost messages. bool PicIo::Receive (unsigned char* picData, const size_t picDataSize) { static hiddev_report_info hidReportInfo; static hiddev_usage_ref_multi hidUsageRef; if (-1 == PicDeviceDescriptor()) { return false; } // Determine whether or not there is data available to be read pollfd pollFd; pollFd.fd = PicDeviceDescriptor(); pollFd.events = POLLIN; int dataPending = poll (&pollFd, 1, 1000); if (dataPending <= 0) { return false; } // Initialize the HID Report structure for an input report hidReportInfo.report_type = HID_REPORT_TYPE_INPUT; hidReportInfo.report_id = 0; hidReportInfo.num_fields = 64; if (-1 == ioctl(PicDeviceDescriptor(), HIDIOCGREPORT, &hidReportInfo)) { return false; } // Initizlize the HID Usage Reference for an Input report hidUsageRef.uref.report_type = HID_REPORT_TYPE_INPUT; hidUsageRef.uref.report_id = 0; hidUsageRef.uref.field_index = 0; hidUsageRef.uref.usage_index = 0; hidUsageRef.num_values = 64; if (-1 == ioctl(PicDeviceDescriptor(), HIDIOCGUSAGES, &hidUsageRef)) { return false; } // Transfer bytes from the usage report into the return value. for (size_t idx=0; (idx < 64) && (idx < picDataSize); ++idx) { picData[idx] = hidUsageRef.values[idx]; } return true; } The function PicDeviceDescriptor() does checking on the device to make sure that it is present. Here are the pertinent details of the PicDeviceDescriptor function, showing how the device is begin opened. int PicIo::PicDeviceDescriptor(int command) { struct stat statInfo; static int picDeviceDescriptor = -1; string picDevicePath = "/dev/usb/hiddev0"; if ((-1 != picDeviceDescriptor) && (CLOSE == command)) { close (picDeviceDescriptor); picDeviceDescriptor = -1; } else if ((-1 != picDeviceDescriptor) && (-1 == fstat(picDeviceDescriptor, &statInfo))) { // Handle the case where the PIC device had previously been detected, and // is now disconnected. close (picDeviceDescriptor); picDeviceDescriptor = -1; } else if ((-1 == picDeviceDescriptor) && (m_picDevice.IsConnected())) { // Create the PIC device descriptor if the PIC device is present (i.e. its // device node is present) and if the descriptor does not already exist picDeviceDescriptor = open (picDevicePath.c_str(), O_RDONLY); } return picDeviceDescriptor; } I'm sure that I'm doing something wrong, but I've Googled the issue and cannot seem to find any relevant answers. Any help would be very much appreciated -- Thx.

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >