Search Results

Search found 3130 results on 126 pages for 'half duplex'.

Page 69/126 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • Entity Framework - Using Transactions or SaveChanges(false) and AcceptAllChanges()?

    - by mark smith
    Hi there, I have been investigating transactions and it appears that they take call of them selves in EF as long as i pass false to savechanges.. SaveChanges(false) and if all goes well then AcceptAllChanges() Question is what is something goes bad, don't have to rollback? or as soon as the my method goes out of scope its ended? What happens to any indentiy columns that were assigned half way through the transaction.. i presume if somebody else added a record after mine before mine went bad then this means there will be a missing Identity value. Is there any reason to use standard "transactionScope" in code? ideas? - thanks

    Read the article

  • Figuring Out Memory Leaks without Clang

    - by RoLYroLLs
    I'm trying to see if I can find some leaks myself in Apple's TopSongs app. Can someone help me out in at least one and how to identify what is in the Leaks reports and how I can get an idea on finding them? ie: I got one like this: # Category Event Type Timestamp Address Size Responsible Library Responsible Caller 0 GeneralBlock-448 Malloc 00:02.185 0x3f41220 448 libxml2.2.dylib xmlNewParserCtxt From what I can tell, the method xmlNewParserCtxt is the problem, and it's not releasing an object, hence Malloc. The responsible library tells me it's the libxml2.2.dylib library with the problem, which I can't edit. Am I heading in the right direction? If so, half the leaks are in that library and well, i can't edit that.

    Read the article

  • What is the best Battleship AI?

    - by John Gietzen
    Battleship! Back in 2003, (when I was 17,) I competed in a Battleship AI coding competition. Even though I lost that tournament, I had a lot of fun and learned a lot from it. Now, I would like to resurrect this competition, in the search of the best battleship AI. Here is the framework: Battleship.zip The winner will be awarded +450 reputation! The competition will be held starting on the 17th of November, 2009. No entries or edits later than zero-hour on the 17th will be accepted. (Central Standard Time) Submit your entries early, so you don't miss your opportunity! To keep this OBJECTIVE, please follow the spirit of the competition. Rules of the game: The game is be played on a 10x10 grid. Each competitor will place each of 5 ships (of lengths 2, 3, 3, 4, 5) on their grid. No ships may overlap, but they may be adjacent. The competitors then take turns firing single shots at their opponent. A variation on the game allows firing multiple shots per volley, one for each surviving ship. The opponent will notify the competitor if the shot sinks, hits, or misses. Game play ends when all of the ships of any one player are sunk. Rules of the competition: The spirit of the competition is to find the best Battleship algorithm. Anything that is deemed against the spirit of the competition will be grounds for disqualification. Interfering with an opponent is against the spirit of the competition. Multithreading may be used under the following restrictions: No more than one thread may be running while it is not your turn. (Though, any number of threads may be in a "Suspended" state). No thread may run at a priority other than "Normal". Given the above two restrictions, you will be guaranteed at least 3 dedicated CPU cores during your turn. A limit of 1 second of CPU time per game is allotted to each competitor on the primary thread. Running out of time results in losing the current game. Any unhandled exception will result in losing the current game. Network access and disk access is allowed, but you may find the time restrictions fairly prohibitive. However, a few set-up and tear-down methods have been added to alleviate the time strain. Code should be posted on stack overflow as an answer, or, if too large, linked. Max total size (un-compressed) of an entry is 1 MB. Officially, .Net 2.0 / 3.5 is the only framework requirement. Your entry must implement the IBattleshipOpponent interface. Scoring: Best 51 games out of 101 games is the winner of a match. All competitors will play matched against each other, round-robin style. The best half of the competitors will then play a double-elimination tournament to determine the winner. (Smallest power of two that is greater than or equal to half, actually.) I will be using the TournamentApi framework for the tournament. The results will be posted here. If you submit more than one entry, only your best-scoring entry is eligible for the double-elim. Good luck! Have fun! EDIT 1: Thanks to Freed, who has found an error in the Ship.IsValid function. It has been fixed. Please download the updated version of the framework. EDIT 2: Since there has been significant interest in persisting stats to disk and such, I have added a few non-timed set-up and tear-down events that should provide the required functionality. This is a semi-breaking change. That is to say: the interface has been modified to add functions, but no body is required for them. Please download the updated version of the framework. EDIT 3: Bug Fix 1: GameWon and GameLost were only getting called in the case of a time out. Bug Fix 2: If an engine was timing out every game, the competition would never end. Please download the updated version of the framework. EDIT 4: Results!

    Read the article

  • Jquery Validate Issue

    - by Thomas
    I'm using the Jquery validate plugin to validate a multi-step form like this one: http://jquery.bassistance.de/validate/demo/multipart/ Unfortunately, I can't seem to get it to work at all and there is a total lack of documentation to guide me through implemnetation. I think the accordian part of script is firing correctly because the bottom half of the form is being hidden and a 'next' button has been successfuly inserted. However, the form never validates or delivers an error message and it is impossible to move on to the next step. Check it out here: http://www.loftist.com/?page_id=78

    Read the article

  • Java: ArrayList bottleneck

    - by Jack
    Hello, while profiling a java application that calculates hierarchical clustering of thousands of elements I realized that ArrayList.get occupies like half of the CPU needed in the clusterization part of the execution. The algorithm searches the two more similar elements (so it is O(n*(n+1)/2) ), here's the pseudo code: int currentMax = 0.0f for (int i = 0 to n) for (int j = i to n) get content i-th and j-th if their similarity > currentMax update currentMax merge the two clusters So effectively there are a lot of ArrayList.get involved. Is there a faster way? I though that since ArrayList should be a linear array of references it should be the quickest way and maybe I can't do anything since there are simple too many gets.. but maybe I'm wrong. I don't think using a HashMap could work since I need to get them all on every iteration and map.values() should be backed by an ArrayList anyway.. Otherwise should I try other collection libraries that are more optimized? Like google's one, or apache one.. Thanks

    Read the article

  • Is the switch to Dvorak worth it?

    - by Kevin Weil
    To those who were experienced ( 70 WPM, say) typists before the switch to Dvorak -- were you faster after switching? There are a couple good SO threads on Dvorak, but they are more on how to learn or reduction in typing pain than speed before/after. I know it will take me 1-2 months to feel comfortable, but I want to know if I should expect to be faster afterward. I am a programmer and type maybe 90-110 WPM on QWERTY. EDIT: I agree that coding is not typically IO-bound, and that a minimum typing speed is sufficient. This is half from curiosity, but it will be an undertaking to achieve QWERTY parity, so I want to know if I should at least expect some asymptotic improvement.

    Read the article

  • Loading persisted workflow after workflowdefinition has changed in WF4

    - by Flores
    How to solve this problem (in WF4): I create a workflow in xaml and start several instances of it, I have a persistancestore and all workflows persist on a bookmark half way their workflow. Now I stop the application If I restart te application everything is resumed, en nicely completes. But what if I want to change the workflow definition after the running instances persist? the only way to load the running workflows (that I was able to find) is the following way: WorkflowApplication wfapp = new WorkflowApplication(new WorkflowDefinition()); wfapp.InstanceStore = new SqlWorkflowInstanceStore(connStr); wfapp.Load(wfGuid); So you need the workflow definition, if it has changed during the persistance, things go horribly wrong. What is the best way to solve this?

    Read the article

  • Graphviz DOT arrange Nodes in circles

    - by Ivo Wetzel
    OK here's my problem, I'm generating a graph of a python module, including all the files with their functions/methods/classes. I want to arrange it so, that nodes gather in circles around their parent nodes, currently everything is on one gargantuan horizontal row, which makes the thing 50k pixels wide and also let's the svg converter fail(only renders about the half of the graph). I went trough the docs(http://www.graphviz.org/doc/info/attrs.html) but couldn't find anything that seems to do the trick. So the question is: Is there a simple way to do this or do I have to layout the whole thing by myself? :/

    Read the article

  • Scheduled task with windows services and system.timer.timer

    - by nccsbim071
    Hi i want implement a windows services scheduled task. I already created windows service. In a service i have implemented a timer.The timer is initialized at class interval. The timers interval is set in the start method of service and also it is enabled in the start method of the service. After timers elapsed event is fire i have done some actions. My problem is that, i am in a dilemma. Lets say the action i have done in Elapsed event, lets say take one hour and the timers interval is set to half an hour. so there are chances that even if the previous call to elapsed event has not ended new call to elapsed event will occur. my question will there be any conflict or is it ok or shall i use threads. please give some advice

    Read the article

  • Android: ImageView scales up source image

    - by legr3c
    I can't seem to get my ImageView to display its source image in its original size. The ImageView looks like this: <ImageView android:id="@+id/Logo" android:src="@drawable/logo" android:layout_width="wrap_content" android:layout_height="wrap_content" > </ImageView> The source image is 140 pixels wide, yet on the Nexus One's screen, which is 480 pixels wide it uses up half of the width. Using absolute values in px or dp for the width and height changes nothing. The image also looks very antialiased from the upscaling. Why is this happening and how can I prevent it?

    Read the article

  • Load balancing a console application or service

    - by David
    So it's easy to load balance an ASP.NET web application. You set up a load balancer between two servers, and if the web server isn't responding on Port 80, it won't receive requests. Are there any proven techniques for doing this for a C# console application or Windows service that takes actions of its own volition? Are there any frameworks for knowing if peer processes are alive or dead, doing heartbeats, etc? I've been experimenting a bit with NServiceBus and it seems like, for certain kinds of applications, it would help to have most of the work done as a response to an event, which makes it more like a web application, actually, and therefore easier to scale and load balance with multiple processes, but I feel like that's a half-baked solution since in most cases there usually needs to be some concept of a "master" process that's responsible for getting work started.

    Read the article

  • VS2010 add-in custom menu item in files of Solution Explorer

    - by NewProgrammer
    Hey guys, I need to create a custom menu item for Visual Studio 2010 Add-in in C#, but I have had no luck in coming with a solution anytime soon. I am aware that there was a similar post: http://stackoverflow.com/questions/2486818/visual-studio-add-in-adding-a-context-menu-item-to-solution-explorer But it did not help, as the blog follows the process through the integration package, and the video is done through VB. I had attempted to convert the VB syntax to the C# syntax, but about half way through the video, the Add-in methods has significantly changed from 2005 to 2010, as some of the methods have removed or changed. Is there any good tutorials on making a custom menu item on the Solution Explorer in the lastest Visual Studio in C#, and is there a good website that could be used as a reference for looking over the VS add-in API? I've used Microsoft's main website, however it is confusing and wordy, which is difficult to understand and find the methods, properties, or commands that I am looking for. Any help would be appreicated, Thanks in advance.

    Read the article

  • How to use Microsoft.Web.Administration.dll to get the site information the page is running on?

    - by Keith Barrows
    I have a half dozen sites on my server and I would like to get some info from IIS7 to display in the footer of each page (as long as you are an admin of course). I am going through the ServerObject and found Sites but am not finding anything obvious for "this site". What should I do to get at the information for the exact site in IIS7 that the page is running on? For a quick 'hack' style approach I wrote this on my default.aspx page code behind: ServerManager serverMgr = new ServerManager(); foreach (Site site in serverMgr.Sites) { string s = info.Text + site.Name + @"<br/>"; info.Text = s; foreach (Binding binding in site.Bindings) { string t = info.Text + binding.BindingInformation + " | "; string p = t + binding.Protocol + @"<br/>"; info.Text = p; } } TIA

    Read the article

  • wamp appache - polling server continuously

    - by stone
    I've heard polling the server is not the best of ideas. Let's say I make a client-server application. A simple game for example. Where each client polls the server every half a minute. How many clients is it possible to have before it overlaods a wamp server? Basically how robust is Apache for this kind of stuff? Getting a request, aggregating data from mysql server, and then returning the data in an xml format.

    Read the article

  • What's viewport mean to the jQuery guys?

    - by justSteve
    I came here intent on asking a 'how do i' type question focused on a particular UI problem i have to solve and i started using the term 'viewport'. Seems there's lots of contexts that tag evokes. Before i outline mine i should ask - is there a generally recognized consensus as to what a 'viewport' is? Any gallery or object browser that focuses on a UI principle where multiple frames/panes show feeds of different graphs where each feed might be a complex grid/graph? I'm imagining something where my page may open with a half dozen different grids (tabular data) stay updated via ajax interactions with various servers. UI elements provide control scale up or down a given grid with a quasi accordion slide kinda thingie. For example, one click on a scale up-or-down control would rescale the other viewports in the opposite direction. More clicks - more pronounced effect. So my 'how do i' question morphs into a 'how have others...' thx

    Read the article

  • UIPickerView with NSDictionary

    - by Dave
    I am a .NET programmer and new to Objective C. I am trying to make a UIPickerView which acts like a .NET dropdownlist. User sees the list of text and selects one and the selected value (which is the ID) is used in code. I have been browsing for almost half a day trying to figure this out. I could add a regular PickerView with list of strings, picker view with mulitple components and picker view with dependent components none of which seems to answer my query. Please help.

    Read the article

  • iPhone Settings app and keyboard control?

    - by randallmeadows
    So I'm putting my app's preference settings into the Settings app. One of the settings is an edit text field (PSTextFieldSpecifier). When touched, the keyboard dutifully appears, I can make the edits, but when I press Return....nothing. Well, the editing is completed, but the keyboard remains. I see no way to make the keyboard go away. I also notice this same behavior in other Settings panes, including those from Apple. Do I assume correctly that this is just standard behavior and I need to just accept the fact that my Settings table has now been reduced to half size, and just deal? Furthermore, I gather there is no approved way to have a "rich" child pane display, such as that seen in Settings-General-About-Legal? Or a way to do what appears to be a -presentModalViewController, a la Settings-General-Passcode Lock?

    Read the article

  • Calculating determinant by hand

    - by ldigas
    Okey, this is only half programming, but let's see how you are on terms with manual calculations. I believe many of you did this on your university's while giving "linear systems" ... the problem is it's been so long I can't remember how to do it any more. I know quite a few algorithms for calculating determinants, and they all work fine ... for large systems, where one would never try to do it manually. Unfortunatelly, I'm soon going on an exam, where I do have to calculate it manually, up to the system of 5. So, I have a K(omega) matrix that looks like this: [2-(omega^2)*c -4 2 0 0] [-2 5-(omega^2)*c -4 1 0] [1 -4 6-(omega^2)*c -4 1] [0 1 -4 5-(omega^2)*c -2] [0 0 2 -4 2-(omega^2)*c] and I need all the omegas which satisfy the det[K(omega)]=0 criteria. What would be a good way to calculate it so it can be repeated in a manual process ?

    Read the article

  • Is detecting scrollbar presence with jQuery still difficult?

    - by donpal
    I know that detecting scrollbar presence is supposed to be one of those illusive things that we should all have to suffer through. What I've read so far is that you can't really detect scrollbar presence, only use hints in the DOM to know if they may be present, and it can't be done in less than 30 lines of code. This sounds a little impossible to me now that we're in 2010. Does jQuery have a cross-browser reliable solution that takes care of this and works at least most of the time? Any help please, I'm pulling my hair, half of it is already on the floor.

    Read the article

  • Mapping table and a simple view with Fluent NHibernate

    - by adrin
    I have mapped a simple entity, let's say an invoice using Fluent NHibernate, everything works fine... after a while it turns out that very frequently i need to process 'sent invoices' (by sent invoices we mean all entities that fulfill invoice.sent==true condition)... is there a way to easily abstract 'sent invoices' in terms of my data access layer? I dont like the idea of having aforementioned condition repeated in half of my repository methods. I thought that using a simple filtering view would be optimal, but how could it be done? Maybe I am doing it terribly wrong and someone would help me realize it :)?

    Read the article

  • Removing a specific XML node in TIBCO BusinessWorks

    - by sangretu
    I have a "global variable" XML schema in TIBCO BusinessWorks. It's simpler than it looks - basically just a single repeatable node. Image: Tibco globals. (old URL redacted) Various processes in the system can update this list. Checking to see if they are listed is easy: $GetVariable/subscriber-list/subscriber = $_processContext/ns:ProcessContext/ProcessId Adding themselves to the list is pretty easy too, using a Set Variable activity (see bottom half of image) But how can a process remove itself from the list? I'm sure there's a type of mapping I can use to filter out the node I want and let the rest through?

    Read the article

  • Using the sharepoint stsadm import command fails when list exists

    - by 78lro
    When using the stsadm -o import command in sharepoint I am getting an error relating to a list already existing, the import then seems to fail. Should it not handle this scenario of a list already existing on the destination server? I then used the UI to delete the existing list and ran the import again. It then seemed to fail at the same point saying the list exists. In the UI the list appears but when I click it, it reports that the list does not exist - almost as if it's stuck in a half created state, unable to be deleted or created by the import. Any suggestions greatly appreciated.

    Read the article

  • Help me finish this Python 3.x self-challenge.

    - by Hamish Grubijan
    This is not a homework. I saw this article praising Linq library and how great it is for doing combinatorics stuff, and I thought to myself: Python can do it in a more readable fashion. After half hour of dabbing with Python I failed. Please finish where I left off. Also, do it in the most Pythonic and efficient way possible please. from itertools import permutations from operator import mul from functools import reduce glob_lst = [] def divisible(n): return (sum(j*10^i for i,j in enumerate(reversed(glob_lst))) % n == 0) oneToNine = list(range(1, 10)) twoToNine = oneToNine[1:] for perm in permutations(oneToNine, 9): for n in twoToNine: glob_lst = perm[1:n] #print(glob_lst) if not divisible(n): continue else: # Is invoked if the loop succeeds # So, we found the number print(perm) Thanks!

    Read the article

  • Multi-threading mechanisms to run some lengthy operations from winforms code and communication with

    - by tmarouda
    What do I want to achieve: I want to perform some time consuming operations from my MDI winforms application (C# - .NET). An MDI child form may create the thread with the operation, which may take long time (from 0.1 seconds, to even half hour) to complete. In the meantime I want the UI to respond to user actions, including manipulation of data in some other MDI child form. When the operation completes, the thread should notify the MDI child that the calculations are done, so that the MDI child can perform the post-processing. How can I achieve this: Should I use explicit threading (i.e., create explicit threads), thread pools? Or simply just propose your solution. Should I create foreground or background threads? And how does the thread communicates with the GUI, according the solution you propose? If you know of a working example that handles a similar situation, please make a note.

    Read the article

  • Reflection Permission problems when using the GSON library in a applet.

    - by mridang
    I'm writing an Applet that makes some JSON-RPC calls. I'm using the Google JSON library (GSON) to cast the response JSON into a class. Thsi seems to work fine as is but when I use this code in my Applet, I'm hit with a java.lang.reflect.reflectpermission. From what I read on this thread on SO, it seems that since GSON uses Reflection, I cannot use it in Applets unless I explicitly modify the security policy. How can I get around this? I've created a bunch of classes in my application and was using the Gson.fromJson method to cast it into the class. Is there any way to achieve the same functionality without having to re-write half my code. (The complexity of dealing with JSON in Java seems to be in a league of its own!) Thanks in advance guys.

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >