Daily Archives

Articles indexed Thursday May 29 2014

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

  • What kind of redirect (301 or 302) for an email links tracker?

    - by MaxiWheat
    We are developing an email sending application ("à la" Mailchimp). Hyperlinks inserted by our users, in the emails they want to send, are replaced by a tracking URL on our application (https://ourdomain.com/trackingurl?blablabla) which then redirects the email reader to the original URL our users included in their emails. This allows us to record statistics about link clicks. Until now, we used 301 for those redirections, but we noticed that Google began indexing pages on our application which are in fact redirects to other domains. (The title and snippet in Google results are from the other domain, but the link in green is from our application). We took action by adding those urls to our robots.txt, but Google seems to take forever (months!) before removing them for its index and removing them by hand in Webmaster Tools would take a lot of time since there are lot. I would like to know which kind of HTTP redirect (301 or 302) is best suited for this kind of opreation ? Do you think switching to 302 redirects could improve this situation since we don't really want Google to index redirected links from our clients emails ?

    Read the article

  • How to ignore collision between two objects

    - by eren_trigger
    I have a player that shoots in the direction that it is facing. However, the shot that is created when I click, also destroys the player. How would I make the shot ignore collision with the player? Or better yet, how to make a shot destroy anything it touches and destroy itself without affecting the player? This is the code that controls collisions: function OnTriggerEnter (col : Collider) { Destroy(col.gameObject); } The shot is a trigger, but the player isn't. Not sure if this changes anything in this case. Thanks in advance. EDIT: http://gfycat.com/TediousAridFeline

    Read the article

  • Animations / OpenGL (ES 2) in game menu

    - by user16547
    (I am specifically asking for Android) If you look at Angry Birds (and in fact many other games), you can already see a lot of animations & effects going in the main menu and in other places even before starting to play. I assume they are done with OpenGL, more precisely a FrameLayout is used and inside it a GLSurfaceView is somewhere at the bottom of the hierarchy; above the GLSurfaceView you have regular Android buttons and texts. Is this how it's done*? Also would you reuse the same GLSurfaceView when running the actual game or should another one be created? *I am aware an alternative approach would be to make absolutely everything in OpenGL. Of these two I prefer the FrameLayout one, but I don't know whether other developers agree.

    Read the article

  • Android Html.fromHtml

    - by user3688154
    hi take from database a String like this: "Frog Revolution <\strong<\span<\p\r\nUn mix perfetto di design e praticità, che stimola il piacere dello sguardo.<\span<\p\r\nLa Frog è una macchina da caffè espresso a cialde destinata sia al mercato domestico che quello aziendale. <\span<\p\r\nIl suo design innovativo, la sua semplicità e la qualità delle sue componenti, la rendono un bene strumentale affidabile a cui puntare in tutta tranquillità. <\span<\p\r\nDIMENSIONI:<\strong<\span<\p\r\n\r\nLarghezza: 22 cm <\span<\li\r\nAltezza: 40 cm<\span<\li\r\nProfondità: 32 cm<\span<\li\r\nPeso: 6.5 Kg<\span<\li\r\n<\ul\r\nCARATTERISTICHE TECNICHE<\strong<\span<\p\r\n\r\nPotenza normale 650 W <\span<\li\r\nVoltaggio 230 V<\span<\li\r\nSistema di decalcificazione rapido <\span<\li\r\nAlloggio bottiglia d'acqua <\span<\li\r\n<\ul\r\nACCESSORI<\strong<\span<\p\r\n\r\nVano porta cialde e bicchieri<\span<\li\r\n<\ul" now i try to put it in a TextView with Html.fromHtml() method…but without success..Can you help me?

    Read the article

  • How can I change this method to get rid of the warning without anything changing?

    - by user3591323
    So this question:Warning-used as the name of the previous parameter rather than as part of the selector answers part of my problem, but I really don't want anything to change inside this method and I'm a bit confused on how this works. Here's the whole method: -(void) SetRightWrong:(sqzWord *)word: (int) rightWrong { if (self.mastered==nil) { self.mastered = [[NSMutableArray alloc]initWithCapacity:10]; } //if right change number right if (rightWrong == 1) { word.numberCorrect++; //if 3 right move to masterd list [self.onDeck removeObject:word]; if(word.numberCorrect >= 3 ) { [self.mastered addObject:word]; } else { //if not 3 right move to end of ondeck [self.onDeck addObject:word]; } } else if(rightWrong == 0) { //if wrong remove one from number right unless 0 NSUInteger i; i=[self.onDeck indexOfObject:word]; word = [self.onDeck objectAtIndex:i]; if (word.numberCorrect >0) { word.numberCorrect--; } } } The warning I am getting is: 'word' used as the name of the previous parameter than as part of the selector.

    Read the article

  • Sorting List which has object that contains two string members that contains numbers

    - by Lemo
    I want to know the best solution for this my case here is that i am taking values from Excel sheet and pushing them to database field, sometimes that field might contain some strings (thats why I cant make my object members int / double) In my class below size is the variable responsible for showing size of files in bytes public class dataNameValue { public string Name { get; set; } public string Count { get; set; } public string Size { get; set; } } I wanted to sort the list by file Size something like List mylist = new List(); mylist = mylist.OrderByDescending(i = i.Size).ToList(); The problem is that if i sorted it without converting it to "int/double" first -- its not giving right results

    Read the article

  • Orientation issue while presenting Modal ViewController

    - by Jacky Boy
    Current scenario: Right now I am showing a UIViewController using a segue with the style Modal and presentation Sheet. This Modal gets its superview bounds change, in order to have the dimensions I want, like this: - (void)viewWillLayoutSubviews { [super viewWillLayoutSubviews]; self.view.superview.bounds = WHBoundsRect; } The only allowed orientations are UIInterfaceOrientationLandscapeLeft and UIInterfaceOrientationLandscapeRight. Since the Modal has some TextFields and the keyboard would be over the Modal itself, I am changing its center so it moves a bit to the top. The problem: What I am noticing right now, is that I am unable to work with the Y coordinate. In order for it move vertically (remember it's on landscape) I need to work with the X. The problem is that when it's UIInterfaceOrientationLandscapeLeft I need to come with a negative X. And when it's UIInterfaceOrientationLandscapeRight I need to come with a positive X. So it seems that the X/Y Coordinate System is "glued" to the top left corner while in Portrait and when an orientation occurs, it's still there: What I have done So I have something like this: UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; NSInteger newX = 0.0f; if (orientation == UIInterfaceOrientationLandscapeLeft) { // Logic for calculating the negative X. } else { // Logic for calculating the positive X. } It works exactly like I want, but it seems a very fragile implementation. Am I missing something? Is this the expected behaviour?

    Read the article

  • How to merge multiple arrays in pairs

    - by user3688059
    I have a problem with "pairing" arrays into one (by index). Here is an example: INPUT: inputArray = [ [0, 1, 2, 3, 4], [2, 3, 5, 7, 8], [9, 6, 1] ] OUTPUT: outputArray = [ [0,2,9], [1,3,6], [2,5,1], [3,7,chooseRandom()], [4,8,chooseRandom()]] Questions: 1) How to avoid out of range problem 2) How to write chooseRandom() to choose N neighbour I'm using python but feel free to share your thoughts in any language.

    Read the article

  • Jenkins merge dev branch to master with -Xtheir stategy

    - by Pandya M. Nandan
    In GIT Plugin, we can merge one branch to other on work space before the starting of Build. However, plugin does not provide -Xtheir strategy. Now i want dev branch to merge on master, validate test cases and if successful then only push back to master. Problem i face is that if there is a merge conflict, i want changes of dev branch to exits (i know i can use -Xtheirs manually). [Like i can check git as Source Code Management, but can;t use its Additional behavior 'Merge Before Build' ] However when i run the required code in Execute Shell Section of Jenkins Job, It does not works as required and fails with error: fatal: dev - not something we can merge Jenkins Job Code is echo Start of Build git checkout dev git checkout master git status git merge dev --no-commit echo End of Build I have also used them with bask -l -c "", but is same problem.

    Read the article

  • Increasing understanding of validating a string with PHP string functions

    - by user1554264
    I've just started attempts to validate data in PHP and I'm trying to understand this concept better. I was expecting the string passed as an argument to the $data parameter for the test_input() function to be formatted by the following PHP functions. trim() to remove white space from the end of the string stripslashes() to return a string with backslashes stripped off htmlspecialchars() to convert special characters to HTML entities The issue is that the string that I am echoing at the end of the function is not being formatted in the way I desire at all. In fact it looks exactly the same when I run this code on my server - no white space removed, the backslash is not stripped and no special characters converted to HTML entities. My question is have I gone about this in the wrong approach? Should I be creating the variable called $santised_input on 3 separate lines with each of the functions trim(), stripslashes() and htmlspecialchars()? By my understanding surely I am overwriting the value of the $santised_input variable each time I recreate it on a new line of code. Therefore the trim() and stripslashes() string functions will never be executed. What I am trying to achieve is using the "$santised_input" variable to run all of these PHP string functions when the $data argument is passed to my test_input() function. In other words can these string functions be chained together so that I only need to create $santised_input once? <?php function test_input($data) { $santised_input = trim($data); $santised_input = stripslashes($data); $santised_input = htmlspecialchars($data); echo $santised_input; } test_input("%22%3E%3Cscript%3Ealert('hacked')%3C/script%3E\ "); //Does not output desired result "&quot;&gt;&lt;script&gt;alert('hacked')&lt;/script&gt;" ?>

    Read the article

  • Nested Execution Flow Control

    - by chris
    I've read tens of answers related to callbacks, promises and other ways to control flow, but I can't still wrap my head around this task, obviously due to my lack of competence. I have a nested problem: In test_1() (and the other functions) I would like to ensure that the rows are added to the table according to the order in which the elements are in the object; I would like to execute either test_2 or test_3 (or both after each other) only after test_1 has finished completely. Actually the right sequence will only be known at runtime (there will be a switch with the possible sequences, like 1,2,3 or 1,3,2 or 1,2,1,3 or 1,3,3,2, etc...) Code: $(function () { // create table tbl = document.createElement('table'); tbl.className = "mainTbl"; $("body").append(tbl); }); function test_1() { $.each(obj, function () { var img = new Image(); img.onload = function () { // add row of data to table var row = tbl.insertRow(-1); var c1 = row.insertCell(0); c1.innerHTML = "loaded"; }; img.onerror = function () { // add row of data to table var row = tbl.insertRow(-1); var c1 = row.insertCell(0); c1.innerHTML = "not loaded"; }; img.src = this.url; }); } function test_2() { $.each(obj, function () { var img = new Image(); img.onload = function () { // add row of data to table var row = tbl.insertRow(-1); var c1 = row.insertCell(0); c1.innerHTML = "loaded"; }; img.onerror = function () { // add row of data to table var row = tbl.insertRow(-1); var c1 = row.insertCell(0); c1.innerHTML = "not loaded"; }; img.src = this.url; }); } function test_3() { $.each(obj, function () { var img = new Image(); img.onload = function () { // add row of data to table var row = tbl.insertRow(-1); var c1 = row.insertCell(0); c1.innerHTML = "loaded"; }; img.onerror = function () { // add row of data to table var row = tbl.insertRow(-1); var c1 = row.insertCell(0); c1.innerHTML = "not loaded"; }; img.src = this.url; }); } I know that calling the functions in sequence doesn't work as they don't wait for each other... I think promises are they way to go but I can't find the right combination and the documentation is way too complex for my skills. What's the best way to structure the code so that it's executed in the right order?

    Read the article

  • Xcode App Crash-When connecting to the ODATA services [on hold]

    - by user3685677
    Can someone help me resolving the following issue: When trying to connect from iPad app to SAP ECC system through ODATA channel services via SUP, it is allowing me to login for the first time and could retrieve the data successfully from SAP system. But when I logout and try logging in again with the same session, application gets crashed. Below is the crash report for your reference. I am using SDM Parser to connect the SAP system. SDMODataServiceDocumentParser *sdmDocParser = [[SDMODataServiceDocumentParser alloc] init]; [sdmDocParser parse:aServiceDocument]; m_serviceDocument = sdmDocParser.serviceDocument; //Load the object with metadata xml: SDMODataMetaDocumentParser *sdmMetadataParser = [[SDMODataMetaDocumentParser alloc] initWithServiceDocument:m_serviceDocument]; [sdmMetadataParser parse:aMetadata]; After initiated the service, setting the URL. [service setServiceDocumentUrl:m_serviceDocumentURL]; Using SDMconnectivityhelper to connect the URL id<SDMRequesting> serviceDocumentRequest2 = [connectivityHelper executeBasicSyncRequestWithQuery3:[[ODataQuery alloc]initWithURL:[NSURL URLWithString:encodedStrUrl]]] ; - (id <SDMRequesting>)executeBasicSyncRequestWithQuery3:(ODataQuery *)aQuery { id<SDMRequesting> request = [self createRequestWithQuery:aQuery]; [request setTimeOutSeconds:TIMEOUT_SEC]; [request setRequestMethod:@"GET"]; [request addRequestHeader:@"Content-Type" value:@"application/xml"]; [request startSynchronous];**[App getting CRASH in this line]** return request; } - (id <SDMRequesting>)createRequestWithQuery:(ODataQuery *)aQuery { if (isSUPMode) { [SDMRequestBuilder setRequestType:SUPRequestType]; } else { [SDMRequestBuilder setRequestType:HTTPRequestType]; } id <SDMRequesting> request = [SDMRequestBuilder requestWithURL:aQuery.URL]; request.username = self.username; request.password = self.password; return request; } Crash Report:- Incident Identifier: 347511BA-5F7F-45D4-8662-D5DCD2F88EA7 CrashReporter Key: 9a4d38cf19b1a94476eb6b2170d4f56678d6ca60 Hardware Model: iPad3,4 Path: /var/mobile/Applications/F38AD64F-03F8-4A21- Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000 Triggered by Thread: 0 Thread 0 Crashed: 0 libsystem_platform.dylib 0x393a94c0 _platform_memmove$VARIANT $Swift + 160 1 Eby Sales Order 0x0015a2c8 0xb7000 + 668360 2 Eby Sales Order 0x0015a8b8 0xb7000 + 669880 3 Eby Sales Order 0x003331ee 0xb7000 + 2605550 4 Eby Sales Order 0x0031856e 0xb7000 + 2495854 5 Eby Sales Order 0x00338454 0xb7000 + 2626644 6 Eby Sales Order 0x000e6ad8 0xb7000 + 195288 7 Eby Sales Order 0x000e99a0 0xb7000 + 207264 8 Eby Sales Order 0x000ea442 0xb7000 + 209986 9 Eby Sales Order 0x000eb0d6 0xb7000 + 213206 10 Eby Sales Order 0x000c13d0 0xb7000 + 41936 11 Foundation 0x2ec93112 __NSFireDelayedPerform + 410 12 CoreFoundation 0x2e27ef4c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 12 13 CoreFoundation 0x2e27eb66 __CFRunLoopDoTimer + 790 14 CoreFoundation 0x2e27ceee __CFRunLoopRun + 1214 15 CoreFoundation 0x2e1e7764 CFRunLoopRunSpecific + 520 16 CoreFoundation 0x2e1e7546 CFRunLoopRunInMode + 102 17 GraphicsServices 0x331216ce GSEventRunModal + 134 18 UIKit 0x30b4688c UIApplicationMain + 1132 19 Eby Sales Order 0x000bd8da 0xb7000 + 26842 20 Eby Sales Order 0x000bd89c 0xb7000 + 26780

    Read the article

  • Optimizing list comprehension to find pairs of co-prime numbers

    - by user3685422
    Given A,B print the number of pairs (a,b) such that GCD(a,b)=1 and 1<=a<=A and 1<=b<=B. Here is my answer: return len([(x,y) for x in range(1,A+1) for y in range(1,B+1) if gcd(x,y) == 1]) My answer works fine for small ranges but takes enough time if the range is increased. such as 1 <= A <= 10^5 1 <= B <= 10^5 is there a better way to write this or can this be optimized?

    Read the article

  • Why does C# exit when calling the Ada elaboration routine using debug?

    - by erict
    I have a DLL created in Ada using GPS. I am dynamically loading it and calling it successfully both from Ada and from C++. But when I try to call it from C#, the program exits on the call to Elaboration init. What am I missing? The exact same DLL is perfectly happy getting called from C++ and Ada. Edit: If I start the program without Debugging, it also works with C#. But if I run it with the Debugger, then it exits on the call to ElaborationInit. There are no indications in any of the Windows event logs. If the Ada DLL is Pure, and I skip the elaboration init call, the actual function DLL is called correctly, so it has something to do with the elaboration. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace CallingDLLfromCS { class Program { [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern IntPtr LoadLibrary(string dllToLoad); [DllImport("kernel32.dll", CharSet = CharSet.Ansi, SetLastError = true)] public static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName); [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern bool FreeLibrary(IntPtr hModule); [UnmanagedFunctionPointer(CallingConvention.StdCall)] delegate int AdaCallable2_dlgt(int val); static AdaCallable2_dlgt fnAdaCallable2 = null; [UnmanagedFunctionPointer(CallingConvention.StdCall)] delegate void ElaborationInit_dlgt(); static ElaborationInit_dlgt ElaborationInit = null; [UnmanagedFunctionPointer(CallingConvention.StdCall)] delegate void AdaFinal_dlgt(); static AdaFinal_dlgt AdaFinal = null; static void Main(string[] args) { int result; bool fail = false; // assume the best IntPtr pDll2 = LoadLibrary("libDllBuiltFromAda.dll"); if (pDll2 != IntPtr.Zero) { // Note the @4 is because 4 bytes are passed. This can be further reduced by the use of a DEF file in the DLL generation. IntPtr pAddressOfFunctionToCall = GetProcAddress(pDll2, "AdaCallable@4"); if (pAddressOfFunctionToCall != IntPtr.Zero) { fnAdaCallable2 = (AdaCallable2_dlgt)Marshal.GetDelegateForFunctionPointer(pAddressOfFunctionToCall, typeof(AdaCallable2_dlgt)); } else fail = true; pAddressOfFunctionToCall = GetProcAddress(pDll2, "DllBuiltFromAdainit"); if (pAddressOfFunctionToCall != IntPtr.Zero) { ElaborationInit = (ElaborationInit_dlgt)Marshal.GetDelegateForFunctionPointer(pAddressOfFunctionToCall, typeof(ElaborationInit_dlgt)); } else fail = true; pAddressOfFunctionToCall = GetProcAddress(pDll2, "DllBuiltFromAdafinal"); if (pAddressOfFunctionToCall != IntPtr.Zero) AdaFinal = (AdaFinal_dlgt)Marshal.GetDelegateForFunctionPointer(pAddressOfFunctionToCall, typeof(AdaFinal_dlgt)); else fail = true; if (!fail) { ElaborationInit.Invoke(); // ^^^^^^^^^^^^^^^^^^^^^^^^^ FAILS HERE result = fnAdaCallable2(50); Console.WriteLine("Return value is " + result.ToString()); AdaFinal(); } FreeLibrary(pDll2); } } } }

    Read the article

  • What are the internal limits to WCF

    - by ligos
    WCF has lots of limits imposed on it to protect against DoS attacks and other developer brainlessness. What are these limits? And how can they be overriden? Specifically, if I was to try to send a large number of messages in a short period of time to a variety of different clients, what are the internal WCF limits they may cause messages to be sent slowly. PS: this question is a much shorter version of my previous question that did not get much attention. EDIT I have answered the original question. The issue being my async calls were being turned into synchronous ones.

    Read the article

  • Training v. Teaching

    - by Chris Gardner
    Originally posted on: http://geekswithblogs.net/freestylecoding/archive/2014/05/28/training-v.-teaching.aspxAs some of you may know, I recently accepted a position to teach an undergraduate course at my alma mater. Yesterday, I had my first day in an academic classroom. I immediately noticed a difference with the interactions between the students. They don't act like students in a professional training or conference talk. I wanted to use this opportunity to enumerate some of those differences. The immediate thing I noticed was the lack of open environment. This is not to say the class was hostile towards me. I am used to entering the room, bantering with audience, loosening everyone a bit, and flowing into the discussion. A purely academic audience does not banter. At least, they do not banter on day one. I think I can attribute this to two factors. This first is a greater perception of authority. In a training or conference environment, I am an equal with the audience. This is true even if I am being a subject matter expert. We're all professionals. We're all there to learn from each other, share our stories, and enjoy the journey. In the academic classroom, there was a distinct class difference. I had forgotten about this distinction; I had the professional familiarity with the staff by the time I completed my masters. This leads to the other distinction. These was an expectation of performance. At conference and professional training, there is generally no (immediate) grading. This may be a preparation for a certification exam, but I'm not the one responsible for delivering the exam. This was not the case in the academic classroom. These students are battling for points, and I am the sole arbiter. These students are less likely to let the material wash over them, applying the material to their past experiences. They were down taking notes. I don't want to leave the impression that there was no interact in the classroom. I spent a good deal of time doing problems with the class on the whiteboard. I tried to get the class to help me work out the steps. This opened up a few of them. After every conference or training class, I always get a few people that will email me afterward to continue the conversation. I am very curious to see if anybody comes to my office hours tomorrow. However, that is a curiosity that will have to wait until tomorrow.

    Read the article

  • One Apache server, multiple clients - best practices for config files?

    - by OttaSean
    First time user; please be gentle. :-) (And if you don't like my question I'd be grateful for a comment as to why...) I am doing a contract at a government server shop that provides web services for multiple client groups in other areas of the government. My employer has asked me to look into how other shops, in similar situations, handle configuration files, and whether there are any best practices on the subject. I'm pretty sure there are lots of installations out there running multiple VirtualHosts out of one Apache installation, but surprisingly I couldn't find anything online about how people handle config file layout, so was hoping some of you wise folks on ServerFault might have some thoughts or pointers for me. The current setup - which seems logical to me - is that each client site has its own directory off the root - so: /client/tps-reports/ /client/silly-walks/ /client/ministry-of-magic/ and so on - and each of those directories has a /htdocs, /cgi-bin, and /conf (among others). The main /etc/apache/httpd.conf only contains Include statements (and lots of comments), the last of which is: Include /etc/apache/vhosts/*.conf The vhosts directory contains symlinks: tpsrept.conf - /client/tps-reports/conf/tpsrept.conf sillywk.conf - /client/silly-walks/conf/sillywk.conf mom.conf - /client/ministry-of-magic/mom.conf Each of those .conf files contains the actual NameVirtualHost definition and a gigantic <VirtualHost 192.168.12.34> stanza - which contains all the stuff about the specific site. The idea is that clients have access to what's in their own /client/xx directory, so they can change stuff in the section of the config that is relevant to them. As I mentioned above, that seems fairly logical to me, but I'm wondering if any of you wise folks are aware of potential gotchas with this sort of layout, or any other thoughts on why it is or isn't a good idea. In particular, how do other places do it? Is there a "best practice" for this sort of thing? Many thanks in advance for your time and any thoughts you all might have.

    Read the article

  • Windows mounted network drives slow after upgrading switch

    - by Kver
    On our small business network our old 10/100 consumer grade switch gave up the ghost, and we replaced it with a proper business-grade gigabyte switch. After wiring it in our Linux and Mac users immediately got back to working off of network drives; But 2 of our 3 Windows 7 PCs have suddenly experienced a tremendous slowdown with mapped network drives; Windows will become stuck "discovering" a folder causing applications to freeze when trying to open files. It will instantly display and browse files, but the moment you try to open one the bug hits. To remedy this we have our users copying files to the desktop, but it can take a few minutes while windows is stuck "calculating" the time it will take to copy. These aren't big files, mostly excel sheets less than 500KB - these operations are instant on Linux and Mac. (The third Windows machine is having no issues) I've tried remapping the drives, mapping to different drive letters, rebooting, etc. I'm at a loss, because switches are mostly transparent, and it's only after the switch was replaced that the Windows PCs started acting up. What black-magic voodoo am I missing to make Windows work? Thank you.

    Read the article

  • Caching issue with Centos forwarding DNS server

    - by Paddington
    I installed a Forwarding DNS server on Centos 5.10 and it is resolving addresses e.g google.com. When I stopped named (service named stop) and tried to dig (dig @localhost A google.com) there was a failure to resolve the address. I checked and see the caching daemon nscd is running. Does this mean the server is not caching at all? How can I get it to cache? named.conf options { // Those options should be used carefully because they disable port // randomization // query-source port 53; // query-source-v6 port 53; // Put files that named is allowed to write in the data/ directory: listen-on port 53 {127.0.0.1; 10.0.0.4;}; directory "/var/named"; // the default dump-file "/var/named/chroot/var/named/data/cache_dump.db"; statistics-file "/var/named/chroot/var/named/data/named_stats.txt"; memstatistics-file "/var/named/chroot/var/named/data/named_mem_stats.txt"; // allow-query {localhost; 192.168.0.0/24; 10.0.0.0/8;}; recursion yes; //allow-query { localhost; 10.0.0.0/8;}; allow-query { localhost; any; }; allow-query-cache { localhost; any; }; forward only; forwarders {8.8.8.8; 8.8.4.4;}; dnssec-enable yes; // dnssec-lookaside auto; /* Path to ISC DLV key */ // bindkeys-file "/etc/named.iscdlv.key"; // managed-keys-directory "/var/named/dynamic"; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; **

    Read the article

  • .htaccess rules not working, but the file seems to be loaded

    - by user221877
    I am trying to remove .php at the end of the URL from any page thats loaded. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php Its running on my own server, which has WHM/cPanel, so I can change settings at the server level, I'm just not really sure what I'm looking for. I found the httpd.conf file, but it said it was auto generated by whm, so I tried looking in whm for the correct settings but it had barely any settings related to htaccess. If I fill htaccess with gibberish it stops the site from loading, which I assume means that the .htaccess file is being loaded, so I'm not sure what the issue is.

    Read the article

  • mosh-like port forwarding

    - by Marc Merlin
    This is on linux, connecting to linux servers: I love mosh, but it doesn't support port forwarding, and likely won't for a while since it's been almost a year now and it hasn't happened yet. port forwarding over ssh is great, but because my laptop moves between networks several times a day, my ssh sessions die, and so do the port forwards. I could script/hack something to detect hung ssh and reconnect to get my port forwards back, but before I do this, is there another way to do long lasting port forwards when your source IP changes several times daily (because you go on different networks)? I'm thinking an ssh over UDP would do the trick but of course ssh is over TCP.

    Read the article

  • Why would Linux VM in vSphere ESXi 5.5 show dramatically increased disk i/o latency?

    - by mhucka
    I'm stumped and I hope someone else will recognize the symptoms of this problem. Hardware: new Dell T110 II, dual-core Pentium G860 2.9 GHz, onboard SATA controller, one new 500 GB 7200 RPM cabled hard drive inside the box, other drives inside but not mounted yet. No RAID. Software: fresh CentOS 6.5 virtual machine under VMware ESXi 5.5.0 (build 174 + vSphere Client). 2.5 GB RAM allocated. The disk is how CentOS offered to set it up, namely as a volume inside an LVM Volume Group, except that I skipped having a separate /home and simply have / and /boot. CentOS is patched up, ESXi patched up, latest VMware tools installed in the VM. No users on the system, no services running, no files on the disk but the OS installation. I'm interacting with the VM via the VM virtual console in vSphere Client. Before going further, I wanted to check that I configured things more or less reasonably. I ran the following command as root in a shell on the VM: for i in 1 2 3 4 5 6 7 8 9 10; do dd if=/dev/zero of=/test.img bs=8k count=256k conv=fdatasync done I.e., just repeat the dd command 10 times, which results in printing the transfer rate each time. The results are disturbing. It starts off well: 262144+0 records in 262144+0 records out 2147483648 bytes (2.1 GB) copied, 20.451 s, 105 MB/s 262144+0 records in 262144+0 records out 2147483648 bytes (2.1 GB) copied, 20.4202 s, 105 MB/s ... but after 7-8 of these, it then prints 262144+0 records in 262144+0 records out 2147483648 bytes (2.1 GG) copied, 82.9779 s, 25.9 MB/s 262144+0 records in 262144+0 records out 2147483648 bytes (2.1 GB) copied, 84.0396 s, 25.6 MB/s 262144+0 records in 262144+0 records out 2147483648 bytes (2.1 GB) copied, 103.42 s, 20.8 MB/s If I wait a significant amount of time, say 30-45 minutes, and run it again, it again goes back to 105 MB/s, and after several rounds (sometimes a few, sometimes 10+), it drops to ~20-25 MB/s again. Plotting the disk latency in vSphere's interface, it shows periods of high disk latency hitting 1.2-1.5 seconds during the times that dd reports the low throughput. (And yes, things get pretty unresponsive while that's happening.) What could be causing this? I'm comfortable that it is not due to the disk failing, because I also had configured two other disks as an additional volume in the same system. At first I thought I did something wrong with that volume, but after commenting the volume out from /etc/fstab and rebooting, and trying the tests on / as shown above, it became clear that the problem is elsewhere. It is probably an ESXi configuration problem, but I'm not very experienced with ESXi. It's probably something stupid, but after trying to figure this out for many hours over multiple days, I can't find the problem, so I hope someone can point me in the right direction. (P.S.: yes, I know this hardware combo won't win any speed awards as a server, and I have reasons for using this low-end hardware and running a single VM, but I think that's besides the point for this question [unless it's actually a hardware problem].) ADDENDUM #1: Reading other answers such as this one made me try adding oflag=direct to dd. However, it makes no difference in the pattern of results: initially the numbers are higher for many rounds, then they drop to 20-25 MB/s. (The initial absolute numbers are in the 50 MB/s range.) ADDENDUM #2: Adding sync ; echo 3 > /proc/sys/vm/drop_caches into the loop does not make a difference at all. ADDENDUM #3: To take out further variables, I now run dd such that the file it creates is larger than the amount of RAM on the system. The new command is dd if=/dev/zero of=/test.img bs=16k count=256k conv=fdatasync oflag=direct. Initial throughput numbers with this version of the command are ~50 MB/s. They drop to 20-25 MB/s when things go south. ADDENDUM #4: Here is the output of iostat -d -m -x 1 running in another terminal window while performance is "good" and then again when it's "bad". (While this is going on, I'm running dd if=/dev/zero of=/test.img bs=16k count=256k conv=fdatasync oflag=direct.) First, when things are "good", it shows this: When things go "bad", iostat -d -m -x 1 shows this:

    Read the article

  • SCCM 2012 Clients no longer detecting

    - by user3685428
    Here is the scenario I had a fully functioning SCCM 2012 site server with the DP, MP, SUP, Application catalog, etc. roles configured and working. There is only one server on this site. Everything was great but i was not happy with SUP, so i decided to create a separate WSUS server and configure Windows Updates through GPOs. That setup worked great as well so i went ahead and removed the SUP role from SCCM and removed the WSUS feature from my SCCM server (they were configured on the same SCCM Server). I did not notice any problems right away. A couple days later i noticed that the OSD deployments were giving errors, and after a couple hours of trying suggestions from Google, i was able to uninstall PXE and make a few changes and reinstall with WDS to get it working again. Again, thought everything was fine and continued on. The last couple days i have noticed that any new machine deployed or installing the Client will show in the SCCM console as "No" Client. The client machines will show connected to a site but the software center shows "IT Organization" instead of our site like the previous clients. The existing clients all seem to be functioning normally. they still receive application distributions and configuration baselines, etc. Reinstalling, uninstalling and reinstalling, repairing does not fix the problems and this happens on all new clients. ClientLocation.log shows it connecting to the correct MP. Nothing odd in any of the logs except for the ClientMessaging.log which repeats continuously this line: <![LOG[Raising event: instance of CCM_CcmHttp_Status { ClientID = "GUID:0450fde3-ab82-41bf-9c33-87a18113744b"; DateTime = "20140528214824.993000+000"; HostName = "SOUNDWAVE.domain.org"; HRESULT = "0x00000000"; ProcessID = 4092; StatusCode = 0; ThreadID = 3720; }; ]LOG]!><time="16:48:24.994+300" date="05-28-2014" component="CcmMessaging" context="" type="1" thread="3720" file="event.cpp:706"> thanks

    Read the article

  • VBA Solution to VLOOKUP with Hyperlinks

    - by Emily2
    I am looking for some help with a VBA solution for preserving hyperlinks when using VLOOKUP on Excel (2010). I have a load of data on Sheet 1 for internal use only, and a cut-down version of this on Sheet 2. Instead of recreating Sheet 2 everytime, I am looking to have a working version which updates everytime Sheet1 is updated. Thus, I have used VLOOKUP on Sheet 2 so that only the desired info is returned on sheet 2. However, the problem was that sheet 1 contained in many cells Hyperlinks to external websites, and this would not pull through to Sheet2 using VLOOKUP. With some help, however, using the following VBA solution the hyperlinks now pull through: Function GetHyperLink(r As Range) As String If r.Hyperlinks.Count Then GetHyperLink = r.Hyperlinks(1).Address End If End Function And I am using the following formula in the relevant cell(s) in Sheet2: =HYPERLINK(GetHyperLink(INDEX('Sheet 1'!$B$1:$B$10001,MATCH(A4,'Sheet 1'!$A$1:$A$10001,0))),(VLOOKUP(A4,'Sheet 1'!$A$1:$B$10001,2,FALSE))) However, the problem is with formatting: every cell on Sheet2 is formatted blue and underlined, even although some of them do not contain a hyperlink! Is someone able to help with a VBA solution/formula to fix this last piece of the puzzle? Many thanks, in anticipation.

    Read the article

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