Search Results

Search found 1512 results on 61 pages for 'dan friedman'.

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

  • Adding existing entity to navigation property of a different entity

    - by Shay Friedman
    I'm using EF4 and I'm running into a problem when I try to do something that looks quite trivial to me. I have two entities, let's call them A and B. These entities have a many-to-many association between them with a navigation property on A that contains a list of related B entities. What I want to do is to add existing B entities to a new A entity. When I try to do that, I get an exception: AcceptChanges cannot continue because the object's key values conflict with another object in the ObjectStateManager. Make sure that the key values are unique before calling AcceptChanges. Has anyone run into such a problem?

    Read the article

  • Ruby on Rails Drawbacks

    - by Shay Friedman
    Ruby on Rails is maybe the most praised web development framework exist. There are tons of reasons for that, but every framework, even the best of its kind, has its drawbacks. I'd like to know the most common problems you run into when developing Ruby on Rails applications and the issues you often struggle with.

    Read the article

  • Import a Collada model doesn't align to pixels

    - by Dan Friedman
    Assume I have a model that is simply a cube. (It is more complicated than a cube, but for the purposes of this discussion, we will simplify.) So when I am in Sketchup, the cube is Xmm by Xmm by Xmm, where X is an integer. I then export the a Collada file and subsequently load that into threejs. Now if I look at the geometry bounding box, the values are floats, not integers. So now assume I am putting cubes next to each other with a small space in between say 1 pixel. Because screens can't draw half pixels, sometimes I see one pixel and sometimes I see two, which causes a lack of uniformity. I think I can resolve this satisfactorily if I can somehow get the imported model to have integer dimensions. I have full access to all parts of the model starting with Sketchup, so any point in the process is fair game. Is it possible? Thanks.

    Read the article

  • Using Html.LabelFor to display human readable label?

    - by Shay Friedman
    I'm using ASP.NET MVC 2 and I'm struggling to understand how can I use the Html.LabelFor helpet method. Assuming I have a model: public class Person { public string FirstName { get; set; } } In my view, if I write: <%: Html.LabelFor(model => model.FirstName) %> What I get on the page is "FirstName". But I don't want that because it's now user-friendly. I want it to be "First Name". How do I achieve that? Thanks.

    Read the article

  • In Varnish, how can I read the Set-Cookie response header?

    - by Adam Friedman
    I am trying to detect if my application has set a cookie that holds an "alert message" for the user on the next page, where the Javascript displays it if detected. In my vcl_fetch(), I need to detect if the specific cookie value "alert_message" appears anywhere in the Set-Cookie header (presumably in the VCL variable beresp.http.Set-Cookie). If detected, then I do not want to cache that next page (since Varnish strips the Set-Cookie header by default, which would obliterate the alert message before it makes it back to the browser). So here is my simple test: if(beresp.http.Set-Cookie ~ "alert_message") { set req.http.no_cache = 1; } Strangely, it fails to evaluate to true. So I throw the variable into the Server header to see what it looks like: set beresp.http.Server = " MyApp Varnish implementation - test reading set-cookie: "+beresp.http.Set-Cookie; But for some reason this only displays the FIRST Set-Cookie line in the response headers. Here are the relevant response headers: Server: MyApp Varnish implementation - test reading cookie: elstats_session=7d7279kjmsnkel31lre3s0vu24; expires=Wed, 10-Oct-2012 00:03:32 GMT; path=/; HttpOnly Set-Cookie:app_session=7d7279kjmsnkel31lre3s0vu24; expires=Wed, 10-Oct-2012 00:03:32 GMT; path=/; HttpOnly Set-Cookie:alert_message=Too+many+results.; expires=Tue, 09-Oct-2012 20:13:32 GMT; path=/; domain=.my.app.com Set-Cookie:alert_key=flash_error; expires=Tue, 09-Oct-2012 20:13:32 GMT; path=/; domain=.my.app.com Vary:Accept-Encoding How do I read and run string detection on ALL Set-Cookie header lines?

    Read the article

  • Why am I getting a warning that windows is logging on with a temporary profile to run a task scheduler task?

    - by Dan C
    I am having a strange problem with the Windows Server 2008 Task Scheduler. I have to run a small command-line application every few minutes. This application just executes a quick web service call on the localhost and adds an entry to a log file; so it should not need anything special in terms of permissions. First, I created a new user account "my_scheduler" just for the task. This account is a member of the Users group (not sure what other settings I should turn on/off) and set it's password to not expire. I then create a task to run the application every few minutes. I set it to "Run whether user is logged on or not" and turned on "Do not store password. The task will only have access to local resources" (I did this since it's not hitting anything on the network. I did not turn on "Run with highest privileges" since it does not seem to need them. I set the schedule to "After triggered, repeat every 30 minutes for a duration of 1 day" and "Allow task to be run on demand" (no other settings enabled). However, I notice that in the Event Log, I see a bunch of these warnings whenever the task is run: "Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off." Even though I get the warning, the task is executing (I see the log entries appearing). Another (possibly related) issue is that I also see that it's starting multiple copies of the task (within a few seconds of each other) even though it should only start one. This is also a big problem. Any idea how I can fix this? Thanks in advance, Dan

    Read the article

  • Advanced Web Browsing: hitting next with keyboard (single keystroke)

    - by Dan
    I have a website for class that is literally 1000's of pages long, with a next button at the bottom like this: Prev 1 2 3 4 Next With the following code, if that helps: <a href="javascript:gotoModuleObjective(1,1,34,17, 1, 0);">Prev</a> </td> <td align="center" width="10"> <font color="CC0000">1</font> </td> <td align="center" width="10"> <a href="javascript:gotoModuleObjective(1,24,33,2,1,0);">2</a> </td> <td align="center" width="10"> <a href="javascript:gotoModuleObjective(1,24,33,3,1,0);">3</a> </td> <td align="center" width="10"> <a href="javascript:gotoModuleObjective(1,24,33,4,1,0);">4</a> </td> <td align="right" style="white-space:nowrap;" width="30"> <a href="javascript:gotoModuleObjective(1, 24,33,2, 1, 0);">Next</a> </td> The numbers change depending on where you are. I would like to be able to, from the keyboard, hit the next button. I am using windows, but can switch to any browser, if this is only possible is a given browser. If this can be done with just one keystroke that would be wonderful. Like just hitting the forward arrow would automatically bring click the button called next and bring me to the next page. Is this possible? Thanks, Dan

    Read the article

  • VPN - Accessing computer outside of network. Only works one way

    - by Dan
    I could use some help here. My ideal goal is to create a VPN for 2 macs that are in different locations so that they can share each others screens and share files. I basically want to do what Logmein's Hamachi does, but without the 5 user limitation. I have set up the VPN on my Synology NAS at my house using the PPTP protocol. I could also use OpenVPN. The good news is that I can use a laptop outside of my home network to access any computer on my network at my house. The bad news is that I can not do the reverse. I want to use a computer in my home network (same network as the VPN server) to access a computer outside of my network (which is connected via VPN successfully). My internal IP is 192.168.1.xxx PPTP VPN assigns my laptop that is outside of my network with 192.168.5.xxx, but when I try to access it remotely either with afp://192.168.5.xxx or vnc://192.168.5.xxx I can't connect using either. Is this something that I should be able to do or is VPN only one way? I've also tried openvpn with the same results. Thanks for any help! -Dan

    Read the article

  • My IDE is showing "undeclared FileNotFoundException must be caught or thrown"

    - by Dan Czarnecki
    I am having the following issue above. I have tried actually putting a try-catch statement into the code as you will see below, but I can't get the compiler to get past that. import java.io.*; public class DirectoryStatistics extends DirectorySize { /* Dan Czarnecki October 24, 2013 Class variables: private File directory A File object that holds the pathname of the directory to look in private long sizeInBytes A variable of type long that holds the size of a file/directory (in bytes) private long fileCount A variable of type long that holds the number of files in a directory Constructors: public DirectoryStatistics(File startingDirectory) throws FileNotFoundException Creates a DirectoryStatistics object, given a pathname (inherited from DirectorySize class), and has 3 instance variables that hold the directory to search in, the size of each file (in bytes), and the number of files within the directory Modification history: October 24, 2013 Original version of class */ private File directory; private long sizeInBytes; private long fileCount; public DirectoryStatistics(File startingDirectory) throws FileNotFoundException { super(startingDirectory); try { if(directory == null) { throw new IllegalArgumentException("null input"); } if(directory.isDirectory() == false) { throw new FileNotFoundException("the following input is not a directory!"); } } catch(IOException ioe) { System.out.println("You have not entered a directory. Please try again."); } } public File getDirectory() { return this.directory; } public long getSizeInBytes() { return this.sizeInBytes; } public long getFileCount() { return this.fileCount; } public long setFileCount(long size) { fileCount = size; return size; } public long setSizeInBytes(long size) { sizeInBytes = size; return size; } public void incrementFileCount() { fileCount = fileCount + 1; } public void addToSizeInBytes(long addend) { sizeInBytes = sizeInBytes + addend; } public String toString() { return "Directory" + this.directory + "Size (in bytes) " + this.sizeInBytes + "Number of files: " + this.fileCount; } public int hashCode() { return this.directory.hashCode(); } public boolean equals(DirectoryStatistics other) { return this.equals(other); } } import java.io.*; import java.util.*; public class DirectorySize extends DirectoryProcessor { /* Dan Czarnecki October 17, 2013 Class variables: private Vector<Long> directorySizeList Variable of type Vector<Long> that holds the total file size of files in that directory as well as files within folders of that directory private Vector<File> currentFile Variable of type Vector<File> that holds the parent directory Constructors: public DirectorySize(File startingDirectory) throws FileNotFoundException Creates a DirectorySize object, takes in a pathname (inherited from DirectoryProcessor class, and has a single vector of a DirectoryStatistics object to hold the files and folders within a directory Modification History October 17, 2013 Original version of class Implemented run() and processFile() methods */ private Vector<DirectoryStatistics> directory; /* private Vector<Long> directorySizeList; private Vector<File> currentFile; */ public DirectorySize(File startingDirectory) throws FileNotFoundException { super(startingDirectory); directory = new Vector<DirectoryStatistics>(); } public void processFile(File file) { DirectoryStatistics parent; int index; File parentFile; System.out.println(file.getName()); System.out.println(file.getParent()); parentFile = file.getParentFile(); parent = new DirectoryStatistics(parentFile); System.out.println(parent); parent.equals(parent); index = directory.indexOf(parent); if(index == 0) { directory.elementAt(index).addToSizeInBytes(file.length()); directory.elementAt(index).incrementFileCount(); } if(index < 0) { directory.addElement(parent); directory.lastElement().setSizeInBytes(file.length()); directory.lastElement().incrementFileCount(); } Could someone tell me why I'm getting this issue?

    Read the article

  • Silverlight TV with Myself, John Papa, Shawn Wildermuth and Ward Bell

    - by dwahlin
    I had the chance to go on a live episode of Channel 9 while at DevConnections and had a lot of fun chatting about various Silverlight topics and answering some fairly unique questions posted on Twitter.  Here’s more info on the episode from John Papa’s blog: John interviews a panel of 3 well known Silverlight leaders including Shawn Wildermuth, Dan Wahlin, and Ward Bell at the Silverlight 4 launch event. The guest panel answers questions sent in from Twitter about the features in Silverlight 4, thoughts on MVVM, and the panel members' experiences developing Silverlight. This is a great chance to hear from some of the leading Silverlight minds. These guys are all experts at building business applications with Silverlight. Relevant links: John's Blog and on Twitter (@john_papa) Shawn's Blog and on Twitter (@shawnwildermuth) Dan's Blog and on Twitter (@danwahlin) Ward's Blog and on Twitter (@wardbell) Silverlight Training Course on Channel 9 Follow us on Twitter @SilverlightTV or on the web at http://silverlight.tv You can see the episode online by clicking the image below:

    Read the article

  • IOUC Summit: Open Arms and Cheese Shoes

    - by Justin Kestelyn
    Last week's International Oracle User Group Committee (IOUC) Summit at Oracle HQ was a high point of the past year, for a number of reasons: A "quorum" of Java User Group leaders, several Java Champions among them, were in attendance (Bert Breeman, Stephan Janssen, Dan Sline, Stephen Chin, Bruno Souza, Van Riper, and others), and it was great to get face time with them. Their guidance and advice about JavaOne and other things are always much appreciated. Mix in some Oracle ACE Directors (Debra Lilley, Dan Morgan, Sten Vesterli, and others), and you really have the making of a dynamic group. Stephan describes it best: "We (the JUG Leaders) discovered that behind the more formal dress code the ACE directors are actually as crazy as we are." (See link below for more.) Thanks to Bert's (NLJug) kindness, I am now the proud owner of a bonafide, straight-from-the-NL cheese shoe. How the heck did he get this through security? I suggest that you also read more robust reports from Stephan, Arun Gupta, and of course "Team Stanley."

    Read the article

  • WPF Toolkit DataGrid SelectionChanged Getting Cell Value

    - by Dan Bater
    Hi, Please help me, Im trying to get the value of Cell[0] from the selected row in a SelectionChangedEvent. I am only managing to get lots of different Microsoft.Windows.Controls and am hoping im missing something daft. Hoping I can get some help from here... private void datagrid_SelectionChanged(object sender, SelectionChangedEventArgs e) { Microsoft.Windows.Controls.DataGrid _DataGrid = sender as Microsoft.Windows.Controls.DataGrid; } I was hoping it would be something like... _DataGrid.SelectedCells[0].Value; However .Value isn't an option.... Many many thanks this has been driving me mad! Dan

    Read the article

  • DateTimePicker not updating dataset

    - by Dan
    I'm binding a DateTimePicker control to my dataset (which is linked to a database). However, unless the user changes the date on that control, the dataset seems to contain null for that entry (even though the Value entry of the control isn't null). I've done a bit of googling, and there's a lot of talk about people having troubles with the DateTimePicker not supporting null values. However, I DON'T want it to support a NULL value. The column in my database table is set to "NOT NULL". It's as if the dataset isn't updating itself from the DateTimePicker control unless the user changes the date. I've tried explicitly setting the date for the control in code (using DateTimePicker.Value = DateTime.Now). This still doesn't update the dataset side. Thankyou for any help, Dan.

    Read the article

  • Graph theory in python

    - by Dan
    I was wondering how people deal with graph theory in python? How is a graph stored? Are there libraries for this? For example how would I input a graph and then find its Chromatic polynomial? Or its girth? Or the number of unique spanning trees? How about problems that involve edge weight like salesman problems? I don't need all of these answered, I'm just looking for a method or tool set that will be able to help me approach solve problems like this. Thanks, Dan

    Read the article

  • Eclipse thinks there are problems with my Android project...

    - by Dan Watling
    I have an Android project and Eclipse is telling me my project has an error with its build path. Specifically, the problem view shows "The project cannot be built until build path errors are resolved". The entire project builds just fine, meaning there are no red X's on any of the files. I can build the project outside of Eclipse, deploy it to the device, and it runs just fine, so I know there isn't a problem with my source code or layouts. The strange thing is when I remove the 'src' folder from the build path in Eclipse, clean and build the project, then re-add the 'src' folder to the build path and build the project it works again. However, within a few changes it gives me the same problem. Has anyone else encountered this before? Does anyone know of a solution? It's driving me mad! Thanks, -Dan

    Read the article

  • Use sed to replace first 8 and last 4 pipes on every line in a file

    - by Dan Watling
    Here's the situation, I have a text file that is pipe-delimited and one of fields contains pipe characters. I already have a sed script that will change it to be tab-delimited, but the problem is it's terribly slow. It will replace the first occurrence of a pipe 8 times, then replace the last occurrence of a pipe 4 times. I'm hoping there's a quicker way to do what I need. Any thoughts would be appreciated. Here's my current sed script: sed 's/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/|\(.*\)/\t/;s/\(.*\)|/\t/;s/\(.*\)|/\t/;s/\(.*\)|/\t/;s/\(.*\)|/\t/' $1 > $1.tab Thanks, -Dan

    Read the article

  • Include params/request information in Rails logger?

    - by Dan Hill
    Hi everyone, I'm trying to get some more information into my Rails logs, specifically the requested URI or current params, if available (and I appreciate that they won't always be). However I just don't seem able to. Here's what I've done so far: #config/environments/production.rb config.logger = Logger.new(config.log_path) config.log_level = :error config.logger.level = Logger::ERROR #config/environment.rb class Logger def format_message(level, time, progname, msg) "**********************************************************************\n#{level} #{time.to_s(:db)} -- #{msg}\n" end end So I can customize the message fine, yet I don't seem to be able to access the params/request variables here. Does anyone know if this is possible, and if so how? Or if there's a better way to get this information? (Perhaps even something Redis based?) Thanks loads, Dan

    Read the article

  • Apache/PHP - alias outgoing URL

    - by Dan
    In my PHP code I've got references to a URL on another website. I'm testing my website locally (using XAMPP). Is it possible to get Apache to automatically replace the domain of this other website for localhost? For example my PHP code might be: <?php echo "<a href='http://www.othersite.com'>Click me</a>"; ?> And I'd like for my local Apache to alias this to <?php echo "<a href='http://localhost'>Click me</a>"; ?> Is this possible? Cheers, Dan.

    Read the article

  • C# .Net file in use issue

    - by Dan
    I'm having an issue opening files that have recently been closed by the .Net framework. Basically, what happens is the following: -Read in an XML file using DataSet.ReadXml() -Make some changes to the data -Write out the XML file using DataSet.WriteXml() -Copy the XML file to a new location using File.Copy -FTP the file using a custom control This sequence can intermittently fail either after the WriteXML or the File.Copy with a file in use exception. I'm guessing it could be the Windows write cache not flushing right away. Can anyone confirm that this could be causing my issue? Any solutions to suggest? Thanks, Dan

    Read the article

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