Search Results

Search found 142 results on 6 pages for 'river tam'.

Page 2/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Django ModelForm is giving me a validation error that doesn't make sense

    - by River Tam
    I've got a ModelForm based on a Picture. class Picture(models.Model): name = models.CharField(max_length=100) pub_date = models.DateTimeField('date published') tags = models.ManyToManyField('Tag', blank=True) content = models.ImageField(upload_to='instaton') def __unicode__(self): return self.name class PictureForm(forms.ModelForm): class Meta: model = Picture exclude = ('pub_date','tags') That's the model and the ModelForm, of course. def submit(request): if request.method == 'POST': # if the form has been submitted form = PictureForm(request.POST) if form.is_valid(): return HttpResponseRedirect('/django/instaton') else: form = PictureForm() # blank form return render_to_response('instaton/submit.html', {'form': form}, context_instance=RequestContext(request)) That's the view (which is being correctly linked to by urls.py) Right now, I do nothing when the form submits. I just check to make sure it's valid. If it is, I forward to the main page of the app. <form action="/django/instaton/submit/" method="post"> {% csrf_token %} {{ form.as_p }} <input type="submit" value"Submit" /> </form> And there's my template (in the correct location). When I try to actually fill out the form and just validate it, even if I do so correctly, it sends me back to the form and says "This field is required" between Name and Content. I assume it's referring to Content, but I'm not sure. What's my problem? Is there a better way to do this?

    Read the article

  • Creating a QuerySet based on a ManyToManyField in Django

    - by River Tam
    So I've got two classes; Picture and Tag that are as follows: class Tag(models.Model): pics = models.ManyToManyField('Picture', blank=True) name = models.CharField(max_length=30) # stuff omitted class Picture(models.Model): name = models.CharField(max_length=100) pub_date = models.DateTimeField('date published') tags = models.ManyToManyField('Tag', blank=True) content = models.ImageField(upload_to='instaton') #stuff omitted And what I'd like to do is get a queryset (for a ListView) given a tag name that contains the most recent X number of Pictures that are tagged as such. I've looked up very similar problems, but none of the responses make any sense to me at all. How would I go about creating this queryset?

    Read the article

  • (Unity)Getting a mirrored mesh from my data structure

    - by Steve
    Here's the background: I'm in the beginning stages of an RTS game in Unity. I have a procedurally generated terrain with a perlin-noise height map, as well as a function to generate a river. The problem is that the graphical creation of the map is taking the data structure of the map and rotating it by 180 degrees. I noticed this problem when i was creating my rivers. I would set the River's height to flat, and noticed that the actual tiles that were flat in the graphical representation were flipped and mirrored. Here's 3 screenshots of the map from different angles: http://imgur.com/a/VLHHq As you can see, if you flipped (graphically) the river by 180 degrees on the z axis, it would fit where the terrain is flattened. I have a suspicion it is being caused by a misunderstanding on my part of how vertices work. Alas, here is a snippet of the code that is used: This code here creates a new array of Tile objects, which hold the information for each tile, including its type, coordinate, height, and it's 4 vertices public DTileMap (int size_x, int size_y) { this.size_x = size_x; this.size_y = size_y; //Initialize Map_Data Array of Tile Objects map_data = new Tile[size_x, size_y]; for (int j = 0; j < size_y; j++) { for (int i = 0; i < size_x; i++) { map_data [i, j] = new Tile (); map_data[i,j].coordinate.x = (int)i; map_data[i,j].coordinate.y = (int)j; map_data[i,j].vertices[0] = new Vector3 (i * GTileMap.TileMap.tileSize, map_data[i,j].Height, -j * GTileMap.TileMap.tileSize); map_data[i,j].vertices[1] = new Vector3 ((i+1) * GTileMap.TileMap.tileSize, map_data[i,j].Height, -(j) * GTileMap.TileMap.tileSize); map_data[i,j].vertices[2] = new Vector3 (i * GTileMap.TileMap.tileSize, map_data[i,j].Height, -(j-1) * GTileMap.TileMap.tileSize); map_data[i,j].vertices[3] = new Vector3 ((i+1) * GTileMap.TileMap.tileSize, map_data[i,j].Height, -(j-1) * GTileMap.TileMap.tileSize); } } This code sets the river tiles to height 0 foreach (Tile t in map_data) { if (t.realType == "Water") { t.vertices[0].y = 0f; t.vertices[1].y = 0f; t.vertices[2].y = 0f; t.vertices[3].y = 0f; } } And below is the code to generate the actual graphics from the data: public void BuildMesh () { DTileMap.DTileMap map = new DTileMap.DTileMap (size_x, size_z); int numTiles = size_x * size_z; int numTris = numTiles * 2; int vsize_x = size_x + 1; int vsize_z = size_z + 1; int numVerts = vsize_x * vsize_z; // Generate the mesh data Vector3[] vertices = new Vector3[ numVerts ]; Vector3[] normals = new Vector3[numVerts]; Vector2[] uv = new Vector2[numVerts]; int[] triangles = new int[ numTris * 3 ]; int x, z; for (z=0; z < vsize_z; z++) { for (x=0; x < vsize_x; x++) { normals [z * vsize_x + x] = Vector3.up; uv [z * vsize_x + x] = new Vector2 ((float)x / size_x, 1f - (float)z / size_z); } } for (z=0; z < vsize_z; z+=1) { for (x=0; x < vsize_x; x+=1) { if (x == vsize_x - 1 && z == vsize_z - 1) { vertices [z * vsize_x + x] = DTileMap.DTileMap.map_data [x - 1, z - 1].vertices [3]; } else if (z == vsize_z - 1) { vertices [z * vsize_x + x] = DTileMap.DTileMap.map_data [x, z - 1].vertices [2]; } else if (x == vsize_x - 1) { vertices [z * vsize_x + x] = DTileMap.DTileMap.map_data [x - 1, z].vertices [1]; } else { vertices [z * vsize_x + x] = DTileMap.DTileMap.map_data [x, z].vertices [0]; vertices [z * vsize_x + x+1] = DTileMap.DTileMap.map_data [x, z].vertices [1]; vertices [(z+1) * vsize_x + x] = DTileMap.DTileMap.map_data [x, z].vertices [2]; vertices [(z+1) * vsize_x + x+1] = DTileMap.DTileMap.map_data [x, z].vertices [3]; } } } } for (z=0; z < size_z; z++) { for (x=0; x < size_x; x++) { int squareIndex = z * size_x + x; int triOffset = squareIndex * 6; triangles [triOffset + 0] = z * vsize_x + x + 0; triangles [triOffset + 2] = z * vsize_x + x + vsize_x + 0; triangles [triOffset + 1] = z * vsize_x + x + vsize_x + 1; triangles [triOffset + 3] = z * vsize_x + x + 0; triangles [triOffset + 5] = z * vsize_x + x + vsize_x + 1; triangles [triOffset + 4] = z * vsize_x + x + 1; } } // Create a new Mesh and populate with the data Mesh mesh = new Mesh (); mesh.vertices = vertices; mesh.triangles = triangles; mesh.normals = normals; mesh.uv = uv; // Assign our mesh to our filter/renderer/collider MeshFilter mesh_filter = GetComponent<MeshFilter> (); MeshCollider mesh_collider = GetComponent<MeshCollider> (); mesh_filter.mesh = mesh; mesh_collider.sharedMesh = mesh; calculateMeshTangents (mesh); BuildTexture (map); } If this looks familiar to you, its because i got most of it from Quill18. I've been slowly adapting it for my uses. And please include any suggestions you have for my code. I'm still in the very early prototyping stage.

    Read the article

  • Getting a mirrored mesh from my data structure

    - by Steve
    Here's the background: I'm in the beginning stages of an RTS game in Unity. I have a procedurally generated terrain with a perlin-noise height map, as well as a function to generate a river. The problem is that the graphical creation of the map is taking the data structure of the map and rotating it by 180 degrees. I noticed this problem when I was creating my rivers. I would set the River's height to flat, and noticed that the actual tiles that were flat in the graphical representation were flipped and mirrored. Here's 3 screenshots of the map from different angles: http://imgur.com/a/VLHHq As you can see, if you flipped (graphically) the river by 180 degrees on the z axis, it would fit where the terrain is flattened. I have a suspicion it is being caused by a misunderstanding on my part of how vertices work. Alas, here is a snippet of the code that is used: This code here creates a new array of Tile objects, which hold the information for each tile, including its type, coordinate, height, and it's 4 vertices public DTileMap (int size_x, int size_y) { this.size_x = size_x; this.size_y = size_y; //Initialize Map_Data Array of Tile Objects map_data = new Tile[size_x, size_y]; for (int j = 0; j < size_y; j++) { for (int i = 0; i < size_x; i++) { map_data [i, j] = new Tile (); map_data[i,j].coordinate.x = (int)i; map_data[i,j].coordinate.y = (int)j; map_data[i,j].vertices[0] = new Vector3 (i * GTileMap.TileMap.tileSize, map_data[i,j].Height, -j * GTileMap.TileMap.tileSize); map_data[i,j].vertices[1] = new Vector3 ((i+1) * GTileMap.TileMap.tileSize, map_data[i,j].Height, -(j) * GTileMap.TileMap.tileSize); map_data[i,j].vertices[2] = new Vector3 (i * GTileMap.TileMap.tileSize, map_data[i,j].Height, -(j-1) * GTileMap.TileMap.tileSize); map_data[i,j].vertices[3] = new Vector3 ((i+1) * GTileMap.TileMap.tileSize, map_data[i,j].Height, -(j-1) * GTileMap.TileMap.tileSize); } } This code sets the river tiles to height 0 foreach (Tile t in map_data) { if (t.realType == "Water") { t.vertices[0].y = 0f; t.vertices[1].y = 0f; t.vertices[2].y = 0f; t.vertices[3].y = 0f; } } And below is the code to generate the actual graphics from the data: public void BuildMesh () { DTileMap.DTileMap map = new DTileMap.DTileMap (size_x, size_z); int numTiles = size_x * size_z; int numTris = numTiles * 2; int vsize_x = size_x + 1; int vsize_z = size_z + 1; int numVerts = vsize_x * vsize_z; // Generate the mesh data Vector3[] vertices = new Vector3[ numVerts ]; Vector3[] normals = new Vector3[numVerts]; Vector2[] uv = new Vector2[numVerts]; int[] triangles = new int[ numTris * 3 ]; int x, z; for (z=0; z < vsize_z; z++) { for (x=0; x < vsize_x; x++) { normals [z * vsize_x + x] = Vector3.up; uv [z * vsize_x + x] = new Vector2 ((float)x / size_x, 1f - (float)z / size_z); } } for (z=0; z < vsize_z; z+=1) { for (x=0; x < vsize_x; x+=1) { if (x == vsize_x - 1 && z == vsize_z - 1) { vertices [z * vsize_x + x] = DTileMap.DTileMap.map_data [x - 1, z - 1].vertices [3]; } else if (z == vsize_z - 1) { vertices [z * vsize_x + x] = DTileMap.DTileMap.map_data [x, z - 1].vertices [2]; } else if (x == vsize_x - 1) { vertices [z * vsize_x + x] = DTileMap.DTileMap.map_data [x - 1, z].vertices [1]; } else { vertices [z * vsize_x + x] = DTileMap.DTileMap.map_data [x, z].vertices [0]; vertices [z * vsize_x + x+1] = DTileMap.DTileMap.map_data [x, z].vertices [1]; vertices [(z+1) * vsize_x + x] = DTileMap.DTileMap.map_data [x, z].vertices [2]; vertices [(z+1) * vsize_x + x+1] = DTileMap.DTileMap.map_data [x, z].vertices [3]; } } } } for (z=0; z < size_z; z++) { for (x=0; x < size_x; x++) { int squareIndex = z * size_x + x; int triOffset = squareIndex * 6; triangles [triOffset + 0] = z * vsize_x + x + 0; triangles [triOffset + 2] = z * vsize_x + x + vsize_x + 0; triangles [triOffset + 1] = z * vsize_x + x + vsize_x + 1; triangles [triOffset + 3] = z * vsize_x + x + 0; triangles [triOffset + 5] = z * vsize_x + x + vsize_x + 1; triangles [triOffset + 4] = z * vsize_x + x + 1; } } // Create a new Mesh and populate with the data Mesh mesh = new Mesh (); mesh.vertices = vertices; mesh.triangles = triangles; mesh.normals = normals; mesh.uv = uv; // Assign our mesh to our filter/renderer/collider MeshFilter mesh_filter = GetComponent<MeshFilter> (); MeshCollider mesh_collider = GetComponent<MeshCollider> (); mesh_filter.mesh = mesh; mesh_collider.sharedMesh = mesh; calculateMeshTangents (mesh); BuildTexture (map); } If this looks familiar to you, its because i got most of it from Quill18. I've been slowly adapting it for my uses. And please include any suggestions you have for my code. I'm still in the very early prototyping stage.

    Read the article

  • Amazon EC2 - HTTPS - Certificate body is invalid. The body must not contain a private key

    - by Tam Minh
    I'm very new to Amazon EC2. I am trying to setup https for my website, I follow the offical instruction from amazon doc: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https.html When I Upload a Signed Certificate using AWS command aws iam upload-server-certificate --server-certificate-name dichcumga --certificate-body file://mycert.pem --private-key file://signedkey.pem --certificate-chain file://mychain.pem And I got error A client error (MalformedCertificate) occurred when calling the UploadServerCert ificate operation: Certificate body is invalid. The body must not contain a private key. mycert.pem is a combination of private.pem and signedkey.pem (which return by VeriSign) copy private.pem+signedkey.pem mycert.pem Please help to shed a light. Thank you in advance.

    Read the article

  • Upload a Signed Certificate to Amazon EC2

    - by Tam Minh
    I'm very new to Amazon EC2. I am trying to setup https for my website, I follow the offical instruction from amazon doc: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https.html And I get stuck at Upload the Signed Certificate step aws iam upload-server-certificate --server-certificate-name <certificate_object_name> --certificate-body <public_key_certificate_file> --private-key <privatekey.pem> --certificate-chain <certificate_chain_file> As a instruction, I just create a private key (privatekey.pem) and A Certificate Signing Request (csr.pem), but in the command line they request 4 params 1. certificate_object_name 2. public_key_certificate_file 3. *private-key --> I only have this one* 4. certificate_chain_file I don't know where to get 3 remain params, please help to shed a light. Thank you in advance.

    Read the article

  • Computer does not boot, often

    - by tam
    I've ran into a issue with my computer that it does no longer reach POST, but simply powers on for a fraction of a second and powers off. But this is not always, some times it boots just normally and it works as it should, no issues with not enough power or anything. But as soon as I turn it of, I can not turn it back on, but then again at some random point it just powers up again, and resumes normal operation. If I disconnect the 8pin ATX connector from the motherboard, it powers up, fans and disks spinning normally until I power it off again. So this problem only happens when ATX is connected, which seems odd, I normally always saw this kind of an error if ATX was not connected, but here it's the exact opposite. It also does not emit any sound on the buzzer, except the normal beep, when it powers up normally. I have already tried: Remove graphics card Remove one and/or all RAM sticks Disconnect everything non-essential, even hard drives Clear CMOS I have not yet tried to remove all components and tried to boot everything outside of the case, because I did not have the time to disassemble and bleed the water loop. However, I can confirm that nothing is stuck underneath the motherboard, not is any of those brass raisers touching the board where it should not. Specs: Gigabyte GA-970A-UD3 AMD FX6300 ATI HD7850 I think this should be enough for this issue.

    Read the article

  • Wireless internet became extremely slow on my 27" IMac

    - by Tam
    The wireless internet on my Mac became extremely slow recently on my 27" IMac. I don't recall doing anything different other than doing the Apple Software updates which I let it pop up and install automatically. On my Mac Book internet is still fine so I don't think it's the model or the router. I'm not sure where to start digging the cause of this or how to solve it. Looking into the System Preferences on my IMac, it's pretty identical to my MacBook!

    Read the article

  • Dell laptop keyboard doesn't work

    - by Tam
    I'm trying to fix my in-laws laptop, it's a Dell Studio 1745 that's running Windows 7 64 bit. The problem is that most of the keys on the keyboard do not work. The function keys work and the caps lock and numpad keys work, but no other keys do. If I hit the F2 key enough times when starting up, I can get to the BIOS, but after that even the function keys stop working. If I let it go all the way to the Windows login screen, I can see that the caps lock and num lock work - little images on screen actually appear, but they don't toggle the state of the key, i.e.,capslock is always off, numlock is always off. Using the fn+function combo works, so changing the brightness, etc. works fine. I'm stumped. I've tried disconnecting power and battery and leaving it for an hour or so before starting up but that hasn't helped either. Also - this might be a red herring - the touchpad is failing as well, the MS Device Manager says that it's failing with status 10, "unable to start device"

    Read the article

  • Split a string by comma, quote and full-stop.. with a few exceptions

    - by dunc
    I've got a lot of text, similar to the following paragraph, which I'd like to split into words without punctuation (', ", ,, ., newline etc).. with a few exceptions. Initially considered endemic to the Chalakudy River system in Kerala state, southern India, but now recognised to have a wider distribution in surrounding drainages including the Periyar, Manimala, and Pamba river though the Manimala data may be questionable given it seems to be the type locality of P. denisonii. In the Achankovil River basin it occurs sympatrically, and sometimes syntopically, with P. denisonii. Wild stocks may have dwindled by as much as 50% in the last 15 years or so with collection for the aquarium trade largely held responsible although habitats are also being degraded by pollution from agricultural and domestic sources, plus destructive fishing methods involving explosives or organic toxins. The text refers to P. denisonii which is a species of fish. It's an abbreviation of Genus species. I would like this reference to be one word. So, for instance, this is the kind of array I'd like to see: Array ( ... [44] given [45] it [46] seems [47] to [48] be [49] the [50] type [51] locality [52] of [53] P. denisonii [54] In [55] the ... ) The only things that distinguish these species references such as P. denisonii from a new sentence like end. New are: The P (for Puntius, as in the P. in the aforementioned example) is only ever one letter, always a capital the d (as in . denisonii) is always either a lower case letter or an apostrophe (') What regexp can I use with preg_split to give me such an array? I've tried a simple explode( " ", $array ) but it doesn't do the job at all. Thanks in advance,

    Read the article

  • What is the program "Additional Drivers" (jockey-gtk) talking me about?

    - by Robert Vila
    The program says: "No proprietary drivers are in use on this system" But it doesn't say if it is talking about graphical drivers only or what. Then, it lists two drivers: NVIDIA accelerated graphics driver (version 173). NVIDIA accelerated graphics driver (version current) [recomended] Both have exactly the same description. What is the difference then? When I select the 1st one, it says: "This river is not activated",and there's a button to "activate" it. When I select the 2nd one, it says: "This river is activated but it is not currently in use", and the button is to "remove". So which one is in use? Why or what for should I have activated (enabled) and not in use? If it is in use it is activated? What is the difference between activate and remove? and what is the relationship between installed, activated, in use, enabled and removed, disabled, inactive and not-installed? Why can I activate the inactivated and remove (but not deactivate) the activated that is not in use? All this is very puzzling... What other drivers can I use for an Apple MacBook pro 3,1 and how? I see that there's a nouveau and I heard that there was going to be a new open source even better. > -display > description: VGA compatible controller > product: G84 [GeForce 8600M GT] > vendor: nVidia Corporation

    Read the article

  • Issue with Date validation from actionscript Flex 4

    - by Tam
    I have a DateValidator as follows: <mx:DateValidator id="stringDateValidator" property="text" required="true" inputFormat="dd-mm-yyyy" allowedFormatChars="*#~/-" /> I would like to call the validator manually from actionscript: var valErrEvent:ValidationResultEvent = stringDateValidator.validate(wholeDate); if(valErrEvent.results.length > 0){ ...... But I'm getting the following exception: ReferenceError: Error #1069: Property month not found on spark.components.TextInput and there is no default value. at mx.validators::DateValidator$/validateDate()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\validators\DateValidator.as:203] at mx.validators::DateValidator/doValidation()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\validators\DateValidator.as:1404] at mx.validators::Validator/processValidation()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\validators\Validator.as:1012] at mx.validators::Validator/validate()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\validators\Validator.as:945] if I let the validator triggers automatically it works. You know how I can make that work? or do you have better ideas for validating dates using ActionScript instead of using the MX Validator.

    Read the article

  • Exception with RubyAMF and Ruby 1.9 although code works

    - by Tam
    I'm getting an exception with RubyAMF using Ruby 1.9 and Rails 2.3.5. Although code afterward executes normally I'm not very comfortable with seeing such exception in the log file. Do you know what is causing it: >>>>>>>> RubyAMF >>>>>>>>> #<RubyAMF::Actions::PrepareAction:0x0000010139ff48> took: 0.00020 secs >>>>>>>> RubyAMF >>>>>>>>> #<RubyAMF::Actions::RailsInvokeAction:0x0000010139ff10> took: 0.29973 secs You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.include? /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:142:in `create_time_zone_conversion_attribute?' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:75:in `block in define_attribute_methods' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:71:in `each' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:71:in `define_attribute_methods' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:242:in `method_missing' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activerecord-2.3.5/lib/active_record/base.rb:2832:in `hash' /Users/tammam56/lal/vendor/plugins/ruby_amf/io/amf_serializer.rb:366:in `hash' /Users/tammam56/lal/vendor/plugins/ruby_amf/io/amf_serializer.rb:366:in `hash' /Users/tammam56/lal/vendor/plugins/ruby_amf/io/amf_serializer.rb:366:in `[]=' /Users/tammam56/lal/vendor/plugins/ruby_amf/io/amf_serializer.rb:366:in `store_object' /Users/tammam56/lal/vendor/plugins/ruby_amf/io/amf_serializer.rb:234:in `write_amf3_object' /Users/tammam56/lal/vendor/plugins/ruby_amf/io/amf_serializer.rb:154:in `write_amf3' /Users/tammam56/lal/vendor/plugins/ruby_amf/io/amf_serializer.rb:78:in `write' /Users/tammam56/lal/vendor/plugins/ruby_amf/io/amf_serializer.rb:70:in `block in run' /Users/tammam56/lal/vendor/plugins/ruby_amf/io/amf_serializer.rb:56:in `upto' /Users/tammam56/lal/vendor/plugins/ruby_amf/io/amf_serializer.rb:56:in `run' /Users/tammam56/lal/vendor/plugins/ruby_amf/app/filters.rb:91:in `block in run' /Users/tammam56/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/benchmark.rb:309:in `realtime' /Users/tammam56/lal/vendor/plugins/ruby_amf/app/filters.rb:91:in `run' /Users/tammam56/lal/vendor/plugins/ruby_amf/app/filters.rb:12:in `block in run' /Users/tammam56/lal/vendor/plugins/ruby_amf/app/filters.rb:11:in `each' /Users/tammam56/lal/vendor/plugins/ruby_amf/app/filters.rb:11:in `run' /Users/tammam56/lal/vendor/plugins/ruby_amf/app/rails_gateway.rb:28:in `service' /Users/tammam56/lal/app/controllers/rubyamf_controller.rb:19:in `gateway' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/base.rb:1331:in `perform_action' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/filters.rb:617:in `call_filters' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/filters.rb:610:in `perform_action_with_filters' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `block in perform_action_with_benchmark' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `block in ms' /Users/tammam56/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/benchmark.rb:309:in `realtime' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/rescue.rb:160:in `perform_action_with_rescue' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/flash.rb:146:in `perform_action_with_flash' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `process' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/filters.rb:606:in `process_with_filters' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/base.rb:391:in `process' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/base.rb:386:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:437:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:87:in `dispatch' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:121:in `_call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:130:in `block in build_middleware_stack' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in `block in call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:9:in `cache' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:28:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.0.1/lib/rack/head.rb:9:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:15:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/session/cookie_store.rb:93:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.0.1/lib/rack/lock.rb:11:in `block in call' <internal:prelude>:8:in `synchronize' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:114:in `block in call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/reloader.rb:34:in `run' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:108:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `block in call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:17:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.0.1/lib/rack/chunked.rb:15:in `call' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:64:in `process' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `block in process_client' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client' /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `block (2 levels) in run '

    Read the article

  • Having trouble with binding

    - by Tam
    I'm not sure if I'm misunderstanding the binding in Flex. I'm using Cairngorm framework. I have the following component with code like: [Bindable] var _model:LalModelLocator = LalModelLocator.getInstance(); .... <s:DataGroup dataProvider="{_model.friendsSearchResults}" includeIn="find" itemRenderer="com.lal.renderers.SingleFriendDisplayRenderer"> <s:layout> <s:TileLayout orientation="columns" requestedColumnCount="2" /> </s:layout> </s:DataGroup> in the model locator: [Bindable] public var friendsSearchResults:ArrayCollection = new ArrayCollection(); Inside the item renderer there is a button that calls a command and inside the command results there is a line like this: model.friendsSearchResults = friendsSearchResults; Putting break points and stepping through the code I confirmed that this like gets called and the friendsSearchResults gets updated. To my understanding if I update a bindable variable it should automatically re-render the s:DataGroup which has a dataProvider of that variable.

    Read the article

  • joining tables while keeping the Null values

    - by Tam
    I have two tables: Users: ID, first_name, last_name Networks: user_id, friend_id, status I want to select all values from the users table but I want to display the status of specific user (say with id=2) while keeping the other ones as NULL. For instance: If I have users: 1 John Smith 2 Tom Summers 3 Amy Wilson And in networks: user_id friend_id status 2 1 friends I want to do search for John Smith for all other users so I want to get: id first_name last_name status 2 Tom Summers friends 3 Amy Wilson NULL I tried doing LEFT JOIN and then WHERE statement but it didn't work because it excluded the rows that have relations with other users but not this user. I can do this using UNION statement but I was wondering if it's at all possible to do it without UNION.

    Read the article

  • Is it easy to switch from relational to non-relational databases with Rails?

    - by Tam
    Good day, I have been using Rails/Mysql for the past while but I have been hearing about Cassandra, MongoDB, CouchDB and other document-store DB/Non-relational databases. I'm planning to explore them later as they might be better alternative for scalability. I'm planning to start an application soon. Will it make a different with Rails design if I move from relational to non-relational database? I know Rails migrations are database-agnostic but wasn't sure if moving to non-relational will make difference with design or not.

    Read the article

  • How to copy x and y coordinate from one Flex component to another

    - by Tam
    Hi, I would like to base one component's x and y cooridnates according to another, I tried using the binding notation but it doesn't seem to work! <?xml version="1.0" encoding="utf-8"?> <s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:vld ="com.lal.validators.*" xmlns:effect="com.lal.effects.*" xmlns:components="com.lal.components.*" width="400" height="100%" right="0" horizontalAlign="right" verticalCenter="0"> ...... <s:VGroup width="125" height="100%" horizontalAlign="right" gap="0" width.normal="153" x.normal="247" width.expanded="199" x.expanded="201"> ...... <s:Panel includeIn="expanded" id="buttonsGroup" mouseOut="changeStateToNormal();" mouseOver="stopChangeToNormal();" skinClass="com.lal.skins.TitlelessPanel" title="hi" right="0" width="125" height="700" > ..... <s:Label text="Jump To Date" paddingTop="20" /> <s:TextInput id="wholeDate" width="100" mouseOver="stopChangeToNormal();" click="date1.visible = true" focusOut="date1.visible = false"/> ... </s:Panel> </s:VGroup> <mx:DateChooser id="date1" change="useDate(event); this.visible = false; " visible="false" mouseOver="stopChangeToNormal();" y="{wholeDate.y}" x="{wholeDate.x}" /> </s:VGroup>

    Read the article

  • How to make mysql accept connections externally

    - by Tam
    I have a VPS and I want to make mysql DB accept connection externally (from my PC for instance). I have Debian Linux installed on the server. I checked some tutorials online and they said to comment out: bind-address = 127.0.0.1 But this didn't seem to help! is there anything specific for VPSs? or Am I missing something else? The command that runs mysql is: /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock

    Read the article

  • Can I send a file to Flex using RubyAMF?

    - by Tam
    I'm generating a PNG file in Flex from graphics drawn by user. I would like to send the file to Ruby on Rails backend and I'm using RubyAMF in other parts of the application. I found ways to upload the file using FileReference which uses HTTP but I prefer to send using RubyAMF ,if possible, as it's more efficient. If this is possible what is your suggested method?

    Read the article

  • Emulate clicking a link with Javascript that works with IE

    - by Tam
    I want to have java script clicking a link on the page..I found something on the net that suggests adding a function like this: function fireEvent(obj,evt){ var fireOnThis = obj; if( document.createEvent ) { var evObj = document.createEvent('MouseEvents'); evObj.initEvent( evt, true, false ); fireOnThis.dispatchEvent(evObj); } else if( document.createEventObject ) { fireOnThis.fireEvent('on'+evt); } } Then call it using: fireEvent(document.getElementById('edit_client_link'),'click'); This seems to work fine for FF but with IE it doesn't work! Any ideas?

    Read the article

  • Flash Builder 4 is suggesting mx1 instead of mx! why?

    - by Tam
    I just bought and installed the Flash Builder 4 after having the Beta for a while. The same code is giving me compile-time errors and suggests using mx1 instead of mx! If I make it mx1 the compile error goes away. Here is the top of my component. <s:SkinnableContainer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" I mentioned nothing about mx1.

    Read the article

  • Setting default_scope according to some criteria

    - by Tam
    I'm trying to set default scope according to some criteria determined by ana ActionController before_filter. In controller: before_filter :authorize ... def authorize if some_condition @default_scope_conditions = something elsif another_condition @default_scope_conditions = something_else end end Inside the ActiveRecord default_scope :conditions => @default_scope_conditions But it doesn't seem to work, the before filter gets called but the default_scope doesn't get set. Could you please advise me what I'm doing wrong and how to fix it or suggest me some other way of achieving that.

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >