Search Results

Search found 5784 results on 232 pages for 'points'.

Page 38/232 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • ASP.NET - Accessing copied content

    - by James Kolpack
    I have a class library project which contains some content files configured with the "Copy if newer" copy build action. This results in the files being copied to a folder under ...\bin\ for every project in the solution. In this same solution, I've got a ASP.NET web project (which is MVC, by the way). In the library I have a static constructor load the files into data structures accessible by the web project. Previously I've been including the content as an embedded resource. I now need to be able to replace them without recompiling. I want to access the data in three different contexts: Unit testing the library assembly Debugging the web application Hosting the site in IIS For unit testing, Environment.CurrentDirectory points to a path containing the copied content. When debugging however, it points to C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE. I've also looked at Assembly.GetExecutingAssembly().Location which points to C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\c44f9da4\9238ccc\assembly\dl3\eb4c23b4\9bd39460_f7d4ca01\. What I need is to the physical location of the webroot \bin folder, but since I'm in a static constructor in the library project, I don't have access to a Request.PhysicalApplicationPath. Is there some other environment variable or structure where I can always find my "Copy if newer" files?

    Read the article

  • ORDER BY in a Sql Server 2008 view

    - by eidylon
    Hi all... we have a view in our database which has an ORDER BY in it. Now, I realize views generally don't order, because different people may use it for different things, and want it differently ordered. This view however is used for a VERY SPECIFIC use-case which demands a certain order. (It is team standings for a soccer league.) The database is Sql Server 2008 Express, v.10.0.1763.0 on a Windows Server 2003 R2 box. The view is defined as such: CREATE VIEW season.CurrentStandingsOrdered AS SELECT TOP 100 PERCENT *, season.GetRanking(TEAMID) RANKING FROM season.CurrentStandings ORDER BY GENDER, TEAMYEAR, CODE, POINTS DESC, FORFEITS, GOALS_AGAINST, GOALS_FOR DESC, DIFFERENTIAL, RANKING It returns: GENDER, TEAMYEAR, CODE, TEAMID, CLUB, NAME, WINS, LOSSES, TIES, GOALS_FOR, GOALS_AGAINST, DIFFERENTIAL, POINTS, FORFEITS, RANKING Now, when I run a SELECT against the view, it orders the results by GENDER, TEAMYEAR, CODE, TEAMID. Notice that it is ordering by TEAMID instead of POINTS as the order by clause specifies. However, if I copy the SQL statement and run it exactly as is in a new query window, it orders correctly as specified by the ORDER BY clause.

    Read the article

  • Help with SQL query (Calculate a ratio between two entitiess)

    - by Mestika
    Hi, I’m going to calculate a ratio between two entities but are having some trouble with the query. The principal is the same to, say a forum, where you say: A user gets points for every new thread. Then, calculate the ratio of points for the number of threads. Example: User A has 300 points. User A has started 6 thread. The point ratio is: 50:6 My schemas look as following: student(studentid, name, class, major) course(courseid, coursename, department) courseoffering(courseid, semester, year, instructor) faculty(name, office, salary) gradereport(studentid, courseid, semester, year, grade) The relations is a following: Faculity(name) = courseoffering(instructor) Student(studentid) = gradereport (studentid) Courseoffering(courseid) = course(courseid) Gradereport(courseid) = courseoffering(courseid) I have this query to select the faculty names there is teaching one or more students: SELECT COUNT(faculty.name) FROM faculty, courseoffering, gradereport, student WHERE faculty.name = courseoffering.instructor AND courseoffering.courseid = gradereport.courseid AND gradereport.studentid = student.studentid My problem is to find the ratio between the faculty members salary in regarding to the number of students they are teaching. Say, a teacher get 10.000 in salary and teaches 5 students, then his ratio should be 1:5. I hope that someone has an answer to my problem and understand what I'm having trouble with. Thanks Mestika

    Read the article

  • How to reload a tableView i.e call the viewDidLoad method if a condition is met

    - by Kquane Ingram
    The problem is this i need a way to basically erase all the entry data a user placed into my arrays if a condition is met. Im new to Objective-C and iOS programming, but i believed the solution might be in calling the viewDidLoad method, thus it would virtually refresh the applications with the values of the array reset to default. If there is any other logical way of doing this i would appreciate the help. In short i need to refresh the arrays as they were when the application first launched and the user did not select anything. This is the part where i need it to refresh. if ([gradeRecieved objectAtIndex:i]==nil) { break; // if this condition is met the program must begin anew. Edit* I need to recall the - (void)viewDidLoad method here is more of the code. -(IBAction)button:(id)sender{ int i = 0; int sum = 0; int gradeEarned; int creditHours = 3; for ( i=0;i<8 ; i++) { if ([[points objectAtIndex:i] tag]==GradeA.intValue) { [gradeRecieved replaceObjectAtIndex:i withObject:GradeA]; } if ([[points objectAtIndex:i]tag]==GradeB.intValue) { [gradeRecieved replaceObjectAtIndex:i withObject:GradeB]; } if ([[points objectAtIndex:i]tag]==GradeC.intValue){ [gradeRecieved replaceObjectAtIndex:i withObject:GradeC]; } if ([gradeRecieved objectAtIndex:i]==nil) { break; // if this condition is met the program must restart. } } while ( i<[gradeRecieved count]) { if ([gradeRecieved objectAtIndex:i] == GradeA ) { [finArray replaceObjectAtIndex:i withObject:GradeA]; i++; continue; } if ([gradeRecieved objectAtIndex:i] == GradeB ) { [gradeRecieved replaceObjectAtIndex:i withObject:GradeB]; i++; continue; } if ([gradeRecieved objectAtIndex:i] == GradeC ) { [gradeRecieved replaceObjectAtIndex:i withObject:GradeC]; i++; continue; } }

    Read the article

  • Unreasonable errors in merge sort

    - by Alexxx
    i have the following errors - please help me to find the error: 9 IntelliSense: expected a '}' 70 4 it points on the end of the code - but there are no open { anywhere!! so why?? 8 IntelliSense: expected a ';' 57 1 it points on the { after the void main but why to put ; after the { of the void main?? Error 7 error C1075: end of file found before the left brace '{' at 70 1 points to the beginig of the code - why??? #include <stdio.h> #include <stdlib.h> void merge(int *a,int p,int q,int r) { int i=p,j=q+1,k=0; int* temp=(int*)calloc(r-p+1, sizeof(int)); while ((i<=q)&& (j<=r)) if(a[i]<a[j]) temp[k++]=a[i++]; else temp[k++]=a[j++]; while(j<=r) // if( i>q ) temp[k++]=a[j++]; while(i<=q) // j>r temp[k++]=a[i++]; for(i=p,k=0;i<=r;i++,k++) // copy temp[] to a[] a[i]=temp[k]; free(temp); } void merge_sort(int *a,int first, int last) { int middle; if(first < last) { middle=(first+last)/2; merge_sort(a,first,middle); merge_sort(a,middle+1,last); merge(a,first,middle,last); { } void main() { int a[] = {9, 7, 2, 3, 5, 4, 1, 8, 6, 10}; int i; merge_sort(a, 0, 9); for (i = 0; i < 10; i++) printf ("%d ", a[i]);

    Read the article

  • ndarray field names for both row and column?

    - by Graham Mitchell
    I'm a computer science teacher trying to create a little gradebook for myself using NumPy. But I think it would make my code easier to write if I could create an ndarray that uses field names for both the rows and columns. Here's what I've got so far: import numpy as np num_stud = 23 num_assign = 2 grades = np.zeros(num_stud, dtype=[('assign 1','i2'), ('assign 2','i2')]) #etc gv = grades.view(dtype='i2').reshape(num_stud,num_assign) So, if my first student gets a 97 on 'assign 1', I can write either of: grades[0]['assign 1'] = 97 gv[0][0] = 97 Also, I can do the following: np.mean( grades['assign 1'] ) # class average for assignment 1 np.sum( gv[0] ) # total points for student 1 This all works. But what I can't figure out how to do is use a student id number to refer to a particular student (assume that two of my students have student ids as shown): grades['123456']['assign 2'] = 95 grades['314159']['assign 2'] = 83 ...or maybe create a second view with the different field names? np.sum( gview2['314159'] ) # total points for the student with the given id I know that I could create a dict mapping student ids to indices, but that seems fragile and crufty, and I'm hoping there's a better way than: id2i = { '123456': 0, '314159': 1 } np.sum( gv[ id2i['314159'] ] ) I'm also willing to re-architect things if there's a cleaner design. I'm new to NumPy, and I haven't written much code yet, so starting over isn't out of the question if I'm Doing It Wrong. I am going to be needing to sum all the assignment points for over a hundred students once a day, as well as run standard deviations and other stats. Plus, I'll be waiting on the results, so I'd like it to run in only a couple of seconds. Thanks in advance for any suggestions.

    Read the article

  • How to convert Vector Layer coordinates into Map Latitude and Longitude in Openlayers.

    - by Jenny
    I'm pretty confused. I have a point: x= -12669114.702301 y= 5561132.6760608 That I got from drawing a square on a vector layer with the DrawFeature controller. The numbers seem...erm...awfull large, but they seem to work, because if I later draw a square with all the same points, it's in the same position, so I figure they have to be right. The problem is when I try to convert this point to latitude and longitude. I'm using: map.getLonLatFromPixel(pointToPixel(points[0])); Where points[0] is a geometry Point, and the pointToPixel function takes any point and turns it into a pixel (since the getLonLatFromPixel needs a pixel). It does this by simply taking the point's x, and making it the pixels x, and so on. The latitude and longitude I get is on the order of: lat: -54402718463.864 lng: -18771380.353223 This is very clearly wrong. I'm left really confused. I try projecting this object, using: .transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()); But I don't really get it and am pretty sure I did it incorrectly, anyways. My code is here: http://pastie.org/909644 I'm sort of at a loss. The coordinates seem consistent, because I can reuse them to get the same result...but they seem way larger than any of the examples I'm seeing on the openLayers website...

    Read the article

  • How to implement a grapher in C#

    - by iansinke
    So I'm writing a graphing calculator. So far I have a semi-functional grapher, however, I'm having a hard time getting a good balance between accurate graphs and smooth looking curves. The current implementation (semi-pseudo-code) looks something like this: for (float i = GraphXMin; i <= GraphXMax; i++) { PointF P = new PointF(i, EvaluateFunction(Function, i) ListOfPoints.Add(P) } Graphics.DrawCurve(ListOfPoints) The problem with this is since it only adds a point at every integer value, graphs end up distorted when their turning points don't fall on integers (e.g. sin(x)^2). I tried incrementing i by something smaller (like 0.1), which works, but the graph looks very rough. I am using C# and GDI+. I have SmoothingMethod set to AntiAlias, so that's not the problem, as you can see from the first graph. Is there some sort of issue with drawing curves with a lot of points? Should the points perhaps be positioned exactly on pixels? I'm sure some of you have worked on something very similar before, so any suggestions? While you're at it, do you have any suggestions for graphing functions with asymptotes? e.g. 1/x^2 P.S. I'm not looking for a library that does all this - I want to write it myself.

    Read the article

  • XCode Obj-C: Make new NSArray from one key each out of an Array of Dictionaries

    - by user323772
    This actually could be a multipart question. But here's the first part ... I have an array (actually in a plist) of dictionaries. Each dictionary has 3 keys in it: (title), (points), and (description). I am trying to make a NEW array with the values of the key "title" from each dictionary in that first array. Let me explain WHY I am doing this and maybe that will provide a better all around explanation. I am trying to let people pick from a pre-determined list. Heck, if this was a web page it would be very simple since all I really care about are the "points" and the "Title". On a web site I could simply do a drop down combo-box with the "points" being the value and the title being the text for each row. But this is not a web page. So what I am trying to do here is pop out a modal picker when they click the text field. The modal picker shows the alphabetical ordered "titles" from our new array. And whichever one they select, it closes the modal view and assigns that "title" text to the UITextField which cannot be edited by the user. I have some code to get my modal picker to pop out. But I need to feed it an array of just the "titles" of each dictionary in my real array. Thanks in advance (and yes I am a newbie)

    Read the article

  • Custom layout in Android: scrollable graphic with selectable elements over top

    - by Martyn
    Hi, I'm fairly new to the Android platform and was wondering if I could get some advice for my current head scratcher: I'm making an app which in one view will need an image, which can be scrolled on one axis, with a load of selectable points over the top of it. Each point needs to be positionable on the x and y (unlikely to change once the app is running, but I'll need to fine tune the positions whilst I'm developing it). I'd like to be able to let the user select each point and have a graphic drawn on the point the user has selected or just draw a graphic on one/more points without user intervention. I though for the selectable points I could extend the checkbox with a custom image for the selected state - does that sounds right, or is there a better way of doing this? Is there any thing I can read up on doing this, I can't seem to find anything on the net about replacing the default images? I was going to use the absolute layout, but see that it's been depreciated and I can't find anything to replace it. Can anyone give me some code or advice on where to read up on what I need to do? Thank you in advance

    Read the article

  • Detecting the axis of rotation from a pointcloud

    - by tfinniga
    I'm trying to auto-detect the axis of rotation on a 3d pointcloud. In other words, if I took a small 3d pointcloud, chose a single axis of rotation, and make several copies of the points at different rotation angles, then I get a larger pointcloud. The input to my algorithm is the larger pointcloud, and the desired output is the single axis of symmetry. And eventually I'm going to compute the correspondences between points that are rotations of each other. The size of the larger pointcloud is on the order of 100K points, and the number of rotational copies made is unknown. The rotation angles in my case have constant deltas, but don't necessarily span 360 degrees. For example, I might have 0, 20, 40, 60. Or I might have 0, 90, 180, 270. But I won't have 0, 13, 78, 212 (or if I do, I don't care to detect it). This seems like a computer vision problem, but I'm having trouble figuring out how to precisely find the axis. The input will generally be very clean, close to float accuracy.

    Read the article

  • Magento, 1 db field not saved

    - by david parloir
    Hi there, I have a problem with 1 field of the db. With this code: $expireMonth = Mage::getStoreConfig('points_options/config_points/expiration_period', Mage::app()->getStore()->getId()); if (!is_null($expireMonth) && ($expireMonth > 0)) { $expireDate = date("Y-m-d H:i:s", strtotime("+" . $expireMonth . " month")); } else { $expireDate = NULL; } //die($expireDate); //store in points history table $this->_pointsModel->setCustomerId($this->_customer->getId()) ->setOrdersId('welcome') ->setPointsPending($pointsForNewCustomer) ->setPointsComment(Mage::helper('points')->__('welcome points')) ->setDateAdded(date('Y-m-d H:i:s')) ->setPointsStatus(2)//confirmed ->setPointsType('WE') ->setStoreId(Mage::app()->getStore()->getId()) ->setExpireDate($expireDate) ->save(); every field is saved in the table, except for expire_date. If I uncoment the die($expireData), I see the correct value, something like 2012-01-13 13:21:12. The filed is defined as: `expire_date` datetime NULL Any thaughts? edit: the solution is: $expireDate = date("Y-m-d H:i:s", strtotime("+" . $expireMonth . " months")); check out the "s" in my strtotime expression

    Read the article

  • Pointer mysteriously moves

    - by Armen Ablak
    Hi, I have this code for Node rotation and in a line which is marked something happens and I don't really know what and why :). //Test case 30 \ 16 / 29 RotationRight(node->mParent); //call template<class T> void SplayTree<T>::RotationRight(SplayNode<T> *&node) const { SplayNode<T> *left = node->mLeft; SplayNode<T> *parent = node->mParent; node->mLeft = left->mRight; if(left->HasRight()) left->mRight->mParent = node; left->mRight = node; //node in this line points to 0x00445198 {30} left->mParent = node->mParent; //and in this line it points to 0x00444fb8 {16} (node, not node->mParent) node->mParent = left; node = left; } Well, left-mParent points to node also, so I basically do node = node-mParent. The problem is I can't find a work around - how to unpin in from node and change it's pointing address without changing it's.

    Read the article

  • Is there a way to route all traffic from Android through a proxy/tunnel to my Tomato router?

    - by endolith
    I'd like to be able to connect my Android phone to public Wi-Fi points with unencrypted connections, but People can see what I'm doing by intercepting my radio transmissions People who own the access point can see what I'm doing. There are tools like WeFi and probably others to automatically connect to access points, but I don't trust random APs. I'd like all my traffic to go through an encrypted tunnel to my home router, and from there out to the Internet. I've done such tunnels from other computers with SSH/SOCKS and PPTP before. Is there any way to do this with Android? I've asked the same question on Force Close, so I'll change this question to be about both sides of the tunnel. More specifically: My phone now has CyanogenMod 4.2.3 My router currently has Tomato Version 1.25 I'm willing to change the router firmware, but I was having issues with DD-WRT disconnecting, which is why I'm using Tomato. Some possible solutions: SSH with dynamic SOCKS proxy: Android supposedly supports this through ConnectBot, but I don't know how to get it to route all traffic. Tomato supports this natively. I've been using this with MyEntunnel for my web browsing at work. Requires setting up each app to go through the proxy, though. PPTP: Android supports this natively. Tomato does not support this, unless you get the jyavenard mod and compile it? I previously used PPTP for web browsing at work and in China because it's native in Windows and DD-WRT. After a while I started having problems with it, then I started having problems with DD-WRT, so I switched to the SSH tunnel instead. Also it supposedly has security flaws, but I don't understand how big of a problem it is. IPSec L2TP: Android (phone) and Windows (work/China) both support this natively I don't know of a router that does. I could run it on my computer using openswan, but then there are two points of failure. OpenVPN: CyanogenMod apparently includes this, and now has an entry to create a new OpenVPN in the normal VPN interface, but I have no idea how to configure it. TunnelDroid apparently handles some of this. Future versions will have native support in the VPN settings? Tomato does not support this, but there are mods that do? I don't know how to configure this, either. TomatoVPN roadkill mod SgtPepperKSU mod Thor mod I could also run a VPN server on my desktop, I guess, though that's less reliable and presumably slower than running it in the router itself. I could change the router firmware, but I'm wary of more fundamental things breaking. Tomato has been problem-free for the regular stuff. Related: Anyone set up a SSH tunnel to their (rooted) G1 for browsing?

    Read the article

  • Automatic subdomain wildcard for DHCP-DDNS additions?

    - by Igor Clark
    I'm running dhcp-4.0.2 server and bind-9.6.1-P3. When a new Mac OSX DHCP client with the name "harry" connects to the network, the DHCP server gives it a lease, and adds appropriate A & PTR records via DDNS. This works fine; harry.my.domain points to (e.g.) 192.168.1.3, the Mac client knows that its name is harry.my.domain, 192.168.1.3 points back to harry.my.domain, and all that is great. Now I want *.harry.my.domain to resolve to 192.168.1.3, and I don't want to have to go in and add wildcard records into zone files. I want the Mac to connect to the network, and have the hostname and wildcard subdomain resolve to the IP address it's been given. Is there a way to do this? Thanks!

    Read the article

  • C# struct and NuSOAP(php)

    - by opx
    Hello Im trying to build a client in c# that talks with some remote (php)server with SOAP using the NuSOAP library. Here im using a struct/object that will containt the user info of some user: public struct UserProfile { public string username; public string password; public string email; public string site; public string signature; public int age; public int points; And this is the PHP Code: server->wsdl->addComplexType( 'UserProfile', 'complexType', 'struct', 'all', '', array( 'username' => array('name' => 'username', 'type' => 'xsd:string'), 'password' => array('name' => 'password', 'type' => 'xsd:string'), 'email' => array('name' => 'email', 'type' => 'xsd:string'), 'site' => array('name' => 'site', 'type' => 'xsd:string'), 'signature' => array('name' => 'signature', 'type' => 'xsd:string'), 'age' => array('name' => 'age', 'type' => 'xsd:int'), 'points' => array('name' => 'username', 'type' => 'xsd:int'), ) ); $server->wsdl->addComplexType( 'UserProfileArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:UserProfile[]')), 'tns:UserProfile' ); $server->register("getUserProfile", array(), array('return' => 'tns:UserProfileArray'), $namespace, false, 'rpc', false, 'Get the user profile object' ); function getUserProfile(){ $profile['username'] = "user"; $profile['password'] = "pass"; $profile['email'] = "usern@ame"; $profile['site'] = "u.com"; $profile['signature'] = "usucsdckme"; $profile['age'] = 111; $profile['points'] = time() / 2444; return $profile; } Now I already have a working login function, and I want to get the info about the logged in user but I dont know howto obtain these. This is what im using to get the userinfo: string user = txtUser.Text; string pass = txtPass.Text; SimpleService.SimpleService service = new SimpleService.SimpleService(); if(service.login(user, pass)){ //logged in } SoapApp.SimpleService.UserProfile[] user = service.getUserProfile(); // THIS LINE GIVES ME AN EXCEPTION MessageBox.Show(user[0].username + "--" + user[0].points); The getUserProfile() function produces an error: System.Web.Services.Protocols.SoapException was unhandled Message="unable to serialize result" Source="System.Web.Services" or I get something like 'cant parse xml' error. The article I used for this was from: http://www.sanity-free.org/125/php_webservices_and_csharp_dotnet_soap_clients.html The difference on what they are doing and what I try to do is that I only want to get one object returned instead of multiple 'MySoapObjects'. I hope someone is familiar with this and could help me, thanks in advance! Regards, opx

    Read the article

  • Wifi ap finder/selector for windows 7

    - by wag2639
    Is there wifi finder program for windows 7 that can let me choose specific access points to connect to? In my school, the wifi network uses the same SSID for numerous access points and usually the default wifi finder in Windows 7 connects to the first one. Even if it connects to the closest one with the best signal, there are times when a specific access point will not work. Machine: Lenovo IdeaPad S10-2 running Windows 7 (32bit) Note: On my ThinkPad, I've got access connection that does the job but that didn't seem to work on the IdeaPad the last time I tried.

    Read the article

  • How would I setup reverse DNS for 2 email servers?

    - by Solignis
    I have an interesting DNS question (well interesting to me atleast). I just installed an hmail server in our remote office to act as an MX backup in the event our exchange server goes down. The 2 host names are mail.campbellsurvey.com mail2.campbellsurvey.com mail points to the address 98.XXX.91.XXX mail2 points to the address 70.XXX.190.XXX How would I setup a PTR record on the ISP end to reflect both hostnames? Does the PTR have to point to EXACTLY mail.campbellsurvey.com or can it point to just campbellsurvey.com? because right now anything passing through the primary static address in our pool (the one used for standard internet) is identified as mail.campbellsurvey.com. My only idea to fix this was to move the mail server to the next available address and give it only it the name mail.campbellsurvey.com but I wanted to see if there was another way. Thanks in advance.

    Read the article

  • Scratched DVD keeps freezin when copying files, even with programs.

    - by Murtez
    Hi, I have a dvd with some family photos that is scratched, the problem is that when i try to copy stuff it reaches certain points and freezes, i'm assuming its the scratches / corrupt data. I've been trying several programs that are supposed to copy corrupt files from damaged media regardless, but they keep freezing when they reach the same points, so no different when with windows. Is there a way to fix the DVD? Or a really really good program that can do that without freezing / allowing windows to freeze? Please help, I don't have any copies of the photos and they are irreplaceable.

    Read the article

  • One external IP 2 servers

    - by Stanley
    Currently there is one external IP pointing to a Window Web Server. Now wish to add a Linux web server. Wish to know if the following setup is ok : 119.xxx.xxx.xxx points to Window Web Server 119.xxx.xxx.xxx/Linux_Server points to the new additional Linux Server. If the above scheme is ok, then how should it be done. (In terms of where the router should be placed and configured etc). If the above scheme is unusual or not workable please suggest best practice scheme. Hope somebody knowledgable could help ...

    Read the article

  • Using the option port on my Watchguard Firebox as a 2nd gateway exit point?

    - by Donovan
    I'm working on a network project in witch I have to design our network to provide two different exit points. The points are differentiated by the path through the corporate network. One of them travels through some monitoring hardware the other does not. We have a Watchguard Firebox in use as our gateway. Currently the network side provides the unmonitored exit point. I was wondering if i hooked the option port to our lan at a point that would force traffic through the monitored path, would it cause any problems? Access to the unmonitored gateway port would be restricted by ip. That would force all others not authorized to point to the monitored gateway port. I thought with the above design i might be able to get away with not having to buy another firebox to achieve the design I want. Thanks, D

    Read the article

  • Issue with CNAME and Virtual Hosts

    - by mrc0der
    I'm using Apache and I have a CNAME DNS record for sub2.sub1.domain1.com that points to sub1.domain1.com And I have an A DNS record for sub1.domain1.com that points to the IP. Then in my httpd.conf file I have: <VirtualHost *:80> ServerName www.domain1.com DocumentRoot /domain1/www </VirtualHost> <VirtualHost *:80> ServerName sub1.domain.com DocumentRoot /domain1/sub1/www </VirtualHost> Yet I appear to be missing something, as when you visit sub2.sub1.domain1.com, it shows you the page for domain1.com. When you visit the sub1.domain1.com, it shows the correct page for sub1.

    Read the article

  • How to automount SMB shared network drives in Mac OS X Lion

    - by cyppher
    In Mac OS X 10.7 (Lion) Apple has replaced good old SMB support. Now I can't auto connect to my shared (SMB) network drives. Workarounds? Or Impossible? In OS X Snow Leopard, I could automatically connect my Ubuntu (SMB) shared network drives with auto_smb / auto_master (autofs configuration in /private/etc/). I made three mount points (folders) directly in '/Volumes', I used /Volumes/Data and /Volumes/webroot (both SMB shared). Unfortunately Lion doesn't connect (automount) my network drives. I have to manually connect to the server (Ubuntu file server) in Finder, then open up Terminal to navigate to the mount points, and then it connects. This is not a workable solution. I've searched (Google/SO) but found no solutions apart from an unsupported hack. Isn't it possible any more to automatically connect to an SMB-shared drive during startup?

    Read the article

  • Confused about SPF Record setup

    - by Ramon A.
    Hello, I'm confused on how I should set up SPF records for my multiple domains. Here is my configuration: the setup is: (a) domain1.com points to server1 (b) mail.domain1.com points to server2 (c) domain2.com is a vhost in server1 (d) domain3.com is a vhost in server1 (e) and so on.. I want the SPF record to be set up so that domain1.com, domain2.com, domain3.com are authorized to send emails using mail.domain1.com. I'm confused on wether to put the SPF record on each domain, or on the main server only.

    Read the article

  • being able to solve google code jam problem sets

    - by JPro
    This is not a homework question, but rather my intention to know if this is what it takes to learn programming. I keep loggin into TopCoder not to actually participate but to get the basic understand of how the problems are solved. But to my knowledge I don't understand what the problem is and how to translate the problem into an algorithm that can solve it. Just now I happen to look at ACM ICPC 2010 World Finals which is being held in china. The teams were given problem sets and one of them is this: Given at most 100 points on a plan with distinct x-coordinates, find the shortest cycle that passes through each point exactly once, goes from the leftmost point always to the right until it reaches the rightmost point, then goes always to the left until it gets back to the leftmost point. Additionally, two points are given such that the the path from left to right contains the first point, and the path from right to left contains the second point. This seems to be a very simple DP: after processing the last k points, and with the first path ending in point a and the second path ending in point b, what is the smallest total length to achieve that? This is O(n^2) states, transitions in O(n). We deal with the two special points by forcing the first path to contain the first one, and the second path contain the second one. Now I have no idea what I am supposed to solve after reading the problem set. and there's an other one from google code jam: Problem In a big, square room there are two point light sources: one is red and the other is green. There are also n circular pillars. Light travels in straight lines and is absorbed by walls and pillars. The pillars therefore cast shadows: they do not let light through. There are places in the room where no light reaches (black), where only one of the two light sources reaches (red or green), and places where both lights reach (yellow). Compute the total area of each of the four colors in the room. Do not include the area of the pillars. Input * One line containing the number of test cases, T. Each test case contains, in order: * One line containing the coordinates x, y of the red light source. * One line containing the coordinates x, y of the green light source. * One line containing the number of pillars n. * n lines describing the pillars. Each contains 3 numbers x, y, r. The pillar is a disk with the center (x, y) and radius r. The room is the square described by 0 = x, y = 100. Pillars, room walls and light sources are all disjoint, they do not overlap or touch. Output For each test case, output: Case #X: black area red area green area yellow area Is it required that people who program should be should be able to solve these type of problems? I would apprecite if anyone can help me interpret the google code jam problem set as I wish to participate in this years Code Jam to see if I can do anthing or not. Thanks.

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >