Search Results

Search found 318 results on 13 pages for 'af'.

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

  • How to clear wxpython frame content when dragging a panel?

    - by aF
    Hello, I have 3 panels and I want to make drags on them. The problem is that when I do a drag on one this happens: How can I refresh the frame to happear its color when the panel is no longer there? This is the code that I have to make the drag: def onMouseMove(self, event): (self.pointWidth, self.pointHeight) = event.GetPosition() (self.width, self.height) = self.GetSizeTuple() if (self.pointWidth>100 and self.pointWidth<(self.width-100) and self.pointHeight < 15) or self.parent.dragging: self.SetCursor(wx.StockCursor(wx.CURSOR_SIZING)) """implement dragging""" if not event.Dragging(): self.w = 0 self.h = 0 return self.CaptureMouse() if self.w == 0 and self.h == 0: (self.w, self.h) = event.GetPosition() else: (posw, posh) = event.GetPosition() displacement = self.h - posh self.SetPosition( self.GetPosition() - (0, displacement)) else: self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW)) def onDraggingDown(self, event): if self.pointWidth>100 and self.pointWidth<(self.width-100) and self.pointHeight < 15: self.parent.dragging = 1 self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW)) self.SetBackgroundColour('BLUE') self.parent.SetTransparent(220) self.Refresh() def onDraggingUp(self, event): self.parent.dragging = 0 self.parent.SetTransparent(255) self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW)) and this are the binds for this events: self.Bind(wx.EVT_MOTION, self.onMouseMove) self.Bind(wx.EVT_LEFT_DOWN, self.onDraggingDown) self.Bind(wx.EVT_LEFT_UP, self.onDraggingUp) With this, if I click on the top of the panel, and move down or up, the panel position changes (I drag the panel) to the position of the mouse.

    Read the article

  • How use the google maps hand cursor in Python?

    - by aF
    Hello, I want to use the google maps hand cursor in Python but I don't know how to do it. I've downloaded the cursor but I only get to use the hand open, I also have a event that "closes" the hand when clicked but I don't know how can I change the style cursor on it. I say this because the google maps hand cursor has two style (the open and the closed hand). If you don't know how to use the other style you can also tell me how can I create another cursor where the close hand is the default style. If I have that, I only change the cursor and it's done. Thanks in advance :)

    Read the article

  • Win7 64/32 bits c# dll doubt

    - by aF
    Hello, is it possible to build a c# dll and tlb files in a win7 64 bits computer and make it work in a win7 32bits computer? Thanks in advance :) Edit: I am using a c++ dll that calls the .tlb file generated in my c# COM interop dll proj.

    Read the article

  • How to get the MD5 hex hash for a file using VBA?

    - by aF
    How can I get the MD5 hex hash for a file using VBA? I need a version that works for a file. Something as simple as this Python code: import hashlib def md5_for_file(fileLocation, block_size=2**20): f = open(fileLocation) md5 = hashlib.md5() while True: data = f.read(block_size) if not data: break md5.update(data) f.close() return md5.hexdigest() But in VBA.

    Read the article

  • How to debug without Visual Studio?

    - by aF
    Hello, Python - c++ dll - c# dll I have a com interop c# dll that is loaded in a wrapper c++ dll throught the .tlb file generated in c# to be used in a python project. When I run in my computer it works fine but when I run in a computer that just got formated it gives: WindowsError: exception code 0xe0434f4d I have the redistribute c++ installed and the .net compact framework 3.5 on the formatted computer. How can I see what is the correct exception on a computer that does not have visual studio installed? How can I debug all of this? I can't debug the dll's itself can I? Note: in my computer all works well so maybe is some dll or file missing. I allready used Dependency Walker to see if there's some dll missing, and nop!

    Read the article

  • How to remove one folder from C:\Windows\winsxs?

    - by aF
    Hello, I've installed: Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) and got the following folders: x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91 x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a I allready uninstalled the redistribute package but they continue overthere. I want to remove them because I want to test my program without installing nothing (I've included those dll's when building it in another computer). So, how can I remove those folders from C:\Windows\winsxs? Thanks in advance :D

    Read the article

  • How to fix this Speech Recognition wicked bug?

    - by aF
    I have this code in my C# project: public void startRecognition(string pName) { presentationName = pName; if (WaveNative.waveInGetNumDevs() > 0) { string grammar = System.Environment.GetEnvironmentVariable("PUBLIC") + "\\SoundLog\\Presentations\\" + presentationName + "\\SpeechRecognition\\soundlog.cfg"; if (File.Exists(grammar)) { File.Delete(grammar); } executeCommand(); /// Create an instance of SpSharedRecoContextClass which will be used /// to interface with the incoming audio stream recContext = new SpSharedRecoContextClass(); // Create the grammar object recContext.CreateGrammar(1, out recGrammar); //recContext.CreateGrammar(2, out recGrammar2); // Set up dictation mode //recGrammar2.SetDictationState(SpeechLib.SPRULESTATE.SPRS_ACTIVE); //recGrammar2.SetGrammarState(SPGRAMMARSTATE.SPGS_ENABLED); // Set appropriate grammar mode if (File.Exists(grammar)) { recGrammar.LoadCmdFromFile(grammar, SPLOADOPTIONS.SPLO_STATIC); //recGrammar.SetDictationState(SpeechLib.SPRULESTATE.SPRS_INACTIVE); recGrammar.SetGrammarState(SPGRAMMARSTATE.SPGS_ENABLED); recGrammar.SetRuleIdState(0, SPRULESTATE.SPRS_ACTIVE); } /// Bind a callback to the recognition event which will be invoked /// When a dictated phrase has been recognised. recContext.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler(handleRecognition); // System.Windows.Forms.MessageBox.Show(recContext.ToString()); // gramática compilada } } private static void handleRecognition(int StreamNumber, object StreamPosition, SpeechLib.SpeechRecognitionType RecognitionType, SpeechLib.ISpeechRecoResult Result) { string temp = Result.PhraseInfo.GetText(0, -1, true); _recognizedText = ""; // System.Windows.Forms.MessageBox.Show(temp); // System.Windows.Forms.MessageBox.Show(recognizedWords.Count.ToString()); foreach (string word in recognizedWords) { if (temp.Contains(word)) { // System.Windows.Forms.MessageBox.Show("yes"); _recognizedText = word; } } } This codes generates a dll that I use in another application. Now, the wicked bug: - when I run the startRecognition method in the beginning of the execution of the other application, this codes works very well. But when I run it some time after the beginning, this codes works but the handleRecognition method is never called. I see that the words are recognized because they appear on the Microsoft Speech Recognition app, but the handler method is never called. Do you know what's the problem with this code? NOTE: this project has some code that is allways being executed. Might that be the problem? Because the other code is running it doesn't allow it to this to run?

    Read the article

  • error calling c# com interop dll

    - by aF
    Hello, I have a python project that calls a c++ dll that calls a c# dll. I wanted all to run without installing visual studio 2008. I allready made the c++ part by installing Visual C++ 2008 SP1 Redistributable Package (x86) and I also installed .net framework 3.5. But now, when I call a function from c++ dll (and this one calls its correspondent in c#), it gives me this error: Traceback (most recent call last): File "C:\Users\Public\SoundLog\Code\Código Python\SoundLog\SoundLog.py", line 821, in OnStart Auxiliar.DataCollection.start(self) File "C:\Users\Public\SoundLog\Code\Código Python\SoundLog\Auxiliar\DataCollection.py", line 68, in start SoundLogDLL.run() File "C:\Users\Public\SoundLog\Code\Código Python\SoundLog\Auxiliar\SoundLogDLL.py", line 61, in run return apiRun() WindowsError: exception code 0xe0434f4d This works where I've installed full VS2008 pro version. What am I missing and what can I do to solve this?

    Read the article

  • How to fix this python error? RuntimeError: dictionary changed size during iteration

    - by aF
    Hello, it gives me this error: Exception in thread Thread-163: Traceback (most recent call last): File "C:\Python26\lib\threading.py", line 532, in __bootstrap_inner self.run() File "C:\Python26\lib\threading.py", line 736, in run self.function(*self.args, **self.kwargs) File "C:\Users\Public\SoundLog\Code\Código Python\SoundLog\SoundLog.py", line 337, in getInfo self.data1 = copy.deepcopy(Auxiliar.DataCollection.getInfo(1)) File "C:\Python26\lib\copy.py", line 162, in deepcopy y = copier(x, memo) File "C:\Python26\lib\copy.py", line 254, in _deepcopy_dict for key, value in x.iteritems(): RuntimeError: dictionary changed size during iteration while executing my python program. How can I avoid this to happen? Thanks in advance ;)

    Read the article

  • How to fix this Speech Recognition on C# wicked bug?

    - by aF
    Hello, I have this code in my C# project: public void startRecognition(string pName) { presentationName = pName; if (WaveNative.waveInGetNumDevs() > 0) { string grammar = System.Environment.GetEnvironmentVariable("PUBLIC") + "\\SoundLog\\Presentations\\" + presentationName + "\\SpeechRecognition\\soundlog.cfg"; if (File.Exists(grammar)) { File.Delete(grammar); } executeCommand(); /// Create an instance of SpSharedRecoContextClass which will be used /// to interface with the incoming audio stream recContext = new SpSharedRecoContextClass(); // Create the grammar object recContext.CreateGrammar(1, out recGrammar); //recContext.CreateGrammar(2, out recGrammar2); // Set up dictation mode //recGrammar2.SetDictationState(SpeechLib.SPRULESTATE.SPRS_ACTIVE); //recGrammar2.SetGrammarState(SPGRAMMARSTATE.SPGS_ENABLED); // Set appropriate grammar mode if (File.Exists(grammar)) { recGrammar.LoadCmdFromFile(grammar, SPLOADOPTIONS.SPLO_STATIC); //recGrammar.SetDictationState(SpeechLib.SPRULESTATE.SPRS_INACTIVE); recGrammar.SetGrammarState(SPGRAMMARSTATE.SPGS_ENABLED); recGrammar.SetRuleIdState(0, SPRULESTATE.SPRS_ACTIVE); } /// Bind a callback to the recognition event which will be invoked /// When a dictated phrase has been recognised. recContext.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler(handleRecognition); // System.Windows.Forms.MessageBox.Show(recContext.ToString()); // gramática compilada } } private static void handleRecognition(int StreamNumber, object StreamPosition, SpeechLib.SpeechRecognitionType RecognitionType, SpeechLib.ISpeechRecoResult Result) { string temp = Result.PhraseInfo.GetText(0, -1, true); _recognizedText = ""; // System.Windows.Forms.MessageBox.Show(temp); // System.Windows.Forms.MessageBox.Show(recognizedWords.Count.ToString()); foreach (string word in recognizedWords) { if (temp.Contains(word)) { // System.Windows.Forms.MessageBox.Show("yes"); _recognizedText = word; } } } This codes generates a dll that I use in another application. Now, the wicked bug: - when I run the startRecognition method in the beginning of the execution of the other application, this codes works very well. But when I run it some time after the beginning, this codes works but the handleRecognition method is never called. I see that the words are recognized because they appear on the Microsoft Speech Recognition app, but the handler method is never called. Do you know what's the problem with this code? Thanks in advance :D

    Read the article

  • How can I refresh wx.Frame?

    - by aF
    Hello, I have 3 panels and I want to make drags on them. The problem is that when I do a drag on one this happens: How can I refresh the frame to happear its color when the panel is no longer there?

    Read the article

  • looping array inside list in c#

    - by 3yoon af
    I have a list of array that contains multiple arrays. each array has 2 index .. First, I want to loop the list. Then i want to loop the array inside the list .. How can i do that ? I try to use this way, but it doesn't work ! foreach (string[] s in ArrangList1) { int freq1 = int.Parse(s[1]); foreach (string[] s1 in ArrangList) { int freq2 = int.Parse(s1[1]); if (freq1 < freq2) { backup = s; index1 = ArrangList1.IndexOf(s); index2 = ArrangList.IndexOf(s1); ArrangList[index1] = s1; ArrangList[index2] = s; } backup = null; } } it give me error in line 4.. I try to do the loop using other way .. but i don't know how to continue ! for (int i = 0; i < ArrangList1.Count; i++) { for (int j = 0; j < ArrangList1[i].Length; j++) { ArrangList1[i][1]; } } I use C# language .. Can someone help me, please?

    Read the article

  • Doubt about odbc's in c#

    - by aF
    Hello, I run a c# process and in the middle of the night this happens: ERROR [HY000][DataDirect][ODBC Sybase Wire Protocol driver] Timeout exceeded I know for sure that the database is allways active! But this keeps happening! Do you how can I fix this error? Thanks in advance!

    Read the article

  • read file and print in specific format c++

    - by 3yoon af
    Dear all, I have a program that i should write a code using c++ lauguage and i don't used this laugauge before.. I now how to write it in java or c#, but i should write it in c++ !! the code should read a text file (i do this step) and then print the output in specific format using the array (i don't now how to do this step) For example: The file has the following: Task distribution duration dependence A Normal 2,10 - B UNIF 2,7 A The code will print the following: The task A is a normal distribution and it is duration between 2 and 10. It doesn't depend on any task. Task B is unif distribution and ...... etc .. Can someone help me, please?

    Read the article

  • How to make an executable file in python?

    - by aF
    Hello, I want to make an executable file (.exe) of my python's application. I want to know how to do it but have this in mind: I use a c++ dll! Do I have to put the dll along side with the .exe or is there some other way? Thanks in advance!

    Read the article

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