Search Results

Search found 671 results on 27 pages for 'justin meltzer'.

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

  • VBA for Access 2003 - DDL help with creating access file: setting the Autonumber data type

    - by Justin
    So I have the below VB that creates an access file in the default workspace, creates a table, create some fields in that table...just need to know the syntax for setting the first data type/field to autonumber...GUID, Counter, etc will not work as in Access SQL ' error handling usually goes here dim ws as workspace dim dbExample as database dim tblMain as TableDef dim fldMain as Field dim idxMain as Index set ws = workspace(0) set dbExample = ws.CreateDatabase('string file path') set tblMain = dbExample.CreateTableDef("tblMain") set fldMain = tblMain.CreateField("ID", 'right here I do not know what to substitute for dbInteger to get the autonumber type to work ) tblMain.Fields.Append fldMain etc to create other fields and indexes so in this line: set fldMain = tblMain.CreateField("ID", dbInteger) i need to replace the dbInteger with something that VB reconizes as the autonumber property. i have tried GUID, Counter, Autonumber, AutoIncrement....unfortunately none of these work anyone know the syntax I am missing here? Thanks, Justin

    Read the article

  • ASP.NET MVC 2 Areas 404

    - by Justin
    Hey, Has anyone been able to get the Areas in ASP.NET MVC 2 to work? I created a new Area called "Secure" and placed a new controller in it named HomeController. I then Created a new Home/Index.aspx view. However, when I browse to http://localhost/myapp/Secure/ it gives a 404 resource cannot be found. http://localhost/myapp/Secure/Home gives the same error. My area registration looks like this: public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Secure_default", "Secure/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional } ); } I also tried this: public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Secure_default", "Secure/{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); } Thanks, Justin

    Read the article

  • How to use exe in SharePoint on itemAdded?

    - by Justin Cullen
    I have a need to convert any document gets uploaded to Image. I downloaded the exe (with all the dlls) on my local machine (dont have to install) export.exe sourcefile.doc destinationfile.gif this syntax works from my local dos prompt. How do I use the same syntax "export.exe exampledoc.doc exampledoc.gif" when an item is added to sharepoint doc library. and Do I need to put the folder (where the exe and dlls are for this) in the sharepoint frontend server so it's accessible? If yes, where should this folder reside? Does the folder and files need sharepoint service account access? I am totally new and I would really like if someone can shed some light on this (step by step if possible)? Thanks Justin...

    Read the article

  • Ruby on Rails: strange voting increment behavior

    - by Justin Meltzer
    So I have an up and a downvote button that inserts a vote with a value of 1 or -1 into the database. This works correctly. Then, I display the total vote count for that element by summing up its votes' values. However, this isn't working correctly, because the vote sum display is acting really strange: The first vote on a video doesn't seem to increment it at all. Then the second vote does. If I go from an upvote to a downvote, it increments up once, and then the next downvote is down. This is difficult to explain, but maybe you can figure out what is wrong with my code. I have this function in my Video model (the element that is voted on, it has_many video_votes): def vote_sum read_attribute(:vote_sum) || video_votes.sum(:value) end I also have this in my VideoVote model: after_create :update_vote_sum private def update_vote_sum video.update_attributes(:vote_sum => video.vote_sum + value) end What am I doing wrong?

    Read the article

  • CSS 100% Height, and then Scroll DIV not page

    - by Justin
    Okay so I haven't been able to find a question with an answer yet, so I decided to make my own. I am trying to create a 100% fluid layout, which technically I have done. http://stickystudios.ca/sandbox/stickyplanner/layout/index2.php BUT, what I want it to now do, is make the page 100% in HEIGHT... But I don't want the page to scroll I want the inner DIV to scroll. So I believe in short I want it to detect the height of the viewport screen, go 100%, and then IF content is longer then the screen, scroll the specific DIV, NOT the page. I hope this makes sense. Thanks in advance. Justin

    Read the article

  • MonoRail - Select parent category from one dropdown, show child category dropdown

    - by Justin
    Hey, I'm new to MonoRail and am trying to figure out how to have it so that I can select a parent category in a dropdown then have it show a second dropdown with the categories that are children of the parent. If I were using what I'm used to, ASP.NET MVC, I would have a javascript function that would be called onchange of the first dropdown and would make an ajax call to a controller method (passing in the selected parent category id) that would grab all child categories of that parent category and return them in JSON. Then in the callback javascript function I would eval the JSON and populate the second dropdown with the child categories. How would I do this using MonoRail/jQuery? Here's the code I have so far: $FormHelper.Select("business.category.id", $categories, "%{value='id', text='name', firstoption='Select a Category'}") $FormHelper.Select("business.category.id", $childCategories, "%{value='id', text='name', firstoption='Select a Sub-Category'}") Then in BusinessController.cs: private void AddDataToModels() { PropertyBag["categories"] = CategoryRepository.GetParentCategories(); PropertyBag["childCategories"] = CategoryRepository.GetChildCategories(1); } Thanks for any input on how to approach this! Justin

    Read the article

  • EJB3 Caching Instance Variables

    - by Justin
    Hi, I've noticed some strange code on a project I am working on - its a SLSB EJB3, and it uses a private instance variable to maintain a cache of data (it even calls it dataCache or something), with a getter/setter. For EJB2 and bellow, this was a typical EJB antipattern - SLSBs are not meant to retain state in between invocations, theres no guarantee you'll see the same data on a subsequent invocation. One of my colleagues said maybe its ok in EJB3 (we don't have much EJB3 experience), but still, its a Stateless Session Bean - why is it trying to maintain state, this doesn't make sense. Can anyone confirm if this is still a bad idea in EJB3 land, or if somehow it is ok? Thanks if you can help, Justin

    Read the article

  • Why doesn't this Ruby on Rails code work as I intend it to?

    - by Justin Meltzer
    So I attempted to build what I asked about in this question: Fix voting mechanism However, this solution doesn't work. A user can still vote however many times he or she wants. How could I fix this and/or refactor? def create @video = Video.find(params[:video_id]) @vote = @video.video_votes.new @vote.user = current_user if params[:type] == "up" @vote.value = 1 else @vote.value = -1 end if @previous_vote.nil? if @vote.save respond_to do |format| format.html { redirect_to @video } format.js end else respond_to do |format| format.html { redirect_to @video } format.js {render 'fail_create.js.erb'} end end elsif @previous_vote.value == params[:type] @previous_vote.destroy else @previous_vote.destroy if @vote.save respond_to do |format| format.html { redirect_to @video } format.js end else respond_to do |format| format.html { redirect_to @video } format.js {render 'fail_create.js.erb'} end end end @previous_vote = VideoVote.where(:video_id => params[:video_id], :user_id => current_user.id).first end

    Read the article

  • Access 2007 & 2003 : Creating an mde for 2003 users with a 2007 dev copy issues

    - by Justin
    So i have an image on my computer that has office 2007, and I have the development copy of this database file where I corrected some code, added some fields, etc... I then converted the Access file (.mdb dev file) to Access 2002-2003 format to create an mde. So I then created the new mde, but when users try to open, it gives them the message that it is not the correct format and that they should upgrade to a newer version of access. So will i be able to get this done with having office 2007, and these other end users not having their new image pushed yet (so they still have office 2003)? I thought that if I converted the file to 2002-2003 then this should not be a problem Thanks Justin

    Read the article

  • Access 2007 VBA : Building a listbox with selection choices from another list box

    - by Justin
    So there are 8 categories that may be associated to each order, but not necessarily all of them. So i was going to build a list box that allowed the user to double click each of the category they wish to associate when they have an "Order Detail" form opened up (unbound form that has hidden text boxes with all needed ID numbers). I want to have another empty text box right beside it that will allow me to append the selections (up to 8) so the user can see that they have been added. So one list box with the default choices, and when a choice is double clicked, it adds that choice to the second list box to see the tally so to speak. What is the VB for getting something like this done? Thanks Justin

    Read the article

  • ACCESS VBA - DAO in VB - problem with creating relations

    - by Justin
    So take the following example: Sub CreateRelation() Dim db As Database Dim rel As Relation Dim fld As Field Set db = CurrentDb Set rel = db.CreateRelation("OrderID", "Orders", "Products") 'refrential integrity rel.Attributes = dbRelationUpdateCascade 'specify the key in the referenced table Set fld = rel.CreateField("OrderID") fld.ForeignName = "OrderID" rel.Fields.Append fld db.Relations.Append rel End Sub I keep getting the error, No unique index found for the referenced field of the primary table. if i include the vb before this sub to create in index on the field, it gives me the error: Index already exists. so i am trying to figure this out. if there are not any primary keys set, will that cause this not to work? i am confused by this, but i really really want to figure this out. So orderID is a FOREIGN KEY in the Products Table please help thanks justin

    Read the article

  • CruiseControl.rb: Error in plugin EmailNotifier: 501 5.1.7 Bad sender address syntax?

    - by Justin
    Hi guys, I can't seem to figure this out. I setup my email address in cruisecontrol.rb but no matter how I set it, it always gives me this error. Current settings are: project/cruise_config.rb: project.email_notifier.emails = ['[email protected]'] project.email_notifier.from = '[email protected]' site_config.rb: ActionMailer::Base.smtp_settings = { :address => "localhost", :domain => "myemail.com", } I've even tried ActionMailer::Base.delivery_method = :sendmail Configuration.email_from = '[email protected]' Any thoughts as to why my cruisecontrol can't send an e-mail? Thanks! Justin

    Read the article

  • Rolling back database changes

    - by justin
    Hi, I work in team which uses Work flow management tool. I was presented with a challenge where the user should be able to roll back the changes made anytime during the flow to a certain point in the past. Surely the toll can handle it but the additional database calls that may have made during these activities have to be manually rolled back. the challenge is that there are multiple parallel paths and there different permutations of external database calls. So is there a frame work or a way to keep track of these DB calls and rollback them?. thank you, Justin

    Read the article

  • Saving elements to database with $.ajax()

    - by Justin Meltzer
    I'm trying to save dynamically created elements in my application.js file to the database. Would the code look something like this?: $.ajax({ type: "POST", data: { title: 'oembed.title', thumbnail_url: 'oembed.thumbnail_url'} }); Is there anything I'm missing? Assume that oembed.title and oembed.thubnail_url hold the values I want to save, and that title and thumbnail are the database columns.

    Read the article

  • Supervising multiple gen_servers with same module / different arguments

    - by Justin
    Hi, I have a OTP application comprising a single supervisor supervising a small number of gen_servers. A typical child specification is as follows: {my_server, {my_server, start_link, [123]}, permanent, 5000, worker, [my_server]} No problems so far. I now want to an add extra gen_server to the supervisor structure, using the same module Module/Fn as above, but different arguments, eg {my_server_2, {my_server, start_link, [123]}, permanent, 5000, worker, [my_server_2]} I thought this would work, but no: =SUPERVISOR REPORT==== 15-Apr-2010::16:50:13 === Supervisor: {local,my_sup} Context: start_error Reason: {already_started,<0.179.0>} Offender: [{pid,undefined}, {name,my_server_2}, {mfa,{my_server,start_link,[]}}, {restart_type,permanent}, {shutdown,5000}, {child_type,worker}] Do the module arguments in the second element of each child specification need to be different ? Thanks, Justin

    Read the article

  • MonoRail - Server-side vs. Client-side Form Validation

    - by Justin
    Hey, I'm using MonoRail and was wondering how it decides when to use client-side vs. server-side validation? In my model class I have [ValidateNonEmpty] on two properties, one is a textbox, the other is a dropdown. The textbox triggers client-side validation on form submission, if I leave the dropdown empty though it posts back to the server and returns back the validation error from server-side. Is there a way to get the dropdown to trigger client-side validation? Also it's odd because after the postback, it clears what I had entered in the dropdown but maintains the state of the textbox (viewstate anyone??) Thanks, Justin

    Read the article

  • MonoRail - Clearing value on edit form submission doesn't trigger validation

    - by Justin
    Hey, In a MonoRail app I have an add/edit view. On add if I don't pick a value for a dropdown I get a validation error and am forced to pick a value. However, if I then edit that same item and reset the dropdown back to the first item ("Select an Item", "0"), it saves and doesn't say it was invalid. Debugging the entity sent back to the server, I can see that it's sending the original value for the dropdown instead of the new value of "0". What's going on here? The first thing I would expect is that it would trigger the validation since the dropdown value isn't set. The second thing I would expect is that it would send the new value I send, not the original. It does send the new value if I change it to another value, but it's as if it has internal logic that says - "I'm updating this entity and a new value was not passed, just don't change the entity value." Thanks, Justin

    Read the article

  • Noob here, but wanting to try and make my own app.

    - by Justin
    Hi all, I have a small amount of programing experience with Siemens and Allen Bradley but would like to make my own app for a certain website I frequent. I would like the website to be a little more user friendly for me instead of having to open browser etc. Is it possible to have a simple forum translated into a widget so you can see the forum posts and post from there? The website in question is http://vnboards.ign.com Any ideas or suggestions no matter how bad are appreciated. If it isnt worth attempting or my skills may not be up to par, feel free to say so :P Dont pull any punches :) Thanks! Justin

    Read the article

  • How would you create a notification system like on SO or Facebook in RoR?

    - by Justin Meltzer
    I'm thinking that notifications would be it's own resource and have a has_many, through relationship with the user model with a join table representing the associations. A user having many notifications is obvious, and then a notification would have many users because there would be a number of standardized notifications (a commenting notification, a following notification etc.) that would be associated with many users. Beyond this setup, I'm unsure how to trigger the creation of notifications based on certain events in your application. I'm also a little unsure of how I'd need to set up routing - would it be it's own separate resource or nested in the user resource? I'd find it very helpful if someone could expand on this. Lastly, ajax polling would likely improve such a feature. There's probably some things I'm missing, so please fill this out so that it is a good general resource.

    Read the article

  • Turn link to a jQuery icon

    - by Justin Meltzer
    I want to turn two "voting" links into jQuery UI icons. One is the upvote link that should be an icon with an up arrow, and one is the downvote link that should be an icon with a down arrow. Here is one of the link's RoR code: <%= link_to "+1", video_votes_path( :video_id => video.id, :type => "up" ), :method => :post, :remote => true %> I also want to change the color of the icon when it is clicked, and when it is clicked again, it should change back to its original color. How can I do all of this?

    Read the article

  • Why is my rspec test failing?

    - by Justin Meltzer
    Here's the test: describe "admin attribute" do before(:each) do @user = User.create!(@attr) end it "should respond to admin" do @user.should respond_to(:admin) end it "should not be an admin by default" do @user.should_not be_admin end it "should be convertible to an admin" do @user.toggle!(:admin) @user.should be_admin end end Here's the error: 1) User password encryption admin attribute should respond to admin Failure/Error: @user = User.create!(@attr) ActiveRecord::RecordInvalid: Validation failed: Email has already been taken # ./spec/models/user_spec.rb:128 I'm thinking the error might be somewhere in my data populator code: require 'faker' namespace :db do desc "Fill database with sample data" task :populate => :environment do Rake::Task['db:reset'].invoke admin = User.create!(:name => "Example User", :email => "[email protected]", :password => "foobar", :password_confirmation => "foobar") admin.toggle!(:admin) 99.times do |n| name = Faker::Name.name email = "example-#{n+1}@railstutorial.org" password = "password" User.create!(:name => name, :email => email, :password => password, :password_confirmation => password) end end end Please let me know if I should reproduce any more of my code. UPDATE: Here's where @attr is defined, at the top of the user_spec.rb file: require 'spec_helper' describe User do before(:each) do @attr = { :name => "Example User", :email => "[email protected]", :password => "foobar", :password_confirmation => "foobar" } end

    Read the article

  • Netgear VPN endpoint drops connectivity to single IP address

    - by Justin Bowers
    I'm having a strange issue with one of the networks I manage recently. We have about 14 different networks connected together through a Netgear hardware VPN. Everything has been running fine (other than standard connectivity problems) for a few years now, but I've hit a wall with a problem that's just cropped up at one of the VPN endpoint locations. Our primary VPN network is on the 192.168.1.0/24 subnet and our other 13 networks are on the 192.168.2.0/24 - 192.168.14.0/24 subnets. We run a terminal server on the 192.168.1.0/24 network with IP address 192.168.1.100. Starting Thursday of last week, we had a problem with connectivity of the 192.168.2.0/24 network to 192.168.1.100. When troubleshooting the problem, I found that Network 2 (192.168.2.0/24) still had connectivity to the Internet as well as VPN connectivity to Network 1 (192.168.1.0/24). We could ping and connect to any other device other than the server with IP address 192.168.1.100. Also, none of our networks had an issue accessing 192.168.1.100. I ran a scan on Network 2 after assigning static IP addresses to one of the workstations but received no response from 192.168.1.100 (looking for possibly a new device that someone had plugged into Network 2 that had a duplicate IP address with the server). Asking the staff, noone had reported connecting a new device to Network 2 as well. I then assigned a secondary IP address of 192.168.1.88 to the server and could ping and connect to the secondary IP address from Network 2, but still couldn't access it via 192.168.1.100. I then just rebooted the Netgear VPN Firewall (FVS318v3) and after it came back up, connectivity to 192.168.1.100 was restored. Beforehand, when checking for devices with a possible duplicate IP address, I did run a check for available wireless access points and stations and found none (our wireless is secured via MAC address access control through a WG102 device). I thought that it may have been a fluke for some reason since everything came back up after a power cycle of the VPN Firewall. Things ran fine for a few days until this afternoon, when the problem happened again. One of our users claimed that they had connectivity problems to the server and after connecting to the computer, I found that I couldn't ping the server address anymore. I could still ping the alternate IP address of the server though, so I went ahead and rebooted the VPN firewall again and connectivity was restored. Unfortunately, I can't find anything in the security or VPN logs of the firewall that helps point me in the right direction, so I thought I would go ahead and ask to see if anyone else has any other insight into why we've started having this problem. I am aware that it could still be a device with a duplicate IP address of the server on Network 2, but every employee claim states that there's been no such new device brought in to the network. I know this is a long read, but any help is appreciated! Thanks, Justin

    Read the article

  • Json HTTP Module stream issue

    - by Justin
    Hey, I have an HTTP Module that I use to clean up the JSON returned by my web service (see http://www.codeproject.com/KB/webservices/ASPNET_JSONP.aspx?msg=3400287#xx3400287xx for an example of this.) Basically it relates to calling cross-domain JSON web services from javascript. There is this JsonHttpModule which uses a JsonResponseFilter Stream class to write out the JSON and the overloaded Write method is supposed to wrap the name of the callback function around the JSON, otherwise the JSON errors out as needing a label. However, if the JSON is really long, the Write method in the Stream class is called multiple times, causing the callback function to incorrectly get inserted midway through the JSON. Is there a way in the Stream class to wrap the callback function around the stream at the end or to specify that it write all of the JSON in 1 Write method instead of in chunks?? Here's where it calls the JsonResponseFilter in the JsonHttpModule: public void OnReleaseRequestState(object sender, EventArgs e) { HttpApplication app = (HttpApplication)sender; if (!_Apply(app.Context.Request)) return; // apply response filter to conform to JSONP app.Context.Response.Filter = new JsonResponseFilter(app.Context.Response.Filter, app.Context); } Here's the Write method in the JsonResponseFilter Stream class that gets called multiple times: public override void Write(byte[] buffer, int offset, int count) { var b1 = Encoding.UTF8.GetBytes(_context.Request.Params["callback"] + "("); _responseStream.Write(b1, 0, b1.Length); _responseStream.Write(buffer, offset, count); var b2 = Encoding.UTF8.GetBytes(");"); _responseStream.Write(b2, 0, b2.Length); } Thanks for any help! Justin

    Read the article

  • MonoRail ActiveRecord - The UPDATE statement conflicted with the FOREIGN KEY SAME TABLE

    - by Justin
    Hey all, I'm new to MonoRail and ActiveRecord and have inherited an application that I need to modify. I have a Category table (Id, Name) and I'm adding a ParentId FK which references the Id in the same table so that you can have parent/child category relationships. I tried adding this to my Category model class: [Property] public int ParentId { get; set; } I also tried doing it this way: [BelongsTo("ParentId")] public Category Parent { get; set; } When I call a method to get all parent categories (they have a null ParentId), it works fine: public static Category[] GetParentCategories() { var criteria = DetachedCriteria.For<Core.Models.Category>(); return (FindAllByProperty("ParentId", null)); } However, when I call a method to get all child categories within a specific category, it errors out: public static Category[] GetChildCategories(int parentId) { var criteria = DetachedCriteria.For<Core.Models.Category>(); return (FindAllByProperty("ParentId", parentId)); } The error is: "The UPDATE statement conflicted with the FOREIGN KEY SAME TABLE constraint \"FK_Category_ParentId\". The conflict occurred in database \"UCampus\", table \"dbo.Category\", column 'Id'.\r\nThe statement has been terminated." I'm hard-coding in the parentId parameter as 1 and I'm 100% sure it exists as an id in the Category table so I don't know why it'd give this error. Also, I'm doing a select, not an update, so what is going on here?? Thanks for any input on this, Justin

    Read the article

  • backbone marionette - displaying a view in a layout region which has already been rendered

    - by Justin Wyllie
    I have something like this: //render the layout Layout.layout = new Layout.Screen(); MyApp.SomeRegion.show(Layout.layout); //render a view into it var mView = new CompositeView({collection: data}); Layout.layout.SomeRegion.show(mView); That all works fine. The layout has 3 regions. The above has rendered a view into one of them. Now, later, I want (in response to some user interaction) to render another view into one of the other regions. So I try: var mView2 = new CompositeView({collection: data}); Layout.layout.SomeOtherRegion.show(mView); But 'SomeOtherRegion' no longer exists on Layout.layout. I looked at this in Firebug. In the first case Layout.layout has my three regions defined on it. In the second case, not. Though they are still there in the regions object. This is the same layout instance. It looks like once a layout has been rendered you cannot render into it again? There must be a way. Nb. I don't want to re-render the layout. I hope that makes sense --Justin Wyllie

    Read the article

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