Daily Archives

Articles indexed Sunday December 9 2012

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

  • Empty array (which's not empty)

    - by Brut4lity
    while($row = mysql_fetch_row($result)){ preg_match('#<span id="lblNumerZgloszenia" style="font-weight:bold;font-style:italic;">([^<]*)<\/span>#',$row[1],$matches); $query2 = 'UPDATE content_pl SET kategoria_data='.$matches[1].' WHERE id='.$row[0].';'; mysql_query($query2); } I'm doing this preg_match to get the span contents into $matches array. When I do a print_r($matches), it shows the right results but when I use $matches[1], it browser tells me that there is no such index.

    Read the article

  • Array Conversion in Xstream Parser

    - by Avidev9
    Hi am trying to convert the following xml into object using Xstream parser. I tried using the below code to convert the xml but am getting Duplicate field ERRORS ---- Debugging information ---- field : ERRORS class : com.avidev9.Fees.GCSFeesResponse$DebitsWSDS required-type : com.avidev9.Fees.GCSFeesResponse$DebitsWSDS converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter path : /DebitsWSDS/ERRORS[2] line number : 1 version : null The Code I used xstream.alias("DebitsWSDS", GCSFeesResponse.DebitsWSDS.class); xstream.alias("ERRORS", GCSFeesResponse.ERRORS.class); xstream.alias("ERROR_ID", String.class); xstream.alias("TABLE_NAME", String.class); xstream.alias("TABLE_ID", String.class); xstream.alias("ROW_ID", String.class); xstream.alias("ERROR_TEXT", String.class); xstream.alias("ERROR_CODE", String.class); xstream.alias("COLUMN_ID", String.class); xstream.alias("ERROR_TYPE", String.class); GCSFeesResponse.DebitsWSDS gcsFeesResponse =(GCSFeesResponse.DebitsWSDS)xstream.fromXML(result.get_any()[0].getAsString()); XML <DebitsWSDS xmlns=""> <DEBITS> <DEBIT_ID>-1</DEBIT_ID> <ACCOUNT_ID>12321312313</ACCOUNT_ID> <EFFECTIVE_DATE>2012-12-12T00:00:00-06:00</EFFECTIVE_DATE> <DAY_OF_MONTH>12</DAY_OF_MONTH> <DEBIT_TYPE>S</DEBIT_TYPE> <OCCURS_NUM>1</OCCURS_NUM> <DEBIT_AMOUNT>750</DEBIT_AMOUNT> <MEMO>S</MEMO> <ACTIVE_FLAG>Y</ACTIVE_FLAG> <MODIFIED_BY/> <DEBIT_AUTHORIZED/> <DEBIT_AUTHORIZED_BY/> <REMAINING_OCCURRENCES>0</REMAINING_OCCURRENCES> </DEBITS> <ERRORS> <ERROR_ID>1</ERROR_ID> <TABLE_NAME>Debits</TABLE_NAME> <TABLE_ID>-1</TABLE_ID> <ROW_ID>0</ROW_ID> <COLUMN_ID>EXCEPTION</COLUMN_ID> <ERROR_TYPE>E</ERROR_TYPE> <ERROR_CODE>4</ERROR_CODE> <ERROR_TEXT>This debit type is not allowed for this company and policy group</ERROR_TEXT> </ERRORS> <ERRORS> <ERROR_ID>2</ERROR_ID> <TABLE_NAME>Clients</TABLE_NAME> <TABLE_ID/> <ROW_ID>0</ROW_ID> <COLUMN_ID>CLOSE_SCHED_DATE</COLUMN_ID> <ERROR_TYPE>E</ERROR_TYPE> <ERROR_CODE>4</ERROR_CODE> <ERROR_TEXT>Client has been closed. Cannot Authorize Draft.</ERROR_TEXT> </ERRORS> <ERRORS> <ERROR_ID>3</ERROR_ID> <TABLE_NAME>Debits</TABLE_NAME> <TABLE_ID>-1</TABLE_ID> <ROW_ID>0</ROW_ID> <COLUMN_ID>EXCEPTION</COLUMN_ID> <ERROR_TYPE>E</ERROR_TYPE> <ERROR_CODE>4</ERROR_CODE> <ERROR_TEXT>Cannot Schedule a Debit or Draft. Client has been closed.</ERROR_TEXT> </ERRORS> <ERRORS> <ERROR_ID>1</ERROR_ID> <TABLE_NAME>Debits</TABLE_NAME> <TABLE_ID>-1</TABLE_ID> <ROW_ID>0</ROW_ID> <COLUMN_ID>ACTIVE_FLAG</COLUMN_ID> <ERROR_TYPE>W</ERROR_TYPE> <ERROR_CODE>4</ERROR_CODE> <ERROR_TEXT>Creating debit on inactive Client account.</ERROR_TEXT> </ERRORS> </DebitsWSDS> My class structure. package com.avidev9.Fees; import java.util.List; public class GCSFeesResponse { public DebitsWSDS DebitsWSDS; public class DebitsWSDS { public List<ERRORS> ERRORS; public String xmlns; public DEBITS DEBITS; } public class ERRORS { public String TABLE_NAME; public Integer TABLE_ID; public Integer ERROR_ID; public Integer ROW_ID; public String ERROR_TEXT; public Integer ERROR_CODE; public String COLUMN_ID; public String ERROR_TYPE; } public class DEBITS { public String EFFECTIVE_DATE; public String ACTIVE_FLAG; public Long ACCOUNT_ID; public String DEBIT_AUTHORIZED_BY; public Integer DAY_OF_MONTH; public Integer DEBIT_ID; public String MEMO; public Integer REMAINING_OCCURRENCES; public String DEBIT_TYPE; public Integer OCCURS_NUM; public Integer DEBIT_AMOUNT; public String DEBIT_AUTHORIZED; public String MODIFIED_BY; } }

    Read the article

  • Adding tooltip to php chart director

    - by Shenoy Tinny
    I am using php chartdirector to generate some charts for my PHP page. We can add tool tip to the chart by setting the title attribute # Create an image map for the chart $imageMap = $c->getHTMLImageMap("clickline.php", "", "title='{xLabel}: US\$ {value|0}M'"); How would add a html tag to the title, like "title='{xLabel} <br/> Click to view more details'" When I do the above the tag <br/> gets displayed as such without the html rendering. I would like to have xLabel displayed and on the next line the phrase Click to view moer details Is there a way to do this Thanks

    Read the article

  • Revalidate and repaint - Java Swing

    - by bosra
    I have a JPanel that I am adding JLabel's to. I then want to remove all the JLabels and add some new ones. So I do the following: panel.removeAll();panel.repaint(); panel.add(new JLabel("Add something new"); panel.revalidate(); This works fine. My problem arises when I start a new thread after this like: panel.removeAll();panel.repaint(); (1)panel.add(new JLabel("Add something new"); panel.revalidate(); //new thread to start - this thread creates new JLabels that should appear under (1) firstProducer.start(); try { firstProducer.join(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } Then the output from the original JLabels is still visible. I have read that the revalidate process is a long running task and hence the firstProducer thread is getting started while the revalidation is going on and a conflict is arising. What is the best way to deal with this?

    Read the article

  • Output character in assembly

    - by lolopolosko
    Please help me! How i can output character that moves around the perimeter of a rectangle (10*5 or 15*7) in console with TASM? .MODEL small .STACK 100h .CODE start: mov ah,03 int 10h mov cx,10 A: push cx mov ah,03 int 10h mov ah,02h inc dl int 10h mov al,42 int 29h pop cx LOOP A mov ah,4ch int 21h end start I do not know how to solve the problem...

    Read the article

  • OpenGL gluLookAt issues

    - by Chris D
    I am trying to switch my space invaders game to a first person view, i.e. a view of the world from the ship. I am getting a bit confused about what point I should be looking at. I am currently using these parameters in gluLookAt: GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GLU.gluLookAt(ship3dPos.x, ship3dPos.y, ship3dPos.z,400.0f, 600.0f,-50.0f, 0.0f, 1.0f,-0.0f); Where ship3dPos is a Vector3f. I'm not sure what I'm supposed to set parameters 4,5 and 6 to, to get a view of the whole world(window is 800/600). I want to have a view of say 100.0 wide from the ships perspective, with this view moving along the x-axis as the player moves the ship. Thanks

    Read the article

  • How to implement button in a vector

    - by user1880497
    In my table. I want to put some buttons into each row that I can press. But I do not know how to do it public static DefaultTableModel buildTableModel(ResultSet rs) throws SQLException { java.sql.ResultSetMetaData metaData = rs.getMetaData(); // names of columns Vector<String> columnNames = new Vector<String>(); int columnCount = metaData.getColumnCount(); for (int column = 1; column <= columnCount; column++) { columnNames.add(metaData.getColumnName(column)); } // data of the table Vector<Vector<Object>> data = new Vector<Vector<Object>>(); while (rs.next()) { Vector<Object> vector = new Vector<Object>(); for (int columnIndex = 1; columnIndex <= columnCount; columnIndex++) { vector.add(rs.getObject(columnIndex)); } data.add(vector); } return new DefaultTableModel(data, columnNames); }

    Read the article

  • What should be the potential reason to get runtime error for this program?

    - by MiNdFrEaK
    #include<iostream> #include<stack> #include<vector> #include<string> #include<fstream> #include<cstdlib> /*farnaws,C++,673,08/12/2012*/ using namespace std; string verifier(string input_line) { stack <char> braces; for(int i=0; i<input_line.size(); i++) { if(input_line[i]=='(' || input_line[i]=='[') { braces.push(input_line[i]); } else if(input_line[i]==')' || input_line[i]==']') { braces.pop(); } } if(braces.size()==0) { return "YES"; } else { return "NO"; } } int main() { ifstream file_input("input.in"); string read_file; vector<string> file_contents; if(file_input.is_open()) { while(file_input>>read_file) { file_contents.push_back(read_file); } } else { cout<<"File cant be open!"<<endl; } int limit=atoi(file_contents[0].c_str()); //cout<< limit; ofstream file_output("output.out"); if(file_output.is_open()) { for(int i=1; i<=limit; i++ ) { file_output<<verifier(file_contents[i])<<endl; } } else { cout<<"File cant be open!"<<endl; } return 0; }

    Read the article

  • Phonegap: Will my mobile app 'feel' faster or slower once ported to phonegap?

    - by user15872
    So I'm designing everything in mobile Safari and I know that phonegap is essentially a stripped webview but... Question: Will my application will run better in phonegap? (revised below) a)I imagine my navigation and core app will load faster as the scripts and images are on the hard drive. Is this True? b)I assume since they've been working on it for 2 years now that they may have made some optimizations to make it quicker than just an average safari window. Is this true? (Assuming both html5/js/css code bases are pretty much the same and app is running on iOS.) Update: Sorry, I meant to compare apples to slightly different apples. Question 1 revised: Will my app see any performance benefits running with in a phonegap environment vs standard mobile safari? (compare mobile - to mobile) 1b) In what ways, other than loading time has phonegap optimized performance over standard mobile safari? Follow ups: 1) Are there any pitfalls, other than large libraries, that may cause phonegap to suffer a serious performance hit vs stand mobile safari? 2) Can I mix native and webview rendering? (i.e the top half of my app is rendered in with html/css/js and the bottom half native)

    Read the article

  • Remove this URL string when login fails and simply show div error

    - by Anagio
    My developer built our registration page to display a div when logins failed based on a string in the URL. When logins fail this is added to the URL /login?msg=invalid The PHP in my login.phtml which displays the error messages based on the msg= parameter is <?php $msg = ""; $msg = $_GET['msg']; if($msg==""){ $showMsg = ""; } elseif($msg=="invalid"){ $showMsg = ' <div class="alert alert-error"> <a class="close" data-dismiss="alert">×</a> <strong>Error!</strong> Login or password is incorrect! </div>'; } elseif($msg=="disabled"){ $showMsg = "Your account has been disabled."; } elseif($msg==2){ $showMsg = "Your account is not activated. Please check your email."; } ?> In the controller the redirect to that URL is else //email id does not exist in our database { //redirecting back with invalid email(invalid) msg=invalid. $this->_redirect($url."?msg=invalid"); } I know there are a few other validation types for disabled accounts etc. I'm in the process of redesigning the entire interface and would like to get rid of this kind of validation so that the div tags display when logins fail but not show the URL strings. If it matters the new div I want to display is <div class="alert alert-error alert-login"> Email or password incorrect </div> I'd like to replace the php my self in my login.phtml and controller but not a good programmer. What can I replace $this->_redirect($url."?msg=invalid"); with so that no strings are added to the URL and display the appropriate div tags? Thanks

    Read the article

  • R equivalent of .first or .last sas operator

    - by Giorgio Spedicato
    Does anybody know what is the best R alternative to SAS first. or last. operators? I did find none. SAS has the FIRST. and LAST. automatic variables, which identify the first and last record amongst a group with the same value with a particular variable; so in the following dataset FIRST.model and LAST.model are defined: Model,SaleID,First.Model,Last.Model Explorer,1,1,0 Explorer,2,0,0 Explorer,3,0,0 Explorer,4,0,1 Civic,5,1,0 Civic,6,0,0 Civic,7,0,1

    Read the article

  • How can I assign a name to a task in TPL

    - by mehrandvd
    I'm going to use lots of tasks running on my application. Each bunch of tasks is running for some reason. I would like to name these tasks so when I watch the Parallel Tasks window, I could recognize them easily. With another point of view, consider I'm using tasks at the framework level to populate a list. A developer that use my framework is also using tasks for her job. If she looks at the Parallel Tasks Window she will find some tasks having no idea about. I want to name tasks so she can distinguish the framework tasks from her tasks. It would be very convenient if there was such API: var task = new Task(action, "Growth calculation task") or maybe: var task = Task.Factory.StartNew(action, "Populating the datagrid") or even while working with Parallel.ForEach Parallel.ForEach(list, action, "Salary Calculation Task" Is it possible to name a task? Is it possible to give ???Parallel.ForEach a naming structure (maybe using a lambda) so it creates tasks with that naming? Is there such API somewhere that I'm missing? I've also tried to use an inherited task to override it's ToString(). But unfortunately the Parallel Tasks window doesn't use ToString()! class NamedTask : Task { private string TaskName { get; set; } public NamedTask(Action action, string taskName):base(action) { TaskName = taskName; } public override string ToString() { return TaskName; } }

    Read the article

  • debugging on bsd using gdb or similar tootls

    - by agent.smith
    I have started using freebsd lately and realized gdb does not support remote debugging on it. Whenever, I try to do remote debugging using gdbserver, I run into SIGSEGV crashes and error message says can’t find definition of “r_debug_state”. Has anyone ever experienced this and solved it? Statically compiled single threaded programs can be compiled using gdbserver. However, other than that it is mostly looking difficult to use. Let me know if anyone knows any other tools to do remote application debugging on bsd or how to fix the issue. (I am on x64 freebsd 9) Thanks

    Read the article

  • Looking into the JQuery Carousel Lite Plugin

    - by nikolaosk
    I have been using JQuery for a couple of years now and it has helped me to solve many problems on the client side of web development. You can find all my posts about JQuery in this link. In this post I will be providing you with a hands-on example on the JQuery Carousel Lite Plugin.If you want you can have a look at this post, where I describe the JQuery Cycle Plugin. I will be writing more posts regarding the most commonly used JQuery Plugins. I have been using extensively this plugin in my websites.You can show a portion of a set of images with previous and next navigation.In this hands-on example I will be using Expression Web 4.0.This application is not a free application. You can use any HTML editor you like.You can use Visual Studio 2012 Express edition. You can download it here. You can download this plugin from this linkI launch Expression Web 4.0 and then I type the following HTML markup (I am using HTML 5)<html lang="en">  <head>    <title>Liverpool Legends</title>        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >        <link rel="stylesheet" type="text/css" href="style.css">        <script type="text/javascript" src="jquery-1.8.3.min.js"> </script>     <script type="text/javascript" src="jcarousellite_1.0.1.min.js"></script>      <script type="text/javascript">        $(function () {            $(".theImages").jCarouselLite({                btnNext: "#Nextbtn",                btnPrev: "#Previousbtn"            });        });    </script>       </head>  <body>    <header>        <h1>Liverpool Legends</h1>    </header>        <div id="main">           <img id="Previousbtn" src="previous.png" />        <div class="theImages">            <ul>                <li><img src="championsofeurope.jpg"></li>                <li><img src="steven_gerrard.jpg"></li>                <li><img src="ynwa.jpg"></li>                <li><img src="dalglish.jpg"></li>                <li><img src="Souness.jpg"></li>                  </ul>    </div>    <img id="Nextbtn" src="next.png" />          </div>            <footer>        <p>All Rights Reserved</p>      </footer>     </body>  </html>  This is a very simple markup. I have added my photos (make sure you use your own when trying this example)I have added references to the JQuery library (current version is 1.8.3) and the JQuery Carousel Lite Plugin. Then I add 5 images in the theImages div element.The Javascript code that makes it all happen follows.  <script type="text/javascript">        $(function () {            $(".theImages").jCarouselLite({                btnNext: "#Nextbtn",                btnPrev: "#Previousbtn"            });        });    </script>I also have added some basic CSS style rules in the style.css file. body{background-color:#efefef;color:#791d22;}       #Previousbtn{position:absolute; left:5px; top:100px;}#Nextbtn {position:absolute; left:812px; top:100px;}.theImages {margin-left:145px;margin-top:10px;} It couldn't be any simpler than that. I view my simple in Internet Explorer 10 and it works as expected.I have tested this simple solution in all major browsers and it works fine.Hope it helps!!!

    Read the article

  • Enterprise Instrumentation: The 'sessionName' parameter of value 'TraceSession' is not valid

    - by Michael Freidgeim
    We are still using Enterprise Instrumentation(that was created during .Net 1.1 time)In new Server 2008 environment and IIS 7 we have the following errors:The 'sessionName' parameter of value 'TraceSession' is not valid. A trace session of this name does not exist in the TraceSessions configuration file for Windows Trace Session Manager service. Ensure that a session of this name exists in the TraceSessions configuration file and that the Windows Trace Session Manager service is started.   at Microsoft.EnterpriseInstrumentation.EventSinks.TraceEventSink..ctor(IDictionary parameters, EventSource eventSource)   --- End of inner exception stack trace ---   at System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType)   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)   at Microsoft.EnterpriseInstrumentation.EventSinks.EventSink.CreateNewEventSinks(DataRow[] eventSinkRows, EventSource eventSource)I’ve seen the same errors on development Win7 machines when using IIS. It seems not a problem on Cassini.I've checked ,that Windows Trace Session Manager Service has started and The file C:\Program Files (x86)\Microsoft Enterprise Instrumentation\Bin\Trace Service\TraceSessions.config has corresponding entry<?xml version="1.0" encoding="utf-8" ?><configuration >                <defaultParameters minBuffers="4" maxFileSize="10" maxBuffers="25" bufferSize="20" logFileMode="sequential" flushTimer="3" />                <sessionList>                                 <session name="TraceSession" enabled="false" fileName="C:\Program Files (x86)\Microsoft Enterprise Instrumentation\Bin\Trace Service\Logs\TraceLog.log" />                </sessionList></configuration>The errors still continue, but I was able to disable  the parameter in  eventSink configuration   <eventSink name=" traceSink" description=" Outputs events to the Windows Event Trace." type ="Microsoft.EnterpriseInstrumentation.EventSinks.TraceEventSink ">                <!-- MNF disabled parameter to  avoid error "The 'sessionName' parameter of value 'TraceSession' is not valid"                      < parameter name ="sessionName " value ="TraceSession " />                    -->    </ eventSink>Related old post http://bytes.com/topic/net/answers/104761-enterprise-instrumentation-windows-trace-session-managerOne day I wish to replace all EnterpriseInstrumentation calls with NLog.

    Read the article

  • Inbound SIP calls through Cisco 881 NAT hang up after a few seconds

    - by MasterRoot24
    I've recently moved to a Cisco 881 router for my WAN link. I was previously using a Cisco Linksys WAG320N as my modem/router/WiFi AP/NAT firewall. The WAG320N is now running in bridged mode, so it's simply acting as a modem with one of it's LAN ports connected to FE4 WAN on my Cisco 881. The Cisco 881 get's a DHCP provided IP from my ISP. My LAN is part of default Vlan 1 (192.168.1.0/24). General internet connectivity is working great, I've managed to setup static NAT rules for my HTTP/HTTPS/SMTP/etc. services which are running on my LAN. I don't know whether it's worth mentioning that I've opted to use NVI NAT (ip nat enable as opposed to the traditional ip nat outside/ip nat inside) setup. My reason for this is that NVI allows NAT loopback from my LAN to the WAN IP and back in to the necessary server on the LAN. I run an Asterisk 1.8 PBX on my LAN, which connects to a SIP provider on the internet. Both inbound and outbound calls through the old setup (WAG320N providing routing/NAT) worked fine. However, since moving to the Cisco 881, inbound calls drop after around 10 seconds, whereas outbound calls work fine. The following message is logged on my Asterisk PBX: [Dec 9 15:27:45] WARNING[27734]: chan_sip.c:3641 retrans_pkt: Retransmission timeout reached on transmission [email protected] for seqno 1 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions Packet timed out after 6528ms with no response [Dec 9 15:27:45] WARNING[27734]: chan_sip.c:3670 retrans_pkt: Hanging up call [email protected] - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions). (I know that this is quite a common issue - I've spend the best part of 2 days solid on this, trawling Google.) I've done as I am told and checked https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions. Referring to the section "Other SIP requests" in the page linked above, I believe that the hangup to be caused by the ACK from my SIP provider not being passed back through NAT to Asterisk on my PBX. I tried to ascertain this by dumping the packets on my WAN interface on the 881. I managed to obtain a PCAP dump of packets in/out of my WAN interface. Here's an example of an ACK being reveived by the router from my provider: 689 21.219999 193.x.x.x 188.x.x.x SIP 502 Request: ACK sip:[email protected] | However a SIP trace on the Asterisk server show's that there are no ACK's received in response to the 200 OK from my PBX: http://pastebin.com/wwHpLPPz In the past, I have been strongly advised to disable any sort of SIP ALGs on routers and/or firewalls and the many posts regarding this issue on the internet seem to support this. However, I believe on Cisco IOS, the config command to disable SIP ALG is no ip nat service sip udp port 5060 however, this doesn't appear to help the situation. To confirm that config setting is set: Router1#show running-config | include sip no ip nat service sip udp port 5060 Another interesting twist: for a short period of time, I tried another provider. Luckily, my trial account with them is still available, so I reverted my Asterisk config back to the revision before I integrated with my current provider. I then dialled in to the DDI associated with the trial trunk and the call didn't get hung up and I didn't get the error above! To me, this points at the provider, however I know, like all providers do, will say "There's no issues with our SIP proxies - it's your firewall." I'm tempted to agree with this, as this issue was not apparent with the old WAG320N router when it was doing the NAT'ing. I'm sure you'll want to see my running-config too: ! ! Last configuration change at 15:55:07 UTC Sun Dec 9 2012 by xxx version 15.2 no service pad service tcp-keepalives-in service tcp-keepalives-out service timestamps debug datetime msec localtime show-timezone service timestamps log datetime msec localtime show-timezone no service password-encryption service sequence-numbers ! hostname Router1 ! boot-start-marker boot-end-marker ! ! security authentication failure rate 10 log security passwords min-length 6 logging buffered 4096 logging console critical enable secret 4 xxx ! aaa new-model ! ! aaa authentication login local_auth local ! ! ! ! ! aaa session-id common ! memory-size iomem 10 ! crypto pki trustpoint TP-self-signed-xxx enrollment selfsigned subject-name cn=IOS-Self-Signed-Certificate-xxx revocation-check none rsakeypair TP-self-signed-xxx ! ! crypto pki certificate chain TP-self-signed-xxx certificate self-signed 01 quit no ip source-route no ip gratuitous-arps ip auth-proxy max-login-attempts 5 ip admission max-login-attempts 5 ! ! ! ! ! no ip bootp server ip domain name dmz.merlin.local ip domain list dmz.merlin.local ip domain list merlin.local ip name-server x.x.x.x ip inspect audit-trail ip inspect udp idle-time 1800 ip inspect dns-timeout 7 ip inspect tcp idle-time 14400 ip inspect name autosec_inspect ftp timeout 3600 ip inspect name autosec_inspect http timeout 3600 ip inspect name autosec_inspect rcmd timeout 3600 ip inspect name autosec_inspect realaudio timeout 3600 ip inspect name autosec_inspect smtp timeout 3600 ip inspect name autosec_inspect tftp timeout 30 ip inspect name autosec_inspect udp timeout 15 ip inspect name autosec_inspect tcp timeout 3600 ip cef login block-for 3 attempts 3 within 3 no ipv6 cef ! ! multilink bundle-name authenticated license udi pid CISCO881-SEC-K9 sn ! ! username xxx privilege 15 secret 4 xxx username xxx secret 4 xxx ! ! ! ! ! ip ssh time-out 60 ! ! ! ! ! ! ! ! ! interface FastEthernet0 no ip address ! interface FastEthernet1 no ip address ! interface FastEthernet2 no ip address ! interface FastEthernet3 switchport access vlan 2 no ip address ! interface FastEthernet4 ip address dhcp no ip redirects no ip unreachables no ip proxy-arp ip nat enable duplex auto speed auto ! interface Vlan1 ip address 192.168.1.1 255.255.255.0 no ip redirects no ip unreachables no ip proxy-arp ip nat enable ! interface Vlan2 ip address 192.168.0.2 255.255.255.0 ! ip forward-protocol nd ip http server ip http access-class 1 ip http authentication local ip http secure-server ip http timeout-policy idle 60 life 86400 requests 10000 ! ! no ip nat service sip udp port 5060 ip nat source list 1 interface FastEthernet4 overload ip nat source static tcp x.x.x.x 80 interface FastEthernet4 80 ip nat source static tcp x.x.x.x 443 interface FastEthernet4 443 ip nat source static tcp x.x.x.x 25 interface FastEthernet4 25 ip nat source static tcp x.x.x.x 587 interface FastEthernet4 587 ip nat source static tcp x.x.x.x 143 interface FastEthernet4 143 ip nat source static tcp x.x.x.x 993 interface FastEthernet4 993 ip nat source static tcp x.x.x.x 1723 interface FastEthernet4 1723 ! ! logging trap debugging logging facility local2 access-list 1 permit 192.168.1.0 0.0.0.255 access-list 1 permit 192.168.0.0 0.0.0.255 no cdp run ! ! ! ! control-plane ! ! banner motd Authorized Access only ! line con 0 login authentication local_auth length 0 transport output all line aux 0 exec-timeout 15 0 login authentication local_auth transport output all line vty 0 1 access-class 1 in logging synchronous login authentication local_auth length 0 transport preferred none transport input telnet transport output all line vty 2 4 access-class 1 in login authentication local_auth length 0 transport input ssh transport output all ! ! end ...and, if it's of any use, here's my Asterisk SIP config: [general] context=default ; Default context for calls allowoverlap=no ; Disable overlap dialing support. (Default is yes) udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all) ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060) tcpenable=no ; Enable server for incoming TCP connections (default is no) tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces) ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060) srvlookup=yes ; Enable DNS SRV lookups on outbound calls ; Note: Asterisk only uses the first host ; in SRV records ; Disabling DNS SRV lookups disables the ; ability to place SIP calls based on domain ; names to some other SIP users on the Internet ; Specifying a port in a SIP peer definition or ; when dialing outbound calls will supress SRV ; lookups for that peer or call. directmedia=no ; Don't allow direct RTP media between extensions (doesn't work through NAT) externhost=<MY DYNDNS HOSTNAME> ; Our external hostname to resolve to IP and be used in NAT'ed packets localnet=192.168.1.0/24 ; Define our local network so we know which packets need NAT'ing qualify=yes ; Qualify peers by default dtmfmode=rfc2833 ; Set the default DTMF mode disallow=all ; Disallow all codecs by default allow=ulaw ; Allow G.711 u-law allow=alaw ; Allow G.711 a-law ; ---------------------- ; SIP Trunk Registration ; ---------------------- ; Orbtalk register => <MY SIP PROVIDER USER NAME>:[email protected]/<MY DDI> ; Main Orbtalk number ; ---------- ; Trunks ; ---------- [orbtalk] ; Main Orbtalk trunk type=peer insecure=invite host=sipgw3.orbtalk.co.uk nat=yes username=<MY SIP PROVIDER USER NAME> defaultuser=<MY SIP PROVIDER USER NAME> fromuser=<MY SIP PROVIDER USER NAME> secret=xxx context=inbound I really don't know where to go with this. If anyone can help me find out why these calls are being dropped off, I'd be grateful if you could chime in! Please let me know if any further info is required.

    Read the article

  • VMWare vSphere 5: 4 pNICs for iSCSI vs. 2 pNICs

    - by gravyface
    New SAN for me, never used before: it's an IBM DS3512, dual controller with a quad 1GbE NIC per controller that a client bought and needs help setting up. Hosts (x2) have 8 pNICs and while I usually reserve 2 pNICs for iSCSI per host (and 2 for VM, 2 for management, 2 for vMotion, staggered across adapters), these extra ports on the SAN have me wondering if storage I/O would be significantly improved with 2 additional NICs per host, or if the limitations of the vmkernel/initiator would prevent the additional multipaths from ever being realized. I'm not seeing alot of 4 pNIC iSCSI implementations per host; 2 is the de facto standard from what I've read/seen online. I could and probably will do some I/O testing, but just wondering if there's a "wall" that someone else has discovered long ago (i.e. before 10GbE) that makes a 4 NIC iSCSI per host setup somewhat pointless. Just to clarify: I'm not looking for a how-to, but an explanation (link to paper, VMWare recommendation, benchmark, etc.) as to why 2-NIC configurations are the norm vs. 4-NIC iSCSI configurations. i.e. storage vendor limitations, VMKernel/initiator limitations, etc.

    Read the article

  • How to distinguish between virtual disk image formats?

    - by Jakub Žitný
    There is huge number of different formats for virtual storage files for desktop and server purposes (vmdk, qcow2, vdi, vdk, etc.). I'm writing a little script for manipulating them and would like the script to be able to distinguish between them. Of course, it can be done via extension, but I want this to be more reliable. I tried commands file or qemu-img, but the results are not quite clear. Any idea improving my methods?

    Read the article

  • Fixed ruby/mysql connection with new libmysql.dll, and broke Apache in the process

    - by jmtoporek
    Ok so bit of background - all my development has been on a local Windows 7 machine. I had Apache with PHP/MySQL running with no issues. Been using ruby (1.9.3 and latest rails release 3.2.9) with built in webrick server, but had a devil of a time connecting to mysql. Did some research, updated my libmysql.dll file in c:/ruby/bin and it worked! Very happy... except now Apache stopped working. In my attempt to resolve the issue I found an older copy of libmysql.dll, renamed the new file, copied the old file back to c:ruby/bin and apache works, ruby does not. So I can take this ass backwards approach but obviously this seems pretty stupid. I was surprised that Apache was using the dll file in ruby/bin folder. I presume this is related to path variables perhaps? I guess I was hoping someone could direct me as to how I can use one dll file for apache and another for ruby. Or if you have some other smarter approach - I've smart enough to follow directions to install apache from scratch and enable php on windows as well as ubuntu, but I'm not much of a sys admin, just a semi competent web developer.

    Read the article

  • LDAP Bind request failing

    - by Madhur Ahuja
    I have a Windows Server 2008 R2 Active Directory domain controller with domain madhurmoss.com I have a Linux box which is trying to connect to LDAP (389) on above box, which is failing. Upon inspection in Wireshark, I see a bind request with following query sAMAccountName=Administrator,DC=madhurmoss,DC=com and result with invalid Credentials 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db0 I want it to connect it through Administrator which lies in CN=Administrator,CN=Users,DC=madhurmoss,DC=com The supplied credentials are correct. I believe the query sAMAccountName=Administrator,DC=madhurmoss,DC=com is wrong. Can anyone guide me what could be wrong ?

    Read the article

  • Email forwarding via spf record

    - by Y.G.J
    I have old-domain.co.il with several emails and a new-domain.co.il with the same email addresses. I don't want to connect my domain to a server via mx to make that transfer via email server. Is it possible to have a SPF record that get an email like [email protected] and transfer it to [email protected]? The new domain is on google apps and the old domain can be connected to the same apps, but how to do it, so emails will arrive only to the new one?

    Read the article

  • “X_FORWARDED_FOR” Header Doesn't Present In The Request

    - by Radi
    In my web application I need to extract the real ip address for clients behind proxy, after searching I found that the possible method to do that is to read the content of "X_FORWARDED_FOR" header , I am using java servlet and the headers of the incoming request doesn't contain "X_FORWARDED_FOR" header , So why the header doesn't included in the request? I am using java 1.7 , tomcat v7 , proxy server :TMG and configured to use "X_FORWARDED_FOR" header . Please advice. Thanks in advance.

    Read the article

  • why do I get this mail server configuration error?

    - by Francesco
    <<The configuration of your mail servers and your DNS are not ok! The report of the test is: mail.mydomain.com. -> mydomain.com -> 78.47.63.148 -> static.148.63.47.78.clients.your-server.de Spam recognition software and RFC821 4.3 (also RFC2821 4.3.1) state that the hostname given in the SMTP greeting MUST have an A record pointing back to the same server.>> I have a A Record that points mail.mydomain.com to 78.47.63.148 (which is my given ip address for my vps) All other records are fine, so what's wrong and what record should I create to make it right? Thanks

    Read the article

  • how to limit upload bandwidth per user in linux?

    - by Gihan Lasita
    Can anyone provide the tc command to limit upload bandwidth per user in Debian Lenny? I found that to mark packets per user with iptables I can use the following command iptables -t mangle -A OUTPUT -p tcp -m owner --uid-owner testuser -j MARK --set-mark 500 but I have no idea how to use tc update by running following commands, i managed to limit testuser upload bandwidth to 10Mbit iptables -t mangle -N HTB_OUT iptables -t mangle -I POSTROUTING -j HTB_OUT iptables -t mangle -A HTB_OUT -j MARK --set-mark 30 iptables -t mangle -A HTB_OUT -m owner --uid-owner testuser -j MARK --set-mark 10 tc qdisc replace dev eth0 root handle 1: htb default 30 tc class replace dev eth0 parent 1: classid 1:1 htb rate 10Mbit burst 5k tc class replace dev eth0 parent 1:1 classid 1:10 htb rate 10Mbit ceil 10Mbit tc qdisc replace dev eth0 parent 1:10 handle 10: sfq perturb 10 tc filter add dev eth0 parent 1:0 prio 0 protocol ip handle 10 fw flowid 1:10 now the problem is, i do not want to limit testuser's FTP bandwidth but by running above commands FTP speed also limited to 10Mbit. Regards

    Read the article

  • Amazon EC2 hostnames

    - by Firefly
    I'm currently trying to setup a Tigase cluster on Amazon EC2 instances in a VPC and I'm having troubles getting it to work due to the hostnames of the instances not being "full DNS names". According to the Tigase documentation: Please note the proper DNS configuration is critical for the cluster to work correctly. Make sure the 'hostname' command returns a full DNS name on each cluster node. Can anyone explain what a full DNS name is and how I can set my instances to use one? Currently my instances get a default hostname of the form "ip-10-0-0-20".

    Read the article

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