Daily Archives

Articles indexed Tuesday April 20 2010

Page 30/121 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • php replace a pattern

    - by Hulk
    Suppose in a file there is a pattern as sumthing.c: and asdfg.c: and many more.. with *.c: pattern How to replace this with the text yourinput and save the file using php The pattern is *.c thanks..

    Read the article

  • Windows Service Installation

    - by Goober
    Scenario I have a server, that has NO Visual Studio Installed. It literally has a normal command prompt and nothing installed yet. We don't want to install anything (except the .Net framework which we have already done). We just want to install a bunch of C# Windows Services that we have written. So far I have been installing and running the windows service on my local machine using a "setup and deploy" project that I built into the application, which I could then use to install the service locally. Question How can I install the service on the server? I imagine it can be done from the command prompt only, but what else do I need? - If anything? and where do I put the files that I want to install BEFORE I install them? I imagine I will have to compile the application on my local machine in Visual Studio, then copy it over to the server, and then run an install utility to install it on the server? Any help would be greatly appreciated.

    Read the article

  • MVVM Binding Selected RadOutlookBarItem

    - by Christian
    Imagine: [RadOutlookBarItem1] [RadOutlookBarItem2] [RadOutlookBar] [CONTENCONTROL] What i want to achieve is: User selects one of the RadOutlookBarItem's. Item's tag is bound like: Tag="{Binding SelectedControl, Mode=TwoWay}" MVVM Property public string SelectedControl { get { return _showControl; } set { _showControl = value; OnNotifyPropertyChanged("ShowControl"); } } ContentControl has multiple CustomControls and Visibility of those is bound like: <UserControl.Resources> <Converters:BoolVisibilityConverter x:Key="BoolViz"/> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <Views:ViewDocumentSearchControl Visibility="{Binding SelectedControl, Converter={StaticResource BoolViz}, ConverterParameter='viewDocumentSearchControl'}"/> <Views:ViewStartControl Visibility="{Binding SelectedControl, Converter={StaticResource BoolViz}, ConverterParameter='viewStartControl'}"/> </Grid> Converter: public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { // here comes the logic part... should return Visibility.Collapsed : Visibility.Visible based on 'object value' value System.Diagnostics.Debugger.Break(); return Visibility.Collapsed; } now, logically the object value is always set to null. So here's it comes to my question: How can i put a value into the SelectedControl Variable for the RadOutlookBarItem's Tag. I mean something like Tag="{Binding SelectedControl, Mode=TwoWay, VALUE='i.e.ControlName'"} So that i can decide, using the Convert Method, whether a specific Control's visibility is either set to collapsed or visible? help's appreciated Christian

    Read the article

  • Hyphen encoding (minus) in Google Base RSS feed

    - by pmells
    I am trying to create an automatic feed generation for data to be sent to Google Base using utf-8 encoding. However I am getting errors whenever hyphens are found telling me that there is an encoding error in the relevant attribute (title, description, product_type). I am currently using: &amp;minus; but I have also tried: &amp;#8722; neither of which have worked. I am using the following declaration at the top of the document: <?xml version="1.0" encoding="utf-8"?> Any help appreciated and let me know if I need to give more information!

    Read the article

  • Generate PDF - how to create paged HTML content beforehand?

    - by Alt_Doru
    My task is to create ready-to-print invoices from a .NET web app. I am already generating the printer-friendly HTML for an invoice - it consists of an invoice header (that will actually need to appear on each printed page) and invoice positions (that may span multiple printed pages). Now, my task is to generate a PDF server-side, populate a header on each of its pages, then populate its pages with invoice positions. I need to generate the PDF from the existing HTML data - by simply passing HTML input to the PDF generator library. I've started using ABCPDF - I am using the AddImageHtml method. The problem I have is that ABCPDF seems to expect me to supply HTML content already paged. So, it won't work correctly when I feed it HTML content that would span on more than 1 PDF page. So, my question is - do you have any suggestions on making this work with ABCPDF? Or, more generally speaking, what other tools/approaches would you use for this - generating PDF doc with headers/footers from HTML input? Thanks

    Read the article

  • MMS interception

    - by kamiomar
    Dear, is there any way to intercept MMS(not SMS). How to track outgoing and incoming MMS. i have completed SMS interception but not get any appropriate help to implement MMS interception. also provide links also if possible. thanks.

    Read the article

  • CSS: Namespace a piece of HTML

    - by Paul Tarjan
    I'm building a browser extension that will insert a chunk of HTML into some pages. I'd like the page's CSS to not apply to this section. What is the best way to do this? Is there a good reset I can put on the root element of my HTML and set it to !important so it gets applied after others?

    Read the article

  • How to load jQm modal on page load?

    - by Wazdesign
    Hi I am using jQm Window to load modal window. http://dev.iceburg.net/jquery/jqModal/#how i am trying to jqmShow Show jqModal element(s). $('#dialog').jqmShow(); $('.dialogs').jqmShow(); but it throws some JS error, but it does not load on the page load, please guide me for the same. TIA

    Read the article

  • Right clicking on QHeaderView inside of QTreeView

    - by taynaron
    I've written a descendant of QTreeView with multiple columns. I want to create a popup menu that appears whe nthe user right-clicks over the column headers. I have tried catching signals from QTreeView for this, but QTreeView doesn't seem to emit signals on the headers. QTreeView.header() does. I therefore believe I must either: 1: connect one of QHeaderView's signals to a popup function - I have been unable to find a signal that is triggered on a single right click - I have tried sectionClicked, sectionHandleDoubleClicked, sectionDoubleClicked, sectionPressed (not surprised the double click functions didn't catch a single right click - but they do catch a double right click) self.header().sectionClicked.connect(self.headerMenu) self.header().sectionHandleDoubleClicked.connect(self.headerMenu) self.header().sectionDoubleClicked.connect(self.headerMenu) self.header().sectionPressed.connect(self.headerMenu) or, 2: write a descendant of QHeaderView with my own MousePressEvent function, and use that for my headers. I have so far been unsuccessful in connecting the new header class to the QTreeView descendant. I keep getting a Segmentation Fault on runtime, with no more explanation. #in DiceView's init, where DiceHeaders is the QHeaderView descendant self.setHeader(DiceHeaders()) Any ideas?

    Read the article

  • Nested Model Form p1 Railscasts example

    - by arzon
    Has anyone managed to make the example at http://railscasts.com/episodes/196-nested-model-form-part-1 work? When I followed through the sample, it never saves any question nor the answer to the database but it manages to create a new survey entry. I am using: Rails 2.3.5 ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] nifty-generators (0.4.0)

    Read the article

  • How to log error queries in mysql?

    - by Kaizoku
    I know that there is general_log that logs all queries, but I want to find out which query has an error, and get the error message. I have tried running an error query on purpose, but it logs as a normal query and doesn't report it with error. Any ideas?

    Read the article

  • Software mirroring (RAID1) versus "Fake Raid" for new Windows 7 install

    - by kquinn
    I've just ordered two new hard drives for my main desktop and a copy of Windows 7 Professional 64-bit. I'd like to do a clean install of Win7 onto the new drives (leaving my old XP Pro boot partition around for a while in case something goes disastrously wrong, etc.). I want to have them set up in mirrored (RAID-1) mode. My understanding is that Win7 Pro can do software mirroring, but can I set this up directly at install time? If so, how? Note that I'd like the disk to be split into three partitions (OS/Apps&Data/Bulk data), all of which should be mirrored. Would it be better (more reliable or faster) to use my motherboard's hardware RAID support? My motherboard is an older nVidia nForce 680i SLI, which is not the most stable of motherboards, and I'm not sure how trustworthy its RAID1 configuration might be (or if Win7 could even detect and install onto a hardware-mirrored volume). Also, the performance characteristics of RAID1 are rather different than RAID0 or RAID5, and I'm wondering if Win7's software mirroring might actually be faster than hardware RAID1 (for example, I'm more of a Unix admin when I have to wear the sysadmin hat, and I've had great success deploying ZFS; most hardware RAID1 implementations have to read both disks and compare results to look for data errors, but ZFS can read from only one disk in the mirror and just use the built-in checksum, meaning it can have up to 2x the number of reads in-flight, as long as there's no data corruption). Edit: Okay, my question about whether Windows 7 can do software mirroring has been answered, and it can. I'm still unsure whether Windows software RAID or my motherboard's hardware "fake RAID" function is a better choice, though. Remember, I'm only interested in mirroring -- not the more complicated striping or parity operations that generally show the poor performance of crappy motherboard RAID solutions.

    Read the article

  • making multiple c# file for one asp.net page

    - by Nikhil K
    For my project(in asp.net) i wrote near 1000 lines of c# code for one asp.net page.It includes so many functions.The problem is,it is going complicated while i am writing more codes on one page.How can i make multiple c# files for one asp.net page?? I tried by adding new class in VS2008.But calling a function from one file to other is making error(item is not present in current file).How can i do that??

    Read the article

  • Problem installing mysql gem on Snow Leopard: uninitialized constant MysqlCompat::MysqlRes

    - by emson
    Hi All I've got a problem trying to install the Ruby mysql gem driver. I recently upgraded to Snow Leopard and did the Hivelogic manual install of MySQL. This all seems to work fine as I can access mysql from the command line and make changes to the database. My problem is that if I now use rake db:migrate I get: rake aborted! uninitialized constant MysqlCompat::MysqlRes (See full trace by running task with --trace) Now it appears that my mysql gem isn't working correctly as I can access MySQL fine from Python using the Python driver (which I compiled to). I therefore tried to rebuild the gem using the following command from this site: http://techliberty.blogspot.com/, (incidentally I am using a recent Intel MacBook Pro): sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config This compiles although I get No definition for the documentation: Building native extensions. This could take a while... Successfully installed mysql-2.8.1 1 gem installed Installing ri documentation for mysql-2.8.1... No definition for next_result No definition for field_name ... I'm a little stumped as my mysql_config is located in the correct place: /usr/local/mysql/bin/mysql_config And I have removed all other instances of the mysql gem, from my system. Any suggestions would be greatly appreciated. Many thanks. PS I saw this previous post http://stackoverflow.com/questions/1332207/uninitialized-constant-mysqlcompatmysqlres-using-mms2r-gem but it doesn't seem applicable for my version.

    Read the article

  • How to run the servlet program in netbeans IDE?

    - by Venkats
    I am new to java servlets. I learning from the basic. I have a simple servlet program, but i don't know how to run it. import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println("Hello World"); } } How can run the above program in netbeans. I am using the netbeans6.8. Whats are the procedures which i have to follow? Thanks in Advance.

    Read the article

  • Java: How ArrayList memory management

    - by cka3o4nik
    In my Data Structures class we have studies the Java ArrayList class, and how it grows the underlying array when a user adds more elements. That is understood. However, I cannot figure out how exactly this class frees up memory when lots of elements are removed from the list. Looking at the source, there are three methods that remove elements: [code] public E remove(int index) { RangeCheck(index); modCount++; E oldValue = (E) elementData[index]; int numMoved = size - index - 1; if (numMoved 0) System.arraycopy(elementData, index+1, elementData, index, numMoved); elementData[--size] = null; // Let gc do its work return oldValue; } public boolean remove(Object o) { if (o == null) { for (int index = 0; index < size; index++) if (elementData[index] == null) { fastRemove(index); return true; } } else { for (int index = 0; index < size; index++) if (o.equals(elementData[index])) { fastRemove(index); return true; } } return false; } private void fastRemove(int index) { modCount++; int numMoved = size - index - 1; if (numMoved 0) System.arraycopy(elementData, index+1, elementData, index, numMoved); elementData[--size] = null; // Let gc do its work } {/code] None of them reduce the datastore array. I even started questioning if memory free up ever happens, but empirical tests show that it does. So there must be some other way it is done, but where and how? I checked the parent classes as well with no success.

    Read the article

  • DLL response is to slow in Visual Studio

    - by magsto
    Hi, I use a 3rd party DLL in my VB.NET project (VS2005) that responds to slow and give wrong values in debug mode. In run-time mode everything works as expected. I do understand that there are something going on in the debug mode which makes the DLL communication slow. This behavior makes it hard to debug the application correctly. Is there any way to force VS to communicate with the DLL in "run-time" mode during debugging but let the rest of the project be in control of the debugger?

    Read the article

  • The Select query I am using is not working.. Can Somebody Guide me to the Correct way?

    - by Parth
    I am using the Select query as SELECT id, ordering FROM `jos_menu` WHERE ordering='".$rec['ordering'] -'1' ."' AND parent = '0' Here I need all the records whose ordering is less than 1 of the selected record's order($rec['ordering'] = getting from other select query ) when I am trying to echo the query I am not getting complete statement but getting only this -1' AND parent = '0' here is the whole snippet $where = ' WHERE (id = ' . implode( ' OR id = ', $cid ) . ')';//Pranav Dave Coded echo $selquery = "SELECT id, ordering FROM `jos_menu`".$where; //Pranav Dave Coded $db->setQuery( $selquery );//Pranav Dave Coded $record = $db->loadAssocList(); //Pranav Dave Coded if ($model->orderItem($id, -1)) { echo "<pre>"; print_r($model); /*exit;*/ //echo $updorderup = mysql_escape_string($model->_db->_sql);//Pranav Dave Coded foreach($record as $rec)//Pranav Dave Coded { echo $aboverow = "SELECT id, ordering FROM `jos_menu` WHERE ordering='".$rec['ordering'] -'1' ."' AND parent = '0'"; $db->setQuery( $aboverow ); $above = $db->loadAssoc(); echo "<pre>"; print_r($above); }//end of foreach }//end of if Please suggest me where I am getting wrong.....

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >