Search Results

Search found 68 results on 3 pages for 'dimitri wetzel'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • How to find out which app locks a given USB storage device?

    - by Dimitri C.
    I'd like to unplug my USB mass storage device, but I get the following error message from Windows: Windows can't stop your 'XYZ' device because it is in use. Close any programs or windows that might be using the device, and then try again later. How can I find out which application locks the device, so I can safely unplug it without having to close all running applications first? Note: I'm working on a Windows Vista system.

    Read the article

  • What does this example bash startup script do?

    - by Dimitri
    I am trying to set up GNU Octave on my computer (Mac OS X 10.7.4). I am newbie in using Terminal and I need help to understand what the following script actually does: if [ -f ~/.bashrc ];then<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;. ~/.bashrc<br> fi<br> PATH=$PATH:/usr/local/bin<br> BASH_ENV=~/.bashrc<br> export BASH_ENV PATH<br> export GNUTERM=aqua<br> alias octave="/Applications/Octave.app/Contents/Resources/bin/octave"<br> alias gnuplot="/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot"<br> (taken from here: http://wikibox.stanford.edu/me112/index.php/Main/OctaveMatlabNotes) So this script begins with the simple conditional if statement. I don't understand the conditional expression - what is -f and .bashrc? What the statement . ~/.bashrc actually does? Then 2 variables are defined PATH and BASH_ENV. Why are they exported? Why GNUTERM=aqua is exported even if it's not defined anywhere? All I need is a script that would allow me to run Octave by simply typing octave in the terminal. I don't need an alias for the gnu plot. Thanks

    Read the article

  • Közkívánatra VB tippjáték újra

    - by Lajos Sárecz
    Dimitri Gielis kiváló APEX fejleszto újra beindította APEX alapon készült népszeru online tippjátékát, így már lehet fogadni az idei foci VB mérkozéseire! 4 éve indult a rendszer, mi kollégákkal rendszeresen meg szoktunk mérkozni ennek keretében. Jó szurkolást, és izgalmas tippjátékot mindenkinek. Ja, és APEX forever! :-)

    Read the article

  • Dartisans Ep. 16: Dart and Web Components Reloaded

    Dartisans Ep. 16: Dart and Web Components Reloaded In this episode of Dartisans, Dimitri Glazkov (one of the godfathers of Web Components) will give a presentation on Web Components. Also, John Messerly and Siggi Cherem (who helped build the dart-lang/dart-web-components library) will give a presentation on using Web Components in Dart. A lot of things have changed since our last episode focused on Web Components, and this is shaping up to be an awesome edition of Dartisans! From: GoogleDevelopers Views: 0 0 ratings Time: 01:00:00 More in Science & Technology

    Read the article

  • How to prevent jQuery FancyBox from closing immediately after submit?

    - by Dimitri
    Hi! I'm loading an inline registration form in a FancyBox from jQuery. However after submitting the form, the box immediately closes while there is some feedback that I want to show the user in the FancyBox itself. This feedback is generated on the server side and is printed in the FancyBox. How can I make the box only closing when their is no feedback anymore? I was thinking about using ajax to just refresh the FancyBox itself and not the whole page after refreshing. But I just can't figure out how this ajax $.ajax({type, cache, url, data, success}); works... Also it seems like there's no reaction from the 'submit bind' in the javascript. I hope someone can help me with this problem. I paste my code below. If any questions, plz ask.. Thx in advance! This is the javascript: <script type="text/javascript"> $(document).ready(function() { $("#various1").fancybox({ 'transitionIn' : 'none', 'transitionOut' : 'none', 'scrolling' : 'no', 'titleShow' : false, 'onClosed' : function() { $("#registration_error").hide(); } }); }); $("#registration_form").bind("submit", function() { if ($("#registration_error").val() != "Registration succeeded!") { $("#registration_error").show(); $.fancybox.resize(); return false; } $.fancybox.showActivity(); $.ajax({ type : "POST", cache : false, url : "/data/login.php", data : $(this).serializeArray(), success : function(data) { $.fancybox(data); } }); return false; }); This is the inline form that I show in the FancyBox: <div style="display: none;"> <div id="registration" style="width:227px;height:250px;overflow:auto;padding:7px;"> <?php echo "<p id=\"registration_error\">".$feed."</p>"; ?> <form id="registration_form" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"> <p> <label for="username">Username: </label> <input type="text" id="login_name" name="username" size="30" /> </p> <p> <label for="password">Password: </label> <input type="password" id="pass" name="pw" size="30" /> </p> <p> <label for="repeat_password">Repeat password: </label> <input type="password" id="rep_pass" name="rep_pw" size="30" /> </p> <p> <input type="submit" value="Register" name="register" id="reg" /> </p> <p> <em></em> </p> </form> </div> </div>

    Read the article

  • C# CreatePipe() -> Protected memory error

    - by M. Dimitri
    Hi all, I trying to create a pipe using C#. The code is quite simple but I get a error saying "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Here the COMPLETE code of my form : public partial class Form1 : Form { [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern bool CreatePipe(out SafeFileHandle hReadPipe, out SafeFileHandle hWritePipe, SECURITY_ATTRIBUTES lpPipeAttributes, int nSize); [StructLayout(LayoutKind.Sequential)] public struct SECURITY_ATTRIBUTES { public DWORD nLength; public IntPtr lpSecurityDescriptor; public bool bInheritHandle; } public Form1() { InitializeComponent(); } private void btCreate_Click(object sender, EventArgs e) { SECURITY_ATTRIBUTES sa = new SECURITY_ATTRIBUTES(); sa.nLength = (DWORD)System.Runtime.InteropServices.Marshal.SizeOf(sa); sa.lpSecurityDescriptor = IntPtr.Zero; sa.bInheritHandle = true; SafeFileHandle hWrite = null; SafeFileHandle hRead = null; if (CreatePipe(out hRead, out hWrite, sa, 4096)) { MessageBox.Show("Pipe created !"); } else MessageBox.Show("Error : Pipe not created !"); } } At the top I declare : using DWORD = System.UInt32; Thank you very much if someone can help.

    Read the article

  • What might cause the big overhead of making a HttpWebRequest call?

    - by Dimitri C.
    When I send/receive data using HttpWebRequest (on Silverlight, using the HTTP POST method) in small blocks, I measure the very small throughput of 500 bytes/s over a "localhost" connection. When sending the data in large blocks, I get 2 MB/s, which is some 5000 times faster. Does anyone know what could cause this incredibly big overhead? Update: I did the performance measurement on both Firefox 3.6 and Internet Explorer 7. Both showed similar results. Update: The Silverlight client-side code I use is essentially my own implementation of the WebClient class. The reason I wrote it is because I noticed the same performance problem with WebClient, and I thought that the HttpWebRequest would allow to tweak the performance issue. Regrettably, this did not work. The implementation is as follows: public class HttpCommChannel { public delegate void ResponseArrivedCallback(object requestContext, BinaryDataBuffer response); public HttpCommChannel(ResponseArrivedCallback responseArrivedCallback) { this.responseArrivedCallback = responseArrivedCallback; this.requestSentEvent = new ManualResetEvent(false); this.responseArrivedEvent = new ManualResetEvent(true); } public void MakeRequest(object requestContext, string url, BinaryDataBuffer requestPacket) { responseArrivedEvent.WaitOne(); responseArrivedEvent.Reset(); this.requestMsg = requestPacket; this.requestContext = requestContext; this.webRequest = WebRequest.Create(url) as HttpWebRequest; this.webRequest.AllowReadStreamBuffering = true; this.webRequest.ContentType = "text/plain"; this.webRequest.Method = "POST"; this.webRequest.BeginGetRequestStream(new AsyncCallback(this.GetRequestStreamCallback), null); this.requestSentEvent.WaitOne(); } void GetRequestStreamCallback(IAsyncResult asynchronousResult) { System.IO.Stream postStream = webRequest.EndGetRequestStream(asynchronousResult); postStream.Write(requestMsg.Data, 0, (int)requestMsg.Size); postStream.Close(); requestSentEvent.Set(); webRequest.BeginGetResponse(new AsyncCallback(this.GetResponseCallback), null); } void GetResponseCallback(IAsyncResult asynchronousResult) { HttpWebResponse response = (HttpWebResponse)webRequest.EndGetResponse(asynchronousResult); Stream streamResponse = response.GetResponseStream(); Dim.Ensure(streamResponse.CanRead); byte[] readData = new byte[streamResponse.Length]; Dim.Ensure(streamResponse.Read(readData, 0, (int)streamResponse.Length) == streamResponse.Length); streamResponse.Close(); response.Close(); webRequest = null; responseArrivedEvent.Set(); responseArrivedCallback(requestContext, new BinaryDataBuffer(readData)); } HttpWebRequest webRequest; ManualResetEvent requestSentEvent; BinaryDataBuffer requestMsg; object requestContext; ManualResetEvent responseArrivedEvent; ResponseArrivedCallback responseArrivedCallback; } I use this code to send data back and forth to an HTTP server.

    Read the article

  • JTable Delete All Rows Exception

    - by Dimitri
    Hi, I'm trying to delete all entrys from my abstractTableModel. As long as I don't delete the last remaining row, everything works fine, but as soon as I delete this one, I get an ArrayOutOfBoundsException. I'm using a DefaultRowSorter and this seems to be the Exception. Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0 at java.util.Vector.get(Vector.java:694) at graphics.tableModel.MyTableModel.getValueAt(MyTableModel.java:78) at graphics.tableModel.MyTableModel.getColumnClass(MyTableModel.java:90) at javax.swing.table.TableRowSorter.useToString(TableRowSorter.java:224) at javax.swing.DefaultRowSorter.updateUseToString(DefaultRowSorter.java:607) at javax.swing.DefaultRowSorter.sort(DefaultRowSorter.java:556) at javax.swing.DefaultRowSorter.shouldOptimizeChange(DefaultRowSorter.java:1008) at javax.swing.DefaultRowSorter.rowsDeleted(DefaultRowSorter.java:866) at javax.swing.JTable.notifySorter(JTable.java:4262) at javax.swing.JTable.sortedTableChanged(JTable.java:4106) at javax.swing.JTable.tableChanged(JTable.java:4383) at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280) my Code to delete all Rows: public void deleteAll() { int size = data.size()-1; data.clear(); this.fireTableRowsDeleted(0, size); } Same thing happens with simply deleting the last existing row. public void deleteRow(int row) { data.remove(row); } the way i'm calling deleteRow: for (int i = rows.length - 1; i >=0; i--) { tm.deleteRow(rows[i]); } tm.fireTableDataChanged(); thanks for your help

    Read the article

  • T-SQL Table Joins - Unique Situation

    - by Dimitri
    Hello Everyone. This is my first time encountering the case like this and don't quite know how to handle. Situation: I have one table tblSettingsDefinition, with fields: ID, GroupID, Name, typeID, DefaultValue. Then I have tblSettingtypes with fields TypeID, Name. And I have final table, tblUserSettings with fields SettingID, SettingDefinitionID, UserID, Value. The whole point of this is to have customizable settings. Setting can be defined for a Group or as global setting (if GroupID is NULL). It will have a default value, but if user modifies the setting, an entry is added to tblUserSettings that stores new value. I want to have a query that grabs user settings by first looking at the tblUserSettings, and if it has records for the given user, grabs them, if not retrieves default settings. But the trick is that no matter if user has settings or not, I need to have fields from other two table retrieved to know the setting's Type, Name etc... (which are stored in those other tables). I'm writing query something like this: SELECT * FROM tblSettingDefinition SD LEFT JOIN tblUserSettings US ON SD.SettingID = US.SettingDefinitionID JOIN tblSettingTypes ST ON SD.TypeID=ST.ID WHERE US.UserID=@UserID OR ((SD.GroupID IS NULL) OR (SD.GroupID=(SELECT GroupID FROM tblUser WHERE ID=@UserID))) but it retrieves settings for all users from tblUserSettings instead of just ones that match current @UserID. And if @UserID has no records in tblUserSettings, still, all user settings are retrieved instead of the defaults from tblSettingDefinition. Hope I made myself clear. Any help would be highly appreciated. Thank you.

    Read the article

  • What can be done to speed up synchronous WCF calls?

    - by Dimitri C.
    My performance measurements of synchronous WCF calls from within a Silverlight application showed I can make 7 calls/s on a localhost connection, which is very slow. Can this be speeded up, or is this normal? This is my test code: const UInt32 nrCalls = 100; ICalculator calculator = new CalculatorClient(); // took over from the MSDN calculator example for (double i = 0; i < nrCalls; ++i) { var call = calculator.BeginSubtract(i + 1, 1, null, null); call.AsyncWaitHandle.WaitOne(); double result = calculator.EndSubtract(call); } Remarks: CPU load is almost 0%. Apparently, the WCF module is waiting for something. I tested this both on Firefox 3.6 and Internet Explorer 7. I'm using Silverlight v3.0

    Read the article

  • Managing logs/warnings in Python extensions

    - by Dimitri Tcaciuc
    TL;DR version: What do you use for configurable (and preferably captured) logging inside your C++ bits in a Python project? Details follow. Say you have a a few compiled .so modules that may need to do some error checking and warn user of (partially) incorrect data. Currently I'm having a pretty simplistic setup where I'm using logging framework from Python code and log4cxx library from C/C++. log4cxx log level is defined in a file (log4cxx.properties) and is currently fixed and I'm thinking how to make it more flexible. Couple of choices that I see: One way to control it would be to have a module-wide configuration call. # foo/__init__.py import sys from _foo import import bar, baz, configure_log configure_log(sys.stdout, WARNING) # tests/test_foo.py def test_foo(): # Maybe a custom context to change the logfile for # the module and restore it at the end. with CaptureLog(foo) as log: assert foo.bar() == 5 assert log.read() == "124.24 - foo - INFO - Bar returning 5" Have every compiled function that does logging accept optional log parameters. # foo.c int bar(PyObject* x, PyObject* logfile, PyObject* loglevel) { LoggerPtr logger = default_logger("foo"); if (logfile != Py_None) logger = file_logger(logfile, loglevel); ... } # tests/test_foo.py def test_foo(): with TemporaryFile() as logfile: assert foo.bar(logfile=logfile, loglevel=DEBUG) == 5 assert logfile.read() == "124.24 - foo - INFO - Bar returning 5" Some other way? Second one seems to be somewhat cleaner, but it requires function signature alteration (or using kwargs and parsing them). First one is.. probably somewhat awkward but sets up entire module in one go and removes logic from each individual function. What are your thoughts on this? I'm all ears to alternative solutions as well. Thanks,

    Read the article

  • Deploy a jar in Jetty

    - by Dimitri
    Hi guys, I was wondering if is it possible to deploy a jar file in Jetty? If not, are there applications servers who can do so? I am beginner. I am asking this question because all the docs that i have found, it seems that we can only deploy war archive in application servers. Is that true?

    Read the article

  • How to avoid MissingMethodException?

    - by Dimitri C.
    If .NET 3.5 is installed, but not .NET 3.5 SP1, WaitHandle.WaitOne(int) throws a MissingMethodException. I'd like to be notified earlier on if the correct version of the .NET libraries is not available, for example when the application is started. Is this possible? Update: So my question question is twofold: a) How can I determine which version of the .NET library is required by an application? b) How can I determine the currently installed version of the .NET library?

    Read the article

  • How to apply CSS theme to only a specific jQuery-UI element?

    - by Thierry-Dimitri Roy
    I have a web site already build with my own CSS theme. I'm using jQuery UI "tabs" widget but no CSS from jQuery-UI. Now, I'm trying to add the "Date Picker" widget in one of my page. It would be great if I could reuse jQuery-UI default theme which is just fine. The problem is that the date picker theme is also applied to my tabs CSS. For example the "ui-widget" css properties is applied to both date picker and tabs elements. I can't seem to find a way to apply the css properties to only the date picker. I can't see a "super selector" that only applies to the date picker DIV. What would be the best way to handle this? [EDIT] The datepicker widget is really the problem. I cannot apply CSS style specific to it. Here is the starting code of the DIV that get pops up: <div style="position: absolute; top: 300.4px; left: 149px; display: block;" id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"><div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all"> As such, I cannot add a super selector. What would be great would be that the date picker widget supports CSS scope. But it does not. I'm stuck manually editing the jQuery CSS file. The Date Picker is currently being refactored. Hopefully the new code will address this issue.

    Read the article

  • Array subscript is not an integer

    - by Dimitri
    Hello folks, following this previous question Malloc Memory Corruption in C, now i have another problem. I have the same code. Now I am trying to multiply the values contained in the arrays A * vc and store in res. Then A is set to zero and i do a second multiplication with res and vc and i store the values in A. (A and Q are square matrices and mc and vc are N lines two columns matrices or arrays). Here is my code : int jacobi_gpu(double A[], double Q[], double tol, long int dim){ int nrot, p, q, k, tid; double c, s; double *mc, *vc, *res; int i,kc; double vc1, vc2; mc = (double *)malloc(2 * dim * sizeof(double)); vc = (double *)malloc(2 * dim * sizeof(double)); vc = (double *)malloc(dim * dim * sizeof(double)); if( mc == NULL || vc == NULL){ fprintf(stderr, "pb allocation matricre\n"); exit(1); } nrot = 0; for(k = 0; k < dim - 1; k++){ eye(mc, dim); eye(vc, dim); for(tid = 0; tid < floor(dim /2); tid++){ p = (tid + k)%(dim - 1); if(tid != 0) q = (dim - tid + k - 1)%(dim - 1); else q = dim - 1; printf("p = %d | q = %d\n", p, q); if(fabs(A[p + q*dim]) > tol){ nrot++; symschur2(A, dim, p, q, &c, &s); mc[2*tid] = p; vc[2 * tid] = c; mc[2*tid + 1] = q; vc[2*tid + 1] = -s; mc[2*tid + 2*(dim - 2*tid) - 2] = p; vc[2*tid + 2*(dim - 2*tid) - 2 ] = s; mc[2*tid + 2*(dim - 2*tid) - 1] = q; vc[2 * tid + 2*(dim - 2*tid) - 1 ] = c; } } for( i = 0; i< dim; i++){ for(kc=0; kc < dim; kc++){ if( kc < floor(dim/2)) { vc1 = vc[2*kc + i*dim]; vc2 = vc[2*kc + 2*(dim - 2*kc) - 2]; }else { vc1 = vc[2*kc+1 + i*dim]; vc2 = vc[2*kc - 2*(dim - 2*kc) - 1]; } res[kc + i*dim] = A[mc[2*kc] + i*dim]*vc1 + A[mc[2*kc + 1] + i*dim]*vc2; } } zero(A, dim); for( i = 0; i< dim; i++){ for(kc=0; kc < dim; k++){ if( k < floor(dim/2)){ vc1 = vc[2*kc + i*dim]; vc2 = vc[2*kc + 2*(dim - 2*kc) - 2]; }else { vc1 = vc[2*kc+1 + i*dim]; vc2 = vc[2*kc - 2*(dim - 2*kc) - 1]; } A[kc + i*dim] = res[mc[2*kc] + i*dim]*vc1 + res[mc[2*kc + 1] + i*dim]*vc2; } } affiche(mc,dim,2,"Matrice creuse"); affiche(vc,dim,2,"Valeur creuse"); } free(mc); free(vc); free(res); return nrot; } When i try to compile, i have this error : jacobi_gpu.c: In function ‘jacobi_gpu’: jacobi_gpu.c:103: error: array subscript is not an integer jacobi_gpu.c:103: error: array subscript is not an integer jacobi_gpu.c:118: error: array subscript is not an integer jacobi_gpu.c:118: error: array subscript is not an integer make: *** [jacobi_gpu.o] Erreur 1 The corresponding lines are where I store the results in res and A : res[kc + i*dim] = A[mc[2*kc] + i*dim]*vc1 + A[mc[2*kc + 1] + i*dim]*vc2; and A[kc + i*dim] = res[mc[2*kc] + i*dim]*vc1 + res[mc[2*kc + 1] + i*dim]*vc2; Can someone explain me what is this error and how can i correct it? Thanks for your help. ;)

    Read the article

  • Prob comparing pointers and integer in C

    - by Dimitri
    Hi I have a problem with this code. When i am using this function I have no warnings. : void handler(int sig){ switch(sig) { case SIGINT : { click++; fprintf(stdout,"SIGINT recu\n"); if( click == N){ exit(0); } } case SIGALRM : fprintf(stdout,"SIGALRM received\n"); exit(0); case SIGTERM: fprintf(stdout,"SIGTERM received\n"); exit(0); } } But when i rewrite the function with this new version, I have a " comparison between pointer and integer" warning on the if statement: void handler( int sig){ printf("Signal recu\n"); if( signal == SIGINT){ click++; fprintf(stdout,"SIGINT received; Click = %d\n",click); if(click == N){ fprintf(stdout,"Exiting with SIGINT\n"); exit(0); } } else if(signal == SIGALRM){ fprintf(stdout,"SIGALRM received\n"); exit(0); } else if(signal == SIGTERM){ fprintf(stdout,"SIGTERM received\n"); exit(0); } Can someone tell me where is the prob?

    Read the article

  • Mapping enum to a table with hibernate annotation

    - by Thierry-Dimitri Roy
    I have a table DEAL and a table DEAL_TYPE. I would like to map this code: public class Deal { DealType type; } public enum DealType { BASE("Base"), EXTRA("Extra"); } The problem is that the data already exist in the database. And I'm having a hard time mapping the classes to the database. The database looks something like that: TABLE DEAL { Long id; Long typeId; } TABLE DEAL_TYPE { Long id; String text; } I know I could use a simple @OneToMany relationship from deal to deal type, but I would prefer to use an enum. Is this possible? I almost got it working by using a EnumType.ORDINAL type. But unfortunately, my IDs in my deal type table are not sequential, and do not start at 1. Any suggestions?

    Read the article

  • Which application server should i choose for my project ?

    - by Dimitri
    Hi folks, I am currently developing an application for some researchers in my university.It's a small java program that you can use by command line. The next step is to package that program and deploy it to an application server. Some clients program will submit requests to the server who will call the tool that I wrote. Lately, we will add more tools to the server and he has to dispatch the requests to the right tool. Which application server fits my needs ? I have looked for Tomcat, Jetty and Glassfish but it seems that they are only used for web application. Is it possible to use those servers in some context different from web context? Which package archive should i use (jar, war) ? Any advice?

    Read the article

  • How to call a function though Control.BeginInvoke in a signal-slot-like fashion?

    - by Dimitri C.
    I'd like a delegate that calls a function in a different thread when it is invoked. Currently, I'm using the following implementation: delegate void someFunctionDelegate(); //... someFunctionDelegate callBackFunction = someForm.SomeFunction; someForm.Invoke(someFunctionDelegate); However, I'd like a more compact form, combining both the someForm instance and the SomeForm.SomeFunction member function. I'm thinking of something like this: var callBackFunction = new AsynchronousCrossThreadDelegate(someForm, SomeForm.SomeFunction); callBackFunction(); // Should call someForm.BeginInvoke(SomeForm.SomeFunction); Is there a way to do so in C#/.NET? Update I'm looking for a solution that will work for functions with 0 or more parameters.

    Read the article

< Previous Page | 1 2 3  | Next Page >