Daily Archives

Articles indexed Saturday October 6 2012

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

  • How to remove hyperlink but keep text for an array of links?

    - by Keith Donegan
    My question is fairly similar to this question: Remove hyperlink but keep text? but, I can't seem to workout how I can feed an array of class names and do this in one go? For Example <a class="unwrap" href="#">Blah</a> <a class="unwrap" href="#">Blah</a> <a href="#">Blah</a> <a class="unwrap" href="#">Blah</a> I would just like the links with the unwrap class to be modified.

    Read the article

  • How can I delete ghost database field between a special date?

    - by Chiyou
    I have a mysql table with many user input and I want to delete ghost e-mail between a special date. I use this query and it seems to work very good: DELETE u1 From tx_table u1 JOIN tx_table u2 USING (email) WHERE u1.tstamp < u2.tstamp but I want to delete between a longer time. When I add 300 it seems to delete everything in my table: DELETE u1 From tx_table u1 JOIN tx_table u2 USING (email) WHERE u1.tstamp < u2.tstamp+300. How can I add 5 minutes to the tstamp with SQL?

    Read the article

  • Java Thread execution on same data

    - by AR89
    first of all here is the code, you can just copy an paste import java.util.ArrayList; public class RepetionCounter implements Runnable{ private int x; private int y; private int[][] matrix; private int xCounter; private int yCounter; private ArrayList<Thread> threadArray; private int rowIndex; private boolean[] countCompleted; public RepetionCounter(int x, int y, int [][]matrix) { this.x = x; this.y = y; this.matrix = matrix; this.threadArray = new ArrayList<Thread>(matrix.length); this.rowIndex = 0; for(int i = 0; i < matrix.length; i++){ threadArray.add(new Thread(this)); } countCompleted = new boolean[matrix.length]; } public void start(){ for (int i = 0; i < threadArray.size(); i++){ threadArray.get(i).start(); this.rowIndex++; } } public void count(int rowIndex) { for(int i = 0; i < matrix[rowIndex].length; i++){ if (matrix[rowIndex][i] == x){ this.xCounter++; } else if (matrix[rowIndex][i] == y){ this.yCounter++; } } } @Override public void run() { count(this.rowIndex); countCompleted[this.rowIndex] = true; } public int getxCounter() { return xCounter; } public void setxCounter(int xCounter) { this.xCounter = xCounter; } public int getyCounter() { return yCounter; } public void setyCounter(int yCounter) { this.yCounter = yCounter; } public boolean[] getCountCompleted() { return countCompleted; } public void setCountCompleted(boolean[] countCompleted) { this.countCompleted = countCompleted; } public static void main(String args[]){ int[][] matrix = {{0,2,1}, {2,3,4}, {3,2,0}}; RepetionCounter rc = new RepetionCounter(0, 2, matrix); rc.start(); boolean ready = false; while(!ready){ for(int i = 0; i < matrix.length; i++){ if (rc.getCountCompleted()[i]){ ready = true; } else { ready = false; } } } if (rc.getxCounter() > rc.getyCounter()){ System.out.println("Thre are more x than y"); } else {System.out.println("There are:"+rc.getxCounter()+" x and:"+rc.getyCounter()+" y"); } } } What I want this code to do: I give to the object a matrix and tow numbers, and I want to know how much times these two numbers occurs in the matrix. I create as many thread as the number of rows of the matrix (that' why there is that ArrayList), so in this object I have k threads (supposing k is the number of rows), each of them count the occurrences of the two numbers. The problem is: if I run it for the first time everything work, but if I try to execute it another time I get and IndexOutOfBoundException, or a bad count of the occurrences, the odd thing is that if I get the error, and modify the code, after that it will works again just for once. Can you explain to me why is this happening?

    Read the article

  • Multithreading using pthread in C++ with shared variables

    - by Saviour Self
    I'm new to threading (and C/C++ for that matter), and I'm attempting to use multiple threads to access shared variables. In the main, I've created a variable char inputarray[100]; Thread 1: This thread will be reading data from stdin in 2 byte bursts, and appending them to the inputarray. (input by feeding a file in) Thread 2: This thread will be reading data 1 byte at a time, performing a calculation, and putting its data into an output array. Thread 3: This thread will be outputting data from the output array in 2 byte bursts. (stdout) I've attempted the input part and got it working by passing a struct, but would like to do it without using a struct, but it has been giving me problems. If I can get input down, I'm sure I'll be able to use a similar strategy to complete output. Any help would be greatly appreciated. Below is a rough template for the input thread. #include <stdio.h> #include <pthread.h> using namespace std; void* input(void* arg) { char reading[3]; fread(reading,1,2,stdin); //append to char inputarray[]..??? } int main() { char inputarray[100]; pthread_t t1; pthread_create(&t1, NULL, &input, &inputarray); void *result; pthread_join(t1,&result); return 0; }

    Read the article

  • Python: Data Object or class

    - by arg20
    I enjoy all the python libraries for scraping websites and I am experimenting with BeautifulSoup and IMDB just for fun. As I come from Java, I have some Java-practices incorporated into my programming styles. I am trying to get the info of a certain movie, I can either create a Movie class or just use a dictionary with keys for the attributes. My question is, should I just use dictionaries when a class will only contain data and perhaps almost no behaviour? In other languages creating a type will help you enforce certain restrictions and because of type checks the IDE will help you program, this is not always the case in python, so what should I do? Should I resort to creating a class only when there's both, behaviour and data? Or create a movie class even though it'll probably be just a data container? This all depends on your model, in this particular case either one is fine but I'm wondering about what's a good practice.

    Read the article

  • How can I read/write data from a file?

    - by samy
    I'm writing a simple chrome extension. I need to create the ability to add sites URLs to a list, or read from the list. I use the list to open the sites in the new tabs. I'm looking for a way to have a data file I can write to, and read from. I was thinking on XML. I read there is a problem changing the content of files with Javascript. Is XML the right choice for this kinda thing? I should add that there is no web server, and the app will run locally, so maybe the problem websites are having are not same as this. Before I wrote this question, I tried one thing, and started to feel insecure because it didn't work. I made a XML file called Site.xml: <?xml version="1.0" encoding="utf-8" ?> <Sites> <site> <url> http://www.sulamacademy.com/AddMsgForum.asp?FType=273171&SBLang=0&WSUAccess=0&LocSBID=20375 </url> </site> <site> <url> http://www.wow.co.il </url> </site> <site> <url> http://www.Google.co.il </url> </site> I made this script to read the data from him, and put in on the html file. function LoadXML() { var ajaxObj = new XMLHttpRequest(); ajaxObj.open('GET', 'Sites.xml', false); ajaxObj.send(); var myXML = ajaxObj.responseXML; document.write('<table border="2">'); var prs = myXML.getElementsByTagName("site"); for (i = 0; i < prs.length; i++) { document.write("<tr><td>"); document.write(prs[i].getElementsByName("url")[0].childNode[0].nodeValue); document.write("</td></tr>"); } document.write("</table"); }

    Read the article

  • How can i set isdigit() command as a variable?

    - by Nick
    I'm new to python but I caught on to the basics pretty quick and decided to start trying to make a program while I'm still learning, since I learn best by actually doing things. So I'm making a program in python that will add polynomials and I need to see if a character from the parser is numeric im using the isdigit() command. Instead of having to type isdigit() all the time in my code such as n.isdigit(), I want to assign it to a variable t = 'isdigit()' and then type n.t. This doesn't work, so is there an alternative to not typing the whole command?

    Read the article

  • merge two binary images using Matlab

    - by Pier-alexandre Bouchard
    I need to create two different black binary rectangles using Matlab, to overlay a part of both and to extract the insertion. How can I overlay two binary images? -------|----------| | | 2 | | 1 |----|-----| | | |-----------| I created my two binary images using the false(X, Y) Matlab function. I dont find how to produce the merge the two images and to extract the insertion.

    Read the article

  • Why can't my main class see the array in my calender class

    - by Rocky Celltick Eadie
    This is a homework problem. I'm already 5 days late and can't figure out what I'm doing wrong.. this is my 1st semester in Java and my first post on this site Here is the assignment.. Create a class called Calendar. The class should contain a variable called events that is a String array. The array should be created to hold 5 elements. Use a constant value to specify the array size. Do not hard code the array size. Initialize the array in the class constructor so that each element contains the string “ – No event planned – “. The class should contain a method called CreateEvent. This method should accept a String argument that contains a one-word user event and an integer argument that represents the day of the week. Monday should be represented by the number 1 and Friday should be represented by the number 5. Populate the events array with the event info passed into the method. Although the user will input one-word events, each event string should prepend the following string to each event: event_dayAppoinment: (where event_day is the day of the week) For example, if the user enters 1 and “doctor” , the first array element should read: Monday Appointment: doctor If the user enters 2 and “PTA” , the second array element should read: Tuesday Appointment: PTA Write a driver program (in a separate class) that creates and calls your Calendar class. Then use a loop to gather user input. Ask for the day (as an integer) and then ask for the event (as a one word string). Pass the integer and string to the Calendar object’s CreateEvent method. The user should be able enter 0 – 5 events. If the user enters -1, the loop should exit and your application should print out all the events in a tabular format. Your program should not allow the user to enter invalid values for the day of the week. Any input other than 1 – 5 or -1 for the day of the week would be considered invalid. Notes: When obtaining an integer from the user, you will need to use the nextInt() method on your Scanner object. When obtaining a string from a user, you will need to use the next() method on your Scanner object. Here is my code so far.. //DRIVER CLASS /** * * @author Rocky */ //imports scanner import java.util.Scanner; //begin class driver public class driver { /** * @paramargs the command line arguments */ //begin main method public static void main(String[] args) { //initiates scanner Scanner userInput = new Scanner (System.in); //declare variables int dayOfWeek; String userEvent; //creates object for calender class calendercalenderObject = new calender(); //user prompt System.out.println("Enter day of week for your event in the following format:"); System.out.println("Enter 1 for Monday"); System.out.println("Enter 2 for Tuesday"); System.out.println("Enter 3 for Wednsday"); System.out.println("Enter 4 for Thursday"); System.out.println("Enter 5 for Friday"); System.out.println("Enter -1 to quit"); //collect user input dayOfWeek = userInput.nextInt(); //user prompt System.out.println("Please type in the name of your event"); //collect user input userEvent = userInput.next(); //begin while loop while (dayOfWeek != -1) { //test for valid day of week if ((dayOfWeek>=1) && (dayOfWeek<=5)){ //calls createEvent method in calender class and passes 2 variables calenderObject.createEvent(userEvent,dayOfWeek); } else { //error message System.out.println("You have entered an invalid number"); //user prompts System.out.println("Press -1 to quit or enter another day"); System.out.println("Enter 1 for Monday"); System.out.println("Enter 2 for Tuesday"); System.out.println("Enter 3 for Wednsday"); System.out.println("Enter 4 for Thursday"); System.out.println("Enter 5 for Friday"); System.out.println("Enter -1 to quit"); //collect user input dayOfWeek = userInput.nextInt(); //end data validity test } //end while loop } //prints array to screen int i=0; for (i=0;i<events.length;i++){ System.out.println(events[i]); } //end main method } } /** * * @author Rocky */ //imports scanner import java.util.Scanner; //begin calender class public class calender { //creates events array String[] events = new String[5]; //begin calender class constructor public calender() { //Initializes array String[] events = {"-No event planned-","-No event planned-","-No event planned-","-No event planned-","-No event planned-"}; //end calender class constructor } //begin createEvent method public String[] createEvent (String userEvent, int dayOfWeek){ //Start switch test switch (dayOfWeek){ case 1: events[0] = ("Monday Appoinment:") + userEvent; break; case 2: events[1] = ("Tuesday Appoinment:") + userEvent; break; case 3: events[2] = ("WednsdayAppoinment:") + userEvent; break; case 4: events[3] = ("Thursday Appoinment:") + userEvent; break; case 5: events[4] = ("Friday Appoinment:") + userEvent; break; default: break; //End switch test } //returns events array return events; //end create event method } //end calender class }

    Read the article

  • Should we have a database independent SQL like query language in Django? [closed]

    - by Yugal Jindle
    Note : I know we have Django ORM already that keeps things database independent and converts to the database specific SQL queries. Once things starts getting complicated it is preferred to write raw SQL queries for better efficiency. When you write raw sql queries your code gets trapped with the database you are using. I also understand its important to use the full power of your database that can-not be achieved with the django orm alone. My Question : Until I use any database specific feature, why should one be trapped with the database. For instance : We have a query with multiple joins and we decided to write a raw sql query. Now, that makes my website postgres specific. Even when I have not used any postgres specific feature. I feel there should be some fake sql language which can translate to any database's sql query. Even Django's ORM can be built over it. So, that if you go out of ORM but not database specific - you can still remain database independent. I asked the same question to Jacob Kaplan Moss (In person) : He advised me to stay with the database that I like and endure its whole power, to which I agree. But my point was not that we should be database independent. My point is we should be database independent until we use a database specific feature. Please explain, why should be there a fake sql layer over the actual sql ?

    Read the article

  • How do I create a patch compared to another changeset in Eclipse?

    - by Larsen
    I started working on an open source project that is using CVS where I want to submit patches. After having edited some files, I created a patch from the files that Eclipse showed as changed. Now I need to change a file for the second patch (that file is already in the first changeset), but the changes from the first changeset shouldn´t be in the second changeset. Therefore, I would need to somehow tell Eclipse that it should compare the changes to the result of the first changeset instead of to the CVS head revision. How can I do that?

    Read the article

  • Maven Grails web.xml

    - by dunn less
    Might be a stupid question, but in my current maven project i do not have a web.xml in my /web-app/WEB-INF folder. There is no web-xml in my project and never has been, im trying to add it but my application is non-responsive to anything written in the web.xml. What am i missing?, iv tried specifying the path to it through the config.groovy like: grails.project.web.xml="web-app/WEB-INF/web.xml" Am i missing something? Do i need to specify the web.xml in some other config file in order to make my project utilize it ?

    Read the article

  • iOS6 Twitter integration

    - by Peter Warbo
    There seems to be a difference between the iPhone simulator and actual device when checking if Twitter is available. I check if a Twitter account is setup by using this code: [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]; In the simulator there is a nice UIAlertView informing the user that there are no Twitter accounts setup and two buttons one for Settings and one for Cancel. However when I run my app on my device it will not show the above UIAlertView. Why is that? And how can I catch what button is tapped in the above UIAlertView (since I did not instantiate it?) This is what it looks like on the simulator:

    Read the article

  • How to enable camera feature in a sencha touch application using phonegap?

    - by Fabre
    I have developed one application in sencha touch2. I want to design a page in such a way that The page has a default image and one button below that. By clicking that button device camera should open(device mainly iPad and iPhone) and after capturing the image lets see it stored in a folder named as "capture" in your device. Then that captured image should replace that default image. I want to use Phonegap compulsorily. I have seen phone gap APIs for camera but I don't get it how to use it exactly. I am using MAC and Xcode for development.

    Read the article

  • Register new memer for vBulletin via Mobile API

    - by Nikolay Stariradeff
    I'm trying to use the vBulletin REST Mobile API to simply register. The sourced are installed on my local machine and according the documentation https://www.vbulletin.com/forum/content.php/393-User-Registration-Process-Mobile-API This procedure should not be so hard, especially without humanity and COPPA authentication. However I've stacked! The method definition describes "addnewmember" clear, so I've generated a test link, which should do the job. https://www.vbulletin.com/forum/content.php/365-User-Related-Methods The link is: .../forum/api.php?&api_m=register_addmember&api_c=1&api_s=76ec9eec61e7fdfef2f3feee28d5f392&api_sig=8fe54313b333cc0fef4ddd8e398b5c80&api_v=6&agree=1&username=testuser&email=XXXXXX%40gmail.com&emailconfirm=XXXXX%40gmail.com&password=12345678&passwordconfirm=12345678 As a response I get: register_not_agreed The Docs: register_not_agreed The agree parameter should be set to 1. Which is also clear - agree parameter was not there. Here comes the funny part - In the API-Log I can see that the 'agree' parameter is correctly passed *1 test_client Gast 13:23, 18.06.2012 register_addmember Array ( [api_m] = register_addmember [api_c] = 1 [api_s] = 76ec9eec61e7fdfef2f3feee28d5f392 [api_sig] = 8fe54313b333cc0fef4ddd8e398b5c80 [api_v] = 6 [agree] = 1 [username] = testuser [email] = ....* Is there anybody with experience with the Mobile API that could help?

    Read the article

  • Projecting a 3D point to 2D screen coordinate OpenTK

    - by sinsro
    Using Monotouch and OpenTK I am trying to get the screen coordinate of one 3D point. I have my world view projection matrix set up, and OpenGL makes sense of it and projects my 3D model perfectly, but how to use the same matrix to project just one point from 2D to 3D? I thought I could simply use: Vector3.Transform(ref input3Dpos, ref matWorldViewProjection, out projected2Dpos); Then have the projected screen coordinate in projected2DPos. But the resulting Vector4 does not seem to represent the proper projected screen coordinate. And I do not know how to calculate it from there on.

    Read the article

  • 500 Internal Server Error when setting up Apache on Ubuntu+Django

    - by ApacheQ
    I tried with Apache on ubuntu 9.04 and get the same error: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. And my apache/error.log is: [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] ServerName: 'sapint2' [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] DocumentRoot: '/etc/apache2/htdocs' [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] URI: '/' [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] Location: '/' [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] Directory: None [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] Filename: '/etc/apache2/htdocs' [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] PathInfo: '/' [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] Traceback (most recent call last): [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch\n default=default_handler, arg=req, silent=hlist.silent) [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1229, in _process_target\n result = _execute_target(config, req, object, arg) [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1128, in _execute_target\n result = object(arg) [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/modpython.py", line 180, in handler\n return ModPythonHandler()(req) [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/modpython.py", line 142, in call\n self.load_middleware() [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 45, in load_middleware\n mod = import_module(mw_module) [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module\n import(name) [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/contrib/sessions/middleware.py", line 4, in \n from django.utils.cache import patch_vary_headers [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/utils/cache.py", line 25, in \n from django.core.cache import get_cache [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/core/cache/init.py", line 187, in \n cache = get_cache(DEFAULT_CACHE_ALIAS) [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/core/cache/init.py", line 179, in get_cache\n cache = backend_cls(location, params) [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/core/cache/backends/memcached.py", line 139, in init\n "Memcached cache backend requires either the 'memcache' or 'cmemcache' library" [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] InvalidCacheBackendError: Memcached cache backend requires either the 'memcache' or 'cmemcache' library [Sat Oct 06 09:51:30 2012] [notice] caught SIGTERM, shutting down [Sat Oct 06 09:51:31 2012] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads. [Sat Oct 06 09:51:31 2012] [notice] mod_python: using mutex_directory /tmp [Sat Oct 06 09:51:31 2012] [notice] Apache/2.2.17 (Ubuntu) PHP/5.3.5-1ubuntu7.11 with Suhosin-Patch mod_python/3.3.1 Python/2.7.1+ mod_wsgi/3.3 configured -- resuming normal operations I need some help Thanks

    Read the article

  • passenger and apache memory usage

    - by Brent Faulkner
    On a "CentOS release 6.2 (Final)" server (with Ruby 1.9.3 and Rails 3.2), and using more memory than expected. Looking at passenger-memory-stats I see a couple of HUGE httpd processes... any thoughts on how I can figure out what's going on and reduce the memory usage? Stats are included here... thanks! ---------- Apache processes ----------- PID PPID VMSize Private Name --------------------------------------- 1371 1 202.1 MB 0.1 MB /usr/sbin/httpd 4573 1371 210.2 MB 5.0 MB /usr/sbin/httpd 4778 1371 202.5 MB 0.6 MB /usr/sbin/httpd 4780 1371 217.6 MB 9.4 MB /usr/sbin/httpd 4781 1371 217.1 MB 9.1 MB /usr/sbin/httpd 4856 1371 202.4 MB 0.5 MB /usr/sbin/httpd 4863 1371 204.1 MB 2.1 MB /usr/sbin/httpd 5027 1371 202.4 MB 0.5 MB /usr/sbin/httpd 5043 1371 202.4 MB 0.4 MB /usr/sbin/httpd 5044 1371 205.5 MB 2.7 MB /usr/sbin/httpd 5072 1371 202.4 MB 0.5 MB /usr/sbin/httpd 5084 1371 202.4 MB 0.5 MB /usr/sbin/httpd 32111 1371 1297.0 MB 246.5 MB /usr/sbin/httpd 32579 1371 1914.3 MB 215.5 MB /usr/sbin/httpd ### Processes: 14 ### Total private dirty RSS: 493.42 MB -------- Nginx processes -------- ### Processes: 0 ### Total private dirty RSS: 0.00 MB ----- Passenger processes ----- PID VMSize Private Name ------------------------------- 4180 280.5 MB 24.4 MB Passenger ApplicationSpawner: /var/www/apps/people/current 4345 309.5 MB 53.4 MB Rack: /var/www/apps/people/current 4800 300.2 MB 55.2 MB Rack: /var/www/apps/people/current 4808 297.8 MB 52.5 MB Rack: /var/www/apps/people/current 4815 297.4 MB 52.4 MB Rack: /var/www/apps/people/current 4822 302.7 MB 55.6 MB Rack: /var/www/apps/people/current 22780 209.0 MB 0.0 MB PassengerWatchdog 22783 991.5 MB 1.3 MB PassengerHelperAgent 22785 113.4 MB 1.1 MB Passenger spawn server 22788 144.6 MB 0.0 MB PassengerLoggingAgent 22911 310.4 MB 64.0 MB Rack: /var/www/apps/people/current 22939 311.6 MB 53.5 MB Rack: /var/www/apps/people/current 26175 304.1 MB 55.8 MB Rack: /var/www/apps/people/current 26182 310.4 MB 44.0 MB Rack: /var/www/apps/people/current ### Processes: 14 ### Total private dirty RSS: 513.24 MB

    Read the article

  • virtualbox instances dedicated-server with custom dnsmasq

    - by ovanes
    I have dedicated server where I planned to run virtualbox virtual machines. Since the VMs are managed with vagrant/chef I may end up with many different ones. I thought it would be a great idea to deploy a dnsmasq on the server, which is going to dynamically assign the ip addresses to the VMs. Since each Vagrant/Chef recipe is configured to set the VM's host name I can find/reference the appropriate VM by the host name. Finally, the entire infrastructure is not directly accessible via internet, so the dedicated Server is the OpenVPN host. So the entire infrastructure may be seen as: +-------------------------------------+ | Dedicated Server | | | | +-------------+ +------------+ | +------------------+ | | DNSMasq | | OpenVPN |<==========>| Client | | +-------------+ +------------+ | | | | ^ ^ | +------------------+ | | | | | +--+ | | | | +-------+ | | | | VM1 | | | | +-------+ | | | ... | | | +-------+ | | +-| VM2 | | | +-------+ | +-------------------------------------+ Now some questions which I am struggling with: Are there any other suggestions to access private infrastructure, because I don't want to reinvent the wheel. On the Dedicated Server I don't see the vboxnet0 interface but VirtualBox is installed without GUI. Accessing of virtual boxes via ssh works fine. Did I miss smth? DNSMasq must serve the local VMs only, otherwise there is a chance that local DNSMasq start to serve other server's on the network, what I don't want. Because I don't see vboxnet0 I tend to use no-dhcp-interface=eth0 config option. Are there any thoughts on that despite, the fact that a second NW-card (which is not the case), might start serving DHCP-Requests? How should I config the VM's network interface that I am able to access it via OpenVPN and resolve the hostnames using the DNSMasq. I think it should be the host-only network card. Should I do bridging in the OpenVPN config or is it sufficient to use routing.

    Read the article

  • Server 2012, Jumbo Frames - should I expect problems?

    - by TomTom
    Ok, this sound might stupid - but is there any negative on just enabling jumbo frames in practice? From what I understand: Any switch or ethernet adapter that sees a jumbo frame it can not handle will just drop it. TCP is not a problem as max frame size is negotiated in the setinuo phase. UCP is a theoretical problem as a server may just send a LARGE UDP packet that gets dropped on the way. Practically though, as UDP is packet based, I do not really think any software WOULD send a UDP packet larger than 1500 bytes net without app level configuration changes - at least this is how I do my programming, as it is quite hard to get a decent MTU size for that without testing yourself, so you fall back in programming to max 1500 packets. The network in question is a standard small business network - we upgraded now from a non managed 24 port switch to a 52 port switch with 4 10g ports (netgear - quite cheap) and will mov a file server to 10g for also ISCSI serving. All my equipment on the Ethernet level can handle minimum 9000 bytes and due to local firewalls I really want to get packets larger (less firewall processing), but the network is also NAT'ed to the internet. On top, different machines move around (download) large files (multi gigabyte area) quite often for processing. The question is - can I expect problems when I just enable jumbo frames? Again, this is not totally ignorance - I just don't see programs sending more than 1500 byte UDP packets (if that is a practical problem please tell me) and for TCP the MTU is negotiated anyway. if there is a problem I can move to a dedicated VLAN, but this has it's own shares of problems as basically most workstations must then be on both VLAN's.

    Read the article

  • Cannot chown my own files from NFS

    - by valpa
    We have a NFS server provide home directory for many account, which provided by a NIS server. I have account A and B. In /home/A, I try to copy "cp -a /home/B/somedir ~/". Then I found in /home/A/somedir, all files are owned by user A. Then if I do "chown -R B:B somedir", I got "Operation not permitted" error. I am user A, "cp -a" didn't preserve the original user (B). Then I cannot chown my own files. Any suggestion? I fix my own issue by "chmod 777 /home/A", "su - B" and "cp -a somedir /home/A/", and "su - A", then "chmod 755 /home/A". But it is not a good solution.

    Read the article

  • iptables NAT configuration

    - by Sarp Kaya
    Hello I am experiencing some issues with my iptables. Here's what I want to do: A(eth0)--------(eth0)B(eth2)---------------(eth2)C Brackets are interface names A,B and C are hosts. Now I would like to forward port number 80 of host C so that It would be accessed via host A. host A is 192.168.1.254 host C is 192.168.3.2 I intentionally ACCEPTed all FILTER chain options as the default policy because I wanted to make sure that NAT is working properly first. I enabled ip_forward. So here's what I have done: sudo iptables -A PREROUTING -t nat -p tcp - d 192.168.1.254 -j DNAT --to 192.168.3.2 However it is not working. What am I missing here?

    Read the article

  • How do I network this Windows Failover Cluster and MongoDB Replica Set? (diagram inside)

    - by arex1337
    As you can see, my two Windows Server Failover Cluster (WSFC) nodes have three network interfaces each, which connects them to three different networks : A public network A private network consisting of the WSFC nodes A private network consisting of the WSFC nodes and a machine with the WSFC Quorum Witness File Share Does this network configuration I've planned, make sense? Do I have the "right" number of NICs and networks? I'm thinking the 2nd NIC/network may be unnecessary. My two MongoDB Replica Set nodes also have three network interfaces each - very similar to the previous situation: A public network A private network consisting of the primary and secondary MongoDB Replica Set nodes A private network consisting of the primary, secondary and arbiter MongoDB Replica Set nodes Does this network configuration, make sense? Do I have the "right" number of NICs and networks? I'm thinking the 2nd NIC/network may be unnecessary. Here is the simpler version I'm considering: UPDATE:

    Read the article

  • Apache spawning one process a day, what causes it?

    - by xtrimsky
    I have a PHP server running, with cron jobs etc... And once a day (between midnight and 3am), apache spawns one process that never ends. The server is a virtual server, so in a couple of days it eats up the whole memory. Is there a way to figure out what is crashing ? What php script isn't finishing ? Or what url via apache was triggered ? I have tried looking on the access logs, errors logs, but didn't find anything unusual. Thank you

    Read the article

  • amazon aws, rds

    - by b0x0rz
    just need a quick info on two questions but very related. 1 if we use rds on amazon aws, what happens if some of the machines rds is running on crash? i mean what happens with the data? is it gone? 2 if we use rds on amazon aws via beanstalk, and decide to stop them is the database gone, i mean data, is it gone? thnx a lot, simple yes/no will do, but if you can give more info or a solution to mitigate these issues if any of the answers is unfavorable, that would be great.

    Read the article

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