Search Results

Search found 8414 results on 337 pages for 'critical section'.

Page 172/337 | < Previous Page | 168 169 170 171 172 173 174 175 176 177 178 179  | Next Page >

  • Passing an address inside a WordPress post to a Google Map elsewhere on the Page

    - by ael_ecurai
    Background: My client is building their own WordPress site (using a purchased feature-rich theme), and I'm modifying a child theme as necessary to achieve customizations she wants. The theme comes with a Page template that includes a full-width Google Map across the top, which pulls its marker from a single address set within the Theme Options. It's meant to be used for one main "Contact Us" page. The client's business has several locations, and she wants each location's page to include such a map. (Example linked below.) It seems that the ideal solution would be the ability to specify an address within a shortcode in the Post, and have that set the map marker. Here's how the theme makes the map (where $mapAddress is the address from the Theme Options): <?php $mapAddress = ot_get_option( 'map_address' ); $mapHeight = ot_get_option( 'map_height' ); $mapContent = ot_get_option( 'map_content' ); ?> <section id="block-map-wrapper"> <div id="block-map" class="clearfix"> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true"></script> <script> jQuery(document).ready(function(){ // Map Options var mapOptions = { zoom: 15, scrollwheel: false, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL, position: google.maps.ControlPosition.TOP_LEFT }, mapTypeControl: true, scaleControl: false, panControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; // The Map Object var map = new google.maps.Map(document.getElementById("map"), mapOptions); var address = ""; var geocoder = new google.maps.Geocoder(); geocoder.geocode({ "address" : "<?php echo $mapAddress; ?>" }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { address = results[0].geometry.location; map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ position: address, map: map, clickable: true, animation: google.maps.Animation.DROP }); var infowindow = new google.maps.InfoWindow({ content: "<?php echo $mapContent; ?>" }); google.maps.event.addListener(marker, "click", function() { infowindow.open(map, marker); }); } }); }); </script> <div id="map" class = "map" style = "width: 100%; height: <?php echo $mapHeight; ?>px"></div> </div><!-- #block-map --> <div class="shadow-bottom"></div> </section><!-- #block-map-wrapper --> Here's a test page using a custom Page template I've created. Right now it's using the same map code as above. I've tried creating a shortcode that takes an address attribute and sets it as $mapAddress, but that didn't work. I believe it's because the map is already loaded by the time the Loop gets parsed. How can I tell Maps to "come back" to the post to get the proper address? My specialty lies in HTML & CSS, but Javascript befuddles me fairly easily, so please be explicit when explaining implementation. Bonus: A further goal is to have the locations' parent Page also include such a map, but have multiple markers representing the multiple locations. When taking more than one location, Google Maps only accepts latitude/longitude. I don't want my client to be concerned with coordinates, so I know there's got to be something I can do with the geocoding service so she can just input a list of addresses instead (into the same, or similar, shortcode solution developed for my main question). But I am extra-clueless about how to do that.

    Read the article

  • How to provide global functionality in multi-user database app

    - by Mike B
    I have been building a multi-user database application (in C#/WPF 4.0) that manages tasks for all employees of a company. I now need to add some functionality such as sending an email reminder to someone when a critical task is due. How should this be done? Obviously I don’t want every instance of the program to be performing this function (Heh each user would get 10+ emails). Should I add the capability to the application as a "Mode" and then run a copy on the database server in this mode or would it be better to create a new app altogether to perform "Global" type tasks? Is there a better way?

    Read the article

  • Optimization Techniques in Python

    - by fear-matrix
    Recently i have developed a billing application for my company with Python/Django. For few months everything was fine but now i am observing that the performance is dropping because of more and more users using that applications. Now the problem is that the application is now very critical for the finance team. Now the finance team are after my life for sorting out the performance issue. I have no other option but to find a way to increase the performance of the billing application. So do you guys know any performance optimization techniques in python that will really help me with the scalability issue

    Read the article

  • Windows Task Scheduler won't let me uncheck "Wake the computer" option for a backup task

    - by KdawgUD
    I have a problem with my windows 7 laptop automatically waking after I put it to sleep and then I find it later with the battery drained. I tracked down the culprit using the "powercfg -lastwake" command to be a Backup task in the "Windows Server" section of the task scheduler. I have tried unchecking the "Wake the computer to run this task" checkbox for this task, but after I do this and reboot, the box is always rechecked again. How can I make this setting persist? I have full admin rights to this laptop, but it is on a domain. Edit: I looked into the domain policy settings as suggested by Dave below and did not find any policies related to scheduled task settings. Any other ideas?

    Read the article

  • How to quickly start Programs like "regedit.exe" from the Windows 7 search bar using substring matching?

    - by Palmin
    The search bar in Windows 7 is very convenient to quickly start applications by pressing the Win-key and then entering the name of the application. For applications with a Program Menu entry like Firefox, it is sufficient to type Fire and Firefox will be displayed in the Programs section of the search results. For other applications like regedit.exe, I have to type the full command regedit before the correct choice regedit.exe appears. Is there any way to have regedit.exe appear already when I have just entered a substring? Please note: I have seen Add my applications to Vista’s Start Search, but I don't want to add anything to the Start Menu manually. This question is about if there is some configuration that can be tuned to make the results appear. I have also seen Search behavior of Windows 7 start menu, but my problem is not that the exe appears under Files, regedit.exe correctly appears under Programs, but it should appear already for a substring match.

    Read the article

  • How to change size of STL container in C++

    - by Jaime Pardos
    I have a piece of performance critical code written with pointers and dynamic memory. I would like to rewrite it with STL containers, but I'm a bit concerned with performance. Is there a way to increase the size of a container without initializing the data? For example, instead of doing ptr = new BYTE[x]; I want to do something like vec.insert(vec.begin(), x, 0); However this initializes every byte to 0. Isn't there a way to just make the vector grow? I know about reserve() but it just allocates memory, it doesn't change the size of the vector, and doesn't allows me to access it until I have inserted valid data. Thank you everyone.

    Read the article

  • Including objects from external .js files

    - by Molle
    I have been searching for many hours over several days for this answer and though there are many topics on how to include files in a project (also here at Stack Overflow), I have not yet found THE solution to my problem. I'm working on a project where I want to include one single object at a time, from many different files (I do not want to include the files themselves, only their content). All the object in all the files have the same name, only the content is different. It is important that I do not get a SCRIPT tag in the head section of the page as all the content from the files will have the same names. None of the files will have functions anyways, only one single object, that will need to be loaded one at the time and then discarded when the next element is loaded. The objects will hold the data that will be shown on the page and they will be called from the menu by an 'onclick' event. function setMenu() // The menu is being build. { var html = ''; html += '<table border="0">'; for (var i = 0; i<menu.pages.length; i++) { html += '<tr class="menuPunkt"><td width="5"></td><td onclick="pageName(this)">'+ menu.pages[i] +'</td><td width="5"></td></tr>'; } // menu is a global object containing elements such as an array with // all the pages that needs to be shown and styling for the menu. html += '</table>'; document.getElementById("menu").innerHTML = html; style.setMenu(); // The menu is being positioned and styled. } Now, when I click on a menu item the pageName function is triggered and I'm sending the HTML element to the function as well, it is here that I want the content from my external file to be loaded into a local variable and used to display content on the page. ** The answer I want is "How to load the external obj into the function where I need it? (It may be an external file, but only in the term of not being included in the head section. I'm still loading the the file from my own local library.** function pageName(elm) // The element that I clicked is elm. { var page = info.innerHTML; // I need only the innerHTML from the element. var file = 'sites/' + page + '.js'; // The file to be loaded is created. var obj = ?? // Here I somehow want the object from the external file to be loaded. // Before doing stuff the the obj. style.content(); } The content from the external file could look like this: // The src for the external page: 'sites/page.js' var obj = new Object() { obj.innerHTML = 'Text to be shown'; obj.style = 'Not important for problem at hand'; obj.otherStuff = ' --||-- '; } Any help will be appreciated, Molle

    Read the article

  • ASP.NET null reference exception

    - by nanek
    Please help me to figure out what is wrong with this code: I have ASP.NET page with one button visible. When user clicks it - it instances MyClass (its implementation is in AppCode directory) and turns invisible (button2 becomes visible). When I click button2 it raises "Object reference not set to an instance of an object" Exception. What seems to be the problem? { public MyClass noviTest; protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { noviTest = new MyClass(TextBox1.Text); Button1.Visible = false; Button2.Visible = true; } protected void Button2_Click(object sender, EventArgs e) { Label1.Text=noviTest.getID; //this is the critical line } } Thank You in advance, Regards

    Read the article

  • How to properly dispose of an object

    - by VoodooChild
    Hi Guys, I am experiencing something weird and have a workaround already, but I don't think I understood it well. If I call the Method below numerous times within a class: public void Method() { Foo a = new Foo(); a.Delegate1Handler = ViewSomething(); } So I am reinitializing "a" every time but for some reason a.Delegate1Handler is still around from the previous initialization, and therefore ViewSomething() is called again and again and again.... I feel like I am forgetting something critical here? Foo's guts look like: public delegate void Delegate1(T t); public Delegate1 Delegate1Handler { get; set; }

    Read the article

  • Kill program after it outputs a given line, from a shell script

    - by Paul
    Background: I am writing a test script for a piece of computational biology software. The software I am testing can take days or even weeks to run, so it has a recover functionality built in, in the case of system crashes or power failures. I am trying to figure out how to test the recovery system. Specifically, I can't figure out a way to "crash" the program in a controlled manner. I was thinking of somehow timing a SIGKILL instruction to run after some amount of time. This is probably not ideal, as the test case isn't guaranteed to run the same speed every time (it runs in a shared environment), so comparing the logs to desired output would be difficult. This software DOES print a line for each section of analysis it completes. Question: I was wondering if there was a good/elegant way (in a shell script) to capture output from a program and then kill the program when a given line/# of lines is output by the program?

    Read the article

  • Cannot access to my app's dashboard (iTunes Connect)

    - by Skynext
    Since more than a week I can't access to my app's admin page on iTunes Connect. I'am able to connect me to iTunes Connect and to access the "manage my Apps" section but when I select a specific app I get the following message: Unable to Process Request Your request could not be processed. For additional help, send an email to [email protected] I have deleted cookies and data navigation in Safari, tried with chrome and fierfox: nothing. I contacted the support of iTunes Connect more than one week ago but nothing moves. If anyone has experienced the same situation and can help me... Thank You !

    Read the article

  • Mac OS X change IP configuration automatically by location (by Wifi network)?

    - by Seppo Sade
    Can Mac OS X be setup to automatically configure its Airport interface with a static IP address when connected to a Wifi network with a certain name, and on all other Wifi networks use DHCP? Currently I'm using the "Locations" feature of the "Network" section in System Preferences to manually switch between two IP address setups. I have a "my static IP" setup, and a default "DHCP" setup. However this requires entering System Preferences to change the Location drop-down each time when switching locations. Can this be automated? Preferably this would be done without third-party software.

    Read the article

  • what are your biggest complaints about TFS as source-control?

    - by jcollum
    I've used TFS for about 18 months now and I'm really not excited about it. It seems like the worst of the current versions of SCMs on the market. I think this thread will help people decide if TFS is for them vs. other source control systems. While TFS does a lot more than that, I think that source control is so critical to software development that any system (or combination thereof) that you pick needs to consider source control first. So, feel free to sound off. Maybe it'll make us feel better and be informative at the same time.

    Read the article

  • Combine OS partion with data partition on NAS4Free/FreeNAS

    - by Pak
    I recently built a NAS4Free (formerly FreeNAS) machine using a 256MB (yes, MB) USB drive for the OS. When I did the original install, I had the bright idea of making the OS partition just big enough for the OS and a then creating a second partition using the remainder of the drive to store stuff pertaining to the OS. I never really found a use for the data partition and I ended up running out of space on the OS partition, so now I'd like to combine the partitions into a single partition. Is this something that is possible to do while everything is up and running? If it comes down to it, I can take down the machine and do a fresh install of the OS using the entire space of the USB drive, but I'd like to use this as an opportunity to better familiarize myself with FreeBSD/UNIX type systems. If this is possible, will it interfere with the NAS4Free things? The data partition shows up in the web interface under the disks section. If I end up manually changing the partitions, I'd be concerned with NAS4Free getting confused by the missing partition.

    Read the article

  • Check "Id3 Tag" integrity from mp3 (almost a "debug"). Is it possible?

    - by Somebody still uses you MS-DOS
    I'm using Mp3Tag do edit Id3 tags in my mp3 files. In the editor everything looks ok, but in my iTunes, some of them just ge messed up. The artist isn't read, Album Artist doesn't show up, this kind of thing. It's just random, some are messed up, some aren't. How do I "debug" this problem? How can I check what is written in my mp3 metadata, if possible, running all my mp3 in a batch (since I have 100gb)? How do I know if there are "garbage" in the metadata section along with information I correctly edited?

    Read the article

  • Elements of website don't work in IE

    - by mjcuva
    On the site I'm working on for my high school basketball team, certain elements don't work in Internet Explorer. The site is hermantownbasketball.com. The boys basketball sidebar should have nested drop down menus, one when you mouse over the team, such as "High School" and then another when you mouse over the grade under the team, such as 9th grade. This works perfectly fine in chrome, however, I can't get it to work in any version of Internet Explorer. Below is the part of the html and the corresponding css I am using. Unfortunately, I don't know enough css to know which part of my code IE doesn't like or how to fix it. Any help is greatly appreciated! HTML <span class = "boyItem"> <h3>High School</h3> <li class="group"> <h4>9th Grade</h4> <div class = "nested">Schedule</div> <div class = "nested">Events</div> <div class ="nested">Forms</div> <div class ="nested">Calendar</div> </li> <li class="group"> <h4>JV/Varsity</h4> <div class = "nested">Schedule</div> <div class = "nested">Events</div> <div class = "nested">Forms</div> <div class = "nested">Calendar</div> </li> </span> /* Creates the box around the title for each boy section. */ .boyItem h3 { background:#1C23E8; color:#EFFA20; padding-right:2px; padding:10px; font-size:18px; margin-left:-30px; margin-top:-10px; } ###CSS .boyItem h3:hover { background:#2A8FF5; } /* Prevents the boy sub-sections from being visable */ .boyItem li h4 { position: absolute; left:-9999px; font-size:15px; list-style-type:none;} /* Shows the boy sub-sections when user mouses over the section title. */ .boyItem:hover li h4 { position:relative; left:10px; background:#1C23E8; color:#EFFA20; padding-left:20px; padding:5px; } .boyItem:hover li h4:hover { background:#2A8FF5;} .nested { position:absolute; left:-9999px; background:#352EFF; color:#EFFA20; padding-right:2px; padding:4px; font-size:14px; margin:2px; margin-left:30px; margin-top:0px; margin-right:0px; margin-bottom:-2px;} .group:hover .nested {position:relative; left:0px; } .group:hover .nested:hover { background:#2A8FF5}

    Read the article

  • Do classes which have a vector has a member have memory issues

    - by user263766
    I am just starting out C++, so sorry if this is a dumb question. I have a class Braid whose members are vectors. I have not written an assignment operator. When I do a lot of assignments to an object of the type Braid, I run into memory issues :- 0 0xb7daff89 in _int_malloc () from /lib/libc.so.6 #1 0xb7db2583 in malloc () from /lib/libc.so.6 #2 0xb7f8ac59 in operator new(unsigned int) () from /usr/lib/libstdc++.so.6 #3 0x0804d05e in __gnu_cxx::new_allocator<int>::allocate (this=0xbf800204, __n=1) at /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../include/c++/4.4.3/ext/new_allocator.h:89 #4 0x0804cb0e in std::_Vector_base<int, std::allocator<int> >::_M_allocate (this=0xbf800204, __n=1) at /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../include/c++/4.4.3/bits/stl_vector.h:140 #5 0x0804c086 in _Vector_base (this=0xbf800204, __n=1, __a=...) at /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../include/c++/4.4.3/bits/stl_vector.h:113 #6 0x0804b4b7 in vector (this=0xbf800204, __x=...) at /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../include/c++/4.4.3/bits/stl_vector.h:242 #7 0x0804b234 in Braid (this=0xbf800204) at braid.h:13 #8 0x080495ed in Braid::cycleBraid (this=0xbf8001b4) at braid.cpp:191 #9 0x080497c6 in Braid::score (this=0xbf800298, b=...) at braid.cpp:251 #10 0x08049c46 in Braid::evaluateMove (this=0xbf800468, move=1, pos=0, depth=2, b=...) I suspect that these memory issues are because the vectors are getting resized. What I want to know is whether objects of type Braid automatically expand when its members expand? he code I am writing is really long so I will post the section which is causing the problems. Here is the relevant section of the code :- class Braid { private : vector<int> braid; //Stores the braid. int strands; vector < vector<bool> > history; vector < vector<bool> > CM; public : Braid () : strands(0) {} Braid operator * (Braid); Braid* inputBraid(int,vector<int>); int printBraid(); int printBraid(vector<vector<int>::iterator>); vector<int>::size_type size() const; ..... ..... } Here is the function which causes the issue :- int Braid::evaluateMove(int move,int pos,int depth,Braid b) { int netscore = 0; Braid curr(*this); curr = curr.move(move,pos); netscore += curr.score(b); while(depth > 1) { netscore += curr.evaluateMove(1,0,depth,b); netscore += curr.evaluateMove(2,0,depth,b); for(int i = 0; i < braid.size();++i) { netscore += curr.evaluateMove(3,i,depth,b); netscore += curr.evaluateMove(4,i,depth,b); netscore += curr.evaluateMove(5,i,depth,b); curr = curr.cycleBraid(); netscore += curr.evaluateMove(6,0,depth,b); } --depth; } return netscore; }

    Read the article

  • Reverse Proxy Server SSL?

    - by valveLondon
    Context We currently have an Apache web server in the DMZ set up as a reverse proxy and load balancer for two machines running Windows Server 2008 (IIS) inside. The Apache server has a genuine SSL certificate and serves up both http and https, however, the balancer members in the load balancing section are set to: BalancerMember {https://server1} and {https://server2}. The IIS web servers have self-signed certificates in order to respond to the https requests. My question: Do we need to forward any requests from Apache (in the DMZ) to the inside using SSL? e.g can the reverse proxy forward the requests using HTTP? and if so, why would I choose to forward them with SSL? (how secure is the http line between the dmz and the inside); In other words, can I totally disable SSL on my inside web servers?

    Read the article

  • Using prf file to configure outlook clients

    - by chrissie1
    I have a prf file to outlook clients. For the moment the new exchange will be in another domain, that will change in the future. But the usernames on both domains are the same. I see that the example prf just takes the username ;*************************************************************** ; Section 4 - Default values for each service. ;*************************************************************** [ServiceEGS] MailboxName=%UserName% HomeServer=exchange_server_name [Service1] OverwriteExistingService=No UniqueService=Yes MailboxName=%UserName% HomeServer=exchange_server_name AccountName=Microsoft Exchange Server Can I add the domainname to that like so. MailboxName=\\domain\%UserName´% or is there a better way of doing this.

    Read the article

  • Persistent SQL Table lock from C#

    - by Chris
    I'm trying to create a persistent SQL (SQL Server 2005) lock on a table level. I'm not updating/querying the specified table, but I need to prevent a third party application from updating the locked table as a means to prevent transactions from being posted (the table I wish to lock is the key on their transaction that interferes with my processing). From my experience the table is only locked for the time a specific transaction is taking place. Any ideas? The 3rd party developer has logged this feature as an enhancement, but since they are in the middle of rolling out a major release I can expect to wait at least 6 months for this. I know that this isn't a great solution, since their software will fall over but it is of a critical enough nature that we're willing to live with the consequences.

    Read the article

  • What are the latest options in Java logging frameworks?

    - by sanity
    This question gets asked periodically, but I've long felt that existing Java logging frameworks were overcomplicated and over-engineered, and I want to see what's new. I have a more critical issue on my current project as we've standardized on JSON as our human-readable data encoding, and most logging frameworks I've seen require XML. I would really rather avoid using JSON for 95% of my apps configuration, and XML for the rest just because of the logging framework (truth be told, I hate XML used for anything other than text markup, its original intended purpose). Are there any hot new Java logging frameworks that are actively maintained, reasonably powerful, have a maven repo, can be reconfigured without restarting your app, and don't tie you to XML?

    Read the article

  • iOS Development: Should the "playersToInvite" property contain an array of strings or an array of GKPlayer objects?

    - by BeachRunnerJoe
    Should the playersToInvite property of the GKMatchRequest object contain an array of NSString objects that hold the player id's or should it contain an array of GKPlayer objects? The documentation on this critical property is not clear at all and I've tried both ways, but my code isn't working, so I can't tell by experimentation. Here's the description for that property in the docs... A list of players to invite to the match. Why did they even bother writing that? Thanks for your help!

    Read the article

  • nvidia ignores the resolution listed in xorg.conf, even though I have 'nvidia-settings --load-config-only' on startup

    - by ihadanny
    when my machine boots, I see a nice 1920X1080 resolution screen, but the minute I login to my user, it's reverted to an ugly 720Xwhatever. When I run nvidia-settings and select 1920X1080, it's ok again. What am I missing??? my /etc/X11/xorg.conf contains: Section "Screen" ... Option "metamodes" "nvidia-auto-select +0+0; 1920x1080 +0+0" ... EndSection I'm using unity 3.8.16 on ubuntu 11.04, and when I check on gnome-session-properties I see that I have sh -c '/usr/bin/nvidia-settings --load-config-only on my startup.

    Read the article

  • How to perform actions on current window in keybindings?

    - by user905686
    In the ManageHook I can define what should happen to windows that have specific xprops etc. For example, I can call doShift or doFloat. How can I do the same to the currently focused window with a key binding? The section looks like this: `additionalKeys` ( [ -- Key bindings -- -- Minimize window ((myModMask .|. shiftMask, xK_m ), withFocused minimizeWindow) As you can see, I can call the minimizedWindow function (which takes a Window as parameter) on the current window when pressing a combination of keys, but doFloat etc. do not work like this.

    Read the article

  • I have to manually enter the pwd when I login at school and when I come back home with my laptop (DELL E6410)

    - by Bong Paduano
    I didn't have to do this the first 3 months of me going to school. My laptop used to be able to connect to my Home WiFi and school Wifi automatically then after the 3rd month something changed and eversince then I literally have to manually enter each of the Wifi passwords in each location each time I try to connect to their respective WLAN. I tried adding each WiFi networks in the "Manage wireless networks" section in the Network and Sharing Center but everytime I login to one of the location, the created network disappears and I did this more than once. I tried restoring the OS back but to no avail. Can someone please assist me on this issue. I'm not sure if this issue has been addressed in this website but I haven't seen any similar question in here. I appreciate any help anyone may be able to share.

    Read the article

< Previous Page | 168 169 170 171 172 173 174 175 176 177 178 179  | Next Page >