Search Results

Search found 5734 results on 230 pages for 'forward declarations'.

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

  • Controlling CodeModel's code output formatting: putting lines between namespace declarations

    - by devoured elysium
    I'm making some experiments with Visual Studio's CodeModel. I tried creating a file with two namespaces in there through VS's Code Model: CodeModel codeModel = projItem.ContainingProject.CodeModel; codeModel.AddNamespace("Namespaces.FirstNamespace", "namespacestest.cs"); codeModel.AddNamespace("Namespaces.SecondNamespace", "namespacestest.cs"); the output of such code is: //file namespacestest.cs namespace Namespaces.FirstNamespace { } namespace Namespaces.SecondNamespace { } Which is almost what I'm looking for. The only catch here is that I'd like to control the spacing: having at least one line between the first and the second namespace. Does by chance anyone know of a way of achieving this? This is what I want: //file namespacestest.cs namespace Namespaces.FirstNamespace { } namespace Namespaces.SecondNamespace { } Thanks

    Read the article

  • Why are forward declarations necessary?

    - by user199421
    In languages like C# and Java there is no need to declare (for example) a class before using it. If I understand it correctly this is because the compiler does two passes on the code. In the first it just "collects the information available" and in the second one it checks that the code is correct. In C and C++ the compiler does only one pass so everything needs to be available at that time. So my question basically is why isn't it done this way in C and C++. Wouldn't it eliminate the needs for header files?

    Read the article

  • Formatting Field Declarations in Eclipse

    - by geeko
    Greetings Overflowers, Problem: public abstract class Filter { private long id; protected String expression; } how can I align fields automatically in Eclipse, such in: public abstract class Filter { private long id; protected String expression; } Note the space before long, thank you ! UPDATE: I cannot find a customization option to align types of class members (e.g.: long and String) under Eclipse formatter options. Yes, there is one to align names of class members (e.g.: id and expression) but not their types. Please, take a lock at this issue in my examples above. Any solution ?

    Read the article

  • Don't understand multiple parameter declarations in objective-c

    - by Blankman
    can someone clarify this for me: When there’s more than one argument, the arguments are declared within the method name after the colons. Arguments break the name apart in the declaration, just as in a message. For example: - (void)setWidth:(float)width height:(float)height; So in the above: method is for instance variables returns void parameter#1 is a float, named width. parameter#2 is a float,named height. But why is it hieght:(float)height; and not just: - (void)setWidth: (float)width (float)height;

    Read the article

  • using declarations in main (C++)

    - by Crystal
    Although you wouldn't want to do this, if you have a namespace COMPANY, and a class in that namespace SOMECLASS. Why is it that in the .cpp file, you might define the functions as COMPANY::SOMECLASS::someFunction() {} But in main, you don't do int main() { COMPANY::SOMECLASS::someFunction(); } but instead you declare the namespace and do something like: using COMPANY::SOMECLASS; int main() { someFunction(); }

    Read the article

  • Multiple declarations and definations

    - by Yogesh
    X.c >> ------------------------- int i; main () { fun (); } ------------------------- Y.c >> int i; fun () { } why does these two files compile with no error ? (using GCC) but if i use int i = 10; throws multiple definition error

    Read the article

  • Android: forward search queries to one single activity that handles search

    - by Stefan Klumpp
    I have an activity handling search (ACTIVITY_1), which works perfectly when I use the search (via SEARCH button on the phone) within/from this activity. However, when I use search from another activity (ACTIVITY_2..x) by implementing onNewIntent and forward the query string to my Search_Activity.class (ACTIVITY_1) @Override protected void onNewIntent(Intent intent) { Log.i(TAG, "onNewIntent()"); if (Intent.ACTION_SEARCH.equals(intent.getAction())) { Log.i(TAG, "===== Intent: ACTION_SEARCH ====="); Intent myIntent = new Intent(getBaseContext(), Search_Activity.class); myIntent.setAction(Intent.ACTION_SEARCH); myIntent.putExtra(SearchManager.QUERY, intent.getStringExtra(SearchManager.QUERY)); startActivity(myIntent); } } it always pauses ACTIVITY_2 first and then goes to onCreate() of ACTIVITY_2. Why does it recreate my ACTIVITY_2 when it is already there and doesn't go to onNewIntent directly? Is there another way I can forward search queries directly to ACTIVITY_1? For example via a setting in the Manifest.xml Is it possible to generally forward all search queries automatically to ACTIVITY_1 without even implementing onNewIntent in all the other activities? Currently I have to put an <intent-filter> in every single activity to "activate" my custom search there and forward the query then to the activity that handles search via the onNewIntent (as shown above). <activity android:name=".Another_Activity" android:theme="@style/MyTheme"> <intent-filter> <action android:name="android.intent.action.SEARCH" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" /> </activity>

    Read the article

  • Port forward to different port number

    - by ThatGuyYouKnow
    I have a router that sets up rules like so: TCP Any -> 5800 Any -> 5900 UDP Any -> 5800 Any -> 5900 Computer: ip-address This would allow someone 'outside' to connect to my router's port 5800 and 5900 and forward that to the same port on my computer. My issue is that I want the 'outside' port to be different without changing the port on my computer.

    Read the article

  • HAProxy - forward to a different web server based on URI

    - by Saggi Malachi
    I have an HTTP farm with the following configuration: listen webfarm 10.254.23.225:80 mode http balance roundrobin cookie SERVERID insert option httpclose option forwardfor option httpchk HEAD /check.txt HTTP/1.0 server webA 10.254.23.4:80 cookie A check server webB 10.248.23.128:80 cookie B check I would like to add some option which would forward all requests for a specific URI (i.e /special) to a 3rd web server. How should I do it?

    Read the article

  • Forward incoming mail to any domain not specified in relay_domains

    - by Frode Svendsen
    Hi, we have an internal test-server that uses real, live mail addresses to send out status mails sometimes. We don't want these mails to end up with our users but for different reasons we can't use a catch_all solution and we only have the one available mail server. What we need is a way to forward incoming mail from any domain not specified in relay_domains to a specified mailbox.

    Read the article

  • How can I port forward with iptables?

    - by stu
    I want connections coming in on ppp0 on port 8001 to route to 192.168.1.200 on eth0 on port 8080 I've got these two rules -A PREROUTING -p tcp -m tcp --dport 8001 -j DNAT --to-destination 192.168.1.200:8080 -A FORWARD -m state -p tcp -d 192.168.1.200 --dport 8080 --state NEW,ESTABLISHED,RELATED -j ACCEPT and it doesn't work, what am I missing?

    Read the article

  • Domino 8.5.3 forward room reservation request to external email

    - by Cividan
    I have created a room reservation database on my notes server. Now my problem is that we have 2 company that will use this room and I would like to forward the meeting request sent to this room to external email address so that the other company email server receive the reservation request and update the calendar on their side to see the accurate availability of the room. How can I achive this. Thanks !

    Read the article

  • bind named server - forward some requests to other servers

    - by Pentium100
    Is there a way to make bind answer some queries but forward all other queries (of the same domain) to another server, as in: example.com A 127.0.0.1 www.example.com A 127.0.0.1 everything not on this list (example.com MX, ftp.example.com A etc) - ask 192.168.0.1 (another DNS server) Essentially I want to intercept some (but not all) queries going to (in this example) 192.168.0.1 and answer for it. example.com A- intercept www.example.com - intercept example.com MX - pass trough ftp.example.com - pass trough

    Read the article

  • Using iptables to forward traffic destined for specific ip via specific interface

    - by shapeshifter
    I want to forward traffic destined for a specific ip from my internal network via a specific interface. I have two interfaces which are currently load balanced. I need all requests for a certain ip to go out via eth0 otherwise my external ip changes and sessions are dropped. eg. all requests from 10.1.1.1/24 to ip 11.22.33.44 on port 443 must go out via interface eth0. How can I do this with iptables?

    Read the article

  • Forward spam is dangerous for my domain repute?

    - by Memiux
    I have Postfix with spamassassin and forward the emails (including spam) to gmail.com, my problem is that when I send "legitimate" emails to gmail.com it is marked as spam, I've done everything that the guidelines said like signing with DKIM, setup a SPF for my domains, require authentication for outbound mails, etc. Now I wonder what I'm doing wrong?

    Read the article

  • forward outbound traffic rule

    - by Claudiu
    I am trying to forward the outbound traffic to another server. Current rule is: /sbin/iptables -A OUTPUT -p tcp -s localhost -o 91.xxx.xxx.xxx --dport 65000:65010 -j ACCEPT but when I do a iptables -L, the rule its showed like this: ACCEPT tcp -- localhost.localdomain anywhere tcp dpts:65000:65010 So I guess my rule is bad written since the "destination" column shows "anywhere" Can you help me with this?

    Read the article

  • VPC SSH port forward into private subnet

    - by CP510
    Ok, so I've been racking my brain for DAYS on this dilema. I have a VPC setup with a public subnet, and a private subnet. The NAT is in place of course. I can connect from SSH into a instance in the public subnet, as well as the NAT. I can even ssh connect to the private instance from the public instance. I changed the SSHD configuration on the private instance to accept both port 22 and an arbitrary port number 1300. That works fine. But I need to set it up so that I can connect to the private instance directly using the 1300 port number, ie. ssh -i keyfile.pem [email protected] -p 1300 and 1.2.3.4 should route it to the internal server 10.10.10.10. Now I heard iptables is the job for this, so I went ahead and researched and played around with some routing with that. These are the rules I have setup on the public instance (not the NAT). I didn't want to use the NAT for this since AWS apperantly pre-configures the NAT instances when you set them up and I heard using iptables can mess that up. *filter :INPUT ACCEPT [129:12186] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [84:10472] -A INPUT -i lo -j ACCEPT -A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 1300 -j ACCEPT -A INPUT -d 10.10.10.10/32 -p tcp -m limit --limit 5/min -j LOG --log-prefix "SSH Dropped: " -A FORWARD -d 10.10.10.10/32 -p tcp -m tcp --dport 1300 -j ACCEPT -A OUTPUT -o lo -j ACCEPT COMMIT # Completed on Wed Apr 17 04:19:29 2013 # Generated by iptables-save v1.4.12 on Wed Apr 17 04:19:29 2013 *nat :PREROUTING ACCEPT [2:104] :INPUT ACCEPT [2:104] :OUTPUT ACCEPT [6:681] :POSTROUTING ACCEPT [7:745] -A PREROUTING -i eth0 -p tcp -m tcp --dport 1300 -j DNAT --to-destination 10.10.10.10:1300 -A POSTROUTING -p tcp -m tcp --dport 1300 -j MASQUERADE COMMIT So when I try this from home. It just times out. No connection refused messages or anything. And I can't seem to find any log messages about dropped packets. My security groups and ACL settings allow communications on these ports in both directions in both subnets and on the NAT. I'm at a loss. What am I doing wrong?

    Read the article

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