Search Results

Search found 2672 results on 107 pages for 'michael cereda'.

Page 87/107 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • SqlCeCommand ExecuteNonQuery performance issue

    - by Michael
    I've been asked to resolve an issue with a .Net/SqlServerCe application. Specifically, after repeated inserts against the db, performance becomes increasingly degraded. In one instance at ~200 rows, in another at ~1000 rows. In the latter case the code being used looks like this: Dim cm1 As System.Data.SqlServerCe.SqlCeCommand = cn1.CreateCommand cm1.CommandText = "INSERT INTO Table1 Values(?,?,?,?,?,?,?,?,?,?,?,?,?)" For j = 0 To ds.Tables(0).Rows.Count - 1 'this is 3110 For i = 0 To 12 cm1.Parameters(tbl(i, 0)).Value = Vals(j,i) 'values taken from a different db Next cm1.ExecuteNonQuery() Next The specifics aren't super important (like what 'tbl' is, etc) but rather whether or not this code should be expected to handle this number of inserts, or if the crawl I'm witnessing is to be expected.

    Read the article

  • Why does Application.Exit Prompt me twice?

    - by Michael Quiles
    How can I stop the message box from showing up twice when I press the X on the form ? FYI the butoon click works fine it's the X that prompts me twice. private void xGameForm_FormClosing(object sender, FormClosingEventArgs e) { //Yes or no message box to exit the application DialogResult Response; Response = MessageBox.Show("Are you sure you want to Exit?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (Response == DialogResult.Yes) Application.Exit(); } public void button1_Click(object sender, EventArgs e) { Application.Exit(); }

    Read the article

  • Make an animation using a loop

    - by Michael Quiles
    I need help making this loop to move a label move smoothly across the screen using count for the animation (its required). The labels location is currently in location 0,0 I'd like to make it go in a square right - down - left - back to its original position how can I accomplish this ? please give me an example using my code below. Thank You in advance. private void xAnimeTimer_Tick(object sender, EventArgs e) { int count; this.xAnimTimer.Stop(); for (count = 0; count <= 100; count++) { this.xAnimLabel.Left = count; } for (count = 0; count <= 150; count++) { this.xAnimLabel.Top = count; }

    Read the article

  • How to only show simpleTip if certain conditions are true?

    - by Michael
    I'm working on my first jquery project and have a question regarding the simpletip plugin. I basically have a calendar where the user can click different meeting titles and the corresponding dates get shaded in with a certain color. I am then using the simpletip to display more detailed information about the meeting when the user hovers over that date. What I want is for the simpletip to only display if the cell is colored in, or "on". When the calendar is blank and no meetings are activated, I don't want all the simpletips to show. I have tried using an if statement with a .mouseover() - this works at first, when the cells are off, no simpletip. After the meeting is turned on and colored in, the first mouseover does nothing, then the second mouseover shows the simpletip, and then the simpletip remains active even after the cell is turned off. Hope this makes sense... please help! Thank you in advance

    Read the article

  • C++ Problem: Class Promotion using derived class

    - by Michael Fitzpatrick
    I have a class for Float32 that is derived from Float32_base class Float32_base { public: // Constructors Float32_base(float x) : value(x) {}; Float32_base(void) : value(0) {}; operator float32(void) {return value;}; Float32_base operator =(float x) {value = x; return *this;}; Float32_base operator +(float x) const { return value + x;}; protected: float value; } class Float32 : public Float32_base { public: float Tad() { return value + .01; } } int main() { Float32 x, y, z; x = 1; y = 2; // WILL NOT COMPILE! z = (x + y).Tad(); // COMPILES OK z = ((Float32)(x + y)).Tad(); } The issue is that the + operator returns a Float32_base and Tad() is not in that class. But 'x' and 'y' are Float32's. Is there a way that I can get the code in the first line to compile without having to resort to a typecast like I did on the next line?

    Read the article

  • What is the equivalent of Java's .length for arrays in C#?

    - by Michael Loftus
    I'm new to C#, and I'm trying to convert this code from java into C#. static public double euclidean_2(double[] x, double[] y) { if (x.length != y.length) throw new RuntimeException("Arguments must have same number of dimensions."); double cumssq = 0.0; for (int i = 0; i < x.length; i++) cumssq += (x[i] - y[i]) * (x[i] - y[i]); return cumssq; } I know java uses .length but what is the equivalent in C# since I keep getting an error Thanks

    Read the article

  • lightweight search engine for asp.net

    - by Michael
    I'm looking to develop a CMS project based on UMBRACO but I also need to index the documents created and to offer search functionality therefore I would like to know if you have any suggestion for a lightweight search engine available in .net technology. The main requirement is to be simple and efficient (nothing complex like solr or sphinx ).

    Read the article

  • Combobox how to get the selected item to show a theme

    - by Michael Quiles
    I'm doing a tic tac toe game and I am trying to add a combo box that will change the applications background based on what the person selects right now I have summer, spring, fall, winter and the images are in the bin/debug folder how can I get this to work I don't know where to start and the tutorials are a bit confusing. Could you please help me

    Read the article

  • How to add padding for background image

    - by michael
    Hi, I have a linear layout which has a background image (a 9 patched png file). How can I add padding to left and right so that the background image does not take up the whole width? I have tried 'android:paddingLeft' and 'android:paddingRight', but that does not change anything. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingLeft="25dip" android:paddingRight="25dip" android:background="@drawable/background"> The whole background still stretches the whole screen width. Thank you for any help.

    Read the article

  • How to enable Apache internal debug log (Win32)

    - by Michael
    On Win32 I'm getting intermittent output like this at page header: order allow,deny deny from allorder allow,deny deny from all I'm running php script which has number of .htaccess files in each subfolder. I need to understand why sometimes apache is just dumping me a content of this files. So just wondering if there is any way to enable debug log. I've tried ErrorLog "e:/wamp/logs/apache_error.log" LogLevel debug However can't see any debug output neither in error nor in access logs. Thanks

    Read the article

  • Jquery how to do image show hid.

    - by Michael
    I am new to html especially to jquery but I want to show hide a photo on click. I pulled some sample code which is exactly what I want "I did not write this code" and I am wanting to modify the code for an image versus a div. The code is noted below. I have tried this several different ways and the My goal: 1. To hide an image versus a div tag Any help would be wonderful <!DOCTYPE html> <html> <head> <style> div { background:#def3ca; margin:3px; width:80px; display:none; float:left; text-align:center; } </style> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <button id="showr">Show</button> <button id="hidr">Hide</button> <div>Hello 3,</div> <div>how</div> <div>are</div> <div>you?</div> <script> $("#showr").click(function () { $("div:eq(0)").show("fast", function () { /* use callee so don't have to name the function */ $(this).next("div").show("fast", arguments.callee); }); }); $("#hidr").click(function () { $("div").hide(2000); }); </script> </body> </html> Show Hide Test

    Read the article

  • Best loose way to get objects with common base class

    - by Michael Teper
    I struggled to come up with a good title for this question, so suggestions are welcome. Let's say we have an abstract base class ActionBase that looks something like this: public abstract class ActionBase { public abstract string Name { get; } public abstract string Description { get; } // rest of declaration follows } And we have a bunch of different actions defined, like a MoveFileAction, WriteToRegistryAction, etc. These actions get attached to Worker objects: public class Worker { private IList<ActionBase> _actions = new List<ActionBase>(); public IList<ActionBase> Actions { get { return _actions; } } // worker stuff ... } So far, pretty straight-forward. Now, I'd like to have a UI for setting up Workers, assigning Actions, setting properties, and so on. In this UI, I want to present a list of all available actions, along with their properties, and for that I'd want to first gather up all the names and descriptions of available actions (plus the type) into a collection of the following type of item: public class ActionDescriptor { public string Name { get; } public string Description { get; } poblic Type Type { get; } } Certainly, I can use reflection to do this, but is there a better way? Having Name and Description be instance properties of ActionBase (as opposed to statics on derived classes) smells a bit, but there isn't an abstract static in C#. Thank you!

    Read the article

  • How to get horizontal menu to go to left when it's too big

    - by Michael
    Hello all, I've got a horizontal menu on my website: http://www.alcmariavictrix.nl When i browse it in small browsers (IPhone), the horizontal menu on top is screwed. What i want to perform is get that horizontal menu to the left when the browser can't display it all in one line. Does anyone know how to do this? example: The right way to do it This is the think i don't want This is how it should be done when it's wrong

    Read the article

  • how to install apc for php on mac osx mamp?

    - by michael
    i am running a mac with mamp and mamp pro. how do i check if i have apc enabled and if its not enabled or not installed how do i install it? thanks i am trying to get the apc upload loader to work that i found online and it gets stuck on NAN% when im uploading. this is a link: http://www.haughin.com/2007/10/23/php-upload-progress-with-php-52-apc/

    Read the article

  • Can an ActiveRecord before_save filter halt the save without halting the transaction?

    - by Michael Boutros
    Is there any way for a before_save filter to halt the entire save without halting the transaction? What I'm trying to do is have a "sample" version of my model that the user can interact with and save but the changes themselves are never actually saved. The following will halt the transaction and (naturally) return false when I call @model.update_attributes: before_filter :ignore_changes_if_sample def ignore_changes_if_sample if self.sample? return false end end Thanks!

    Read the article

  • MySQL: LOAD DATA reclaim disk space after delete

    - by Michael
    I have a DB schema composed of MYISAM tables, i am interested to delete old records from time to time from some of the tables. I know that delete does not reclaim the memory space, but as i found in a description of DELETE command, inserts may reuse the space deleted In MyISAM tables, deleted rows are maintained in a linked list and subsequent INSERT operations reuse old row positions. I am interested if LOAD DATA command also reuses the deleted space? UPDATE I am also interested how the index space reclaimed?

    Read the article

  • Setup database for Unit tests with Spring, Hibernate and Spring Transaction Support

    - by Michael Bulla
    I want to test integration of dao-layer with my service-layer in a unit-test. So I need to setup some data in my database (hsql). For this setup I need an own transaction at the begining of my testcase to ensure that all my setup is really commited to database before starting my testcase. So here's what I want to achieve: // NotTranactional public void doTest { // transaction begins setup database // commit transaction service.doStuff() // doStuff is annotated @Transactional(propagation=Propagation.REQUIRED) } Here is my not working code: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={"/asynchUnit.xml"}) @DirtiesContext(classMode=ClassMode.AFTER_EACH_TEST_METHOD) public class ReceiptServiceTest implements ApplicationContextAware { @Autowired(required=true) private UserHome userHome; private ApplicationContext context; @Before @Transactional(propagation=Propagation.REQUIRED) public void init() throws Exception { User user = InitialCreator.createUser(); userHome.persist(user); } @Test public void testDoSomething() { ... } } Leading to this exception: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63) at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:687) at de.diandan.asynch.modell.GenericHome.getSession(GenericHome.java:40) at de.diandan.asynch.modell.GenericHome.persist(GenericHome.java:53) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196) at $Proxy28.persist(Unknown Source) at de.diandan.asynch.service.ReceiptServiceTest.init(ReceiptServiceTest.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) I dont know whats the right way to get the transaction around setup database. What I tried: @Before @Transactional(propagation=Propagation.REQUIRED) public void setup() { setup database } - Spring seems not to start transaction in @Before-annotated methods. Beyond that, thats not what I really want, cause there are a lot merhods in my testclass which needs a slightly differnt setup, so I need several of that init-methods. @Transactional(propagation=Propagation.REQUIRED) public void setup() { setup database } public void doTest { init(); service.doStuff() // doStuff is annotated @Transactional(propagation=Propagation.REQUIRED) } -- init seems not to get started in transaction What I dont want to do: public void doTest { // doing my own transaction-handling setup database // doing my own transaction-handling service.doStuff() // doStuff is annotated @Transactional(propagation=Propagation.REQUIRED) } -- start mixing springs transaction-handling and my own seems to get pain in the ass. @Transactional(propagation=Propagation.REQUIRED) public void doTest { setup database service.doStuff() } -- I want to test as real as possible situation, so my service should start with a clean session and no transaction opened So whats the right way to setup database for my testcase?

    Read the article

  • Problem with thread after SCREEN_OFF in Android

    - by michael
    I’m doing an application that listens to the android.intent.action.SCREEN_OFF in a Service (if that matter) and then it is supposed to wait a few seconds and launch an action, I’ve tried a timer schedule method, thread and handler postDelay method but all of them seems to fail, they are never executed on a device, it seems like it’s being freezed/killed after phone is locked. It works on emulator and on device attached to USB, but never with device working on battery only, which actually is a main scenario. Do you know any solutions to this?

    Read the article

  • Script-Based Configuration in .net?

    - by Michael Stum
    One of the downsides of web.config/app.config is that it's just Magic Strings everywhere, since it's just an XML file. Interpreted languages like PHP or Ruby have the advantage that the configuration is just code that is executed. In .net, doing stuff in code requires a redeployment, which defeats the purpose. Now, before I build my own web.config replacement based on Boo or PowerShell I wanted to know if there is an existing one?

    Read the article

  • What should be DefaultLocation property of VS2010 setup to install application in C:\Users\[username

    - by Michael
    I have to install windows service using Visual Studio. Target location for the install is handled by “DefaultLocation” property in Visual Studio setup project. I had used [AppDataFolder] tag to install the application. As the result, it has been installed in “C:\Users[username]\AppData*Roaming*” folder. I can not figure out how to modify “DefaultLocation” property in such a way that application will be installed in C:\Users[username]\AppData*Local* folder. Any idea how to accomplish that?

    Read the article

  • How to launch a c program from another c program

    - by michael
    Hi, I have a c program which I can launch at command prompt. Is it possible for me the lunch this application in my another c program? If yes, how? All the google result shows me how to do that using pthread? Will that work? I suspect that I need a new process for my c program. Thank you.

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >