I have tried so hard to solve my problem, here's what I'm trying to do: I have an XML file that I load into a dataset("ds") using ReadXML, several tables are populated in to the dataset, the one I'm concerned about is ("SalesReceiptRet") and I'll refer to it as the source table. I have another table in MS Access database, I load it into the same dataset using OleDBAdapter.Fill, into a datatable named ("dtTarget") and the adapter's name is ("dbAdapter"). I want to go through all the records in the source table, lookup a field called ("TxnID") to locate the record in the target table. If it does
I try to create an associative array in bash like this: #! /bin/bash declare -a arr while read key do arr+=([$key]=1) done < /dev/stdin for i in ${!arr[@]} do echo "key:$i,value:${arr[$i]}" done I have inputed "leopard" and "longtuan" as a key,the output supposed to be like this in my mind: key:leopard,value:1 key:longtuan,value:1 But I only got: key:0,value:11 How can I get through of this problem, Thanks for any help.
My example script clicks the first "rate" button it finds on a page, yet I want it to find text and then click the next "rate" button on a page. VERSION BUILD=8300326 RECORDER=FX TAB T=1 SET !DATASOURCE C:\Users\admin\Documents\iMacros\Downloads\extract.csv SET !DATASOURCE_COLUMNS 1 SET !LOOP 1 SET !DATASOURCE_LINE {{!LOOP}} URL GOTO={{!COL1}} SEARCH SOURCE=TXT:"my favorite energy drink" TAG POS=1 TYPE=SPAN ATTR=TXT:*<SP>Rating:<SP>Good<SP>Answer WAIT SECONDS=2 The search line seems to work, yet the tag line jumps the script back to the top of the page.
I have given an option to user to Export Images As JPG and I have stored png images So, i have created some php script to do so. png is converting fine.. but when i downloaded the jpg image and try to open in image viewer, its showing corrupted. My php code: Converting PNG to JPG $input_file = 'images/image1364926178.png'; $filename = time().'.jpg'; $output_file = 'images/'.$filename; $input = imagecreatefrompng($input_file); if($input){ list($width, $height) = getimagesize($input_file); $output = imagecreatetruecolor($width, $height); $white = imagecolorallocate($output, 255, 255, 255); image
I'm using tomcat 7 in my application. When I start the server, it shows me following warning message while startup:- May 15, 2013 11:45:10 AM org.apache.tomcat.jdbc.pool.ConnectionPool abandon WARNING: Connection has been abandoned PooledConnection[oracle.jdbc.driver.T4CConnection@d6d9b4]:java.lang.Exception at org.apache.tomcat.jdbc.pool.ConnectionPool.getThreadDump(ConnectionPool.java:1006) at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:672) at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:607) at org.apache.tomcat.jdbc.po
None of the following code works: p:before { content: " "; } p:before { content: " "; } How do I add white space before an element's content? Note: I need to color the border-left and the margin-left for semantic use and use the space as a colorless margin. :)
I want slice the main windows as like this my layout code is follow: QGridLayout *gLayout = new QGridLayout (); viewWidget->setStyleSheet("background-color: #333;" ); for ( i = 0; i < m_numOfVideoWidget; i++) { QWidget *vWidget = new QWidget(viewWidget); vWidget->setSizePolicy(QSizePolicy ::Expanding , QSizePolicy ::Expanding ); videoList.append( vWidget); } index = 0; for ( j = 0; j < 4; j += 2) { gLayout->addWidget( videoList[ index++], 0, j, 2, 2); } for ( i = 2; i < 4; i++) for ( j = 0; j < 4; j++) gLayout-> addWidget( videoList[ index++], i, j); viewWidget->setLayout(gLayout ); Unfortunat
I want to create a boostrap markup definition with this image: What do I have to do that row1, row2 and row3 share the same div/column? If I would do table design then I would use a rowspan... UPDATE Bad resizing behavior with a larger window (see button) Better resizing behavior with a smaller window (see button) Thats the code: <div class="row"> <div class="span6"> <div class="row"> <div class="span3">xxxxxxxxxxxx name</div> <div class="span3"> <input type="text" class="text" /> </div> </div> <div class="row"> <div class="span3">xxxxxxxxxxxxxx from</div> <div class="span3"> <input type="text
In my database I have for every entry one uri to a picture on my mobile phone. To display it on the phone, there is a CustomAdapter for the Listview. Now, I want to display the picture in the ListView and get the following error message: 05-13 12:20:34.234: E/BitmapFactory(17684): Unable to decode stream: java.io.FileNotFoundException: /external/images/media/10139: open failed: ENOENT (No such file or directory) BitmapDrawable: cannot decode external/images/media/10139 It happens at this function: @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolderEreig
I have looked thoroughly on the internet for an answer to this question, but it seems to be too specific for an answer anywhere else. This is my last stop. To preface, this is not a homework problem, but it is adapted from an online Coursera course, whose quiz has already passed. I got the correct answer, but it was mostly luck. Also, it is a more of a general programming question than anything related to the course, so I know for a fact that it is within my right to ask it on a public forum. The last thing is that I'm trying to do this in MatLab; however if you have an answer that is in C++ o
I have a pandas dataframe, df: c1 c2 0 10 100 1 11 110 2 12 120 How do I iterate over the rows of this dataframe? For every row, I want to access its elements (values in cells) by the name of the columns. For example: for row in df.rows: print(row['c1'], row['c2']) I found a similar question, which suggests using either of these: for date, row in df.T.iteritems(): for row in df.iterrows(): But I do not understand what the row object is and how I can work with it.
I have a table, where I need to get the contacts from. So I use a complex query to retrieve all the contacts from my "sms" table. However, it should only count the records for the provided "imei" field, but my query keeps returning all the counts for the specific contact. Below is the code is use: $sql = $this->db->query(' SELECT t1.mnumber AS t1_number, t1.mcontent AS t1_content, t1.mcontact as t1_contact, SUM(t2.TOTAL) AS mTotal FROM sms t1 JOIN (SELECT mContent, mcontact, COUNT(mNumber) AS TOTAL, mnumber, MAX(mID) mID FROM sms GROUP BY mContact) t2 ON t1.mcontact = t2.mcontact AND t1.mid =
I have a class country with an arraylist that stores countries. I have created a get and set to add and get items from specified indexes from the array list but i wont work. Whenever i call an index from the arraylist i get an out of bounds exception because the array is empty or at least seems to be. public class country extends Application { public ArrayList<country> countryList = new ArrayList<country>(); public String Name; public String Code; public String ID; public country() { } public country(String name, String id, String code) { this.Name = name; this.ID = id; this.Code = code; } pub
In WordPress, I need a function that returns the email address of the currently logged-in user (specifically for users with the Author role). Is there a built-in WordPress function to retrieve this information?
I have some issues to download a directory though mac's terminal. On Windows: svn+ssh://[email protected]/home/netimage/svn/xxxxx.dk2 I've tried it though mac terminal via. this without luck. svn co http://xxxxxx/home/netimage/svn xxxxxx --username netimage also tried svn co http://xxxxxx/home/netimage/svn/xxxxx.dk2 --username netimage My password keyphrase is in "ssh add -K mypasswordkey.ppk" What to do?
I am using Ruby SDK for AWS:S3. I have files listed in bucket like below: s3://client1/client_name_delivery1_2013-05-01.txt s3://client1/client_name_delivery2_2013-05-01.txt There may be many files for particular date. I want to fetch all the files for particular date e.g. for 2013-05-01. I found prefix option of objects method of bucket however did not find something like suffix How should I fetch files by suffix?
im currently working on a c++ application which is using a c library which needs a callback implemented from my side for example the callback is defined as this: int onWrite(char *what, char *buffer, size_t size, off_t offset); i have std::set which needs to be formated and written into buffer and take care of size and offset where size is buffer's size and offset how many bytes have already been processed is there a c++ way where i can stream-like into buffer? i think about something like this: SomeSTLStandardStream stream(buffer,size); stream.ignore(offset); // to drop the first n offset byt
I'm investigating how to develop a decent web app with Python. Since I don't want some high-order structures to get in my way, my choice fell on the lightweight Flask framework. Time will tell if this was the right choice. So, now I've set up an Apache server with mod_wsgi, and my test site is running fine. However, I'd like to speed up the development routine by making the site automatically reload upon any changes in py or template files I make. I see that any changes in site's .wsgi file causes reloading (even without WSGIScriptReloading On in the apache config file), but I still have to pr
I'm working with a winforms application that is targeting .net 4.5 and I really need to inspect the UI elements. I've used Snoop to inspect wpf elements in the past, and I've come across Hawekeye as well. However, it appears hawkeye is not compatible with .net 4.5. Are there any tools out there than can give me similar results?
I already developed fully-fledged video chat application in Java with Swing but now my requirement is to make that application web based. So where to I start? Is there any hint or any tool that convert my application into web based application?
How we can handle SSL certificate errors for chrome and internet explorer with selenium web driver. When I am working with Firefox it is working fine. Could you please provide me the solution to handle SSL certificate error. Below is the code i tried. // For Chrome @Test public void CRconfiguration() throws Exception { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); System.setProperty("webdriver.chrome.driver", "D:\\Softwares\\Selenium softwares\\drivers\\chromedriver.exe"); _driver = new ChromeDriver(capabilities
I've absolutely exhausted Google and I can't find a solution to this problem. When click a button on my .aspx page, the corresponding function is not called from .aspx.cs file. I'll just post my code and see if there are any takers. AddUser.aspx: <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="AddUser.aspx.cs" Inherits="AddUser" %> <asp:Content ID="tb_AddUserHeader" ContentPlaceHolderID="tb_HeaderPlaceHolder" Runat="Server"> </asp:Content> <asp:Content ID="tb_AddUserContent" ContentPlaceHolderID="tb_ContentPlaceHolder" Runat="Server"> <h1>Add Use
I have a significant amount of data which I must analyse in Excel (this would be much easier in a DB, I realize). Each line item has a T/F indicator for it's membership in a given category and I would like to get a correlation of volume and price for each category across months. The quantity of data I am talking about is between 8-30k records at a time. We use Excel 2010 at my office Example data: State | Cat.1 | Cat.2 | Cat.3 | TimeStamp | Volume | Price WA | TRUE | FALSE | FALSE | 01/31/13 12:00 | 113.1 | 35.64 WA | TRUE | TRUE | FALSE | 01/31/13 13:00 | 65.2 | 32.52 FL | TRUE | FALSE | TRUE
I am trying to read data from a database. I imported the database in the sqlite manually and now just want the connection made in android application and want to read the rows and display them in the text fields, however the code I am using is either making the database new every time or is creating the table again in that database and I get a run time error. My code is : package com.example.dbexample; import java.util.ArrayList; import java.util.List; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteData
I have the class Devices with Platform as one of the properties: public partial class DevicesCollection : ObservableCollection<Device> { public DevicesCollection() : base() { } } public partial class Device : INotifyPropertyChanged { private string hostIP; private string password; private int platform; private string status = ""; private int loop = 1; public Device() { } public Device(string ip, string pswd, int tp) { HostIP = ip; Password = pswd; Platform = tp; Status = "Disconnected"; Loop = 1; } As well as I have Platform class: public partial class PlatformsCollection : ObservableCollectio
I am building a web application that interact with documents for later printing. In some points is similar to Google Docs. I am considering using cm/mm on the CSS of my documents pages because it will help me on the document generation. Example: // A4 size .page { width: 210mm; height: 297mm; margin: 2cm 5cm; } <div class="page"> ... </div> What are the main issues of following this approach?
I'm wondering if there's any possible way how to use or implement SELECT query into JavaM API for GT.M database system. I'm using version 0.1, since I haven't found any other version ( https://github.com/Gadreel/javam/blob/master/README.md ). If there's no option yet, could you recommend me any other API for this DBMS, using Java? I know there's some gtm4j ( http://code.vistaehr.com/gtm4j ), but it takes advantage of springframework, which is not convenient for me. I'm new with GT.M and I just want to test, how to connect to it using Java and use some basic queries.
I'm programming an STM32F4 in C (GCC), and it's an ARM Cortex-M4. I see all examples finish their main() function with an infinite loop, even when the rest of the program will be executed from interrupts. If I try to remove the loop from my program, the interrupts stop being fired too. Why can't I just remove this loop and exit the main thread? Here is the assembly (I guess it's Thumb-2, but I can't read that, even with the documentation): LoopFillZerobss: ldr r3, = _ebss cmp r2, r3 bcc FillZerobss /* Call the clock system initialization function.*/ bl SystemInit /* Call the application's entr
On mac snow leopard, I have installed Apache Solr 4.2.0 using brew and triggered the server using the below commands, Usage: $ solr path/to/config/dir When I try to access the admin page in browser using below link and the page with SolrCore Initialization failure occurs as below, http://localhost:8983/solr/admin collection1: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load config for solrconfig.xml The page also has message, There are no SolrCores running. Using the Solr Admin UI currently requires at least one SolrCore. Any help regarding this is grea