Search Results

Search found 37 results on 2 pages for 'ani'.

Page 2/2 | < Previous Page | 1 2 

  • Can't update contact details in android using code

    - by masterkapu
    I'm trying to update/change contact ringtone using this code: ContentValues values = new ContentValues(); values.put(ContactsContract.Data.CUSTOM_RINGTONE, "D:/TempDownloads/BurpSounds/Alex.wav"); getContentResolver().update(ContactsContract.Contacts.CONTENT_URI, values , "DISPLAY_NAME = 'Ani'", null); I get the message: " the application has stopped unexpectedly" what is wrong with my code and how do I do it? thanks

    Read the article

  • Animation using AniMate with Unity3D doesn't interact with physical objects

    - by Albz
    I'm designing a maze with Unity3D. The maze has a number of bifurcations and the player will stop before each bifurcation and simply choose left or right. Then an automatic animation will move the player through the next bifurcation till the end of the maze (or till a dead end). To animate the player I'm using AniMate and C# in my Unity project. Using AniMate I'm simply creating a point-to-point animation for each bifurcation (e.g. mage below: from the start/red arrow to point 5) My problem is that my animation script (associated to the "First Person Controller") is not working properly since physics is not respected (the player passes through walls). If in the same project I enable the standard character controls in Unity, then I can navigate in the maze with the physical contrains of walls etc... (i.e. I have colliders). This is an example of the code I'm using when I press left to pass from starting point, trough point 1 to point 2: void FixedUpdate () { if (Input.GetKey(KeyCode.LeftArrow)) { //To point 1 Hashtable props = new Hashtable(); props.Add("position", new Vector3(756f,112f,1124f)); props.Add("physics", true); Ani.Mate.To(transform, 2, props); //To point 2 Hashtable props2 = new Hashtable(); props2.Add("position", new Vector3(731f,112f,1124f)); props2.Add("physics", true); Ani.Mate.To(transform, 2, props2); } } What happens practically when I press the left arrow button is that the player moves directly to point 2 using a straight line passing through the wall. I tried to pass to AniMate "Physics = true" but it doesn't seem to help. Any idea on how to solve this issue? Alternatively... any hint on how to have a more optimized code and just use a series of vector3 coordinates (one for each point) to obtain the simple animation I want without having to declare new Hashtable(); etc... every time? I chose AniMate simply because 1. I'm a beginner with Unity 2. I don't need complex animations (e.g. I don't need to use iTween), just fixed animations along straight lines and I need something really simple and quick to implement in a script. However, if someone has an equally simple solution it will be welcome. thank you in advance for your help

    Read the article

  • apache solr auto suggestions

    - by Pydev UA
    I use solr+django-haystack I set settings.HAYSTACK_INCLUDE_SPELLING = True and rebuild index I'm trying to get any suggestion using: SearchQuerySet().auto_query('tryng ani word her').spelling_suggestion() But I always get None What should I do to get at least one working suggestion ? may be I need add some configuration into solr config or have some specific data indexed ?

    Read the article

  • How to debug lack of sound in Asus EEE PC

    - by Kalmar
    I have an Asus EEE PC 1225B with fresh Lubuntu 12.04. And no sound. It doesn't seem to be some common problem, so I have to make some research what's up. I tried running alsamixer, so I know I have Realtek ALC269VB with nothing muted unexpectedly. What can I do next to identify and solve the problem? Additional info: alsamixer shows two cards: HD-Audio Generic and HDA ATI-SB (Realtek ALC269VB); the first one is muted. ~$ aplay ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave aplay: main:682: blad otwierania audio: Nie ma takiego pliku ani katalogu The Polish part can be translated as "error opening audio: There is no such file or directory". ~$ sudo lspci -v | grep -A7 -i "audio" 00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI Wrestler HDMI Audio [Radeon HD 6250/6310] Subsystem: ASUSTeK Computer Inc. Device 103b Flags: bus master, fast devsel, latency 0, IRQ 44 Memory at feb44000 (32-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 3 Capabilities: [58] Express Root Complex Integrated Endpoint, MSI 00 Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?> -- 00:14.2 Audio device: Advanced Micro Devices [AMD] nee ATI SBx00 Azalia (Intel HDA) (rev 40) Subsystem: ASUSTeK Computer Inc. Device 103b Flags: bus master, slow devsel, latency 32, IRQ 16 Memory at feb40000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Kernel driver in use: snd_hda_intel Kernel modules: snd-hda-intel

    Read the article

  • How can I call a module in a Perl one-liner?

    - by Zaid
    Say I have a data file that I want to process; I want to take the maximum value of each of the column and append it to the end of each line. INPUT: T1 T2 T3 35.82 34.67 31.68 32.20 34.52 33.59 37.41 38.64 37.56 OUTPUT: T1 T2 T3 35.82 34.67 31.68 35.82 32.20 34.52 33.59 34.52 37.41 38.64 37.56 38.64 I'm trying to implement this as a one-liner. So far, this is what I've come up with, although it complains that &main::max is undefined: perl -MList::Util -ani.bak -e "print qq(@F).q( ).max(@F).qq(\n)" file1.txt It seems that I haven't loaded the List::Util module. What's wrong? And is the header column an issue? perlrun doesn't have a decent example on how to do this (actually it does now, my documentation was a little out-of-date).

    Read the article

  • converting a treebank of vertical trees to s-expressions

    - by Andreas
    I need to preprocess a treebank corpus of sentences with parse trees. The input format is a vertical representation of trees, like so: S =NP ==(DT +def) the == (N +ani) man =VP ==V walks ...and I need it like: (S (NP (DT the) (N man)) (VP (V walks))) I have code that almost does it, but not quite. There's always a missing paren somewhere. Should I use a proper parser, maybe a CFG? The current code is at http://github.com/andreasvc/eodop/blob/master/arbobanko.py The code also contains real examples from the treebank.

    Read the article

  • Why is selecting specified columns, and all, wrong in Oracle SQL?

    - by TomatoSandwich
    Say I have a select statement that goes.. select * from animals That gives a a query result of all the columns in the table. Now, if the 42nd column of the table animals is is_parent, and I want to return that in my results, just after gender, so I can see it more easily. But I also want all the other columns. select is_parent, * from animals This returns ORA-00936: missing expression. The same statement will work fine in Sybase, and I know that you need to add a table alias to the animals table to get it to work ( select is_parent, a.* from animals ani), but why must Oracle need a table alias to be able to work out the select?

    Read the article

  • Make Your Mouse Pointers Left-hand Friendly

    - by Matthew Guay
    It’s a right-centric world, with everything from pencils to computer mice expecting you to be right-handed.  Here’s how you can train your mouse and cursors in Windows 7 and Vista to respect your left-handedness. Using your Left Hand the Right Way It’s easy to switch your mouse to left-handed mode.  Enter “mouse” in your Start menu search, and select the first entry. Check the “Switch primary and secondary buttons” box to make your mouse more left-hand friendly.  Now your primary select button is your right button, and the secondary button (commonly referred to as right-click) is the left button. But, it can still be awkward to select items on screen with your left hand using the default cursors.  MSDN has a free set of cursors designed for left-handed users, that can fix this problem for you.  These cursors are exactly like the default Aero cursors in Windows 7 and Vista, except they are reversed to make them better for left-handed use. The cursors are available in 3 sizes: normal, large, and extra large.  The normal ones are the same size as the default ones in Windows 7; feel free to choose the other sizes if you prefer them.  Click each link to download all 6 cursors for your size (link below). Click “I Agree” after selecting the cursors to accept the license agreement and download them. Once you have all 6 cursors downloaded, select the Pointers tab in the Mouse Properties dialog.  Click the cursor to change, and then click Browse to select the new cursor. Browse to the folder you downloaded your new cursors to, select the correct cursor, and click Open. Do this for each of the 6 cursors to be changed.  Strangely, the Busy cursor (the spinning blue orb) is a static cursor, so you may not wish to change it.  All the other ones look and act like their standard counterparts. Here’s the cursors to be changed, and their equivalents in the default cursors: Normal Select: aero_arrow_left.cur Help Select: aero_helpsel_left.cur Working in Background: aero_working_left.ani Busy: aero_busy_left.cur Handwriting: aero_pen_left.cur Link Select: aero_link_left.cur After changing all the cursors, click Save As… to save this mouse scheme so you can easily select it in the future.  Finally click Ok to close the Mouse Properties dialog and accept the changes. Now your pointers will be easier to use left-handed! Conclusion Whether you’re right-handed or left-handed, you can enjoy the Aero cursors in Windows 7 or Vista in the way that works best for you.  Unfortunately, many mice are still designed for right-handed people, but this trick will help you make the best out of your mouse. We included all of the 6 cursors for you in a zip file you can download Here. This will make it easier for you to get them all together without having to download them individually. Link Download Left-Handed Mouse Pointers from MSDN Similar Articles Productive Geek Tips Prevent Themes From Modifying Icons and Cursors in Windows 7How To Personalize Windows 7 StarterShow Two Time Zones in Your Outlook 2007 CalendarMake Mouse Navigation Faster in WindowsWhy Doesn’t Tab Work for Drop-down Controls in Firefox on OS X? TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Microsoft’s “How Do I ?” Videos Home Networks – How do they look like & the problems they cause Check Your IMAP Mail Offline In Thunderbird Follow Finder Finds You Twitter Users To Follow Combine MP3 Files Easily QuicklyCode Provides Cheatsheets & Other Programming Stuff

    Read the article

  • Odd behaviour with PHP's in_array function.

    - by animuson
    I have a function that checks multiple form items and returns either boolean(true) if the check passed or the name of the check that was run if it didn't pass. I built the function to run multiple checks at once, so it will return an array of these results (one result for each check that was run). When I run the function, I get this array result: Array ( [0] => 1 [1] => password [2] => birthday ) // print_r array(3) { [0]=> bool(true) [1]=> string(8) "password" [2]=> string(8) "birthday" } // var_dump The 'username' check passed and the 'password' and 'birthday' checks both failed. Then I am using simple in_array statements to determine which ones failed, like so: $results = $ani->e->vld->simulate("register.php", $checks); die(var_dump($results)); // Added after to see what array was being returned if (in_array("username", $results)) // do something if (in_array("password", $results)) // do something if (in_array("birthday", $results)) // do something The problem I'm having is that the 'username' line is still executing, even those 'username' is not in the array. It executes all three statements as if they were all true for some reason. Why is this? I thought maybe that the bool(true) was automatically causing the function to return true for every result without checking the rest of the array, but I couldn't find any documentation that would suggest that very odd functionality.

    Read the article

  • When are predicates appropriate and what is the best pattern for usage

    - by Maxim Gershkovich
    When are predicates appropriate and what is the best pattern for usage? What are the advantages of predicates? It seems to me like most cases where a predicate can be employed a tight loop would accomplish the same functionality? I don’t see a reusability argument given you will probably only implement a predicate in one method right? They look and feel nice but besides that they seem like you would only employ them when you need a quick hack on the collection classes? UPDATE But why would you be rewriting the tight loop again and again? In my mind/code when it comes to collections I always end up with something like Class Person End Class Class PersonList Inherits List(Of Person) Function FindByName(Name) as Person tight loop.... End Function End Class @Ani By that same logic I could implement the method as such Class PersonList Inherits List(Of Person) Function FindByName(Name) as PersonList End Function Function FindByAge(Age) as PersonList End Function Function FindBySocialSecurityNumber(SocialSecurityNumber) as PersonList End Function End Class And call it as such Dim res as PersonList = MyList.FindByName("Max").FindByAge(25).FindBySocialSecurityNumber(1234) and the result along with the amount of code and its reusability is largely the same, no? I am not arguing just trying to understand.

    Read the article

  • Delphi - Why is my global variable "inacessible" when i debug

    - by Antoine Lpy
    I'm building an application that contains around 30 Forms. I need to manage sessions, so I would like to have a global LoggedInUser variable accessible from all forms. I read "David Heffernan"'s post about global variables, and how to avoid them but I thought it would be easier to have a global User variable rather than 30 forms having their own User variable. So i have a unit : GlobalVars unit GlobalVars; interface uses User; // I defined my TUser class in a unit called User var LoggedInUser: TUser; implementation initialization LoggedInUser:= TUser.Create; finalization LoggedInUser.Free; end. Then in my LoginForm's LoginBtnClick procedure I do : unit FormLogin; interface uses [...],User; type TForm1 = class(TForm) [...] procedure LoginBtnClick(Sender: TObject); private { Déclarations privées } public end; var Form1: TForm1; AureliusConnection : IDBConnection; implementation {$R *.fmx} uses [...]GlobalVars; procedure TForm1.LoginBtnClick(Sender: TObject); var Manager : TObjectManager; MyCriteria: TCriteria<TUser>; u : TUser; begin Manager := TObjectManageR.Create(AureliusConnection); MyCriteria :=Manager.Find<TUtilisateur> .Add(TExpression.Eq('login',LoginEdit.Text)) .Add(TExpression.Eq('password',PasswordEdit.Text)); u := MyCriteria.UniqueResult; if u = nil then MessageDlg('Login ou mot de passe incorrect',TMsgDlgType.mtError,[TMsgDlgBtn.mbOK],0) else begin LoggedInUser:=u; //Here I assign my local User data to my global User variable Form1.Destroy; A00Form.visible:=true; end; Manager.Free; end; Then in another form I would like to access this LoggedInUser object in the Menu1BtnClick procedure : Unit C01_Deviations; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls, FMX.ListView.Types, FMX.ListView, FMX.Objects, FMX.Layouts, FMX.Edit, FMX.Ani; type TC01Form = class(TForm) [...] Menu1Btn: TButton; [...] procedure Menu1BtnClick(Sender: TObject); private { Déclarations privées } public { Déclarations publiques } end; var C01Form: TC01Form; implementation uses [...]User,GlobalVars; {$R *.fmx} procedure TC01Form.Menu1BtnClick(Sender: TObject); var Assoc : TUtilisateur_FonctionManagement; ValidationOK : Boolean; util : TUser; begin ValidationOK := False; util := GlobalVars.LoggedInUser; // Here i created a local user variable for debug purposes as I thought it would permit me to see the user data. But i get "Inaccessible Value" as its value util.Nom:='test'; for Assoc in util.FonctionManagement do // Here is were my initial " access violation" error occurs begin if Assoc.FonctionManagement.Libelle = 'Reponsable équipe HACCP' then begin ValidationOK := True; break; end; end; [...] end; When I debug I see "Inaccessible Value" in the value column of my user. Do you have any idea why ? I tried to put an integer in this GlobalVar unit, and i was able to set its value from my login form and read it from my other form.. I guess I could store the user's id, which is an integer, and then retrieve the user from the database using its id. But it seems really unefficient.

    Read the article

  • Loading FireMonkey style resourses with RTTI

    - by HeMet
    I am trying to write class that inherits from FMX TStyledControl. When style is updated it loads style resource objects to cache. I created project group for package with custom controls and test FMX HD project as it describes in Delphi help. After installing package and placing TsgSlideHost on the test form I run test app. It’s work well, but when I close it and try to rebuild package RAD Studio says “Error in rtl160.bpl” or “invalid pointer operation”. It seems what problem in LoadToCacheIfNeeded procedure from TsgStyledControl, but I’m not understand why. Is there any restriction on using RTTI with FMX styles or anything? TsgStyledControl sources: unit SlideGUI.TsgStyledControl; interface uses System.SysUtils, System.Classes, System.Types, FMX.Types, FMX.Layouts, FMX.Objects, FMX.Effects, System.UITypes, FMX.Ani, System.Rtti, System.TypInfo; type TCachedAttribute = class(TCustomAttribute) private fStyleName: string; public constructor Create(const aStyleName: string); property StyleName: string read fStyleName; end; TsgStyledControl = class(TStyledControl) private procedure CacheStyleObjects; procedure LoadToCacheIfNeeded(aField: TRttiField); protected function FindStyleResourceAs<T: class>(const AStyleLookup: string): T; function GetStyleName: string; virtual; abstract; function GetStyleObject: TControl; override; public procedure ApplyStyle; override; published { Published declarations } end; implementation { TsgStyledControl } procedure TsgStyledControl.ApplyStyle; begin inherited; CacheStyleObjects; end; procedure TsgStyledControl.CacheStyleObjects; var ctx: TRttiContext; typ: TRttiType; fld: TRttiField; begin ctx := TRttiContext.Create; try typ := ctx.GetType(Self.ClassType); for fld in typ.GetFields do LoadFromCacheIfNeeded(fld); finally ctx.Free end; end; function TsgStyledControl.FindStyleResourceAs<T>(const AStyleLookup: string): T; var fmxObj: TFmxObject; begin fmxObj := FindStyleResource(AStyleLookup); if Assigned(fmxObj) and (fmxObj is T) then Result := fmxObj as T else Result := nil; end; function TsgStyledControl.GetStyleObject: TControl; var S: TResourceStream; begin if (FStyleLookup = '') then begin if FindRCData(HInstance, GetStyleName) then begin S := TResourceStream.Create(HInstance, GetStyleName, RT_RCDATA); try Result := TControl(CreateObjectFromStream(nil, S)); Exit; finally S.Free; end; end; end; Result := inherited GetStyleObject; end; procedure TsgStyledControl.LoadToCacheIfNeeded(aField: TRttiField); var attr: TCustomAttribute; styleName: string; styleObj: TFmxObject; val: TValue; begin for attr in aField.GetAttributes do begin if attr is TCachedAttribute then begin styleName := TCachedAttribute(attr).StyleName; if styleName <> '' then begin styleObj := FindStyleResource(styleName); val := TValue.From<TFmxObject>(styleObj); aField.SetValue(Self, val); end; end; end; end; { TCachedAttribute } constructor TCachedAttribute.Create(const aStyleName: string); begin fStyleName := aStyleName; end; end. Using of TsgStyledControl: type TsgSlideHost = class(TsgStyledControl) private [TCached('SlideHost')] fSlideHost: TLayout; [TCached('SideMenu')] fSideMenuLyt: TLayout; [TCached('SlideContainer')] fSlideContainer: TLayout; fSideMenu: IsgSideMenu; procedure ReapplyProps; procedure SetSideMenu(const Value: IsgSideMenu); protected function GetStyleName: string; override; function GetStyleObject: TControl; override; procedure UpdateSideMenuLyt; public constructor Create(AOwner: TComponent); override; procedure ApplyStyle; override; published property SideMenu: IsgSideMenu read fSideMenu write SetSideMenu; end;

    Read the article

< Previous Page | 1 2