Search Results

Search found 2579 results on 104 pages for 'mike peshka'.

Page 76/104 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • How to provide global functionality in multi-user database app

    - by Mike B
    I have been building a multi-user database application (in C#/WPF 4.0) that manages tasks for all employees of a company. I now need to add some functionality such as sending an email reminder to someone when a critical task is due. How should this be done? Obviously I don’t want every instance of the program to be performing this function (Heh each user would get 10+ emails). Should I add the capability to the application as a "Mode" and then run a copy on the database server in this mode or would it be better to create a new app altogether to perform "Global" type tasks? Is there a better way?

    Read the article

  • XML to JSON - losing root node

    - by Mike
    I'm using net.sf.json with a Java project and it works great. The conversion of this XML: <?xml version="1.0" encoding="UTF-8"?> <important-data certified="true" processed="true"> <timestamp>232423423423</timestamp> <authors> <author> <firstName>Tim</firstName> <lastName>Leary</lastName> </author> </authors> <title>Flashbacks</title> <shippingWeight>1.4 pounds</shippingWeight> <isbn>978-0874778700</isbn> </important-data> converts to this in JSON: { "@certified": "true", "@processed": "true", "timestamp": "232423423423", "authors": [ { "firstName": "Tim", "lastName": "Leary" }], "title": "Flashbacks", "shippingWeight": "1.4 pounds", "isbn": "978-0874778700" } However, the root tag <important-data> is lost in the conversion. Being new to XML and JSON, I am not sure if this is suppose to be the correct behaviour. If not, is there any way to tell net.sf.json to convert it while keeping the root node property? Thanks.

    Read the article

  • Using Drools to provide error processing and consequence management

    - by Mike
    Hi, I am working on a module whose purpose is to process Java exceptions and decide upon a strategy for dealing with them. The exceptions could be things I know about (explicit business exceptions eg TransformationException) or more general environmental stuff (JMS errors, IO errors etc) The facts inserted into the knowledge base are all the same class, and wrap (contain) an Exception. I want to write a rule that will explicitly match the exceptions I know how to deal with (eg TransformationException) and have another rule that catches 'everything else' The problem seems to me to be that for a fact containing a TransformationException, both rules will fire and the output will be uncertain. How would I go about writing such exclusive rules without relying on salience to steer the order of execution (this seems to be bad practice from what I have read)? I have a solution in place that I am not happy with whereby the outcome depends on the order in which the rules are defined in my .drl.

    Read the article

  • perl, module variable

    - by Mike
    I don't really understand how scoping works in perl modules. This doesn't print anything. I would like it if running a.pl printed 1 b.pm $f=1; a.pl use b; print $f

    Read the article

  • How do I keep a count of undefined strings within a loop using PHP?

    - by mike
    I'm using a loop within a loop to try to generate keyword combinations and also find the ones that have been used the most. My outside loop just queries a list of keywords (lets use "chicago" as our first keyword, 3 records were found). The inside loop finds all the records in the "posts" table where keyword = "chicago". Within this loop, I need to generate strings based on info I found in the database. Which, would look something like "chicago bulls", "chicago bears", "chicago cubs" etc... I know how to do everything up until this point, but how do I temporary hold these generated strings and count how many times they have been found within the 3 records?

    Read the article

  • Preprocessor Conditionals

    - by Mike
    I was wondering if it would be possible to have a define which changes values at some point in the code be used in a conditional. Basically something like this: //////////////////////////////////////////// SomeFile.cpp #define SHUTDOWN false while(window->isOpen()) { if(SHUTDOWN) window->close(); // Rest of the main loop } //////////////////////////////////////////// SomeOtherFile.cpp if(Escape.isPressed()) { #undef SHUTDOWN #define SHUTDOWN true } Thus causing the app to close. If it's not, would having a function like RenderWindow* getWindow() { return window; } and then calling if(Escape.isPressed()) getWindow()->close(); The best way to do it? I'd rather not go that route because the classes that are calling the key event are members of the class controlling the main loop and the window, so I'd have to set pointers to the containing class in the smaller classes to call getWindow() and it just seems like a more complicated method. But if I can't do it with preprocessor directives I'll just have to use pointers to the parent class.

    Read the article

  • Subversion update misses new directories

    - by Mike Q
    Hi all, Periodically we have trouble with SVN when doing updates. Very occasionally when someone adds a new directory doing an update through Tortoise doesn't work. If we do a "Fully Recursive" update using "Update from revision..." option then it picks it up fine. I'm poked around and seen this question which is virtually identical but with no answer. I've found the item on the SVN website, referenced by that post, that talks about an issue in 1.6.0 which is now fixed. However my SVN version is 1.6.9 and Tortoise is 1.6.7 so I wouldn't expect to have this problem any more. This only seems to occur with new directories, never seen it for individual files. We may have had older versions of Tortoise at one point (can't remember which tho) so maybe some issue has been introduced into our repo that an upgrade doesn't solve. We have the workaround but it wastes a few minutes of head-scratching after failed builds to figure it out and people who haven't come across this problem before really struggle until they ask someone else. Anyone know if this is a known bug and any permanent solutions? Thanks.

    Read the article

  • Using Generics to return a literal string or from Dictionary<string, object>

    - by Mike
    I think I outsmarted myself this time. Feel free to edit the title also I could not think of a good one. I am reading from a file and then in that file will be a string because its like an xml file. But in the file will be a literal value or a "command" to get the value from the workContainer so <Email>[email protected]</Email> or <Email>[? MyEmail ?]</Email> What I wanted to do instead of writing ifs all over the place to put it in a generic function so logic is If Container command grab from container else grab string and convert to desired type Its up to the user to ensure the file is ok and the type is correct so another example is so <Answer>3</Answer> or <Answer>[? NumberOfSales ?]</Answer> This is the procedure I started to work on public class WorkContainer:Dictionary<string, object> { public T GetKeyValue<T>(string Parameter) { if (Parameter.StartsWith("[? ")) { string key = Parameter.Replace("[? ", "").Replace(" ?]", ""); if (this.ContainsKey(key)) { return (T)this[key]; } else { // may throw error for value types return default(T); } } else { // Does not Compile if (typeof(T) is string) { return Parameter } // OR return (T)Parameter } } } The Call would be mail.To = container.GetKeyValue<string>("[email protected]"); or mail.To = container.GetKeyValue<string>("[? MyEmail ?]"); int answer = container.GetKeyValue<int>("3"); or answer = container.GetKeyValue<int>("[? NumberOfSales ?]"); But it does not compile?

    Read the article

  • Placeholder containing dynamic table is empty unless I create table twice

    - by Mike O.
    I am dynamically creating a table that contains a textbox in each cell. The table is put in a placeholder control. Everything displays perfectly. The problem is when I go to retrieve the values entered in the cells. I have the code to generate the table in a separate method called CreateTable(). In order for my program to find a table in the placeholder when I go to save, I have to run CreateTable() in a postback event AND in the PageLoad event. If I call CreateTable() in only one of those places and I try to save, it says the placeholder is empty and, therefore, I cannot save the textbox contents. I've tried calling CreateTable() from InitLoad but that doesn't work because it needs to reference values from three static controls: 1 dropdown, 1 listbox, and 1 calendar control, which I don't believe have had their viewstate rendered yet. Anyone have any ideas? It would sure be nice not to have to double the number of database calls just to make this work.

    Read the article

  • How to map UID to user name using Perl library functions?

    - by Mike
    I'm looking for a way of mapping a uid (unique number representing a system user) to a user name using Perl. Please don't suggest greping /etc/passwd :) Edit As a clarification, I wasn't looking for a solution that involved reading /etc/passwd explicitly. I realize that under the hood any solution would end up doing this, but I was searching for a library function to do it for me.

    Read the article

  • Font alignment problem in webkit based browsers

    - by Mike
    Here is the code: <style type="text/css"> html, body {font:0.9em/1.2em arial, verdana, helvetica, sans-serif;} #todayOn {background-color:#efefef; repeat-x top left;border-bottom:1px solid #ddd;border-top:1px solid #ddd;height:52px;margin:15px 0;} #todayOn #pageTitle {float:left;padding-left:3px;} #todayOn #pageTitle h2 {color:#feb425;font-size:32px;margin:10px 0 0 0;padding:0;} #todayOn #pageTitle h2 em {color:#7498c0;display:block;font-size:14px;font-style:italic;font-weight:normal;line-height:20px;padding:5px 0 0 0;} </style> <div id="todayOn"> <div id="pageTitle"> <h2>TODAY <em>on this page.com</em></h2> </div> </div> In Firefox, IE (6+), Opera, etc. the subheader "on this page.com" displays vertically how I want it to. In Webkit browsers like Chrome and Safari, it's pushed down a couple more pixels. What's the prob? Thanks.

    Read the article

  • jquery next() outside of div

    - by mike
    Hi, I'm trying to use next() to toggle a div. The problem is that the "trigger" is in a different div than the one I want to toggle. An example that works: $("span.trigger").click(function(){ $(this).next("div.task_description").slideToggle("fast"); }); <span class="trigger">The trigger</span> <div class="task_description "> some content </div> But the way I need the html setup is: <div> <span class="trigger">The trigger</span> </div> <div class="task_description "> some content </div> That doesn't work... any suggestions?

    Read the article

  • How do I dynamically add and remove line items from an ASP.NET MVC view?

    - by Mike Roosa
    I have a PurchaseOrder model: public class PurchaseOrder { public string OrderNumber { get; set; } public string Customer { get; set; } public IList<LineItem> Lines { get; set; } } and a LineItem class: public class LineItem { public string PartNumber { get; set; } public int Quantity { get; set; } } What I want to do is on my view for the PurhcaseOrder Create action, I need a section for line items. The user should be able to add a new line, remove a line, then submit. One caveat is the PartNumber needs to be a dropdown list of valid parts. What can I do to accomplish what I'm looking for?

    Read the article

  • Porting library from Java to Python

    - by Mike Griffith
    I'm about to port a smallish library from Java to Python and wanted some advice (smallish ~ a few thousand lines of code). I've studied the Java code a little, and noticed some design patterns that are common in both languages. However, there were definitely some Java-only idioms (singletons, etc) present that are generally not-well-received in Python-world. I know at least one tool (j2py) exists that will turn a .java file into a .py file by walking the AST. Some initial experimentation yielded less than favorable results. Should I even be considering using an automated tool to generate some code, or are the languages different enough that any tool would create enough re-work to have justified writing from scratch? If tools aren't the devil, are there any besides j2py that can at least handle same-project import management? I don't expect any tool to match 3rd party libraries from one language to a substitute in another.

    Read the article

  • Same source, multiple targets with different resources (Visual Studio .Net 2008)

    - by Mike Bell
    A set of software products differ only by their resource strings, binary resources, and by the strings / graphics / product keys used by their Visual Studio Setup projects. What is the best way to create, organize, and maintain them? i.e. All the products essentially consist of the same core functionality customized by graphics, strings, and other resource data to form each product. Imagine you are creating a set of products like "Excel for Bankers", Excel for Gardeners", "Excel for CEOs", etc. Each product has the the same functionality, but differs in name, graphics, help files, included templates etc. The environment in which these are being built is: vanilla Windows.Forms / Visual Studio 2008 / C# / .Net. The ideal solution would be easy to maintain. e.g. If I introduce a new string / new resource projects I haven't added the resource to should fail at compile time, not run time. (And subsequent localization of the products should also be feasible). Hopefully I've missed the blindingly-obvious and easy way of doing all this. What is it? ============ Clarification(s) ================ By "product" I mean the package of software that gets installed by the installer and sold to the end user. Currently I have one solution, consisting of multiple projects, (including a Setup project), which builds a set of assemblies and create a single installer. What I need to produce are multiple products/installers, all with similar functionality, which are built from the same set of assemblies but differ in the set of resources used by one of the assemblies. What's the best way of doing this? ------------ The 95% Solution ----------------- Based upon Daminen_the_unbeliever's answer, a resource file per configuration can be achieved as follows: Create a class library project ("Satellite"). Delete the default .cs file and add a folder ("Default") Create a resource file in the folder "MyResources" Properties - set CustomToolNamespace to something appropriate (e.g. "XXX") Make sure the access modifier for the resources is "Public". Add the resources. Edit the source code. Refer to the resources in your code as XXX.MyResources.ResourceName) Create Configurations for each product variant ("ConfigN") For each product variant, create a folder ("VariantN") Copy and Paste the MyResources file into each VariantN folder Unload the "Satellite" project, and edit the .csproj file For each "VariantN/MyResources" <Compile> or <EmbeddedResource> tag, add a Condition="'$(Configuration)' == 'ConfigN'" attribute. Save, Reload the .csproj, and you're done... This creates a per-configuration resource file, which can (presumably) be further localized. Compile error messages are produced for any configuration that where a a resource is missing. The resource files can be localized using the standard method (create a second resources file (MyResources.fr.resx) and edit .csproj as before). The reason this is a 95% solution is that resources used to initialize forms (e.g. Form Titles, button texts) can't be easily handled in the same manner - the easiest approach seems to be to overwrite these with values from the satellite assembly.

    Read the article

  • Which are the most useful techniques for faster Bluetooth?

    - by Mike Howard
    Hi. I'm adding peer-to-peer bluetooth using GameKit to an iPhone shoot-em-up, so speed is vital. I'm sending about 40 messages a second each way, most of them with the faster GKSendDataUnreliable, all serializing with NSCoding. In testing between a 3G and 3GS, this is slowing the 3G down a lot more than I'd like. I'm wondering where I should concentrate my efforts to speed it up. How much slower is GKSendDataReliable? For the few packets that have to get there, would it be faster to send a GKSendDataUnreliable and have the peer send an acknowledgement so I can send again if I don't get the Ack within, say, 100ms? How much faster would it be to create the NSData instance using a regular C array rather than archiving with the NSCoding protocol? Is this serialization process (for about a dozen floats) just as slow as you'd expect from an object creation/deallocation overhead, or is something particularly slow happening? I heard that (for example) sending four seperate sets of data is much, much slower, than sending one piece of data four times the size. Would I make a significant saving by sending separate packets of data that wouldn't always go together in the same packet when they happen at the same time? Are there any other bluetooth performance secrets I've missed? Thanks for your help.

    Read the article

  • iPhone: Which are the most useful techniques for faster Bluetooth?

    - by Mike Howard
    Hi. I'm adding peer-to-peer bluetooth using GameKit to an iPhone shoot-em-up, so speed is vital. I'm sending about 40 messages a second each way, most of them with the faster GKSendDataUnreliable, all serializing with NSCoding. In testing between a 3G and 3GS, this is slowing the 3G down a lot more than I'd like. I'm wondering where I should concentrate my efforts to speed it up. How much slower is GKSendDataReliable? For the few packets that have to get there, would it be faster to send a GKSendDataUnreliable and have the peer send an acknowledgement so I can send again if I don't get the Ack within, say, 100ms? How much faster would it be to create the NSData instance using a regular C array rather than archiving with the NSCoding protocol? Is this serialization process (for about a dozen floats) just as slow as you'd expect from an object creation/deallocation overhead, or is something particularly slow happening? I heard that (for example) sending four seperate sets of data is much, much slower, than sending one piece of data four times the size. Would I make a significant saving by sending separate packets of data that wouldn't always go together in the same packet when they happen at the same time? Are there any other bluetooth performance secrets I've missed? Thanks for your help.

    Read the article

  • How to create a splash activity , call a second activity via a button, simple data form 5 fields and 2 buttons

    - by Mike
    New to Android need help with one solid build that I can refer to and study for future projects. The first activity is a background image with a button,when clicked the it takes you to the second activity which is a form with 5 data fields and 2 buttons. One button calls an intent to take a picture within the app and one button that submits the data from the form along with the picture to URL. lastly a third activity that says complete thank you. I can make some of this but don't know how to link button or open and merge camera with the app to be sent as a package of data. I suppose I could also hook into GPS acquire location as well as the camera call?

    Read the article

  • svnant: How to checkout specified URLs from a repository?

    - by Mike
    Hi all: i'm using SVNant to checkout a repository, the total repository content is so large and i'm only interest in a few file and directories, the repository structure as below: project folder1 folder2 largefolder largefile1 largefile2 folder3 fileilike1.txt fileilike2.txt file.txt file2.txt etc... i'm only interest in the files under project/ folder such as file.txt and file2.txt, and also all files under folder3. i do not want to checkout largefolder/ because it has extra-large files in it. how to write the svnant script? i use ignore but seems not work.

    Read the article

  • Possible to have ampersands ("&") in URL BEFORE the query string?

    - by Mike Crittenden
    My client is determined to have a page at /nfm&t so I made a directory named nfm&t with an index.html (to test) and that URL is still throwing a 404. So apparently it's not that easy. Any ideas? Or is there a way to just redirect nfm&t to nfmt, so that the URL at least resolves? This is a Windows server, by the way, which throws a wrench into how I'm used to doing redirects.

    Read the article

  • Including Data From DropDownList Into Gridview

    - by Mike Keller
    I feel a little embarassed posting two questions relating to the same problem, but the first one ended up answering a question that I believe is unrelated to the solution so I'm leaving it up and outlining what I'm trying to accomplish with the hopes that someone can help out a .Net noob. What I need to be able to do is create a field in my gridview that contains a link that passes two variables. One is pulled from within the gridviews datasource and the other needs to be pulled from a textbox control outside the gridview. From what I've read so far you cannot use a hyperlinkfield for this as the datanavigateurlfields cannot be set to pull from anything but the gridview's data source. What I attempted to do was create a template field where in the itemtemplate I called: <a href="example.aspx?e=<%# Eval(ExampleList.SelectedItem.Value) %>">Test</a> That comes back with an error like this: DataBinding: 'System.Data.DataRowView' does not contain a property with the value 'TestData' Any clues to make this happen would be appreciated, like I said I'm pretty new to .Net so please be gentle. I tried to do my homework before posting this.

    Read the article

  • IronPython memory leak?

    - by Mike Gates
    Run this: for i in range(1000000000): a = [] It looks like the list objects being created never get marked for garbage collection. From a memory profiler, it looks like the interpreter's stack frame is holding onto all the list objects, so GC can never do anything about it. Is this by design?

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >