Search Results

Search found 5180 results on 208 pages for 'outside'.

Page 123/208 | < Previous Page | 119 120 121 122 123 124 125 126 127 128 129 130  | Next Page >

  • Void pointer values comparing C++

    - by user2962977
    My actual question is it really possible to compare values contained in two void pointers, when you actually know that these values are the same type? For example int. void compVoids(void *firstVal, void *secondVal){ if (firstVal < secondVal){ cout << "This will not make any sense as this will compare addresses, not values" << endl; } } Actually I need to compare two void pointer values, while outside the function it is known that the type is int. I do not want to use comparison of int inside the function. So this will not work for me as well: if (*(int*)firstVal > *(int*)secondVal) Any suggestions? Thank you very much for help!

    Read the article

  • How to get global access to enum types in C#?

    - by lala
    This is probably a stupid question, but I can't seem to do it. I want to set up some enums in one class like this: public enum Direction { north, east, south, west }; Then have that enum type accessible to all classes so that some other class could for instance have: Direction dir = north; and be able to pass the enum type between classes: public void changeDirection(Direction direction) { dir = direction; } I thought that setting the enum to public would make this automatically possible, but it doesn't seem to be visible outside of the class I declared the enum in.

    Read the article

  • Question about variable definitions in functions.

    - by Kaan Tekelioglu
    Hi. #include <stdio.h> main() { int a; for(a=1; a<=4 && printf("%d ",a); a++) { int a; static int b=a; printf("%d ",(a++)-b); } getchar(); getchar(); } In this code, the printout is 1 0 2 1 3 2 4 3. I understand why the int a; part works differently then the int a which was defined outside the for function, and why static int b; is only defined once with the primary value of a ; but why does the (a++) part in printf affect proceeding values of a? Don't we redefine int a; each time the for function runs? Thanks in advance.

    Read the article

  • Solr; What does this mean?

    - by Camran
    At the end of the README.txt file which is located in the example directory under solr, I find this line: NOTE: This Solr example server references SolrCell jars outside of the server directory with statements in the solrconfig.xml. If you make a copy of this example server and wish to use the ExtractingRequestHandler (SolrCell), you will need to copy the required jars into solr/lib or update the paths to the jars in your solrconfig.xml What does this mean? Do I have to make some adjustment before uploading solr to my server? Also, if you know, what is Solr-nightly:s difference to regular solr? The tutorial states "solr-nightly.zip" but on their download section I cant find it.

    Read the article

  • Ubuntu 8.04 LTS MySQL port remote access

    - by Stig Christian
    Hi! I have tried everything I know, but still no solution to this problem. MySQL works perfectly on localhost, but it seems port 3306 is blocked from the outside... I have commented out "bind-address" in /etc/mysql/my.cnf, and there is no iptables rules that deny this port. (I have even opened the port in iptables just to be sure) Still I can`t connect to the server from a remote connection (telnet or portscan returns negative results). Where is the problem?

    Read the article

  • How do I return a variable from $.post() in jQuery? Closure variable?

    - by James Bao
    I am having trouble passing data retrieved from a $.post() function to use in other places in my code. I want to save the data as a variable and use it outside of the post() function. This is my code: var last_update = function() { $.post('/--/feed', {func:'latest', who:$.defaults.login}, function($j){ _j = JSON.parse($j); alert(_j.text); // This one works }); } alert(_j.text); // This one doesn't }; last_update(); //run the function Please help!

    Read the article

  • Annoying Bug in banner cycle

    - by Davemof
    I have created a rotating banner script for a new site I'm developing View banner here(it rotates every 10 seconds) Unfortunately to the transition seems to be a biut buggy, and the image will fade out, show the same image again and then fade in the new one. I think I have made a simple error somewhere, but can't figure out where it is. the code used to cycle the banners is: In document ready: if ($('.home').length > 0){ $('<img width="100%" />').attr('src', '/assets/img/backgrounds/home/hero'+homecount+'.jpg').load(function(){ $('.hero').append( $(this) ); $('.hero img').fadeIn('medium').delay(10000).fadeOut('slow', loopImages); setHeroHeight(); }); } Outside document ready: function loopImages(){ homecount = homecount+1; if (homecount > 5){ homecount = 1; } $('.hero img') .attr('src', '/assets/img/backgrounds/home/hero'+homecount+'.jpg') .load(function(){ $('.hero img').fadeIn('fast')}).delay(10000).fadeOut('slow', loopImages); } Any help would be greatly appreciated Thanks Dave

    Read the article

  • app.config - where should it go?

    - by Piers
    This is a follow on from here: Storing database settings outside app.config So I know it's possible to have one app.config, with different sections externalised, all with different values. But are they like the web.config files in asp.net projects where you can just copy it into the same folder as the rest of the files and it will work, or do I need to compile it in somewhere. Also, won't it be overwritten by the .exe.config file? Edit Ok, so I worded this question a bit badly. I've updated it.

    Read the article

  • ActionScript Aligning Graphics Line Style Stroke?

    - by TheDarkIn1978
    is it possible to align the stroke of a graphic with actionscript? for example, the following code creates a black rounded rect with a grey stroke that is automatically centre aligned. var t:Sprite = new Sprite(); t.graphics.lineStyle(5, 0x555555); t.graphics.beginFill(0, 1); t.graphics.drawRoundRect(25, 25, 200, 75, 25, 25); t.graphics.endFill(); the lineStyle function doesn't seem to offer any built-in functionality for aligning the stroke. in Adobe Illustrator, you can align a stroke to be either centre (default), inside or outside.

    Read the article

  • How do I include 3rd party libraries in my code...

    - by Krakkos
    I understand the process of using a 3rd party library to access functions outside of my code base, but how do i actually set up Visual Studio 2005 to include them in the project. I have a 3rd party library with some headers, some cpp's, and some .lib files. In the projects properties I add the top level external library directory as an include directory, I add the additional library directory at the same level put this is project properties too. In the .cpp file where I use the functions, do I put the #include in its header file? In the top level projects header file? in the cpp? I've tried all that, but I get "unresolved external symbol"... grrrrrrrrrrrrr

    Read the article

  • C# Threading and Sql Connections

    - by Jonathan M
    I have a method that attempts to update a sql server database in an ASP.NET application. If the update fails, it catches the exception and then queues the update in MSMQ, and then spins up a new thread that will later de-queue the pending update and try again. When the thread starts, it fails to open a database connection because it is attempting to connect using Network Service as the login. The sql connection is using Windows Authentication, and will work outside of the thread. If I put a breakpoint in the code that executes inside the new thread and check the Thread.CurrentPrincipal, it shows the Identity as being the correct user. Why is the sql connection attempting to be opened by the Network Service account? I can elaborate further is necessary. Thanks.

    Read the article

  • How can I provide links to intranet files through ASP.net?

    - by PhoenixWright
    Conditions: The files must be opened outside of the window that the link to them is in. I have tried href, but when I give it an intranet link it only opens correctly if I leave out target="_blank"; if I put that in, the new window that opens doesn't receive the full link if there is a pound sign in the filepath... a direct link to the intranet address \a\b\c#c.txt would be fine with me; there is no concern about security, but I can't seem to get that to happen in a new window. It seems like this is happening when I don't create a new window, but I can't utilize the same window to open the links. Any ideas?

    Read the article

  • Operating System Widget Side Project

    - by Calpis
    I want to start on a side project and here's my idea: Whenever the user's mouse is pressed down, I want a small ring around the cursor to show up. I'm mainly doing this to learn more about programming and get myself to think outside of work related materials. My questions are: 1) is there a good source I can reference to start a project that deals with something like this? 2) Is visual studio a sufficient software to create such an application? Or would I need some other tool to do this. 3) What language should I choose to do this task? Thanks in advance!

    Read the article

  • The best way to ensure only 1 copy of bash script is running?

    - by depesz
    What is the simplest/best way to ensure only 1 copy of given script is running - assuming it's bash on linux? At the moment I'm doing: ps -C script.name.sh > /dev/null 2>&1 || ./script.name.sh but it has several issues: it puts the check outside of script it doesn't let me run the same script from separate accounts - which I would like sometimes. -C checks only first 14 characters of process name Of course I can write my own pidfile handling, but I sense that there should be some simple way to do it.

    Read the article

  • Global jQuery dialog variable not working properly

    - by Ben Dauphinee
    When I call the function, the dialog does work. If I move the dialog construction into the showtimes_list function, everything works fine. I thought that variables declared outside a function were global in context? var dialog_list = $("<div></div>").dialog({ autoOpen: false, modal: true, height: 300, width: 720, }); function showtimes_list(sid){ dialog_list.html(""); $.get("ajax_showtimes.php?sid="+sid, function(data){ dialog_list.html(data); } ); dialog_list.dialog("open"); }

    Read the article

  • How to get an variable output from remote pssession

    - by Vinith menon
    I have a script to get virtual harddisk info from vmm, im executing it remotely from a server, currently im unable to get the variable value outside of the pssession in the local host, could you please help me out with achieveing the same. PS C:\Windows\system32> enter-pssession iscvmm02 [iscvmm02]: PS C:\Users\su\Documents>Add-PSSnapin Microsoft.SystemCenter.VirtualMachineManager [iscvmm02]: PS C:\Users\su\Documents>$hide= Get-VMMServer -ComputerName "iscvmm02.corp.avanade.org" [iscvmm02]: PS C:\Users\su\Documents>$VM = Get-VM | where { $_.ComputerNameString -contains "idpsm02.corp.air.org" } [iscvmm02]: PS C:\Users\su\Documents>$harddisk=$VM.VirtualHardDisks [iscvmm02]: PS C:\Users\su\Documents>$h=$harddisk.length [iscvmm02]: PS C:\Users\su\Documents>for($i=0;$i-lt$h;$i++){ New-Variable -Name "HardDiskType_$i" -value $harddisk[$i].vhdtype New-Variable -Name "HardDiskLocation_$i" -value $harddisk[$i].Location } [iadpscvmm02]: PS C:\Users\su\Documents>Exit-PSSession PS C:\Windows\system32>$harddisktype_0 PS C:\Windows\system32>$harddisklocation_0 as you can see both the variable output's give null value, im unable to retain the values

    Read the article

  • Using JavaScript to render HTML; nothing appearing but values will alert

    - by Jack Roscoe
    Hi, I'm taking some information from some variables I have already defined outside this function to create a html svg text box. Here is the function which is causing me trouble: RenderTextBox:function() { alert('this.x: ' + this.x); alert('this.y: ' + this.y); this.textBox = paper.text(this.x, this.y, this.htmlTextBox); } The alerts works prefectly, and prompt me with the values expected. However, the final line which is supposed to create the text box puts them nowhere to be seen. Does anybody know why? If I replace 'this.x, this.y..' with numerical values in the final line of the function, the text box is placed correctly. It's only when I use the 'this.x' and 'this.y' that I have issues.

    Read the article

  • Diamonds Are Forever. Services Are Not.

    - by rayman
    Hi, ive read this article by Mark Murphy, while i was looking for a solution to my case. I have a Listener in my system, which suppose to get a UDP trigger times to times from an outside server, ive done this listener as a service. how could i prevent it being shut off by the user? (SDK 1.5), i`am working for a company which create cell phones, and we spread the device with this Listener. as soon as the listener goes off our systems will be terminated any idea for this scenario? *i`am already aware to the face, that the system could also take it off, but this case will be easier to handle and avoid. thanks, ray.

    Read the article

  • Programmatically dial a series of numbers on a modem?

    - by Nathan Long
    At work, we just got a large number exotic cellular devices that need to be programmed. To do this, you plug in a standard home telephone and dial a series of numbers, with pauses between them. To me, this is a task that begs to be automated, and we've got one Linux desktop (a test Asterisk machine) with a modem on it. Does anybody know an easy way to approach this task? I could install Ruby or Python on that desktop. I also know PHP, but I'm not sure how to run it outside of a server setup, and it seems silly to install Apache for this.

    Read the article

  • Parallel Processing Simulation in Javascript

    - by le_havre
    Hello, I'm new to JavaScript so forgive me for being a n00b. When there's intensive calculation required, it more than likely involves loops that are recursive or otherwise. Sometimes this may mean having am recursive loop that runs four functions and maybe each of those functions walks the entire DOM tree, read positions and do some math for collision detection or whatever. While the first function is walking the DOM tree, the next one will have to wait its for the first one to finish, and so forth. Instead of doing this, why not launch those loops-within-loops separately, outside the programs, and act on their calculations in another loop that runs slower because it isn't doing those calculations itself? Retarded or clever? Thanks in advance!

    Read the article

  • Non US characters in section headers for a UITableView

    - by epatel
    I have added a section list for a simple Core Data iPhone app. I followed this so question to create it - How to use the first character as a section name but my list also contain items starting with characters outside A-Z, specially Å,Ä and Ö used here in Sweden. The problem now is that when the table view shows the section list the three last characters are drawn wrong. See image below It seems like my best option right now is to let those items be sorted under 'Z' if ([letter isEqual:@"Å"] || [letter isEqual:@"Ä"] || [letter isEqual:@"Ö"]) letter = @"Z"; Someone that have figured this one out? And while I'm at it... 'Å', 'Ä' and 'Ö' should be sorted in that order but are sorted as 'Ä', 'Å' and 'Ö' by Core Data NSSortDescriptor. I have tried to set set the selector to localizedCaseInsensitiveCompare: but that gives a out of order section name 'Ä. Objects must be sorted by section name' error. Seen that too?

    Read the article

  • Is it possible to create nested classes in PHP as it is in C#?

    - by Edward Tanguay
    In C# you can have nested classes like this, which are useful if you have classes which do not have meaning outside the scope of one particular class, e.g. in a factory pattern: public abstract class BankAccount { private BankAccount() {} private sealed class SavingsAccount : BankAccount { ... } private sealed class CheckingAccount : BankAccount { ... } public BankAccount MakeSavingAccount() { ... } public BankAccount MakeCheckingAccount() { ... } } Is this possible in PHP? I've read that it was planned for PHP 5, then cancelled, then planned again, but can't find definitive info. Does anyone know how to create nested classes (classes within the scope of another class) as in the above C# example using PHP 5.3?

    Read the article

  • Eclipse: Double semi-colon on an import

    - by smp7d
    Using Eclipse, if I have an extra semicolon on an import line (not the last import line), I see a syntax error in the IDE. However, this compiles fine outside of the IDE (Maven in this case). Example: import java.util.ArrayList;; //notice extra semicolon import java.util.List; Does anyone else see this behavior? Why is this showing as a syntax error? I am working with someone who keeps pushing these this to source control and it is irritating me (they clearly aren't using Eclipse). Full disclosure... I am using SpringSource Tool Suite 2.8.0.

    Read the article

  • Unexpected cross threading issue

    - by haughtonomous
    I'm trying to do something very simple in principal, but I keep getting a cross-threading exception which has me stumped because I'm not setting out to use multiple threads. I have a Windows Forms application. It launches another Windows Forms application (using the System.Diagnostics.Process class) , and catches the Exited event when that application is closed. My application event handler then tries to copy text from the clipboard to a control on the current displayed form. At this point a Cross-threading exception is thrown. I assume that the problem is that the event from the closing application is in another thread (I'm outside my comfort zone here, so bear with me), so the question boils down to "How do I prevent this exception?" I'm somewhat constrained into having to copy from the clipboard, but I could launch the other application a different way if that would solve the problem.

    Read the article

  • Enums With Default Throw Clause?

    - by Tom Tresansky
    I noticed the following in the Java Language spec in the section on enumerations here: link switch(this) { case PLUS: return x + y; case MINUS: return x - y; case TIMES: return x * y; case DIVIDE: return x / y; } throw new AssertionError("Unknown op: " + this); However, looking at the switch statement definition section, I didn't notice this particular syntax (the associated throw statement) anywhere. Can I use this sort of "default case is throw an exception" syntactic sugar outside of enum definitions? Does it have any special name? Is this considered a good/bad practice for short-cutting this behavior of "anything not in the list throws an exception"?

    Read the article

< Previous Page | 119 120 121 122 123 124 125 126 127 128 129 130  | Next Page >