on-internet

Windows 7 MySQL Error 1067 Services Will not Start

This has been a nightmare of a problem. I initially installed WAMP and everything worked fine. I restarted my computer and MySQL server hasn't worked since. I have been trying to install just MySQL and the "SQL Instance Config" freezes and when trying to start the service I receive the "Error 1067: The process terminated unexpectedly". I have searched for hours online trying all of the various solutions. These are the main ones that I recall seeing the most. Changing the install paths to ones without spaces Deleting all mySQL files and reinstalling Starting the services through the command Pro

Join the discussion →

Error: selected processor does not support ARM mode `wfi'

I'm getting the following errors while trying to compile an ARM embedded C program (I'm using YAGARTO as my cross compiler). I'm trying to work out what this error means and what are the steps to correct it. From the research I've done so far, the issue it seems to be wfi, and wfe are not ASM instruction. How could I fix this? \cc9e5oJe.s: Assembler messages: \cc9e5oJe.s:404: Error: selected processor does not support ARM mode `wfi' \cc9e5oJe.s:414: Error: selected processor does not support ARM mode `wfe' \cc9e5oJe.s:477: Error: selected processor does not support ARM mode `wfi' make: *** [ST

Join the discussion →

Apache Velocity - Resource not found exception

I have a requirement to generate some automated mails and so I wanted to use velocity for this task.I have copied all velocity jars to the lib folder and created a hello.vm template and placed in WEB-INF/templates folder.Below is exception I am getting, org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'hello.vm' userCount incremented to :1 at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:474) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352) at org.apache.velocit

Join the discussion →

Login form on top nav with zurb foundation

I've already learned bootstrap but I'm trying to learn foundation for a different project just to get some exposure to it. I'm wondering if there's any simple way to add a username/password form to the top nav bar similar to how bootstrap does? I've checked out the template called workspace here: http://foundation.zurb.com/page-templates/workspace.html and it has a search box in the top that looks very similar to what I want, but when I wrap a form around it, it goes haywire. Anybody have an idea how to do this in foundation? What I'm trying to work with: <nav class="top-bar contain-to-grid">

Join the discussion →

Full width background image in footer

I am working with 960gs (in my local environment) and I insert this CSS code into my footer div: #footer { background: url(https://placehold.co/1800x130) repeat-x scroll top transparent; height: 130px; width: 100%; overflow: hidden; } <div id="footer"> <div id="nav" class="container_12"> </div> <div id="endfooter" class="container_12"> <div id="copyright" class="grid_3 alpha"> </div> <div id="design" class="grid_3 omega"> </div> </div> <!-- endfooter --> </div> <!-- end footer --> The problem is that the page does not show the footer div at full width with the background covering the entire di

Join the discussion →

TCP spec for message sending deadlock

I am trying to get a high level understanding of TCP and have come to a confusing point. Let's say we have a server S and a client C which are connected. If S pushes a message to C and before C realizes there was a message sent it also pushes a message towards S. Now were are in a state where S is waiting for it's message ACK and C is also waiting for it's ACK. How does the specification avoid this kind of deadlock? A lot of the resources online quickly go into specific implementation details, but I am instead trying to find a high level explanation of how these deadlocks are dealt with. (I am

Join the discussion →

Using sentinel-controlled loop

I'm having trouble with an exercise asking to have a user prompt a name and echoes that name to the screen until user enters a sentinel value. I understand this is a sentinel-controlled loop but I'm stuck on the fact that I'm dealing with entering a name instead of an integer. I tried to follow a program in my book which only explains how to use a sentinel value with integers but not with String "name". I tried looking up this answer and saw something like name.equals("stop") if it even applies to this. and looked it up on the APIs and still didn't find it helpful. I would like to see how it a

Join the discussion →

How to reopen differential review in phabricator?

I created review for development branch in phabricator, updated it several times and than pushed branch for testing. Review was not finished but phabricator automatically closed it. I can create another differential review, but all comments and updates will be in old... So is there a way to reopen closed review?

Join the discussion →

Javascript to simulate "right click on image -> save image as"

There has been an exact duplicate question as this one, but it's been 2 years, and there's only one answer which was not really a solution. I have an image (thumbnail). Right below it there are 2 buttons: View and Download. View will open the image in browser (cached). And the Download button will open the Save Image dialog. Right now I'm using PHP's header Content-Disposition: attachment; for the download button. Generally, visitors will first hit the View button to preview (thumbnail is not a solution since details and quality need to be verified), especially for my own app. Now, I don't rea

Join the discussion →

SQL Server - synchronizing 2 tables on 2 different databases

I have 2 tables with same schema on 2 different databases on the same server with SQL Server 2008 R2. One table gets updated with data more often. Now there is a need to keep these 2 table in sync. This can happen as a nightly process. What is the best methodology to achieve the sync. process ?

Join the discussion →

How do I offset where my fixed nav bar takes me?

I have a fixed navigation bar on my website that stays at the top with links that take me to different sections further down the page. However, because my fixed nav bar has a height of 40px, the beginning 40px of every section is covered up. How would I offset where my links take me by 40px using either HTML or CSS? Thanks.

Join the discussion →

Tracing syscalls of a process and all forked processes

I'm using ptrace to trace the syscalls of a process. After forking the process, I use PTRACE_TRACEME to start trace the the process. The code looks like this: while (true) { int status; int gotPid; gotPid = waitpid(pid, &status, 0); if (WIFEXITED(status) || WIFSIGNALED(status)) { break; } if (WIFSTOPPED(status)) { handleTrace(); } } Then there is the handleTrace function, which looks like this. long syscall; syscall = ptrace(PTRACE_PEEKUSER, pid, 8 * ORIG_RAX, NULL); // do something with the syscall // continue program ptrace(PTRACE_SYSCALL, pid, NULL, NULL); This is all good, but if the progr

Join the discussion →

How to unlink image from folder?

I am currently working on shopping cart.let me quick expain whats happening in product_info.php page. in product info page products information in displayed such as name,price,image etc.. i have made small functionality in this page.i have put 10 small diffrent color images below the product main image and 2 text boxes to write something on main image using php Gd. i have made ajax function which is called on onclick of image small images and on onkeyup of two text boxes with three parameter : selected color image's path and value of textboxes.Now when user will click on the one of the color i

Join the discussion →

Android: Screen Orientation/Rotation for Camera Preview

I have created a camera app and I want my app to be turned in all 4 possible orientations and the to update the camera preview accordingly. for that I have used the following method I have copied from: Android - Camera preview is sideways public void updateCameraDisplay(int w, int h) { // set preview size and make any resize, rotate or // reformatting changes here Log.i("CameraPreviews", "Updating camera orientation with w=" + w + " and h=" + h); Parameters parameters = camera.getParameters(); Display display = getActivity().getWindowManager() .getDefaultDisplay(); int rotation = getActivity()

Join the discussion →

Read /dev/ttyUSB0 with a c program on LINUX

I want to read data frames sent by a GPS XBee protocol. The USB XStick receives the following data: CHARS : 15931 SENTENCES = 0 CHECKSUM : 58 Heading : 55 Tilt: -46 Roll:2 CHARS : .... and so on ... I can read by typing in the terminal control : $ screen /dev/ttyUSB0 I'd like to see these details in the same way, but with a program written in C. Here's what I do : #include <stdio.h> #include <stdlib.h> #include <termios.h> #include <sys/fcntl.h> #include <unistd.h> #include "serial_port.h" void read_Serial_Port(const char* DEVICE_PORT) { int file; struct termios options; char message[100]; uns

Join the discussion →

Can not display plot with matplotlib under eclipse

I have a strange problem with matplotlib under Eclipse I've tested this code and this works fine in the command line: import matplotlib.pyplot as plt import matplotlib.pylab as pylab plt.plot([1,2,3,4]) plt.ylabel('some numbers') plt.show() But when I execute this code under Eclipse, there is nothing shown. I see that pydev understood all my imports and there is no error message.

Join the discussion →

How to run coded UI test with MSTest.ese without installing Visual Studio 2010

I am working with Coded UI automation. The issue is to customize test case execution. I cannot use TFS or Lab agent or any other tool. The test components (DLL) are executed through a customized UI developed using C# on a 64bit machine with Win7. I am able to run test case now through the code below: string str = "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\MSTest.exe"; ProcessStartInfo startInfo = new ProcessStartInfo(str); startInfo.Arguments = " /testcontainer:TestProject1.dll"; Process.Start(startInfo); But when I want to install this application to another machine

Join the discussion →

Oracle chain results in "job slave process was terminated" for concurrent job execution

Currently I have an Oracle chain defined with the following steps: 1) TRUE START first,second,third 2) first COMPLETED AND second COMPLETED AND third COMPLETED START A,B,C 3) A COMPLETED AND B COMPLETED AND C COMPLETED END first.sql: create materialized view first_View nologging never refresh as select * from first second.sql: create materialized view second_View nologging never refresh as select * from second third.sql: create materialized view third_View nologging never refresh as select * from third The error I receive is this: CHAIN_LOG_ID="4321", STEP_NAME="SECOND" REASON="Job slave proce

Join the discussion →

COUNT related rows from a JOINed table with CodeIgniter's query builder [duplicate]

I have a raw SQL query that works, but I want to convert it to CodeIgniter's query builder methods. Raw query: SELECT online_visitors.page_id, hotels.hotel_name, COUNT(online_visitors.page_id) AS count_visit FROM `online_visitors`, `hotels` WHERE online_visitors.page_type = 'hotel' AND online_visitors.is_bot = 0 AND hotels.ID = online_visitors.page_id GROUP BY online_visitors.page_id ORDER BY online_visitors.page_id ASC My unsuccessful coding attempt which is at least missing the COUNT part: $this->db->select("page_id, hotel_name"); $this->db->from("hotels"); $this->db->join("online_visitors")

Join the discussion →

Can C#/.net parse exponential hex encoded floating point numbers from strings?

C++, Java all include the [-]0xh.hhhhp+/-d format in the syntax of the language, other languages like python and C99 have library support for parsing these strings (float.fromhex, scanf). I have not, yet, found a way to parse this exact hex encoded exponential format in C# or using the .NET libraries. Is there a good way to handle this, or a decent alternative encoding? (decimal encoding is not exact). Example strings: 0x1p-8 -0xfe8p-12 Thank you

Join the discussion →

how to send string array in soap request to webservice

i cant send my request to webservice. string array not accept and show error to me. i want to send array string in soap request but show error to me. my webservice: This XML file does not appear to have any style information associated with it. The document tree is shown below. <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:typens="urn:HostIranSmsWebService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="HostIranSmsWebServic

Join the discussion →

POST JSON with PHP cURL and show JSON response

I've looked a lot around on Stack Overflow to find an answer to my issue, but simply can't. I'm trying to post the following JSON <?php $data_string = '{ "jsonrpc": "2.0", "method": "login", "id": 1, "params": { "params": { "username": "4321", "password": "1234" } } }'; $ch = curl_init('https://domain.com'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string)) ); $result = curl_ex

Join the discussion →

Retrieve and update data from SQL Server 2008 with AJAX/Jquery

I am presently working on a new development and I really need my project to have the silky feel it requires, So I thought of using Ajax or jQuery to retrieve data from SQL Server 2008. I am new to JSON and its functions. Here is the html: Enter Employee ID <br /> <asp:TextBox ID="txtEmpId" runat="server"></asp:TextBox>&nbsp; <br /> <input type="button" id="BtnSearch" runat="server" value="Search" /> <div id="emp" style="display: none; margin-top: 40px"> ID:<span id="txtId"></span><br /> Title:<span id="txtTitle"></span><br /> Name:<span id="txtName"></span><br /> Department:<span id="txtDepart

Join the discussion →

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 →

Database connection error (3): Could not connect to database',

I upgrade my xampp to 1.8 from 1.7 by uninstalling 1.7 but did not uninstall the htdocs and mysql data folder. But my problem now is that my site are not displaying, my joomla 2.5 sites give: Database connection error (3): Could not connect to database, while joomla 1.5 sites give errors such as: Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\osu\libraries\joomla\import.php on line 29 Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\osu\libraries\loader.php on line 71 Strict Stan

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 →

How to keep a counter for removed duplicates inside a hash value?

chdir("c:/perl/normalized"); $docid=0; use List::MoreUtils qw( uniq ); my %hash = (); @files = <*>; foreach $file (@files) { $docid++; open (input, $file); while (<input>) { open (output,'>>c:/perl/postinglist/total'); chomp; (@words) = split(" "); foreach $word (@words) { push @{ $hash{$word} }, $docid; } } } foreach $key (sort keys %hash) { $size = scalar (@{$hash{$key}}); print output "Term: $key, Frequency:$size, Document(s):", join(" ", uniq @{ $hash{$key} }), "\n"; } close (input); close (output); before the join(" ", uniq @{ $hash{$key} }), the output was as follows: Term:of Frequency:3

Join the discussion →
Older stories