Search Results

Search found 1689 results on 68 pages for 'pan student'.

Page 13/68 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • C# Simple IF OR question

    - by Jamie
    Hi all, Sorry to ask this as I thought I knew the answer, I want to exit the program if userName is greater than 4 characters or userName is not an account called student. However this even if the userName is only 3 characters and is not student I'm still hitting Application.Exit. What am I doing wrong? if (userName.Length > 4 | userName != "student") { Application.Exit(); } Shame on me :-(

    Read the article

  • Looking for MSSQL Table Design Sanity Check for Profile Tables with Dynamic Columns.

    - by Code Sherpa
    I just want a general sanity check regarding database design. We are building a web system that has both Teachers and Students. Both have accounts in the system. Both have profiles in the system. My question is about the table design of those Profile tables. The Teacher profile is pretty static regarding the metadata associated with it. Each teacher has a set number of fields that exposes information about that individual (schools, degrees, etc). The students, however, are a different case. We are using a windows service to pull varying data about the students from an endless stream of excel spreadsheets. The data gets moved into our database and then the fields appear in association with the student's profile. Accordingly, each and every student may have very different fields in their profile. I originally started with the concept of three tables: Accounts ---------- AccountID TeacherProfiles ---------- TeacherProfileID AccountID SecondarySchool University YearsTeaching Etc... StudentProfiles ---------- StudentProfileID AccountID Header Value The StudentProfiles table would hold the name of the column headers from the excel spreadsheets and the associated values. I have since evolved the design a little to treat Profiles more generically per the attached ERD image. The Teacher and Student "Headers" are stored in a table called "ProfileAttributeTypes" and responses (either from the excel document or via input fields on the web form) are put in a ProfileAttributes table. This way both Student and Teacher profiles can be associated with a dynamic flow of profile fields. The "Permissions" table tells us whether we are dealing with a Student or a Teacher. Since this system is likely to grow quickly, I want to make sure the foundation is solid. Can you please provide feedback about this design and let me know if it seems sound or if you could see problems it might create and, if so, what might be a better approach? Thanks in advance.

    Read the article

  • symfony and entity manager

    - by Jenis Sam
    I want to do the following I have a database table of students, and I want to output each student name in a check box list. so checkbox. Student 1 checkbox. Student 2 Where the value of the checkbox is the student's ID. How can I do that using Symfony? I want teachers to be able to select one or more checkboxes. I tried following this tutorial: http://symfony.com/doc/current/cookbook/form/form_collections.html and using collections, but I am lost...

    Read the article

  • multiple inheritance

    - by hitech
    when we say "a member declated as protected is accessible to any class imediately derived from it" what does this mean. in the follwing example get_number function can be accessible by the result class , as per the statement it sould only be accessile to test class. class student { protected: int roll_number; public: void get_number(int){ cout<< "hello"; } void put_number(void) {cout<< "hello"; } }; class test : public student { protected : float sub1; float sub2; public: void get_marks(float, float) {cout<< "hello"; roll_number = 10; } void put_marks(void) {cout<< "hello"; cout << "roll_number = " << roll_number ; } }; class result :public test { float total; public: void display(){cout<< "hello"; roll_number = 10; } }; int main() { result student; student.get_marks(2.2, 2.2); student.put_marks(); return 0; } i changed the code as per the first statement the protected variable roll_number not be accessible upto the result class ?

    Read the article

  • NHibernate SchemaUpdate adding existing foreign keys again?

    - by afsharm
    I'm using SchemaUpdate to synchronize my hbms with existing database. Database has recently created based on hbms and is completely up-to-date. But SchemaUpdate generates all foreign key constraints again. For example suppose you have Student and Teacher. Student has association to Teacher with name ArtTeacher. ArtTeacher is a foreign key from Student to Teacher. Suppose database is up-to-date and currently holde Student, Teacher and their foreign key relation. So HBM and Database are equivalent. Know SchemaUpdate must not do anything but when I see its generated scripts, it re-produce that foreign key again. Why this happens? Is there any way to avoid it?

    Read the article

  • How to acheieve this kind of behaviour in asp.net mvc

    - by kumar
    Hello Friends,, I have this two Action result methods. public ActionResult GetStudentInfo(StudentBE s) { return PartialView("editStudent", s); } public ActionResult GenericList() { StudentBE codes = new StudentBE(); codes.lookcodes= GetStudentCodes(new string[] { "A", "B", "C, "D", "E" }); return PartialView(codes); } // Lookcodes display dropdownlist boxes in the GeneridList view.. In genericList view I hvae beginForm.. <% using (Html.BeginForm("Updatestudent", "expense", FormMethod.Post, new { @id = "id" })) { %> <% } %> so My updatestudent method is [HttpPost] public JsonResult Updatestudent(StudentBE e) { var status = common.Update(e.student); } } return Json(status.ToString()); } Here is my problem.. the GetStudentInfo Actionresult is having each student information.. in UpdateStudent method Update Method calls the DB calls for stored procedure to update each user information now to update each user I need to call GetstudentInfo each time to get student information to update..? how to call GetStudentInfo method here to get studentinformation? student informatin may be multiple that is more than one student informaton... can anybody help me out.. thanks

    Read the article

  • Ruby on Rail - Format for fetching and displaying Dymanic drop down

    - by Ruby
    Hi, I have 3 tables : Student , Subject and Score Every student can add 3 Subjects (Physics, Mathematics and Chemistry) marks. The combination of (student_id + subject_id) is added to Score table. i.e., capturing that sudent '1' has added 'Mathematics' marks with the actual score (say 0-100 range) student id : subjectid Score 1 Mathematics 95 The Add page of Score has a "subject" drop down. which is displayed from "subject" table. When the student wants to add the 2nd subject marks, in the add page, he should not be displayed the previoys added subject in the drop down. Can any1 tell me how to do this?

    Read the article

  • hibernate many to many only save the new object and between table

    - by Joe
    I have the following tables: Student Student_Course Course Now when I create a student I only want to create a user and add a row to student_course. The "problem" I have is that when I set the set of courses in Student to cascade="save-update" that an update is also invoked on course. I was wondering if there was a way to prevent this.

    Read the article

  • Looking for an example of selecting a row(s) with multiple columns from a grid view and add them to

    Here is the situation dealing with a vb.net website, I have students who will be enrolled into a course. The student grid view has many columns like client_no, student_name, date_of_birth, address, etc. There are over 100000 students so I will need to filter the student grid view to find the correct student to enroll in the course. Once they are found, the user selects them and somehow moves them to the enrolled grid view. If a student drops out then they would be removed from the enrolled grid view. This process needs to be easy to understand and use. Are there any examples available or other suggestions on how to do this?

    Read the article

  • Django forms: prepopulate form with request.user and url parameter

    - by Malyo
    I'm building simple Course Management App. I want Users to sign up for Course. Here's sign up model: class CourseMembers(models.Model): student = models.ForeignKey(Student) course = models.ForeignKey(Course) def __unicode__(self): return unicode(self.student) Student model is extended User model - I'd like to fill the form with request.user. In Course model most important is course_id, which i'm passing into view throught URL parameter (for example http://127.0.0.1:8000/courses/course/1/). What i want to achieve, is to generate 'invisible' (so user can't change the inserted data) form with just input, but containing request.user and course_id parameter.

    Read the article

  • Hibernate many-to-many relationship

    - by Capitan
    I have two mapped types, related many-to-many. @Entity @Table(name = "students") public class Student{ ... @ManyToMany(fetch = FetchType.EAGER) @JoinTable( name = "students2courses", joinColumns = { @JoinColumn( name = "student_id", referencedColumnName = "_id") }, inverseJoinColumns = { @JoinColumn( name = "course_id", referencedColumnName = "_id") }) public Set<Course> getCourses() { return courses; } public void setCourses(Set<Course> courses) { this.courses = courses; } ... } __ @Entity @Table(name = "courses") public class Course{ ... @ManyToMany(fetch = FetchType.EAGER, mappedBy = "courses") public Set<Student> getStudents() { return students; } public void setStudents(Set<Student> students) { this.students = students; } ... } But if I update/delete Course entity, records are not created/deleted in table students2courses. (with Student entity updating/deleting goes as expected) I wrote abstract class HibObject public abstract class HibObject { public String getRemoveMTMQuery() { return null; } } which is inherited by Student and Course. In DAO I added this code (for delete() method): String query = obj.getRemoveMTMQuery(); if (query != null) { session.createSQLQuery(query).executeUpdate(); } and I ovrerided method getRemoveMTMQuery() for Course @Override @Transient public String getRemoveMTMQuery() { return "delete from students2courses where course_id = " + id + ";"; } Now it works but I think it's a bad code. Is there a best way to solve this problem?

    Read the article

  • javascript object creating

    - by Md. Shohel Rana
    I have a javascript object like this var student = function () { this.id = 1; this.Name = "Shohel"; this.Roll = "04115407"; this.Session = "03-04"; this.Subject = "CSE"; }; and i have a javascript array list like this var students = []; now i want to push student into students, this is shown below students.push(new student()) //no prolem students.push(new student[id = 3]) //Problem here second line occurs exceptions, how can i push javascript object like as c# add list, which is representing second line? thanks

    Read the article

  • Can reducing index length in Javascript associative array save memory

    - by d777
    I am trying to build a large Associative Array in JavaScript (22,000 elements). Do I need to worry about the length of the indices with regards to memory usage? In other words, which of the following options saves memory? or are they the same in memory consumption? Option 1: var student = new Array(); for (i=0; i<22000; i++) student[i] = { "studentName": token[0], "studentMarks": token[1], "studentDOB": token[2] }; Option 2: var student = new Array(); for (i=0; i<22000; i++) student[i] = { "n": token[0], "m": token[1], "d": token[2] }; I tried to test this on Google Chrome DevTools, but the numbers are inconsistent to make a decision. My best guess is that because the Array indices repeat, the browser can optimize memory usage by not repeating them for each student[i], but that is just a guess. Thanks.

    Read the article

  • Deleting the first occurrence of a target in aList [closed]

    - by Bandz Jooz
    /** Replaces each occurrence of oldItem in aList with newItem */ public static void replace(List<Student> aList, Student oldItemStudent newItem) { int index = aList.indexOf(oldItem); while(index != -1){ aList.set(index, newItem); index = aList.indexOf(oldItem); } /** Deletes the first occurrence of target in aList */ public static void delete(List<Student> aList, Student target){ Object o = //stuck here, dont know how to set up boolean stuff } } I figured out how to do the first method by looking up Java documentation, however I can't figure out how to finish my code for the second method even though I looked up the documentation which states: boolean remove(Object o) Removes the first occurrence of the specified element from this list, if it is present.

    Read the article

  • Turn Photos and Home Videos into Movies with Windows Live Movie Maker

    - by DigitalGeekery
    Are you looking for an easy way to take your digital photos and videos and turn them into a movie or slideshow? Today we’ll take a detailed look at how to do use Windows Live Movie Maker. Installation Windows Live Movie Maker comes bundled as part of the Windows Live Essentials suite (link below). However, you don’t have to install any of the programs you may not want. Take notice of the You’re almost done screen. Before clicking Continue, be sure to uncheck the boxes to set your search provider and homepage. Adding Pictures and Videos Open Windows Live Movie Maker. You can add videos or photos by simply dragging and dropping them onto the storyboard area. You can also click on the storyboard area or on the Add videos and photos button on the Home tab to browse for videos and photos. Windows Live Movie Maker supports most video, image, and audio file types. Select your files and add click Open to add them to Windows Live Movie Maker. By default WLMM doesn’t allow you to add files from network locations…so check out our article on how to add network support to Windows Live MovieMaker if the files you want to add are on a network drive. Layout All of your added clips will appear in the storyboard area on the right, while the currently selected clip will appear in the preview window on the left. You can adjust the size of the two areas by clicking and dragging the dividing line in the middle.    Make the clips on the storyboard bigger or smaller by clicking on the thumbnail size icon. The slider at the lower right adjusts the zoom time scale.   Previewing your Movie At any time, you can playback your movie and preview how it will look in the Preview window by clicking the space bar, or by pushing the play button under the preview window. You can also manually move the preview bar slider across the storyboard to view the clips as the video progresses. Adjusting Clips on the Storyboard You can click and drag clips on the storyboard to change the order in which the photos and videos appear.   Adding Music Nothing brings a movie to life quite like music. Selecting Add music will add your music to the beginning of the movie. Select Add music at the current point to include it in the movie to the current location of your preview bar slider, then browse for your music clip. WLMM supports many common audio files such as WAV, MP3, M4A, WMA, AIFF, and ASF. The music clip will appear above the video / photos clips on the storyboard.   You can change the location of music clips by clicking and dragging them to a different location on the storyboard. Add Titles, Captions, and Credits To add a Title screen to your movie, click the Title button on the Home tab. Type your title directly into the text box on the preview screen. The title will be placed at the location of the preview slider on the storyboard. However, you can change the location by clicking and dragging title to other areas of the storyboard. On the Format tab, there are a handful of text settings. You can change the font, color, size, alignment,  and transparency. The Adjust group allows you to change the background color, edit the text, and set the length of time the Title will appear in the movie.   The Effects group on the Format tab allows you to select an effect for your title screen. By hovering your cursor over each option, you will get a live preview of how each effect will appear in the preview window. Click to apply any of the effects. For captions, select where you want your caption to appear with the preview slider on the storyboard, then click the captions button on the Home tab. Just like the title, you type your caption directly into the text box on the preview screen, and you can make any adjustments by using the Font and Paragraph, Adjust, and Effects groups above. Credits are done the same as titles and captions, except they are automatically placed at the end of the movie.   Transitions Go to the Animation tab on the ribbon to apply transitions. Select a clip from the storyboard and hover over one of the transition to see it in the preview window. Click on the transition to apply it to the clip. You can apply transitions separately to clips or hold down Ctrl button while clicking to select multiple clips to which to apply the same transition. Pan and zoom effects are also located on the Animations tab, but can be applied to photos only. Like transition, you can apply them individually to a clip or hold down Ctrl button while clicking to select multiple clips to which to apply the same pan and zoom effect. Once applied, you can adjust the duration of the transitions and pan and zoom effects. You can also click the dropdown for additional transitions or effects. Visual Effects Similar to Pan and Zoom and Transitions, you can apply a variety of Visual Effects to individual or multiple clips. Editing Video and Music Note: This does not actually edit the original video you imported into your Windows Live Movie Maker project, only how it appears in your WLMM project. There are some very basic editing tools located on the Home tab. The Rotate left and Rotate right button will adjust any clip that may be oriented incorrectly. The Fit to music button will automatically adjust the duration of the photos (if you have any in your project) to fit the length of the music in your movie. Audio mix allows you to change the volume level   You can also do some slightly more advanced editing from the Edit tab. Select the video clip on the storyboard and click the Trim tool to edit or remove portions of a video clip. Next, click and drag the sliders in the preview windows to select the are you wish to keep. For example, the area outside the sliders is the area trimmed from the movie. The area inside is the section that is kept in the movie. You can also adjust the Start and End points manually on the ribbon.   When you are finished, click Save trim. You can also split your video clips. Move the preview slider to the location in the video clip where you’d like to split it, and select Split. Your video will be split into separate sections. Now you can apply different effects or move them to different locations on the storyboard. Editing Music Clips Select the music clip on the storyboard and then the Options tab on the ribbon. You can adjust the music volume by moving the slider right and left.   You can also choose to have your music clip fade in or out at the beginning and end of your movie. From the Fade in and Fade out dropdowns, select None, Slow, Medium, or Fast. To adjust the sound of your audio clips, click on the Edit tab, select the Video volume button, and adjust the slider. Move it all the way to the left to mute any background noise in your video clips.   AutoMovie As you have seen, Windows Live Movie Maker allows you to add effects, transitions, titles, and more. If you don’t want to do any of that stuff yourself, AutoMovie will automatically add title, credits, cross fade transitions between items, pan and zoom effects to photos, and fit your project to the music. Just select the AutoMovie button on the Home tab. You can go from zero to movie in literally a couple minutes.   Uploading to YouTube You can share your video on YouTube directly from Windows Live Movie Maker. Click on the YouTube icon in the Sharing group on the Home tab. You’ll be prompted for your YouTube username and password. Fill in the details about your movie and click Publish. The movie will be converted to WMV before being uploaded to YouTube. As soon as the YouTube conversion is complete, you’re new movie is live and ready to be viewed. Saving your Movie as a Video File Select the icon at the top left, then select Save movie. As you hover your mouse over each of the options, you will see the output display size, aspect ratio, and estimated file size per minute of video. All of these settings will output your movie as a WMV file. (Unfortunately, the only option is to save a movie as a WMV file.) The only difference is how they are encoded based on preset common settings. The Burn to DVD option also outputs a WMV file, but then opens Windows DVD Maker and walks you through the process of creating and burning a DVD.   If you choose the Burn to DVD option, close this window when the WMV file conversion is complete and the Windows DVD Maker will prompt you to begin. When your movie is finished, it’s time to relax and enjoy.   Conclusion Windows Live Movie Maker makes it easy for the average person to quickly churn out nice looking movies and slideshows from there own pictures and videos. However, long time users of previous editions (formerly called Windows Movie Maker) will likely be disappointed by some features missing in Windows Live Movie Maker that existed in earlier editions. Looking for details on burning your new project to DVD, check out our article on how to create and author DVDs with Windows DVD Maker. Download Windows Live Movie Maker Similar Articles Productive Geek Tips Family Fun: Share Photos with Photo Gallery and Windows Live SpacesCreate and Author DVDs in Windows 7Rotate a Video 90 degrees with VLC or Windows Live Movie MakerInstall Windows Live Essentials In Windows 7How to Make/Edit a movie with Windows Movie Maker in Windows Vista TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips CloudBerry Online Backup 1.5 for Windows Home Server Snagit 10 VMware Workstation 7 Acronis Online Backup Windows Firewall with Advanced Security – How To Guides Sculptris 1.0, 3D Drawing app AceStock, a Tiny Desktop Quote Monitor Gmail Button Addon (Firefox) Hyperwords addon (Firefox) Backup Outlook 2010

    Read the article

  • Configuring VLAN's on two HP procurve switches

    - by pan
    Trying to route a new ISP (Microwave link) from one of my out buildings to my computer room and hence my firewall. Old ISP came direct into firewall. In the outbuilding the Microwave modem connects with cat5 to HP Procurve 2524 switch. Because this ISP is coming through my internal network, I plan on using a new vlan called "airspeed" only for this ISP traffic. Up until now I've just been using the Default_vlan on both HP switches (4108 + 2524). So far I've been unable to ping from my laptop to the ISP modem both of which are on the new vlan 2 ("Airspeed"). No traffic needs to cross from vlan 2 to vlan 1 so I've left the ports as untagged. I've used the subnet provide from my ISP as the new vlan 2 subnet. Can anybody see what I'm doing wrong here? I've added the configuration of both switch below. Rough diagram: Microwave modem (Gateway IP 77.75.00.49) | HP 2524 switch (port 24) | HP 2524 switch fibre link | HP 4108GL switch fibre link | HP 4108GL switch (port D1) | Laptop configured with IP 77.75.00.50 (for testing but will be connected to firewall) And my 4108GL config: ; J4865A Configuration Editor; Created on release #G.07.21 hostname "HP ProCurve Switch 4108GL" cdp run module 1 type J4864A module 2 type J4862B module 3 type J4862B module 4 type J4862B ip default-gateway 128.1.146.50 snmp-server community "public" Unrestricted snmp-server host 128.1.146.51 "public" Not-INFO snmp-server host 128.1.146.38 "public" vlan 1 name "DEFAULT_VLAN" untagged A1-A3,B1-B24,C1-C24,D2-D24 ip address 128.1.146.203 255.255.0.0 no untagged D1 exit vlan 2 name "Airspeed" untagged D1 ip address 77.75.00.51 255.255.255.248 exit Finally my 2524 config: ; J4813A Configuration Editor; Created on release #F.04.08 hostname "HP ProCurve Switch 2524" cdp run ip default-gateway 0.0.0.0 snmp-server community "public" Unrestricted snmp-server host 128.1.146.51 "public" Not-INFO snmp-server host 128.1.146.51 "public" snmp-server host 128.1.146.38 "public" vlan 1 name "DEFAULT_VLAN" untagged 1-23,25-26 no untagged 24 ip address 128.1.146.204 255.255.0.0 exit vlan 2 name "Airspeed" untagged 24 ip address 77.75.00.51 255.255.255.248 exit no aaa port-access authenticator active

    Read the article

  • Changing mouse behaviour in EOG

    - by Wauzl
    When I open a photo in eog I can easily zoom with the mouse mouse wheel. This is kind of nice but since I have a touchpad with two-fingered scrolling and horizontal scrolling I'd rather scroll in the image and zoom by using Ctrl+Mouse Wheel? I basically want the same behaviour as in evince: Horizontal Scroll and Normal Scroll navigate within the image and Ctrl + Mouse Wheel zooms in and out. Is this possible somehow? [EDIT] I just figured out that what I want is already implemented: I can pan the image by using Ctrl + Mouse Wheel. This is fine as it is the behaviour I want only with the Ctrl inverted. But I cannot pan to the left. Up, down and right work fine. What's the problem?

    Read the article

  • Scrolling Box2D DebugDraw

    - by onedayitwillmake
    I'm developing a game using Box2D (javascript implementation - Box2DWeb), and I would like to know how I can pan the debug draw. I know the usual answer is - don't use debug draw, it's just for debugging. I'm not, however not all my objects are on the same screen, and i'd like to see where they are in the physics representation. How can I pan the debug drawing? As you can see the debug draw stuff, is show on the top left, but it only shows a small part of the world. Here is an example of what I mean: http://onedayitwillmake.com/ChuClone/ The game is open source, If you'd like to poke through and note something that perhaps i'm doing something that is obviously wrong: https://github.com/onedayitwillmake/ChuClone Here's my hacky way that I'm using now to scroll the b2DebugDraw view, in which I added a property offsetX and offsetY into b2DebugDraw

    Read the article

  • Scrolling Box2D DebugDraw

    - by onedayitwillmake
    I'm developing a game using Box2D (javascript implementation - Box2DWeb), and I would like to know how I can pan the debug draw. I know the usual answer is - don't use debug draw, it's just for debugging. I'm not, however not all my objects are on the same screen, and i'd like to see where they are in the physics representation. How can I pan the debug drawing? As you can see the debug draw stuff, is show on the top left, but it only shows a small part of the world. Here is an example of what I mean: http://onedayitwillmake.com/ChuClone/ The game is open source, If you'd like to poke through and note something that perhaps i'm doing something that is obviously wrong: https://github.com/onedayitwillmake/ChuClone

    Read the article

  • Panning a 3d viewport in 2d direction with rotated camera

    - by Noob Game Developer
    I am using below code to pan the viewport (action script 3 code using flare3d framework) _mainCamera.x-= Input3D.mouseXSpeed; _mainCamera.z+= Input3D.mouseYSpeed; Where as Input3D.mouse[X|Y]Speed gives the displacement of the mouse on the X/Y axis starting from the position of the last frame. This works perfect if my camera is not rotated. However, if I rotate the camera (x by 30, y by 60) and pan the camera then it goes wrong. Which is actually correctly panning according to the code. But this is not desired and I know I need to do some math to get the correct x/y which I am not aware of it. Can some one help me achieving it? Update: I am getting an Idea but I am not sure how to do it :( Get the mouseX/Y deltas (xd,yd) Get the current camera coords (pos3d) Convert to screen coords (pos2d) Add deltas to screen coords (pos2d+ (xd,yd)) Convert above coords to 3d coords

    Read the article

  • communication network applications in Ubuntu 12.04

    - by soporte.cs
    I have installed edubuntu on 2 computers that are networked. I installed an educational software to keep track of the teams (one student and one teacher) but the teacher software is not any student team, as I have indicated in the product support should be enabled for proper telnet performance but despite being able to telnet between computers not get it to work. I wonder which options should be active in ubuntu for this type of software to operate smoothly. Thank you.

    Read the article

  • Zoom on multiple areas in d3.js

    - by t2k32316
    I'm planning to have a geoJSON map inside my svg alongside other svg elements. I would like to be able to zoom (zoom+pan) in the map and keep the map in the same location with a bounding box. I can accomplish this by using a clipPath to keep the map within a rectangular area. The problem is that I also want to enable zooming and panning on my entire svg. If I do d3.select("svg").call(myzoom); this overrides any zoom I applied to my map. How can I apply zoom to both my entire svg and to my map? That is, I want to be able to zoom+pan on my map when my mouse is in the map's bounding box, and when the mouse is outside the bounding box, zoom+pan on the entire svg. Here's example code: http://bl.ocks.org/nuernber/aeaac0e8edcf7ca93ade. (how do I get around the cross domain issue to load the map?) <svg id="svg" width="640" height="480" xmlns="http://www.w3.org/2000/svg" version="1.1"> <defs> <clipPath id="rectClip"> <rect x="150" y="25" width="400" height="400" style="stroke: gray; fill: none;"/> </clipPath> </defs> <g id="outer_group"> <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red" /> <g id="svg_map" style="clip-path: url(#rectClip);"> </g> </g> </svg><br/> <script type="text/javascript"> var svg = d3.select("#svg_map"); var mapGroup = svg.append("g"); var projection = d3.geo.mercator(); var path = d3.geo.path().projection(projection); var zoom = d3.behavior.zoom() .translate(projection.translate()) .scale(projection.scale()) .on("zoom", zoomed); mapGroup.call(zoom); var pan = d3.behavior.zoom() .on("zoom", panned); d3.select("svg").call(pan); mapGroup.attr("transform", "translate(200,0) scale(2,2)"); d3.json("ne_110m_admin_0_countries/ne_110m_admin_0_countries.geojson", function(collection) { mapGroup.selectAll("path").data(collection.features) .enter().append("path") .attr("d", path) .attr("id", function(d) { return d.properties.name.replace(/\s+/g, "")}) .style("fill", "gray").style("stroke", "white").style("stroke-width",1); } ); function panned() { var x = d3.event.translate[0]; var y = d3.event.translate[1]; d3.select("#outer_group").attr("transform", "translate("+x+","+y+") scale(" + d3.event.scale + ")"); } function zoomed() { previousScale = d3.event.scale; projection.translate(d3.event.translate).scale(d3.event.scale); translationOffset = d3.event.translate; mapGroup.selectAll("path").attr("d", path); } </script>

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >