Daily Archives

Articles indexed Sunday October 21 2012

Page 9/14 | < Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • mount issue in ubuntu 12.10

    - by Vipin Ms
    I'm having issue with latest Ubuntu 12.10. Let me make it more clear. I'm having the following partitions in my Laptop. Device Boot Start End Blocks Id System /dev/sda1 2048 39997439 19997696 83 Linux /dev/sda2 * 40001850 81947564 20972857+ 83 Linux /dev/sda3 81947565 123877214 20964825 83 Linux /dev/sda4 123887614 976773119 426442753 5 Extended /dev/sda5 123887616 333602815 104857600 83 Linux /dev/sda6 333604864 543320063 104857600 83 Linux /dev/sda7 543322112 753037311 104857600 83 Linux /dev/sda8 753039360 976773119 111866880 83 Linux I have also two users named "ms" and abc. Here ms is for administrative tasks and abc for my friends. When I mount any drive under "abc" user, I cannot access it under my other user "ms". Same as in the case with "ms" user. I found possible reason behind the issue. When I mount any drive under "abc" user, Ubuntu will try to mount it under "/media/abc/volume_name" instead of "/media/volume_name" . Same as in the case with "ms" user. # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 19G 11G 7.5G 59% / udev 1.5G 4.0K 1.5G 1% /dev tmpfs 599M 896K 598M 1% /run none 5.0M 0 5.0M 0% /run/lock none 1.5G 620K 1.5G 1% /run/shm none 100M 92K 100M 1% /run/user /dev/sda2 20G 172M 19G 1% /media/abc/TEST /dev/sdb1 466G 353G 114G 76% /media/abc/F088F74288F7063E /dev/sdb2 466G 318G 148G 69% /media/abc/New Volume /dev/sda5 99G 94G 323M 100% /media/abc/Songs /dev/sda6 99G 31G 63G 34% /media/ms/Films Here, you can see that "TEST" was mounted under "/media/abc/TEST". When I try to access the already mounted partition named '/media/abc/TEST" in my "ms" session I'm getting the following error. How to fix this error? Is it a bug? Is there any way to fix this without modifying the underlying file-system structure?

    Read the article

  • Mount exFAT partition in virtual guest machine

    - by Alain Jacomet
    I have a real Ubuntu 12.10 installation being virtualized under a Windows 8 host, by using the VBoxManage.exe internalcommands createrawvmdk method. I'm trying to mount an exFAT partition into the virtualized machine (which is the partition of shared work files), but even though I have fuse-exfat installed, and the partition is perfectly mountable while booting entirely into Ubuntu, I can't mount it while virtualizing it. 1- If I make a full vmdk image of the HDD, including all partitions, Ubuntu 12.10 "sees" the partition, and trying to mount it throws this error: Image: http://i.stack.imgur.com/AyUSn.png 2- If I make a machine with only the linux partitions, + the exFAT partition. Again Ubuntu "sees" the partition and the result is: Error: fsync failed Image: http://i.stack.imgur.com/u4SkC.png 3- If I make a machine with only the linux partitions, and try to mount it, Ubuntu doesn't "see" the partition, and I get this error: Image: i.stack.imgur.com/q1hz5.png I've tried using the VirtualBox' "Shared Folders" functionality but even though I install the "Guest Additions", the system doesn't seem to recognize the shared folder: Image: i.stack.imgur.com/yLU0E.png Help? Thanks!

    Read the article

  • I have problem on 12.10 64bit with nvidia graphics driver opensource and proprietary ! Can't change resolution on 3d games

    - by digitalcrow
    I have problem with nvidia graphics driver opensource and proprietary ! Can't change resolution on 3d games and there's a bug there are no kernel sources installed and thus jockey can't install proprietary drivers. I can't change resolution while on games fullscreen. I tried to install proprietary driver and i couldn't plus i couldn't login to ubuntu it showed only the desktop photo no dash no nothing. -tried to install kernel sources and blacklist+remove Nouveau drivers and then installed the proprietary drivers i hope succesfully. -The problem is the same i can't change resolution on 3d games while on fullscreen. I've installed the sources and be able to install the proprietary nvidia drivers but the problem remains, look what i got in the output of a 3d game exited while i tried to change resolution: X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 150 (XFree86-VidModeExtension) Minor opcode of failed request: 10 (XF86VidModeSwitchToMode) Value in failed request: 0x25b Serial number of failed request: 497 Current serial number in output stream: 499 I'm giving you more details about my system: i have an nvidia geforce gts 250 , 3,4 ghz quadcore amd phenom2 , 8gbytes of ram. The output of: sudo lshw -C display; lsb_release -a; uname -a Is the following: *-display description: VGA compatible controller product: G92 [GeForce GTS 250] vendor: NVIDIA Corporation physical id: 0 bus info: pci@0000:01:00.0 version: a2 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress vga_controller bus_master cap_list rom configuration: driver=nvidia latency=0 resources: irq:18 memory:fa000000-faffffff memory:d0000000-dfffffff memory:f8000000-f9ffffff ioport:ef00(size=128) memory:fb000000-fb01ffff No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.10 Release: 12.10 Codename: quantal Linux darkpc 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux I like ubuntu's style and user interface but i hate the bad quality of work they do.

    Read the article

  • How to hide assets from user? ( e.g.: a png file )

    - by burninggramma
    I think the title is quite self-explaining, still this is a big area I think, so let me drop a few words: I've got a simple experiment game project going, and I want to make sure, that the user isn't messing with the game assets like player skin etc. In my opinion the best way would be that on production I would merge all the assets into one file and the application would check the hash of that file, so it could detect the corrupted data. Is this an acceptable practice? There must be sum libraries / applications which are targeting this problem, could you guide me on this? Project details: unix/linux, c++, sdl

    Read the article

  • Spreadsheets in Game Design?

    - by Joey Green
    There have been two instances from the past two weeks that I've heard from well known successful game developers that they use spreadsheets when designing games. The first being David Whatley in this GDCVault video: http://gdcvault.com/play/1012372/From-Zero-to-Time-Magazine The second being the guys that do Walled Garden Weekly: http://walledgardenweekly.com/ David said he models everything out and uses excel models to see how everything plays out. What on earth is he talking about? Is it seeing how the game mechanics react to each other? Is there somewhere where I can learn more about how to do this? Thanks

    Read the article

  • Which one is better to get started? [closed]

    - by vanangamudi
    Which one of the open-source game engine is better to get started? I read several threads over several forums and found that it is better to write own game engine specific to application. But I need to know the requirements of a game engine, other than Graphics, Physics and AI... Many people suggested Unity, But I need open-source version so that I can have a look at implementation... so I google rigorously and found some unknown game engines(at least to me) Unvanquished Cube Spring Pyrogenesis Torque3D CrystalSpace Panda3D Delta3D Irrichlt OpenArena AlienArena (please list others if I missed anything....) FYI: my present focus is on FPS/TPS. Can you tell me which one is better at performance if possible? Torque3D claims to be the best opensource engine - is that true, and if so to what extent?

    Read the article

  • Vector transform equation explanation

    - by cyberdemon
    I'm trying to understand the maths of moving points in a 3d space by making a game written in C#. I'm looking at this wolfire blog series which explains some basic 3d maths. I've read the first two parts but am stuck on the 3rd. I know it's all really rudimentary stuff but I find Googling for help with equations really hard. The one I'm struggling with is: 0*(0.66,0.75) + 2*(-0.75, 0.66) = (-1.5, 1.3) How can anything multiplied by 0 not be 0? So my question is how does this look in code: x(a,b) + y(c,d) I know it's basic stuff but I just can't see it.

    Read the article

  • Attach my sprite with Box2d

    - by user919496
    I'm coding Javascript(HTML5) with Box2D. And I want to ask how to attach Sprite with Box2D. This is function My sprite: function My_Sprite() { this.m_Image = new Image(); this.m_Position = new Vector2D(0,0); this.m_CurFrame = 0; this.m_ColFrame = 0; this.m_Size = new Vector2D(0,0); this.m_Scale = new Vector2D(0,0); this.m_Rotation = 0; } My_Sprite.prototype.constructor = function (_Image_SRC) { this.m_Image.src = _Image_SRC; } My_Sprite.prototype.constructor = function (_Image_SRC,_Size,_Col) { this.m_Image.src = _Image_SRC; this.m_Size = _Size; this.m_ColFrame = _Col; this.m_Scale = new Vector2D(1, 1); } My_Sprite.prototype.Draw = function (context) { context.drawImage(this.m_Image, this.m_Size.X * (this.m_CurFrame % this.m_ColFrame), this.m_Size.Y * parseInt(this.m_CurFrame / this.m_ColFrame), this.m_Size.X, this.m_Size.Y, this.m_Position.X, this.m_Position.Y, this.m_Size.X * this.m_Scale.X, this.m_Size.Y * this.m_Scale.Y ); } and this is function Object : function Circle(type, angle, size) { // Circle.prototype = new My_Object(); // Circle.prototype.constructor = Circle; // Circle.prototype.parent = My_Object.prototype; this.m_den = 1.0; this.m_fri = 0.5; this.m_res = 0.2; fixDef.density = this.m_den; fixDef.friction = this.m_fri; fixDef.restitution = this.m_res; fixDef.shape = new b2PolygonShape; bodyDef.type = type; bodyDef.angle = angle; bodyDef.userData = m_spriteCircle; fixDef.shape = new b2CircleShape( Radius / SCALE //radius ); this.m_Body = world.CreateBody(bodyDef); this.m_Body.CreateFixture(fixDef); m_spriteCircle = new My_Sprite(); this.Init(); } Circle.prototype.Init = function () { m_spriteCircle.constructor("images/circle.png", new Vector2D(80, 80), 1); m_spriteCircle.m_CurFrame = 0; } Circle.prototype.Draw = function (context) { m_spriteCircle.Draw(context); } and I draw it : var m_Circle = new Circle(); m_Circle.Draw(context);

    Read the article

  • Storing a Hex Grid

    - by Pedro Caetano
    I've been creating a small hex grid framework for Unity3D and have come to the following dilema. This is my coordinate system (taken from here) Link because I'm a new user It all works pretty nicely except for the fact I have no idea how to store it. I originally intended to store this in a 2D array and use images to generate my maps. One problem was that it had negative values (this was easily fixed by offsetting the coordinates a bit). However, due to this coordinate system, such an image or bitmap would have to be diamond shaped - and since these structures are square shaped, this would cause a lot of headaches even if I hack something together. Is there anything I'm missing that could fix this? I recall seeing a forum post regarding this in the unity forums but I can no longer find the link. Is writing a set of coordinate translators the best solution here? If you guys think it would be helpful, I can post code and images of my problem.

    Read the article

  • read object from compressed file that generate from actionscript3

    - by Last Chance
    I have made a simple game Map Editor, and I want to save a array that contain map tile info to a file, as below: var arr:Array = [.....2d tile info in it...]; var ba:ByteArray = new ByteArray(); ba.writeObject(arr); ba.compress(); var file:File = new File(); file.save(ba); now I had successful save a compressed object to a file. now the problem is my server side need to read this file and decompress get the arr out from file, then convert it as python list. is that prossible?

    Read the article

  • Why distant objects draw in front of close objects?

    - by cad
    I am rendering two cubes in the space using XNA 4.0 and the layering of objects only works from certain angles. Here is what I see from the front angle (everything ok) Here is what I see from behind This is my draw method. Cubes are drawn by serverManager and serverManager1 protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); switch (_gameStateFSM.State) { case GameFSMState.GameStateFSM.INTROSCREEN: spriteBatch.Begin(); introscreen.Draw(spriteBatch); spriteBatch.End(); break; case GameFSMState.GameStateFSM.GAME: spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend); // Text screenMessagesManager.Draw(spriteBatch, firstPersonCamera.cameraPosition, fpsHelper.framesPerSecond); // Camera firstPersonCamera.Draw(); // Servers serverManager.Draw(GraphicsDevice, firstPersonCamera.viewMatrix, firstPersonCamera.projMatrix); serverManager1.Draw(GraphicsDevice, firstPersonCamera.viewMatrix, firstPersonCamera.projMatrix); // Room //roomManager.Draw(GraphicsDevice, firstPersonCamera.viewMatrix); spriteBatch.End(); break; case GameFSMState.GameStateFSM.EXITGAME: break; default: break; } base.Draw(gameTime); fpsHelper.IncrementFrameCounter(); } serverManager and serverManager1 are instances of the same class ServerManager that draws a cube. The draw method for ServerManager is: public void Draw(GraphicsDevice graphicsDevice, Matrix viewMatrix, Matrix projectionMatrix) { cubeEffect.World = Matrix.CreateTranslation(modelPosition); // Set the World matrix which defines the position of the cube cubeEffect.View = viewMatrix; // Set the View matrix which defines the camera and what it's looking at cubeEffect.Projection = projectionMatrix; // Enable textures on the Cube Effect. this is necessary to texture the model cubeEffect.TextureEnabled = true; cubeEffect.Texture = cubeTexture; // Enable some pretty lights cubeEffect.EnableDefaultLighting(); // apply the effect and render the cube foreach (EffectPass pass in cubeEffect.CurrentTechnique.Passes) { pass.Apply(); cubeToDraw.RenderToDevice(graphicsDevice); } } Obviously there is something I am doing wrong. Any hint of where to look? (Maybe z-buffer or occlusion tests?)

    Read the article

  • TGA loader: reverse y-axis

    - by aVoX
    I've written a TGA image loader in Java which is working perfectly for files created with GIMP as long as they are saved with the option origin set to Top Left (Note: Actually TGA files are meant to be stored upside down - Bottom Left in GIMP). My problem is that I want my image loader to be capable of reading all different kinds of TGA, so my question is: How do I flip the image upside down? Note that I store all image data inside a one-dimensional byte array, because OpenGL (glTexImage2D to be specific) requires it that way. Thanks in advance.

    Read the article

  • how can cookies track users despite same origin policy?

    - by user1763930
    Article here discusses tactics used by political campaigns. http://www.nytimes.com/2012/10/14/us/politics/campaigns-mine-personal-lives-to-get-out-vote.html The part in question is quoted: The campaigns have planted software known as cookies on voters’ computers to see if they frequent evangelical or erotic Web sites for clues to their moral perspectives. Voters who visit religious Web sites might be greeted with religion-friendly messages when they return to mittromney.com or barackobama.com. How is that possible? I thought all modern browsers have same origin policy security where website A doesn't have access to any information about other website B, website C, etc. The article makes it sound like a user browses: 1. presidentialcandidate.com 2. website2.com 3. website3.com 4. website4.com 5. presidentialcandidate.com How can a cookie from visit #1 know track user history and be revealed in visit #5?

    Read the article

  • Rewriting URL in AJAX application

    - by Artem Moskalev
    I am making a simple online application. I have a navigation bar with a few buttons and one "div" into which all the new contents will be loaded dynamically i.e. when I click "About", it will load the page parts into the "div" without reloading the whole page with .load() function. The problem is: what if I need to give a link to the Documents section of my web site, or the user wants to store this kind of link, the url is not rewritten when browsing my site. when the user stores the default link it will always link him to the default "Home" part. How can I rewrite the URL and what is the most correct way to do this?

    Read the article

  • How to op-en file and view in a rich text box using vb.net?

    - by Aaron Warnke
    Hi I am trying to open and view a files text in a rich text box. Here is what I have please let me know what I am doing wrong? Private Sub loadButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles loadButton.Click ' Displays an OpenFileDialog so the user can select a Cursor. Dim openFileDialog1 As New OpenFileDialog() openFileDialog1.Filter = "Cursor Files|*.txt" openFileDialog1.Title = "Select a Cursor File" If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then ' Assign the cursor in the Stream to the Form's Cursor property. Me.mainRTBox = New Text(openFileDialog1.OpenFile()) End If End Sub

    Read the article

  • How to draw histogram in Processing

    - by theolc
    I have an arrayList and I would like to take the size of the ten arrayList elements and use the sizes to create a histogram. I understand processing coordinate system starts in the top left corner. My question is, how do I use the arrayList.size() values to start at 450 (based from a 500,500 window) and go upwards from there to create my histogram. The following is my function for the histogram, it is receiving as a parameter the arrayList called bins. void histogram(ArrayList[] bins) { //set window background(0,0,0); size(500,500); background(255,255,255); line(50,0,50,500); line(0,450,500,450); int i; for (i = 50; i <= 500; i+=45) { line(i,450,i,480); } for (i = 50; i <= 450; i+=45) { line(50,i,20,i); } } Thanks in adavance for any help and input!

    Read the article

  • How to perform gui operation in doInBackground method?

    - by jM2.me
    My application reads a user selected file which contains addresses and then displays on mapview when done geocoding. To avoid hanging app the importing and geocoding is done in AsyncTask. public class LoadOverlayAsync extends AsyncTask<Uri, Integer, StopsOverlay> { Context context; MapView mapView; Drawable drawable; public LoadOverlayAsync(Context con, MapView mv, Drawable dw) { context = con; mapView = mv; drawable = dw; } protected StopsOverlay doInBackground(Uri... uris) { StringBuilder text = new StringBuilder(); StopsOverlay stopsOverlay = new StopsOverlay(drawable, context); Geocoder geo = new Geocoder(context, Locale.US); try { File file = new File(new URI(uris[0].toString())); BufferedReader br = new BufferedReader(new FileReader(file)); String line; while ((line = br.readLine()) != null) { StopOverlay stopOverlay = null; String[] tempLine = line.split("~"); List<Address> results = geo.getFromLocationName(tempLine[4] + " " + tempLine[5] + " " + tempLine[7] + " " + tempLine[8], 10); if (results.size() > 0) { Toast progressToast = Toast.makeText(context, "More than one yo", 1000); progressToast.show(); } else if (results.size() == 1) { Address addr = results.get(0); GeoPoint mPoint = new GeoPoint((int)(addr.getLatitude() * 1E6), (int)(addr.getLongitude() * 1E6)); stopOverlay = new StopOverlay(mPoint, tempLine); } if (stopOverlay != null) { stopsOverlay.addOverlay(stopOverlay); } //List<Address> results = geo.getFromLocationName(locationName, maxResults) } } catch (URISyntaxException e) { showErrorToast(e.toString()); //e.printStackTrace(); } catch (FileNotFoundException e) { showErrorToast(e.toString()); //e.printStackTrace(); } catch (IOException e) { showErrorToast(e.toString()); //e.printStackTrace(); } return stopsOverlay; } protected void onProgressUpdate(Integer... progress) { Toast progressToast = Toast.makeText(context, "Loaded " + progress.toString(), 1000); progressToast.show(); } protected void onPostExecute(StopsOverlay so) { //mapView.getOverlays().add(so); Toast progressToast = Toast.makeText(context, "Done geocoding", 1000); progressToast.show(); } protected void showErrorToast(String msg) { Toast Newtoast = Toast.makeText(context, msg, 10000); Newtoast.show(); } } But if geocode fails, I want a dialog popup to let user edit the address. That would require calling on gui method while in doInBackground. What would be a good workaround this?

    Read the article

  • Mapping to a different view based on child type

    - by Ryan Burnham
    So i have a situation where i have common base type but i need to map to a different view based on the child type. It looks like i can use a generic mapping class to handle the inheritance http://geekswithblogs.net/nharrison/archive/2010/07/09/inheriting-a-class-map-in-fluent-nhibernate.aspx But how can i conditionally map to a different view based on the child type? I see an EntityType property but it says its obsolete and will be made private in the next version. As an example i have a base class of ContactInfo is standard between contact types but the values come from different places depending on the contact type, this I'll handle through the sql view.

    Read the article

  • What did I do wrong with this function?

    - by Felipe Galdino Campos
    I don't know what I did - it's wrong . Can someone help me? def insert_sequence(dna1, dna2, number): '''(str, str, int) -> str Return the DNA sequence obtained by inserting the second DNA sequence at the given index. (You can assume that the index is valid.) >>> insert_sequence('CCGG', 'AT', 2) 'CCATGG' >>> insert_sequence('TTGC', 'GG', 2) 'TTGGGC' ''' index = 0 result = ''; for string in dna1: if index == number: result = result + dna2 result = result + string index += 1 print(result)

    Read the article

  • Webserver for publishing adjusted images

    - by Petr Prikryl
    I want to create webserver which will be receiving data (images probably) from webclients who will be uploading these photos. And then the webserver must execute some graphic programs (client select whichone) to modify the image(s). After the graphic program is done, the results (output image(s)) will be uploaded to the web temp database (by webserver) to publish results of graphic programs. I found the C++ web toolkit (http://www.webtoolkit.eu), but I'm not sure if this is a suitable C/C++ library for me because I haven't any experiences with making C/C++ web apps/servers. Can someone tell me some advice please? The webserver should have some SDK too, for adding next graphic programs. I'm searching only for any C/C++ tools/libraries/etc.

    Read the article

  • Java: Is there a way to efficiently insert or remove many elements from the middle of a LinkedList?

    - by allyourcode
    I was expecting to find this in Java's LinkedList, since the point of linked lists is to be able to efficiently insert (and remove) anywhere (assuming you have some kind of pointer to the location where you want to insert or remove). I'm not finding anything in the API though. Am I overlooking something? The closest thing I can find to this are the add and remove method in ListIterator. This has some limitations though. In particular, other iterators become invalid as soon as the underlying LinkedList is modified via remove, according to the API. This is born out in my tests as well; the following program results in a IllegalStateException: import java.util.*; public class RemoveFromLinkedList { public static void main(String[] args) { LinkedList<Integer> myList= new LinkedList<Integer>(); for (int i = 0; i < 10; ++i) { myList.add(i); } ListIterator<Integer> i1 = myList.listIterator(); ListIterator<Integer> i2 = myList.listIterator(); for (int i = 0; i < 3; ++i) { i1.next(); i2.next(); } System.out.println("i1.next() should be 3: " + i1.next()); i1.remove(); i1.remove(); // Exception! System.out.println("i2.next() should be 5: " + i2.next()); } } Ideally, what I'm expecting is something like this: // In my imagination only. This is the way Java actually works, afaict. // Construct two insertion/deletion points in LinkedList myLinkedList. myIterator = myLinkedList.iterator(); for (...) { myIterator.next(); } start = myIterator.clone(); for (...) { myIterator.next(); } // Later... after = myLinkedList.spliceAfter(myIterator, someOtherLinkedList); // start, myIterator, and after are still all valid; thus, I can do this: // Removes everything I just spliced in, as well as some other stuff before that. myLinkedList.remove(start, after); // Now, myIterator is invalid, but not start, nor after. C++ has something like this for its list class (template). Only iterators pointing to moved elements become invalidated, not ALL iterators.

    Read the article

  • PHP Passing Data to a Specific Class? (Data Encapsulation)

    - by Adam184
    I've learned that OOP is all about data encapsulation, but what about passing data between classes that have nothing to do with each other (would the below example be worthy of using extends)? class Dog { private $secretVar; public function getSecretVar() { $this->secretVar = 'psst... only for rainbow!'; return $this->secretVar; } } class Rainbow { public function __construct(Dog $Dog) { print_r($Dog->getSecretVar()); } } $Dog = new Dog(); $Rainbow = new Rainbow($Dog); // ... classes that don't need the $secretVar How would you encapsulate $secretVar for only classes Dog and Rainbow? As of now, anyone can call getSecretVar(), and I'm having a hard time allowing that to happen as it seems to defeat the whole point of encapsulation.

    Read the article

  • understanding and implementing Boids

    - by alphablender
    So I'm working on porting Boids to Brightscript, based on the pseudocode here: http://www.kfish.org/boids/pseudocode.html I'm trying to understand the data structures involved, for example is Velocity a single value, or is it a 3D value, ie velocity={x,y,z} It seems as if the pseudocode seems to mix this up where sometimes it has an equation that incudes both vectors and single-value items: v1 = rule1(b) v2 = rule2(b) v3 = rule3(b) b.velocity = b.velocity + v1 + v2 + v3 If Velocity is a tripartite value then this would make sense, but I'm not sure. So my first question here is, is this the correct datastructure for a single boid based on the Pseudocode on that page: boid={position:{px:0,py:0,pz:0},velocity:{x:0,y:0,z:0},vector:{x:0,y:0,z:0},pc:{x:0,y:0,z:0},pv:{x:0,y:0,z:0}) where pc=perceived center, pv= perceived velocity I"ve implemented a vector_add, vector_sub, vector_div, and vector boolean functions. The reason I'm starting from this pseudocode is I've not been able to find anything else that is as readable, but it still leaves me with lots of questions as the data structures are not explicitly defined for each variable. (edit) here's a good example of what i'm talking about: IF |b.position - bJ.position| < 100 THEN if b.position - b[j].position are both 3D coordinates, how can they be considered "less than 100" unless they are < {100,100,100} ? Maybe that is what I need to do here, use a vector comparison function?

    Read the article

  • AngularJS Bind Attribute Presence

    - by Chuck
    I want to bind the presence of an attribute to a variable in AngularJS. Specifically, sandbox for an iframe. Say I have $myCtrl.allowJavascript as a variable, I want to do: <iframe src="..." sandbox /> Where the sandbox attribute is present when allowJavascript == false, and I want the sandbox attribute to disappear when allowJavascript == true. Does AngularJS have a mechanism for this? The closest thing I could find was here, which basically says "it will just work for certain attributes"--but not for sandbox.

    Read the article

  • java RSA Multiple Encryption

    - by user1763730
    I encrypt my message with a symmetric key and the symmetric key itself has to be further encrypted with different RSA public keys. When I tried to implement the above I got the following error: javax.crypto.IllegalBlockSizeException: The input was invalid: Invalid input length. at com.rsa.shareCrypto.j.hD.engineDoFinal(Unknown Source) at javax.crypto.Cipher.doFinal(Cipher.java:2087) at wrap1.main(wrap1.java:69) Is there a way to solve this problem ?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >