Search Results

Search found 24382 results on 976 pages for 'tutor process procedure f'.

Page 100/976 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • Integrate test process with Rspec and Cucumber in a plugin using Desert

    - by Romain Endelin
    Hello, I'm developing some rails plugins with desert, and I would like to use tests with RSpec and Cucumber in the development. RSpec is integrated by default in Desert plugins, but it gives me some bugs. Finally I have created a minimal application which use my plugin, and I try to test it like a normal application without plugin. But I dislike that solution, the plugin lost its modularity, and RSpec still returns me some bugs (he can't find the models/views/controllers located in the plugin...). So am I the only one who try to test a Desert plugin (or even in a classic plugin) ? May anyone know those matters and get a solution ?

    Read the article

  • Threading process in asp.net

    - by Zerotoinfinite
    Hi All, I am using asp.net 3.5 and C#. I have a blog site and I want that whenever user enter any comment, the suscriber related to that post will get the notification. So what I am doing that I am sending mail at the same time as the comment is inserted into the table, which sometimes take time because of the quantity of user. Is their any way that user enter the comment into the database and the send mail function will run asynchornysly which will not interfear user to go ahead with his task. please let me know how to acheieve it in a simplier way. Thanks in advance

    Read the article

  • Execute a BASH command in Python-- in the same process

    - by Baldur
    I need to execute the command . /home/db2v95/sqllib/db2profile before I can import ibm_db_dbi in Python 2.6. Executing it before I enter Python works: baldurb@gigur:~$ . /home/db2v95/sqllib/db2profile baldurb@gigur:~$ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ibm_db_dbi >>> but executing it in Python using os.system(". /home/db2v95/sqllib/db2profile") or subprocess.Popen([". /home/db2v95/sqllib/db2profile"]) results in an error. What am I doing wrong? Edit: this is the error I receive: > Traceback (most recent call last): > File "<file>.py", line 8, in > <module> > subprocess.Popen([". /home/db2v95/sqllib/db2profile"]) > File > "/usr/lib/python2.6/subprocess.py", > line 621, in __init__ > errread, errwrite) File "/usr/lib/python2.6/subprocess.py", > line 1126, in _execute_child > raise child_exception OSError: [Errno 2] No such file or directory

    Read the article

  • C# Process Binary File, Multi-Thread Processing

    - by washtik
    I have the following code that processes a binary file. I want to split the processing workload by using threads and assigning each line of the binary file to threads in the ThreadPool. Processing time for each line is only small but when dealing with files that might contain hundreds of lines, it makes sense to split the workload. My question is regarding the BinaryReader and thread safety. First of all, is what I am doing below acceptable. I have a feeling it would be better to pass only the binary for each line to the PROCESS_Binary_Return_lineData method. Please note the code below is conceptual. I looking for a but of guidance on this as my knowledge of multi-threading is in its infancy. Perhaps there is a better way to achieve the same result, i.e. split processing of each binary line. var dic = new Dictionary<DateTime, Data>(); var resetEvent = new ManualResetEvent(false); using (var b = new BinaryReader(File.Open(Constants.dataFile, FileMode.Open, FileAccess.Read, FileShare.Read))) { var lByte = b.BaseStream.Length; var toProcess = 0; while (lByte >= DATALENGTH) { b.BaseStream.Position = lByte; lByte = lByte - AB_DATALENGTH; ThreadPool.QueueUserWorkItem(delegate { Interlocked.Increment(ref toProcess); var lineData = PROCESS_Binary_Return_lineData(b); lock(dic) { if (!dic.ContainsKey(lineData.DateTime)) { dic.Add(lineData.DateTime, lineData); } } if (Interlocked.Decrement(ref toProcess) == 0) resetEvent.Set(); }, null); } } resetEvent.WaitOne();

    Read the article

  • How is Java Process.getOutputStream() Implemented?

    - by Amit Kumar
    I know the answer depends on the particular JVM, but I would like to understand how it is usually implemented? Is it in terms of popen (posix)? In terms of efficiency do I need to keep something in mind (other than using a Buffered stream as suggested by the javadoc). I would be interested to know if there is a general reference about implementations of JVMs which answers such questions.

    Read the article

  • Twisted - how to create multi protocol process and send the data between the protocols

    - by SpankMe
    Hey, Im trying to write a program that would be listening for data (simple text messages) on some port (say tcp 6666) and then pass them to one or more different protocols - irc, xmpp and so on. I've tried many approaches and digged the Internet, but I cant find easy and working solution for such task. The code I am currently fighting with is here: http://pastebin.com/ri7caXih I would like to know how to from object like: ircf = ircFactory('asdfasdf', '#asdf666') get access to self protocol methods, because this: self.protocol.dupa1(msg) returns error about self not being passed to active protocol object. Or maybe there is other, better, easier and more kosher way to create single reactor with multiple protocols and have actions triggeres when a message arrives on any of them, and then pass that message to other protocols for handling/processing/sending? Any help will be highly appreciated!

    Read the article

  • Silverlight file upload - file is in use by another process (Excel, Word)

    - by walkor
    Hi, all. I have a problem with uploading of the file in Silverlight application. Here is a code sample. In case when this file is opened in other application (excel or word for example) it fails to open it, otherwise it's working fine. I'm using OpenFileDialog to choose the file and pass it to this function. private byte[] GetFileContent(FileInfo file) { var result = new byte[] {}; try { using (var fs = file.OpenRead()) { result = new byte[file.Length]; fs.Read(result, 0, (int)file.Length); } } catch (Exception e) { // File is in use } return result; } Is there any way i can access this file or should i just notify the user that the file is locked?

    Read the article

  • Rails - good tool to create a scheduled background process which will regularly retrieve messages fr

    - by adam
    Background Job gets mentioned a lot but all the tutorials I've seen seem to indicate that its for queuing jobs which are created by some external event such as a user clicking "Send mail". But what about when you have code that needs to scheduled to run every 30 seconds to listen for new messages from twitter? Normally rake is recommended for set in stone schedules but it inst so efficient for frequent jobs as it has to to load the entire rails app each time. Can anyone recommend anything for this situation?

    Read the article

  • Receive and Process Email with ASP.NET / C# [closed]

    - by Arthur Chaparyan
    Possible Duplicates: Recommendations for a .NET component to access an email inbox coding for how to receive a mail in windows apllication What methods are there for having .NET code run and handle e-mails as they arrive? I'm developing a social networking site that will allow users to send an email to an email address that is for posting. This is the same thing Blogger does. This allows me to take a picture with my phone and send it to [email protected] and have it posted to my profile. The site is running IIS6 and I have full access to the server. Emails are currently being processed using the SMTP service that comes with Windows 2003 Server, but I can switch to another system without any issues. I am assuming I would have to somehow have the incoming emails either go into a folder that my application is watching or cause incoming emails to trigger a script. can anyone point me in the right direction?

    Read the article

  • Something like System.Diagnostics.Process.Start to run a stream

    - by phenevo
    Hi, I get from server images and videos by stream. Now I'm saving it: Stream str = client.GetFile(path); using (var outStream = new FileStream(@"c:\myFile.jpg", FileMode.Create)) { var buffer = new byte[4096]; int count; while ((count = str.Read(buffer, 0, buffer.Length)) > 0) { outStream.Write(buffer, 0, count); } } I can be jpg, mpg, flv and a lot of other multimedia types (Before I get stream I know what is a extension of this file). Now I want to not save it , bu run direct from stream. Is it possible ??

    Read the article

  • I don't get coredump with all process

    - by Antoine
    Hello, I try to get a coredump, so i use : ulimit -c unlimited I run my program in background, and I kill it : kill -SEGV %1 But i just get : [1]+ Exit 1 ./Test And no coredumps are created. I did the same with other programs and it works, so why that didn't work with all ? Anybody can help me ? Thanks. (GNU/Linux, Debian 2.6.26)

    Read the article

  • Web design process with CSS - during or after?

    - by SyaZ
    Which is the better practice? Add CSS during web designing you can see the result (or close) as early as possible and make required changes. You also know how many divs or spans you might need (eg to make curved cross-browser hover background). But as you add more and more components to the page sometimes things get hack-ish as you need to patch here and there to get the exact design required. Add CSS after finishing page design you can see the page overall structure as it is well, without styles. You get to see how accessible your site is, and modify it right away if it's not good enough (unlike the former case where you may break multiple CSS rules). Plus after you finished it, you only need to spend most of the time to alter only the CSS file, which is good to get the momentum going. Granted I have never tried the latter approach, but am seriously considering it for my next project if I can see convincing reasons -- or if it's no good at all. Thanks.

    Read the article

  • process semaphores linux - wait

    - by coubeatczech
    Hi, I try to code a simple program that starts and waits on the system semaphore until it gets terminated by signal. union semun { int val; struct semid_ds *buf; unsigned short int *array; struct seminfo *__buf; }; int main(){ int semaphores = semget(IPC_PRIVATE,1,IPC_CREAT | 0666); union semun arg; arg.val = 0; semctl(semaphores,0,SETVAL,arg); struct sembuf operations[1]; operations[0].sem_num = 0; operations[0].sem_op = -1; operations[0].sem_flg = 0; semop(semaphores,operations,1); fprintf(stderr,"Why?\n"); return 0; } I expect, that everytime this program gets executed, nothing actually happens and it waits on the semaphore, but everytime it goes through the semaphore and writes Why?. Why?

    Read the article

  • Matching process , issue with query

    - by Blerta Blerta
    i have this code which helps me match two different tables.. now, each of this tables, has a epos_id and a rbpos_id ! I have another table which has pairs of rbpos_id and epos_id, something like: id | epos_id | rbpos_id 1 a3566 465jd 2 hkiyb rbposi When i join this other table, i need to check this condition, i mean, the matching should be done, only and if, the epos_id and rbpos_id of the join i'm doing, have the same id,i mean, belong to the same row.. Here is my current query... Thanks! SELECT retailer.date, retailer.time, retailer.location, retailer.user_id,imovo.mobile_number ". "FROM retailer LEFT JOIN imovo ". " ON addtime(retailer.time, '0:0:50')>imovo.time AND retailer.time <imovo.time AND retailer.date=imovo.date

    Read the article

  • Make process run on non EDT (event dispatch thread) thread from EDT

    - by Aly
    I have a method running on the EDT and within that I want to make it execute something on a new (non EDT) thread. My current code is follows: @Override public void actionPerformed(ActionEvent arg0) { //gathering parameters from GUI //below code I want to run in new Thread and then kill this thread/(close the JFrame) new GameInitializer(userName, player, Constants.BLIND_STRUCTURE_FILES.get(blindStructure), handState); }

    Read the article

  • Monitor memory usage of child process

    - by Omry
    I have a Linux daemon that forks a few children and monitors them for crashes (restarting as needed). It will be great if the parent could monitor the memory usage of child processes - to detect memory leaks and restart child processes when the go beyond a certain size. How can I do this?

    Read the article

  • Process for linking static ObjC libraries in XCode

    - by madmik3
    I'm trying to link to a static library and I keep getting linker errors. I've found a few sites that post examples but I have not been able to see what I am doing wrong. First I create a project that will link to my lib add existing files find my .xcodeproj file select "Copy items into destination groups folder"... Select my host project as Add To Targets. Then I add a direct dependency to my host app expand targets double click MyHost.app click + under direct dependencies select my lib Then I set build flags double click MyHost application icon in Groups and Files. click the build tab then I set the OtherLinerFlag to -ObjC then I set Header Search Paths to my header file location for my static library. I pass the compile stage but any classes in my static lib cause linker error: literal-pointer@_OBJC@_cls_refs@SomeClass in MyHost.o thanks!

    Read the article

  • Getting base address of a process

    - by yoni0505
    I'm trying to make a program that read the timer value from Minesweeper. (OS is windows 7 64bit) Using cheat engine I found the base address of the variable, but it changes every time I run Minesweeper. What do I need to do to find out the base address automatically? Does it have something to do with the executable base address? Here's my code: #include <windows.h> #include <iostream> using namespace std; int main() { DWORD baseAddress = 0xFF1DAA38;//always changing DWORD offset1 = 0x18; DWORD offset2 = 0x20; DWORD pAddress1; DWORD pAddress2; float value = 0; DWORD pid; HWND hwnd; hwnd = FindWindow(NULL,"Minesweeper"); if(!hwnd)//didn't find the window { cout <<"Window not found!\n"; cin.get(); } else { GetWindowThreadProcessId(hwnd,&pid); HANDLE phandle = OpenProcess(PROCESS_VM_READ,0,pid);//get permission to read if(!phandle)//failed to get permission { cout <<"Could not get handle!\n"; cin.get(); } else { ReadProcessMemory(phandle,(void*)(baseAddress),&pAddress1,sizeof(pAddress1),0); ReadProcessMemory(phandle,(void*)(pAddress1 + offset1),&pAddress2,sizeof(pAddress2),0); while(1) { ReadProcessMemory(phandle,(void*)(pAddress2 + offset2),&value,sizeof(value),0); cout << value << "\n"; Sleep(1000); } } } }

    Read the article

  • How to process XML sernt via POST?

    - by John Conde
    I'm receiving XML sent via POST. Naturally I need to parse this XML to get at the goodies it holds for me. However, when I receive the XML is seems that PHP is parsing it like a query string. For example, this xml: <?xml version="1.0" encoding="utf-8"?> <ForgotPassword> <version>1.0</version> <authentication> <login>myresllerid</login> <apikey>1234567890abcdef</apikey> </authentication> <parameters> <emailAddress>[email protected]</emailAddress> </parameters> </ForgotPassword> Becomes this (from print_r($_REQUEST)): Array ( [ <?xml_version] => "1.0" encoding="utf-8"?> <IDCForgotPassword> <version>1.0</version> <authentication> <login>myresllerid</login> <apikey>1234567890abcdef</apikey> </authentication> <parameters> <emailAddress>[email protected]</emailAddress> </parameters> </IDCForgotPassword> ) You can see the XML is being broken up at the first equals sign (=) in the XML into a key/value pair. How do I avoid this?

    Read the article

  • get output of last Process on SSAS cube

    - by Raj More
    I have processed a SSAS cube. After it was done processing, I hit the close button - and then realized that I should have saved the output. I think SSAS stores the processing log as a text or XML file, but I do not know what folder to look into. Can someone direct me to retrieving processing logs?

    Read the article

  • Java Swing: JWindow appears behind all other process windows, and will not disappear

    - by Kim Jong Woo
    I am using JWindow to display my splash screen during the application start up. however it will not appear in front of all windows as it should, and it will not disappear as well. import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.Toolkit; import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JWindow; public class MySplash { public static MySplash INSTANCE; private static JWindow jw; public MySplash(){ createSplash(); } private void createSplash() { jw = new JWindow(); JPanel content = (JPanel) jw.getContentPane(); content.setBackground(Color.white); // Set the window's bounds, centering the window int width = 328; int height = 131; Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); int x = (screen.width - width) / 2; int y = (screen.height - height) / 2; jw.setBounds(x, y, width, height); // Build the splash screen JLabel label = new JLabel(new ImageIcon("splash.jpg")); JLabel copyrt = new JLabel("SplashScreen Test", JLabel.CENTER); copyrt.setFont(new Font("Sans-Serif", Font.BOLD, 12)); content.add(label, BorderLayout.CENTER); content.add(copyrt, BorderLayout.SOUTH); Color oraRed = new Color(156, 20, 20, 255); content.setBorder(BorderFactory.createLineBorder(oraRed, 0)); } public synchronized static MySplash getInstance(){ if(INSTANCE==null){ INSTANCE = new MySplash(); } return INSTANCE; } public void showSplash(){ jw.setAlwaysOnTop(true); jw.toFront(); jw.setVisible(true); return; } public void hideSplash(){ jw.setAlwaysOnTop(false); jw.toBack(); jw.setVisible(false); return; } } So in my main class which extends JFrame, I call my splash screen by SwingUtilities.invokeLater(new Runnable(){ @Override public void run() { MySplash.getInstance().showSplash(); } }); However, the JWindow appears behind the all open instances of windows on my computer. Hiding the JWindow also doesn't work. SwingUtilities.invokeLater(new Runnable(){ @Override public void run() { MySplash.getInstance().hideSplash(); } });

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >