on-internet

How to Check IP Address of Subdomain

I'm sending XML from a client's site to an external server. This external server admin needs to verify the IP from the sender. We have the script working fine when sending from the main site (domain.com), but I am not sure when we are sending from a subdomain of the main site (sub.domain.com, getting an error currently). Is there a way to check the IP of a subdomain so I can give the admin the right IP address? Thanks. UPDATE: I've used the firefox extension 'IP Addresses and Domain Information' and am comparing the info from both domain.com and sub.domain.com and both look pretty much identic

Join the discussion →

Query not passing with View in Codeigniter [closed]

I have the foloowing controller (supernavigationloggedin): <?php class Supernavigationloggedin extends CI_Controller { function index(){ #get current session id $currentSessionID = $this->session->userdata('session_id'); #get all the account row for the given sessionID $data['info'] = $this->db->get_where('Client', array('session_id'=>$currentSessionID))->row(); #views $this->load->view('supernavigationloggedin',$data); } } ?> and the following view named(supernavigationloggedin): <div id="superNavigation"> <h5><strong>Welcome</strong>, <?php $info->fname; ?>&nbsp;<a href="#">Account Settings<

Join the discussion →

How to change the default MIB searching path?

I have the following code to parse the mibs in a folder called mibp . #include <net-snmp/net-snmp-config.h> #include <net-snmp/net-snmp-includes.h> #include <string.h> #include<stdlib.h> int main(int argc, char ** argv) { FILE *fp=NULL; fp=fopen("/root/mib2.txt","w"); if (fp == NULL ) { printf("error");; exit(2); } netsnmp_init_mib(); add_mibdir("/home/pradipta/snmp/share/snmp/mibp"); //netsnmp_set_mib_directory( "/home/pradipta/snmp/share/snmp/mibp" ); struct tree *node; //node=read_all_mibs(); node=read_mib("/home/pradipta/snmp/share/snmp/mibp/EtherLike-MIB.txt"); print_subtree(fp,node,0); }

Join the discussion →

Devexpress Gridview Filter Control

I have a ASPxGridView component that is filled from a SQL query I wanted to apply a filter on my ASPX Gridview so I wrote: <dx:ASPxGridView runat="server" ID="gvExecReq" Visible="false" AutoGenerateColumns="true" OnPageIndexChanged="gvExecReq_PageIndexChanged" OnBeforeColumnSortingGrouping="gvExecReq_BeforeColumnSortingGrouping"> **<Settings ShowFilterRow="True" /> <Settings ShowFilterBar="Visible" ShowHeaderFilterButton="True" />** </dx:ASPxGridView> the filter is well established, but it is not functional What do I need to add more?

Join the discussion →

PowerShell's Clear-History doesn't clear history

Recently I had to run a command that unfortunately required me to type a password right on the command line. Afterwards, I cleared my screen with "Clear", but also wanted to clear the command history so the offending command wouldn't show up in the session history. Unfortunately, the Clear-History cmdlet doesn't seem to actually do what its documentation claims - running Clear-History doesn't seem to have any impact on the session history whatsoever. I can still see previous commands in the pop-up history menu, and scroll through old commands by pressing the up key. Here's a screengrab demonst

Join the discussion →

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement underTimelyRenewal

I am getting the below exception before hitting a axis 2 webservice. org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement underTimelyRenewal I can't reproduce the same issue locally on tomcat or in DEV environment which runs in Weblogic. It justs happens only in 1 environment which runs on Weblogic 11g. This makes to think that I am missing some config in that environment, I am not sure what it is. Any help on this is highly appreciated. Here is code that calls web service. public com.ibs.accouting.employeeVerificationResponse getEmployeeVerificationRequ

Join the discussion →

Sonatype Insight - Application Health Check - Is it ok to share application composition details to the remote Sonatype Insight Server

Has anybody used the Sonatype Insight-Application Health Checker? It requires you to scan your application (war, jar, zip, etc) and then uploads its findings onto the Sonatype Insight Server. After this, you get the report via the email which also contains an online link to the interactive report. The problem that i find with this approach is that my application composition details get uploaded to a remote server (outside my organizational control) and then the report gets published at an online link which can be accessed by anyone. I do not want this. Is there a way to generate this report wi

Join the discussion →

Display selected range of cells in Textbox1

I am facing an issue while trying to display a selected range of cells from Excel to a UserForm textbox, say C1:E14. The code below is giving me an Runtime error '13' Type Mismatch: Private Sub CommandButton1_Click() Dim ActSheet As Worksheet Dim SelRange As Range Set ActSheet = ActiveSheet Set SelRange = Selection Range("TABLE").Select Application.Goto "TABLE" UserForm1.TextBox1.Text = Range("C1:E14").Value 'UserForm1.TextBox1.Text = Range("C1:E14").Select End Sub If I use .Value it's giving the above mentioned error, but if I use .Select "True" it is printing in the UserForm text box.

Join the discussion →

NSBundle "not yet loaded" for existing path

I'm trying to implement a way to change language inside the application. I think I have it all figured it out, but for some reason the folder is not laded as a bundle I have a folder called kh.lproj NSString *path = [[NSBundle mainBundle] pathForResource:newLanguage ofType:@"lproj"]; if ([[NSFileManager defaultManager] fileExistsAtPath:path]) { bundle = [NSBundle bundleWithPath:path]; DLOG(@"Language: %@ from path %@ (%@)", newLanguage, path, bundle); } The output of my dlog is Language: kh from path ......../F1AA1E74-A014-4331-BD1B-D05D0E54AFF3/console.app/kh.lproj (NSBundle <......./F1AA1E74

Join the discussion →

linux nasm assembly print all numbers from zero to 100

I am writing a program to print out all the numbers from zero to 100. The only reason I am doing this is to test out printing out multiple digit numbers. The problem that I am having is that my program is only printing out the numbers 1 and 2. I have no idea why. My compiler compiles fine, without error, as well as no linker errors. Here is my code: SECTION .data len EQU 32 NUL EQU 0 countlen EQU 8 SECTION .bss counter resb countlen strlen resb countlen SECTION .text GLOBAL _start _start: mov BYTE[counter], 1 ; set counter to 1 mov BYTE[strlen], 1 ; set string length counter to 1 mov ecx, coun

Join the discussion →

Returning multiple values from a recursive function

I have this problem where I have to convert a decimal number to binary and then store the bits in a linked list where the head node is the most significant bit and the last node is the least significant bit. Solving the problem itself is actually easy as you only need to keep taking the modulo of 2 recursively and add the result in the list until the decimal number becomes 0. Where I'm stuck is that I have to write the function such that it returns a pair of number, (whether an array or a list) of the most significant bit and the last significant bit. i.e: Inputting 14 in the function would re

Join the discussion →

HTTP OPTIONS - Not Cacheable?

I'm designing a RESTful service aligning to HATEOAS principles as much as possible. As a result, I need a way to have my cool URLs return a list of links describing available options. I'm using HAL-JSON to facilitate the data format so that's all good, but I'm now considering what HTTP method should pull this. I'm sure I could stick with a simple GET, but from reading over the HTTP RFC, it seems that OPTIONS might fit the bill here. My only concern is in bold: 9.2 OPTIONS The OPTIONS method represents a request for information about the communication options available on the request/response c

Join the discussion →

ASP.NET session variables

I have a session variable: ID. Is there ever a possibility that two browsers on the same PC could share the same session variable and update it, therefore producing random results. I would expect there to always be two separate sessions with two separate sets of session variables. I have researched this and I have come across the following web page, which suggests that there are session locks to prevent this from happening: http://odetocode.com/blogs/scott/archive/2006/05/20/session-state-uses-a-reader-writer-lock.aspx. I have an ASP.NET application and there are random results suggesting that

Join the discussion →

How do you force an embedded audio file to autostart on an Android Tablet?

I have a Nabi (Android Tablet), and I am designing a website and I have an audio file that I want to play when the audio file is on the page. On the Nabi, it shows up, but I have to press play. It doesn't just start. Here's the code: <embed src="windchimes.mp3" height="100px" width="100px" autostart="true"> or <audio autoplay="autoplay" controls="controls"><source src="windchimes.mp3" type="audio/mpeg" /></audio> Does anybody know how to make it so that I don't have to push play on the tablet?

Join the discussion →

What has a better performance: multiplication or division?

Which version is faster: x * 0.5 or x / 2 ? I've had a course at the university called computer systems some time ago. From back then I remember that multiplying two values can be achieved with comparably "simple" logical gates but division is not a "native" operation and requires a sum register that is in a loop increased by the divisor and compared to the dividend. Now I have to optimise an algorithm with a lot of divisions. Unfortunately it's not just dividing by two, so binary shifting is not an option. Will it make a difference to change all divisions to multiplications ? Update: I have c

Join the discussion →

Move OS X Dock to other monitor programmatically

I'm using 2 external monitors with my rMBP (one via thunderbolt/DVI and one via HDMI). The lid of the laptop is closed. Is it possible to move the Dock and the Menu Bar from one display to the other (ie. make it the main display) programmatically? I use ControlPlane to detect certain situations and I'd like to swap the main monitor if a situation occurs with a script (like bash or AppleScript). I looked in the com.apple.dock.plist but didn't find any key that I could use.

Join the discussion →

How do I run a program from command prompt as a different user and as an admin [closed]

I am using "runas" to open command prompt as a different user but that command prompt is not running as an admin. How can I make it run as an admin? UPDATE: I am using Windows Server 2012 UPDATE: I opened cmd for another account by running runas /user:domain\username cmd.exe Then I tried to run some commands in this new prompt but this is not running as an elevated user (even though it has Administrator privileges).

Join the discussion →

How should I choose the degree of a hypothesis function? [closed]

In a normal machine learning problem, you get many features (for example, if you are making an image recogniser), so when there are many features, you can't visualise the data (you can't plot a graph). Without plotting a graph, is there a way to determine what degree of a hypothesis function should we use for that problem? How can I determine the best hypothesis functions to use? For example: if there are 2 inputs x(1), x(2). whether to choose (w0) + x(1)*w(1) + x(2)*w(2) as the hypothesis function or w(0) + x(1)*w(1) + x(2)*w(2) + x(1)*x(2)*w(3) + (x(1)^2)*w(4) + (x(2)^2)*w(5) as the hypothes

Join the discussion →

Attempt to de-reference a null object: Salesforce

I am trying to submit data to a server where it is picked and stored in salesforce. The error I am getting is "Attempt to de-reference a null object" at the server. so I am wondering what the problem is... Below is the sample code: public static List<String> processAgentVisitSurvey(ProcessSurveySubmission.SurveySubmission submission, Map<String, Submission_Answer__c> answers, Person__c person) { // Load the TDR TDR__c tdr = loadTdr(person); if (tdr == null) { //Send an email saying that an unregistered person is trying to act a TDR // Send back the error message return new String[] { '0', 'Use

Join the discussion →

oracle connection String with C# using oledb

Im developing an application in C# that connects to Oracle 10g. When I use ODP. Net and this Connection String "Data Source=Angelo-HP/XE;User ID=MAPFRE;Password=123456" I can connect and perform any action with the database, but when I use OleDbConnection (System.Data.OleDb) with this connection String: "Provider=OraOLEDB.Oracle;OLEDB.NET=true;PLSQLRSet=true;User ID=mapfre;password=123456;Data Source=XE" I got this error: ORA-12154: TNS:could not resolve the connect identifier specified When I try use Open() method from OleDbConnection. I think is not oracle configuration because I can connect

Join the discussion →

In jQuery how can I set "top,left" properties of an element with position values relative to the parent and not the document?

.offset([coordinates]) method set the coordinates of an element but only relative to the document. Then how can I set coordinates of an element but relative to the parent? I found that .position() method get only "top,left" values relative to the parent, but it doesn't set any values. I tried with $("#mydiv").css({top: 200, left: 200}); but does not work.

Join the discussion →

Print to standard printer from Python?

Is there a reasonably standard and cross platform way to print text (or even PS/PDF) to the system defined printer? Assuming CPython here, not something clever like using Jython and the Java printing API.

Join the discussion →

sql server alter permission

Experts I am trying to set up permission for our IT team. All our IT staffs are member of I.T group. With the database in question the IT staffs groups are member of db_reader, db_reader and can execute all SP/Fun. one particular user I want to give the permission to modify the objects. CREATE USER [S\Al] FOR LOGIN [S\Al] WITH DEFAULT_SCHEMA=[dbo] added him to db_ddlAmin role EXEC sp_addrolemember N'db_ddladmin', N'S\Al' all the objects in our db belongs to DBO schema..so i have give alter permission on dbo schema to the user GRANT ALTER ON SCHEMA::[dbo] TO [S\Al] But when this user tries to m

Join the discussion →

git push a sub branch

I was in branch feature_swap there I did some change but I am not confident enough to push those changes in feature_swap branch. So I tried to create another sub branch feature_swap_experiment with git branch feature_swap_experiment git checkout feature_swap_experiment Now I want to push to feature_swap_experiment I've tried git push origin feature_swap_experiment which is not working error: src refspec feature_swap_experiment does not match any. error: failed to push some refs to 'https://[email protected]/uname/project.git'

Join the discussion →

SVD optimization formula

What convex optimization formula (Objective function) results in the singular value decomposition or principal component analysis (PCA) of matrix X (n by p)?

Join the discussion →

javascript jquery preview image before upload

Refs: How to preview a image before upload using JavaScript or jquery? javascript - image preview before upload How to upload preview image before upload through JavaScript didn't worked for me... from above refs some only worked in ff and some is uploading first and then only showing preview. I find the exact solution in: http://blueimp.github.com/jQuery-File-Upload/ It works in all i have tested. I find it working but my code isn't working. So what is the keypoint blueimp is following and i missing for enabling image preview before upload. I tried with : $('.hidFileBtn').live('change', funct

Join the discussion →

How to "multithread" single table items that require long time to calculate, in PyQt?

I'm a real beginner in multithreading. This question is about high-level multithreading in PyQt. Suppose that a table widget requires much time to be populated because of some single items, making the window unresponsive meanwhile. So I imagine that a responsive window should require a multithreaded solution in this case, where the big calculations (not every ones) are supposed to use separate threads. A simpler version could use a separate thread for every single column instead of single items. Working examples are really appreciated. Thank you and sorry for my bad english. EDIT: I removed th

Join the discussion →

Ruby in Linux: How can I permanently "source .rvm/scripts/rvm"?

I'm new to Ruby on Rails and have just set it up in Ubuntu Linux following instructions I found here. Specifically, As s.m. said, I uninstalled everything, then I opened another terminal session as a normal user and run: bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) then I run source /home/my-desktop-username/.rvm/scripts/rvm as a normal user NOT ROOT then I run rvm requirements as a normal user. Then I copy the requirements and close the session, open a root session and install the requirements using sudo Then I close the session and open

Join the discussion →
Older stories