Daily Archives

Articles indexed Saturday January 8 2011

Page 3/30 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Cocos2d shake/accelerometer issue.

    - by Ryan Poolos
    So I a little backstory. I wanted to implement a particle effect and sound effect that both last about 3 sec or so when the user shakes their iDevice. But first issue arrived when the build in UIEvent for shakes refused to work. So I took the advice of a few Cocos veterans to just use some script to get "violent" accelerometer inputs as shakes. Worked great until now. The problem is that if you keep shaking it just stacks the particle and sounds over and over. Now this wouldn't be that big of a deal except it happens even if you are careful to try and not do so. So what I am hoping to do is disable the accelerometer when the particle effect/sound effect start and then reenable it as soon as they finish. Now I don't know if I should do this by schedule, NStimer, or some other function. I am open to ALL suggestions. here is my current "shake" code. - (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration { const float violence = 1; static BOOL beenhere; BOOL shake = FALSE; if (beenhere) return; beenhere = TRUE; if (acceleration.x > violence * 1.5 || acceleration.x < (-1.5* violence)) shake = TRUE; if (acceleration.y > violence * 2 || acceleration.y < (-2 * violence)) shake = TRUE; if (acceleration.z > violence * 3 || acceleration.z < (-3 * violence)) shake = TRUE; if (shake) { id particleSystem = [CCParticleSystemQuad particleWithFile:@"particle.plist"]; [self addChild: particleSystem]; // Super simple Audio playback for sound effects! [[SimpleAudioEngine sharedEngine] playEffect:@"Sound.mp3"]; shake = FALSE; } beenhere = FALSE; }

    Read the article

  • Set up DPM to use hardware VSS Provider with EMC Clariion SAN

    - by Ryan
    We recently purchased an EMC Clariion AX4 SAN and we're using it to provide storage for our Hyper-V virtual machines. I've already got the servers registered with it and configured the failover cluster CSV's, etc. I'm wanting to figure out what I have to do to set up the VSS Provider for the SAN, so that Microsoft Data Protection Manager can use it to backup the virtual machines. I'm new when it comes to Clariion SAN's, so I have no idea how to set up the VSS provider. I downloaded something from Powerlink that was labeled VSS Provider and installed it on one of the machines connected to the SAN. It had something to do with a Solutions Enabler (I don't know what that is), but it doesn't really seem like it did anything. I read something that suggested I'd need to have Navisphere Manager to use the VSS Provider on the AX4, but we didn't purchase that - we're just using Navisphere Express. Can anyone help me figure out how to get the VSS Provider up and running?

    Read the article

  • hyper-v cluster behavior when losing network connectivity

    - by ChristopheD
    Setup: (rather new) Hyper-V R2 cluster with 2 nodes (in failover configuration). Fysical host OS: Windows Server 2008. About eight VM's (mixed: Windows Server 2008 and Linux) Yesterday we had a power outage of about 15 minutes. Our blades are on UPS so the fysical host machines (Windows Server 2008) never went down. Our main switches are not on UPS (yet) and we saw the behaviour similar to the following (as distilled from the event logs). The nodes in the cluster lost means of communication (because the external switches went down). The cluster wants to bring down one (the first) of the nodes (to start failover?). The previous step impacts clustered storage where the virtual machine VHD's are located. All VM's got brutally terminated and were found in a failed state in the failover manager in the host OS'es. The Linux VM's were kernel panicking and looked like they had their disk ripped out. This whole setup is rather new to us, so we are still learning about this. The question: We are putting switches on UPS soon but were wondering if the above is expected behavior (seems rather fragile) or if there are obvious improvements configuration-wise to handle such scenario's ? I can upload an evtx file concerning what exactly was going on in case that's necessary.

    Read the article

  • Dsquery nested groups

    - by Doctor Trout
    Hi there, How would I write a dsquery to get a list of all the members of a d-list, expanding any nested groups to get the members of those groups? I've written this: dsquery * -filter "(&(memberOf=cn=...))" -r -limit 0 -attr CUSTOMFIELD sAMAccountName displayName > export.txt but returns nested d-lists and I want to expand these. I then tried this: dsquery group -samid "NAME | dsget group -members -expand > export.txt But this just lists the OU of each member and I want to get the Account Name and a custom field returned. Is there any way, either of chosing which fields to return from dsget or to epxand dsquery to show nested group membership? Thanks.

    Read the article

  • Command-line tool to deduplicate a single humongous file?

    - by romkyns
    I make regular snapshots of my VM using a nightly script. These backups are compressed using WinRAR and do shrink considerably, but I suspect it's not as efficient as had the file had been deduplicated first (just a hunch which I'm hoping to test). So instead of compressing the VHD itself, I would like to deduplicate the single file first, and then compress the output of the deduplicator. Is anyone aware of such a CLI tool?

    Read the article

  • Flash player displays incorrect colours

    - by neurolysis
    This is not a webapps issue, so please don't move it there. This is an issue with Flash, not with one specific website, as shown in this screenshot: This issue appears to come and go with time, it often also manifests as 'stuttering' playback with audio corruption and strange artifacts on the frames. I tried to uninstall/reinstall Flash a while back when it first started to do this, and that worked briefly, then it came back. Now reinstalling it doesn't fix the problem, even temporarily. Any ideas on the cause and/or a solution?

    Read the article

  • Macbook Pro 2010 Ethernet Jumbo Frame(9k MTU) Support?

    - by Troggy
    Has anyone been able to use jumbo frame support on their 2010 Macbook Pros? This is kind of negative news here, but I am seeing many reports that this is not available anymore due to Apple's choice of network card in the new machines. I cannot set my MTU speed over 1500 on my new 2010 MBP i7, but my old early 2008 MBP (Core2) has the 9000 MTU setting for use. Everything I have is setup to use jumbo frames and I thought apple kept that feature in their "pro" lineup. It sounds like the Mac Pro still has it. Did they decide to use a chipset that doesn't support it? I am trying to pinpoint some solid chipset numbers and the feature support. Maybe they just need to update the drivers? Is there some more official information about this feature? This might seem minor, but this is really frustrating if apple removed this feature from their pro laptop line. From what I have read so far, it sounds like I am not alone in my frustrations with this. http://discussions.info.apple.com/message.jspa?messageID=12258067 http://discussions.apple.com/thread.jspa?messageID=12130158 Anyone have any experience or further knowledge about this issue ... beyond typing my question into google and giving the top 5 results as answers? :)

    Read the article

  • OpenOffice.org 3 waits 25 seconds before opening

    - by Joey Adams
    I'm on Fedora 14, and OpenOffice 3.3.0 takes a long time to open (about 30 seconds, sometimes less). It isn't a CPU or disk performance issue, it's just simply a very long delay before the program opens. It appears to be a frivolous network connection timing out. According to Wireshark, it tries to look up: dulcimer.(none) which fails, after which it tries to look up: dulcimer.(none).mylitestream.com (dulcimer is my hostname, and LiteStream is my ISP) Is there a way to work around this bug in OpenOffice?

    Read the article

  • How to search for a tester?

    - by MainMa
    As a freelance developer, a few times I tried to find some testers to be able to let them test my software/web applications. If I try to find them, it's because most of the customers are not intended to hire external testers and don't see why this can benefit to them, so products are UI-untested and buggy. I tried lots of things. Discussion boards for IT people, specific websites for people who search for a job. Every time I clearly precise that I'm looking for product testers. I completely failed to find anybody for this job. I found instead two types of people: Non IT people who try to qualify as testers, but don't have enough skills for that, and don't really know what testing is and how to do it, Programmers, who are skilled as programmers, but not as testers, and who mostly don't understand neither what testing is about (or think it's the same thing as code review, or it consists in writing unit tests). Of course, they submit general programmers resumes, where they describe their high experience in Assembler and C++, but don't tell anything about anything related to the job of a tester. What I'm doing wrong? Isn't it called "tester"? Is there at least a tester job, different from general programming job? Is there any precise requirement to require from each candidate which can eliminate non IT people and general programmers?

    Read the article

  • Custom ListView Row, can no longer select rows...

    - by LDK
    Here's my ScrollView: middle: SC.ScrollView.design({ layout: { top: 36, bottom: 32, left: 0, right: 0 }, backgroundColor: '#ccc', contentView: SC.ListView.design({ contentBinding: 'Spanish.wordsController.arrangedObjects', selectionBinding: 'Spanish.wordsController.selection', contentValueKey: "word", contentDisplayProperties: 'word english'.w(), selectOnMouseDown: YES, exampleView: Spanish.CustomListItemView }) }) and here is my custom listView row: Spanish.CustomListItemView = SC.View.extend({ render: function(context, firstTime){ var content = this.get('content'); var word = content.get('word'); var english = content.get('english'); context = context.begin().push('&nbsp;%@ (%@)'.fmt(word,english)).end(); return sc_super(); } }); The above works as expected, except that I can no longer select views. When I comment out "exampleView: Spanish.CustomListItemView" I can select rows, but they are no longer formatted properly. Why can I no longer select rows when I use exampleView?

    Read the article

  • How to split page and reveal stuff underneath?

    - by sudo rm -rf
    Hi there. I've already achieved this on my iPhone app, but I want to know if it's possible on an HTML page, maybe using CSS effects or similar. As you can see, the current view is split, the bottom part is moved down, and another view is revealed underneath. I have a page I'd like to try this on. Any ideas if this is possible, and any specifics as to how I can do it? I'm quite new to HTML coding, so please take it easy on me. :) Thanks in advance!

    Read the article

  • WPF Show Open TabItem Names in a List View

    - by mr justinator
    I'm trying to display a list of open tab names in a listview or listbox (recommendations?). Been going through the different type of binding options and I'm able to bind to a single tab name but it displays vertical instead of horizontal. Here is my XAML: <ListView DockPanel.Dock="Left" Height="352" Name="listView1" Width="132" ItemsSource="{Binding ElementName=RulesTab, Path=Name}" IsSynchronizedWithCurrentItem="True" FlowDirection="LeftToRight" HorizontalAlignment="Left" HorizontalContentAlignment="Left" DataContext="{Binding}"> Any pointers would be greatly appreciated as I'd like to be able to see a list of all the tabs open and then double click on one to bring the tab into focus. Many thanks!

    Read the article

  • Saving data in a inherited django model

    - by aldeano
    I'm building an app to save data and some calculations made with those datas, the idea is keep the data in one model and the calculations in other. So, the models are like this: class FreshData(models.Model): name = models.CharField(max_length=20) one = models.IntegerField() two = models.IntegerField() def save(self, *args, **kwargs): Calculations() Calculations.three = self.one + self.two super(FreshData, self).save(*args, **kwargs) Calculations.save() class Calculations(FreshData): three = models.IntegerField() I've got a valueerror pointing out "self.one" and "self.two" as without value. I keep the idea in witch my design is wrong and django has a simpler way to store related data.

    Read the article

  • PHP mail() function not delivering mail

    - by Ryan Jones
    Hi there, I have a slight problem. I am using a working script (works on my testing account - shared server) to send a mail through PHP using the mail() function. I just got a dedicated server, and I haven't been able to get the function to work. I've spent the last 10 or so hours reading various documentations on BIND (for the SPF record), dovecot, sendmail and postfix trying various things to get this to work. There is clearly something that I am missing. So we know the PHP code works fine. All the headers are fine everything. We know this as it's a direct copy from my testing account. So the problem must arise somewhere in the server config. The path to sendmail is correct, and sendmail is (apparently) working fine. I've set up the script to now deliver "Sent" or "Error" based on the boolean result from the PHP mail() function. That is: if(mail($blah,$blah,$blah,$blah,$blah)) { echo "Sent"; } else { echo "Error";} And the result ALWAYS comes up as "Sent" - however, the email never arrives. Can someone suggest things to check, as I'm completely new to this (24 hours or so!). Thanks in advance. Ryan

    Read the article

  • Is there any way to store full size image returned from camera activity in internal memory ?

    - by SimpleGuy
    I am using Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT,Uri.fromFile(externalFileObj)); intent to call default camera activity. To get full image you need to specify intent.putExtra(). But this always requires URI that works only for external storage files. I tried to create a temp.jpg image in internal memory and pass its URI Uri.fromFile(new File(getFilesDir() + "/temp.jpg")); but the camera activity won't return back after the image is captured. So there is no way to get Full size image from default camera application in our activity without using any external storage ? Assuming that the device do not have SD card or currently in use is there no way I can avoid using it ? Yes I know we can create our own camerapreview surface but I want to use the default camera application as it is natural with many more options. Thanks.

    Read the article

  • My Android ListView item layout looks terrible

    - by jnylen
    I wanted to create a layout like the CyanogenMod call log in that there is a list item and a call button on the left which gets focus separately (screenshot). Instead, I get this mess. Here's my code: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:minHeight="?android:attr/listPreferredItemHeight" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingLeft="4dip" > <DontPressWithParentImageView android:id="@+id/play_icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingLeft="14dip" android:paddingRight="14dip" android:layout_alignParentRight="true" android:gravity="center_vertical" android:src="@drawable/sym_play" android:background="@drawable/play_background" /> <View android:id="@+id/divider" android:layout_width="1px" android:layout_height="fill_parent" android:layout_marginTop="5dip" android:layout_marginBottom="5dip" android:layout_toLeftOf="@id/play_icon" android:layout_marginLeft="2dip" android:background="@drawable/divider_vertical_dark" /> <TextView android:id="@+id/file_info" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_marginBottom="8dip" android:layout_marginTop="-10dip" android:layout_marginLeft="10dip" android:layout_alignWithParentIfMissing="true" android:singleLine="true" android:ellipsize="marquee" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> <TextView android:id="@+id/file_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_above="@id/file_info" android:layout_alignWithParentIfMissing="true" android:layout_marginBottom="-10dip" android:layout_marginLeft="4dip" android:textAppearance="?android:attr/textAppearanceLarge" android:singleLine="true" android:ellipsize="marquee" android:gravity="center_vertical" /> </RelativeLayout> For reference, the code I started with is here and here, and the source to DontPressWithParentImageView is here (but as you can see from my screenshot, that part is working). What am I doing wrong?

    Read the article

  • Translate this code to objective-c iPhone?

    - by Silent
    Hi there would somone know how to translate this cose into iphone programming it seems like its an http message the data i would be sending is audio data im not sure which type of file. Any things helps thanks. /////////////////////////////////////////////////////////// Using the cgi command fifo.cgi will enable the IP camera to start receiving audio data User can use Microsoft WinHTTP C/C++ API to upload the audio file   http://msdn.microsoft.com/en-us/library/aa384252%28v=VS.85%29.aspx   1. Establish connection     hSession = WinHttpOpen(L"WinHTTP Example/1.0",WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,WINHTTP_NO_PROXY_NAME,WINHTTP_NO_PROXY_BYPASS, 0 );        if(hSession)      {          USES_CONVERSION;          hConnect = WinHttpConnect(hSession,A2W(m_cAddr), m_iPort,0);      }   2. Establish listen request        if(hConnect)          hRequest = WinHttpOpenRequest(hConnect,L"POST",L"/cgi-bin/fifo.cgi",NULL,WINHTTP_NO_REFERER,WINHTTP_DEFAULT_ACCEPT_TYPES,0);        if(hRequest)          bResults = WinHttpSendRequest(hRequest,WINHTTP_NO_ADDITIONAL_HEADERS,0,WINHTTP_NO_REQUEST_DATA,0,uDataLength,0);   Send audio data        if( hRequest)          WinHttpWriteData(hRequest, pData, nDataSize, &dwBytesWritten); //////////////////////////////////////////////////////////////////////////

    Read the article

  • StackOverFlowException - but oviously NO recursion/endless loop

    - by user567706
    Hi there, I'm now blocked by this problem the entire day, read thousands of google results, but nothing seems to reflect my problem or even come near to it... i hope any of you has a push into the right direction for me. I wrote a client-server-application (so more like 2 applications) - the client collects data about his system, as well as a screenshot, serializes all this into a XML stream (the picture as a byte[]-array]) and sends this to the server in regular intervals. The server receives the stream (via tcp), deserializes the xml to an information-object and shows the information on a windows form. This process is running stable for about 20-25 minutes at a submission interval of 3 seconds. When observing the memory usage there's nothing significant to see, also kinda stable. But after these 20-25 mins the server throws a StackOverflowException at the point where it deserializes the tcp-stream, especially when setting the Image property from the byte[]-array. I thoroughly searched for recursive or endless loops, and regarding the fact that it occurs after thousands of sucessfull intervals, i could hardly imagine that. public byte[] ImageBase { get { MemoryStream ms = new MemoryStream(); _screen.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); return ms.GetBuffer(); } set { if (_screen != null) _screen.Dispose(); //preventing well-known image memory leak MemoryStream ms = new MemoryStream(value); try { _screen = Image.FromStream(ms); //<< EXCEPTION THROWING HERE } catch (StackOverflowException ex) //thx to new CLR management this wont work anymore -.- { Console.WriteLine(ex.Message + Environment.NewLine + ex.StackTrace); } ms.Dispose(); ms = null; } } I hope that more code would be unnecessary, or it could get very complex... Please help, i have no clue at all anymore thx Chris

    Read the article

  • iPhone YouTube Channel App

    - by pki
    What would the steps be to creating an app that connected to YouTube's XML API. Here is my setup currently but it is not working. App Delegate creates object "YTXMLParser" App Delegate calls [parser prepAndPrase]; In Prep and Parse the app initiates a NSURLConnection The app downloads the XML Data using the NSURLConnection well appeneding to NSMutableData The app parses the data with NSXMLParser At the end of each "entry" the app adds the current dictionary to the class. At the beginning of each "entry" the app creates an instance of a dictionary. Here's where i'm stuck. How do I get this data back to my app delegate?

    Read the article

  • Creating C++ client app for some abstract windows server - how to manage TCP connection to server speed?

    - by Kabumbus
    So we have some server with some address port and ip. we are developing that server so we can implement on it what ever we need for help. What are standard/best practices for data transfer speed management between C++ windows client app and server (C++)? My main point is in how to get how much data can be uploaded/downloaded from/to client via his low speed network to my relatively super fast server. (I need it for set up of his live stream Audio/Video bit rate) My try on explaining number 3. We do not care how fast is our server. It is always faster than needed. We care about client tyring to stream out to our server his media. he streams encoded (via ffmpeg) live video data to our server. But he has say ADSL with 500kb/s of outgoing traffic. Also he uses some ICQ or what so ever so he has less than 500 kb/s per second. And he wants to stream live video! So we need to set up our ffmpeg to encode video with respect to the bit rate user can provide. We develop server side and client side. We need a way of finding out how much user can upload per second currently (so value can change dynamically over time)

    Read the article

  • About to migrate :string but I'm thinking :text might be better. Performance/Purpose?

    - by Sam
    class CreateScrapes < ActiveRecord::Migration def self.up create_table :scrapes do |t| t.text :saved_characters t.text :sanitized_characters t.string :href t.timestamps end end def self.down drop_table :scrapes end end I'm about to rake db:migrate and I'm think about the attribute type if I should be using text or string. Since saved_characters and sanitized_characters will be arrays with thousands of unicode values, its basically comma delimited data, I'm not sure if `:text' is really the right way to go here. What would you do?

    Read the article

  • Validating key/certificate pairs with M2Crypto when a certificate chain is needed

    - by Charles Duffy
    M2Crypto.X509.X509 objects have a verify(pkey) method, which provide a means of testing that a given certificate does in fact sign a specified key. This is a good and useful thing -- except that sometimes the certificate I want to verify in this way is invalid without the use of an intermediate certificate, which this API does not appear to allow a way to specify. Is there an alternate means of validating a certificate / private key pair which will work even when the certificate is unable to stand alone?

    Read the article

  • PHP arrays. There must be a simpler method to do this

    - by RisingSun
    I have this array in php returned from db Array ( [inv_templates] = Array ( [0] = Array ( [inven_subgroup_template_id] = 1 [inven_group] = Wires [inven_subgroup] = CopperWires [inven_template_id] = 1 [inven_template_name] = CopperWires6G [constrained] = 0 [value_constraints] = [accept_range] = 2 - 16 [information] = Measured Manual ) [1] = Array ( [inven_subgroup_template_id] = 1 [inven_group] = Wires [inven_subgroup] = CopperWires [inven_template_id] = 2 [inven_template_name] = CopperWires2G [constrained] = 0 [value_constraints] = [accept_range] = 1 - 7 [information] = Measured by Automated Calipers ) ) ) I need to output this kind of multidimensional stuff Array ( [Wires] = Array ( [inv_group_name] = Wires [inv_subgroups] = Array ( [CopperWires] = Array ( [inv_subgroup_id] = 1 [inv_subgroup_name] = CopperWires [inv_templates] = Array ( [CopperWires6G] = Array ( [inv_name] = CopperWires6G [inv_id] = 1 ) [CopperWires2G] = Array ( [inv_name] = CopperWires2G [inv_id] = 2 ) ) ) ) ) ) I currently do this stuff foreach ($data['inv_templates'] as $key = $value) { $processeddata[$value['inven_group']]['inv_group_name'] = $value['inven_group']; $processeddata[$value['inven_group']]['inv_subgroups'][$value['inven_subgroup']]['inv_subgroup_id'] = $value['inven_subgroup_template_id']; $processeddata[$value['inven_group']]['inv_subgroups'][$value['inven_subgroup']]['inv_subgroup_name'] = $value['inven_subgroup']; $processeddata[$value['inven_group']]['inv_subgroups'][$value['inven_subgroup']]['inv_templates'][$value['inven_template_name']]['inv_name'] = $value['inven_template_name']; $processeddata[$value['inven_group']]['inv_subgroups'][$value['inven_subgroup']]['inv_templates'][$value['inven_template_name']]['inv_id'] = $value['inven_template_id']; } return $processeddata; EDIT : A var_export array ( 'inv_templates' = array ( 0 = array ( 'inven_subgroup_template_id' = '1', 'inven_group' = 'Wires', 'inven_subgroup' = 'CopperWires', 'inven_template_id' = '1', 'inven_template_name' = 'CopperWires6G', 'constrained' = '0', 'value_constraints' = '', 'accept_range' = '2 - 16', 'information' = 'Measured Manual', ), 1 = array ( 'inven_subgroup_template_id' = '1', 'inven_group' = 'Wires', 'inven_subgroup' = 'CopperWires', 'inven_template_id' = '2', 'inven_template_name' = 'CopperWires6G', 'constrained' = '0', 'value_constraints' = '', 'accept_range' = '1 - 7', 'information' = 'Measured by Automated Calipers', ), ), ) The foreach is almost unreadable. There must be a simpler way

    Read the article

  • TabBar as rootController flip animation.

    - by user558076
    Hi there, I'm using a TabBarController as the root controller for my app. I have all the views I use (5 tabs) all hooked together through it in interface builder. What I'm trying to do is trigger a slide or flip animation when moving between tabs. However, I only want this to occur when I change tabs programmatically (ie the animation is triggered when someone does a swipe gesture in the one of the views, but not when they just select one of the tabs). The way I'm currently handling this is by calling: [appDelegate.myTab setSelectedIndex:0]; when the iphone detects a swipe. I've been searching the internet for 5 straight hours and can't seem to find a way to add an animation here. It'd be really cool if there were something like: [appDelegate.myTab setSelectedIndex:0 animated:(YES)]; However, there isn't... I can't imagine no one's ever tried this before, but for the life of me, I can't find anything online that explains how this can be done. Thank you in advance for your help.

    Read the article

  • C# unusual inheritance syntax w/ generics

    - by anon
    I happened upon this in an NHibernate class definition: public class SQLiteConfiguration : PersistenceConfiguration<SQLiteConfiguration> So this class inherits from a base class that is parameterized by... the derived class?   My head just exploded. Can someone explain what this means and how this pattern is useful? (This is NOT an NHibernate-specific question, by the way.)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >