While working on a production issue, I stumbled on something, that I thought was, strange in a SELECT statement in PB. Essentially, I have a simple SQL that selects into a Variable. I guess, the original developer (I am only maintaining this code) expected only one row in this case. .... // Date ld_CutOff .... SELECT TO_DATE(PARM_VALUE, 'DD-MON') INTO :ld_CutOff FROM SYSPARM WHERE PARM_NAME = 'CUTOFF_DATE' ; .... Now the table has more than 1 that match the criteria. Thus, the SQL errored (Select Returned more than 1 row) as expected. (Based on prior experience in PB and PL/SQL,) I expected th
I am using Selenium 2 Webdriver. I want to click on a link but the link text can be "Linktext" or "LINKTEXT". Is ther a better way than that: List<WebElement> list = driver.findElements(By.linkText("Linktext")); if(list.size()>0){ driver.findElement(By.linkText("Linktext")).click(); } else { driver.findElement(By.linkText("LINKTEXT")).click(); } API and google didnt really help me. Any ideas how to ignore upper case?
Why do certain random strings produce colors when entered as background colors in HTML? For example, bgcolor="chucknorris" produces a red background: <body bgcolor="chucknorris"> test </body> Conversely, bgcolor="chucknorr" produces a yellow background: <body bgcolor="chucknorr"> test </body> This holds true across various browsers and platforms. What’s going on here?
This is my mysql query: $acountry = 1; $this->db->where_in('varcountry', $acountry); $val = $this->db->get('tblagencies')->result(); In database table the varcountry filed is stored like this 1,2,3,4; its type is varchar. Each row in the table has multiple countries -- that is the reason to use varchar datatype. I want to select table rows which have $acountry value in the field varcountry. How can I do that? Is the above code correct?
I have the fllowing code strMyFormat1 = oWB.Worksheets(strSelectedSheet).Range(strStemLocation).NumberFormat WordApp.Selection.TypeText Format(oWB.Worksheets(strSelectedSheet).Range(strStemLocation), strMyFormat1) & vbCr But it does not retain the format of the Excel Cell e.g. if the Excel Cell is bold I want that to be retained when entering into my word doc I know it works with copy and paste but I dont want to do that
I have an HTML table 360px wide, which works great. The challenge is that sometimes a url appears http://this/is/a/really-really-really-really-really/long/url in the text. This causes the table to expand horizontally and a scroll bar appears on the bottom. I don't think overflow:hidden will work because half of the text would be hidden. What is the best way to force breaking the line on slashes (/) and dashes (-) in CSS (hopefully)? It should work with IE7+, Chrome, Firefox and Safari. Working in Rails 3 and jQuery.
I want to copy a file to a remote location. This task will run from SQL Server (Agent) scheduler, and thus the COPY will run under the SQL Service account, and I don't want to create matching credentials on the remote machine. Only way I figured was: NET USE X: \RemoteServer\RemoteShare ThePassword /USER:RemoteUserID then I can run a command to copy to X: However, X: cannot be relied upon to be persistent, so I came up with: NET USE X: /DELETE NET USE X: \\RemoteServer\RemoteShare ThePassword /USER:RemoteUserID COPY MyFile X: NET USE X: /DELETE and ignored the initial delete if X: was not alre
I understand what the concept of currying is, and know how to use it. These are not my questions, rather I am curious as to how this is actually implemented at some lower level than, say, Haskell code. For example, when (+) 2 4 is curried, is a pointer to the 2 maintained until the 4 is passed in? Does Gandalf bend space-time? What is this magic?
I need to install the imagick extension for PHP. I have already installed ImageMagick. Then I did "sudo pecl install imagick". After this, I had such output in the console: Installing '/usr/include/php/ext/imagick/php_imagick.h' Installing '/usr/include/php/ext/imagick/php_imagick_defs.h' Installing '/usr/include/php/ext/imagick/php_imagick_shared.h' Installing '/usr/lib/php/extensions/no-debug-non-zts-20090626/imagick.so' But as I'm using XAMPP, my extension directory (as I understand) is /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626. So what should I d
I'd like Sublime 2 editor to treat *.sbt files (to highlight syntax) as Scala language, same as *.scala, but I can't find where to set this up. Do you happen to know?
I've read the BNF grammar for the SQLite CREATE TABLE command found here: http://www.sqlite.org/lang_createtable.html. I was wondering how to create a link table. Let's say I have two tables: houses and electrical_items. I want to create a link table to have the house_id and the item_id as a composite key. However, SQLite doesn't appear to allow a primary key to be a foreign key? N.B. I want a third field pap_tested which stores the date the electrical item in the house was pap_tested. This linking table via composite primary key seems like the best approach.
Im trying to implement a web service for an android app (with Phonegap) I have an Interface: package webservice; import javax.jws.WebMethod; import javax.jws.WebService; @WebService public interface HelloService { @WebMethod(operationName = "hello") public String hello(String name); } and the implementation of it: package webservice; import javax.jws.*; import android.webkit.WebView; import com.phonegap.DroidGap; @WebService public class HelloServiceImpl implements HelloService { //Constructor for a invocation with javascript public LottozahlenServiceImpl(DroidGap gap, WebView view){ } public
The API I'm trying to call requires a POST with an empty body. I'm using the WCF Web API HttpClient, and I can't find the right code that will post with an empty body. I found references to some HttpContent.CreateEmpty() method, but I don't think it’s for the Web API HttpClient code since I can't seem to find that method.
There is an algorithm for triangulating a polygon in linear time due to Chazelle (1991), but, AFAIK, there aren't any standard implementations of his algorithm in general mathematical software libraries. Does anyone know of such an implementation?
I am trying to run a simple struts 2 HelloWorld application ,when i run it ,says "There is no Action mapped for namespace / and action name HelloWorld.Can somebody please help. WARNING: Could not find action or result There is no Action mapped for namespace / and action name HelloWorld. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189) at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39) at com.opensymphony.xwor
Let's say I have the following commits in my master: master : ---A----B----C----D---E Now I need to create new branch from commit A and include only changes in commit C master : ---A----B----C----D---E \ branch2 : \-------C So I need to put in my branch2 commit C without B How can I do that ?
On CSS we can write : <div style="float:right"> Text1 </div> <div style="float:right"> Text2 </div> by this way Text1 will appear on the right .. I'm trying to do the same with LinearLayout , the View should appear from right to left : <LinearLayout android:id="@+id/linearLayout1" android:layout_gravity="right" android:gravity="right" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:weightSum="2" android:orientation="horizontal"> <!-- First Column should be on the right : Text1--> <LinearLayout android:id="@+id/linearLayout2" android:lay
I have got problem with FileUpload control. I have this one, two drop down list, text box and button. If I select in first dropDownList "Yes" second one become disable and set value on NO (In second ddl I have two option YES or NO and in first one as well) however if I select NO in first dropDownList I posible to choose both option in second dropDownList. First ddl change second one on postBack using selectedIndexChanged evet and when it happends I loose file name in UploadFile control which I set before. Code sample: <asp:FileUpload ID="fuUploadGeometry" runat="server" Width="100%" /> <asp:Dr
I want a free command line application or Java application that I can run on one of my JavaScript files and obfuscate it. I prefer to run it when I compile my website in visual studio locally, but it can be a software that runs locally and I will run it manually. I want a strong obfuscator that even when reversed engineer, it will be very difficult to understand the code. My project was built with ASP.net and C# if that matters for the answer. Thanks!
I'm using WebDriver and Java to automate some web pages. I have a scenario that I'm not sure the best way to manage. A website provides the option to leave a comment, but if you are not a user it sends you the email with a link to click to activate the user and add the comment. Is there a clean way to automate leaving the site to wait for the email, and when it's found clicking the link.
I've C#-WCF/Winforms application.It inserts 450,000 plus records in a staging table in Oracle database using Oracle Client API and a stored proc having a simple insert query. Its taking about 15 minutes to insert records in db and sometimes the records dont get inserted too..giving all sorts of timeout errors at the wcf side. Is there any efficient way of doing these inserts? Thanks for reading. Here's my code which does the batch insert: OracleTransaction tran = null; UpdateRowSource oldURS = this.cmd.UpdatedRowSource; OracleCommand oldCmd = this.dbAdapter.InsertCommand; int oldUBS = this.dbA
I work on some ASP.NET projects in collaboration with other developpers and I'm thinking about building a homemade logging solution. But before starting anything I would like to know if something similar to what I'm intended to code already exists. I'm looking for a tool, framework or whatever, that can be used to create a logging webservice. The service will be reachable by all our websites. It offers a set of methods to send logging information to the service which will store them in a database. We can imagine a method named "Trace(String message, TraceLevel level)" where the first argument
We have a team project in TFS 2010. This team project is used as a container for a few smaller, related projects in order to share bugs, work items, etc. My question, how do I add a new VS solution to this team project? I created the new solution in my local working folder. The team project is already created on the server. When I go into the Source Control Explorer and try to add the new solution to the project, I can’t add the new solution because I don’t have a destination folder mapped. I can’t map the destination folder because I can’t figure out how to add a new folder to the server proj
I need some help with concatenating in JavaScript. I've got an array. The value of its property: (args['type']) is TERRAIN. In another array, I've got: var myOptions = { zoom: parseInt( args['zoom'] ), center: latlng, mapTypeId: }; I want to set mapTypeId to google.maps.MapTypeId.TERRAIN (by using whatever value is held in args['type'] instead of hardcoding TERRAIN ). How do I concatenate it in this situation?
I don't want to really fly there, it would take too long and probably would be prohibitively expensive for me. But nevertheless I am really wondering if it is already possible, and if so, how expensive it is and which companies might offer such ventures?
I want to use PowerShell with WebDAV (https) to download multiple files from a folder. The name from the download files is unknown. So my plan is to download all files from this folder and create a cleaning job at the server. At the moment I´m searching for a good PowerShell with WebDAV example. Does anybody know a good example?