Search Results

Search found 24043 results on 962 pages for 'private methods'.

Page 83/962 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • How to extract a record in a text on string match in a file using bash

    - by private
    Hi I have a text file sample.txt as =====record1 title:javabook price:$120 author:john path:d: =====record2 title:.netbook author:paul path:f: =====record3 author:john title:phpbook subject:php path:f: price:$150 =====record4 title:phpbook subject:php path:f: price:$150 from this I want to split the data based on author, it should split into 2 files which contains test1.txt =====record1 title:javabook price:$120 author:john path:d: =====record3 author:john title:phpbook subject:php path:f: price:$150 and test2.txt =====record2 title:.netbook author:paul path:f: like above I want to classify the main sample.txt file into sub files based on author field dynamically. Please suggest me a way to do it.

    Read the article

  • Is it better to load up a class with methods or extend member functionality in a local subclass?

    - by Calvin Fisher
    Which is better? Class #1: public class SearchClass { public SearchClass (string ProgramName) { /* Searches LocalFile objects, handles exceptions, and puts results into m_Results. */ } DateTime TimeExecuted; bool OperationSuccessful; protected List<LocalFile> m_Results; public ReadOnlyCollection<LocalFile> Results { get { return new ReadOnlyCollection<LocalFile>(m_Results); } } #region Results Filters public DateTime OldestFileModified { get { /* Does what it says. */ } } public ReadOnlyCollection<LocalFile> ResultsWithoutProcessFiles() { return new ReadOnlyCollection<LocalFile> ((from x in m_Results where x.FileTypeID != FileTypeIDs.ProcessFile select x).ToList()); } #endregion } Or class #2: public class SearchClass { public SearchClass (string ProgramName) { /* Searches LocalFile objects, handles exceptions, and puts results into m_Results. */ } DateTime TimeExecuted; bool OperationSuccessful; protected List<LocalFile> m_Results; public ReadOnlyCollection<LocalFile> Results { get { return new ReadOnlyCollection<LocalFile>(m_Results); } } public class SearchResults : ReadOnlyCollection<LocalFile> { public SearchResults(IList<LocalFile> iList) : base(iList) { } #region Results Filters public DateTime OldestFileModified { get { /* Does what it says. */ } } public ReadOnlyCollection<LocalFile> ResultsWithoutProcessFiles() { return new ReadOnlyCollection<LocalFile> ((from x in this where x.FileTypeID != FileTypeIDs.ProcessFile select x).ToList()); } #endregion } } ...with the implication that OperationSuccessful is accompanied by a number of more interesting properties on how the operation went, and OldestFileModified and ResultsWithoutProcessFiles() also have several more siblings in the Results Filters section.

    Read the article

  • Class design, One class in two sources

    - by Pavla
    Is it possible define methods from the same class in different "CPP" files? I have header file "myClass.h" with: class myClass { public: // methods for counting ... // methods for other ... }; I would like to define "methods for counting" in one CPP and "methods for other" in other CPP. For clarity. Both groups of methods sometime use the same attributes. Is it possible? Thanks :).

    Read the article

  • Tinkerforge Rotation/LCD & JavaFX Plans

    - by Geertjan
    The first time I integrated two Tinkerforge bricklets, the day before yesterday, was pretty cool: import com.tinkerforge.BrickMaster; import com.tinkerforge.BrickletLCD20x4; import com.tinkerforge.BrickletRotaryPoti; import com.tinkerforge.IPConnection; import java.util.Calendar; public class TFConnectionDemo { private static final String HOST = "localhost"; private static final int PORT = 4223; private static final String MASTERBRICKUID = "somethingabc"; private static final String LCDUID = "somethingabc"; private static final String ROTIUID = "somethingabc"; private static IPConnection ipc; private static BrickMaster master = new BrickMaster(MASTERBRICKUID); private static BrickletLCD20x4 lcd = new BrickletLCD20x4(LCDUID); private static BrickletRotaryPoti poti = new BrickletRotaryPoti(ROTIUID); public static void main(String[] args) { try { ipc = new IPConnection(HOST, PORT); ipc.addDevice(master); ipc.addDevice(lcd); ipc.addDevice(poti); poti.setPositionCallbackPeriod(50); poti.addListener(new BrickletRotaryPoti.PositionListener() { @Override public void position(short position) { lcd.clearDisplay(); Calendar cal = Calendar.getInstance(); lcd.writeLine((short) 0, (short) 0, cal.getTime().toString()); lcd.writeLine((short) 1, (short) 0, "Rotation: " + position); } }); } catch (Exception e) { } } } The result is that the display text in the LCD bricklet changes while I turn the rotation bricklet: Now imagine that you have some JavaFX charts and, while you turn the rotation bricklet (i.e., the dial thing that I'm turning above), the values of the charts change. That would be pretty cool because you'd be able to animate the JavaFX charts by rotating an object externally, i.e., without even touching the keyboard. That would be pretty cool to see and shouldn't be hard to implement.

    Read the article

  • What is the best way to setup a public and private wireless access point on the same home network?

    - by Dougman
    For my home network (with internet provided from a cable modem) I would like to setup a secure wireless access point that I use for all of my personal connections (home PC, iPhone, Xbox, etc) and also another public access point that friends and folks in the neighborhood may connect to (for good karma). I want to ensure that my private traffic cannot be accessed from users of the public access point. I currently have one router that is running the Tomato firmware that I use with WPA security. What is the best way to accomplish this kind of setup securely (if it is possible in a home environment)?

    Read the article

  • What are your advice, methods, or practices to take out the most from a day on-site at a customer?

    - by Stephane
    We just deployed a large software that affects the way the user work-day looks like in many aspects. It changes a lot of things in the way they interact between eachothers. The developers of the team are taking rounds and spending one day at the customer's site to understand better what is a typical day for our user, and the learning process they go through. In this context, what How would you approach that day, what kind of questions do you ask, how do you observe the user. Are there defined practices that exist? Also what wouldn't you do? Did you have some bad experience out of this?

    Read the article

  • What are some options and methods to link a contact form on WordPress to an existing form processing script?

    - by eirlymeyer
    I’m searching for the best way to link the outgoing/output data in a WordPress contact form plugin on a WordPress website to an existing MySQL database where a contact form is processed. Scenario: A new site (Site A) is being developed with a contact form. Site B (old site) uses a contact form script to process contact form leads through an existing legacy database and a ColdFusion application. The goal is to create site A with a new contact form to continue the same existing processes. Site A is to become the new Site B.

    Read the article

  • How can I test database access methods in Java?

    - by javaStudent
    I want to write a test for a method that accesses a database such as following. public class MyClass{ public String getAddress(Int id){ String query = "Select * from Address where id="+id; //some additional statements resultSet = statement.executeQuery(); return result.getString(ADDRESS); } } How can I test this method? I am using Java.

    Read the article

  • How can Nautilus autodiscover a NAS?

    - by Private
    I have two machines: a 12.10 which autodiscovers my NAS fine and a 13.04 which does not autodiscover the NAS in Nautilus. The latter does not display the drive in Nautilus. I did install samba on the 13.04, I think a while ago, but I cannot remember what I did. Before I connected to the drive using afp, now I notice the 12.10 uses smb. How can I make my 13.04 autodiscover the NAS and how should I configure it?

    Read the article

  • Why would the servers network type change from Private to Public?

    - by Phil Hannent
    Just found a fault with a server, other users have had problems connecting to it. The setting on the network card had changed from Private (domain) network to Public (the other option being Home). The switch to the network interface would have caused the firewall to block a lot of normal functions. I am guessing that since the event log showed no reason for the change that it might be due to a complete shutdown we had recently where someone powered up the machines, however the domain controllers might not have been booted up first. Any confirmation that this might be the case?

    Read the article

  • How can i access windows XP remote desktop on private IP from internet?

    - by Jennie
    So the machine is behind a DSL router on a private IP so that it can not receive inbound requests. I want to know: Is there anyway to setup the router NAT (i highly doubt it supports one to one port mapping) without disturbing other users on the same router. I have another machine on internet which has public IP on it without any firewall. Can i use this machine as a relay server so that to initiate the connection, the XP machine send an outbound request and this relay server makes my connection through and then i can access my machine on pvt ip without any problem. Please tell??

    Read the article

  • How to build a private Wi-Fi Network server with VMware?

    - by Maarten Schermer
    For a school project, we have to build a Private network with VMware vSphere , which we can connect to with a Username and Password. On the network we want to create a folder for each Useraccount. Also we must have add a few groups (Admin,Customer,Manager). We must be able to connect to our network via the school Wi-Fi. We want to build a safe and secure network, with an easy way to access the network. Do you have any tips on how to approach this?

    Read the article

  • /dev/sda2 contains a filesystem with error after partitioning

    - by Private
    I just wanted to create a separate home partition on my Ubuntu 12.10 system. I booted the liveDVD, resized the sda2 partition (28gb of data resized to 30gb based on MiB [originally on a 100gb partition]) and made a new ext4 partition for the home folder. The drive is an SSD drive. I had changed the settings (noatime etc.) for SSD succesfully a week ago. On reboot I get the following error: /dev/sda2 contains a filesystem with errors Inode 74669 has an invalid extent node (blk 6881289) fsd / [953] terminated with status 4 What would you suggest me to do? If I can avoid a clean install that would save me a lot of time (I had just done all the config). I was following this HOWTO, but I did not get to changing any of the files or configs other than those with gparted. I have a (two-week old) SSD Samsung drive which is functioning just fine (other specs see bottom of this question). Other specs: 64bit 12.10, i7, 8gb ram, nvidia.

    Read the article

  • Best practice for comments above methods in a grails application?

    - by Travis
    I'm writing a grails application and am not sure what the best practice is with regard to comments outside of method blocks. I've done a bit of research and there seems to be conflicting views on how and when these sort of comments should be used. In lots of source code I have seen there seems to be comments above every method detailing what that method does. I'm not sure if grails should be differnet? My question is should I have a comment above each method in my controllers, services and domain objects? i.e /* * This method displays the index page */ def index(){ render view : "index" }

    Read the article

  • Establish connection with an IP camera behind a modem-router assigned with a private IP by Internet Service Provider?

    - by silvernightstar
    Most solutions out there require the modem-router to have been assigned a public IP by the ISP. After which, one can access the IP camera via a portforward setting on the router. However, my ISP only provides private IPs internal to their system (they probably have a limited pool of public IPs). So I am unable to view my IP cameras in the way described. I'm wondering if there's a way to work around this problem without having to need a public IP. Since, after all, two users on Yahoo Messenger or Facebook Chat are able to find one another and exchange data despite both sides being within the internal networks of their respective ISPs. Given that I only plan to view my IP cameras via iOS or Android running on a smartphone or tablet, any ready-to-use solutions out there?

    Read the article

  • What are some methods for pulling information and interacting with flash games?

    - by Xploit
    In general, how should I approach interacting with a flash game pragmatically? The flash game is online and I would like to be able to pull information from the game, make computations, and send the appropriate keystrokes back to the flash game? I'm having difficult deciding how to begin. Any specific libraries or languages that you feel would be best for accomplishing this task? I would like it to be as fast as possible. Are there ways of doing this without taking screen shots and simulating keyboard presses?

    Read the article

  • What are good/fast methods to pull data from a database using JavaScript?

    - by Yatrix
    I'm pretty new to web technologies and I am creating a filter control that will have cascading controls. We are doing a lot of this through JavaScript and are debating the best route to take to the database. HTTPHandlers, WebServices and Ajax are all being considered (or a combination of them). We want to be able to handle a million rows in theory, so it has to be scalable to at that. We are going through JavaScript as our page must not do post-backs, if your'e wondering. I'm asking from an architectural standpoint, but will take any useful information. Links, control suggestions - anything you have, I'll happily listen to.

    Read the article

  • In C and C++, what methods can prevent accidental use of the assignment(=) where equivalence(==) is needed?

    - by DeveloperDon
    In C and C++, it is very easy to write the following code with a serious error. char responseChar = getchar(); int confirmExit = 'y' == tolower(responseChar); if (confirmExit = 1) { exit(0); } The error is that the if statement should have been: if (confirmExit == 1) As coded, it will exit every time, because the assignment of the confirmExit variable occurs, then confirmExit is used as the result of the expression. Are there good ways to prevent this kind of error?

    Read the article

  • How do I combine the two methods of cryptography, CBC cipher block and Vingenere Chiper [on hold]

    - by Bangpe
    Code Vingenere static String encrypt(String text, final String key) { String res = ""; text = text.toUpperCase(); for (int i = 0, j = 0; i < text.length(); i++) { char c = text.charAt(i); if (c < 'A' || c > 'Z') continue; res += (char)((c + key.charAt(j) - 2 * 'A') % 26 + 'A'); j = ++j % key.length(); } return res; } Code CBC Chiper public CbcBlockCipher( BlockCipher blockCipher ) { super( blockCipher.keySize(), blockCipher.blockSize() ); this.blockCipher = blockCipher; iv = new byte[blockSize()]; zeroBlock( iv ); temp = new byte[blockSize()]; }

    Read the article

  • Why has the accessor methods from the JavaBean specification become the standard for Java development?

    - by Dakotah North
    The JavaBeans Specification describes a JavaBean as A Java Bean is a reusable software component that can be manipulated visually in a builder tool Since the majority of the lines of code that are written seem to have nothing to do with being manipulated visually in a builder tool, why has the JavaBean specification been the "way" to write object oriented code? I would like to forgo the traditional getter/setter in favor of Fluent Interfaces all throughout the code, not just in builders but fear doing so since this is traditionally not the way way object oriented code is written in Java.

    Read the article

  • What methods of requirements elicitation are suitable when I do not have direct access to the user base?

    - by metadice
    I am working on an application to create invoices. There are some features that are required based on the type of the application and are common to all invoice applications. However, we still need to determine what unique needs the user base might have. We do not have direct access to the users to obtain requirements or user stories. What techniques are most suitable for eliciting high-quality requirements from users when direct or frequent access is not possible?

    Read the article

  • Can I store multiple private keys in one Putty PPK file?

    - by RedGrittyBrick
    I have multiple accounts on a server, say for example red webadmin testuser At the moment I have private keys for these in separate PPK files. I have shortcuts to these on the desktop - so clicking the desktop icon launches Pageant and prompts for a password. After doing this for each PPK file, I can log in and out of the server(s) multiple times during the day using various user-ids without entering passwords. So far so good. Could I streamline this further by somehow combining all these PPK files into a single PPK file? If so how?

    Read the article

  • openVAS - Microsoft RDP Server Private Key Information Disclosure Vulnerability - false Alarm?

    - by huebkov
    I performed a openVAS scan on a Windows Server 2008 R2 and got a report for a high threat level vulnerability called Microsoft RDP Server Private Key Information Disclosure Vulnerability. An remote attacker could perform a man-in-the-middle attack to gain access to a RDP session. Affected Software is Microsoft RDP 5.2 and below. My server uses RDP 7.1, is this alarm a false alarm? Security Advisor Pages say: Solution Status Unpatched, No remedy... References http://secunia.com/advisories/15605/ http://xforce.iss.net/xforce/xfdb/21954/ http://www.oxid.it/downloads/rdp-gbu.pdf CVE: CVE-2005-1794 BID:13818

    Read the article

  • how to design LAN connectivity between private and corporate ?

    - by maruti
    there is a bunch of servers connected to shared storage in a private LAN (10.x.x.x). this privateLAN is managed by a windows server (DHCP, DNS and directory services). how can these hosts be accessed from outside of this privateLAN? Eg. Remote desktop. can the NIC2 on each of the hosts be connected to the other public LAN (compromising speed or security? what are improtant considerations: additional hardware? like switches? routing&DNS software?

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >