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 get the following error when I try to run the project created by Zend Framework. Its looking for Zend/Application.php and that is available in the directory that is in my include_path. I do have read permissions on the directory. PHP Fatal error: require_once() [function.require]: Failed opening required 'Zend/Application.php' (include_path='/var/www/vhosts/moderncloud.net/om/library:.:/var/www/vhosts/moderncloud.net/om /library:') in /var/www/vhosts/moderncloud.net/om/public/index.php on line 24 <?php // Define path to application directory //defined('APPLICATION_PATH') // || define('APPLIC
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 have a node app that I wrote, that I run as follows: node.exe app.js inputArg Is there some way I can package this into a .exe by itself? So I can just do something like this? App.exe inputArg I have some way of faking this by using a batch file, so I can do this: App.bat inputArg But this requires that I have all the dependencies and node in that folder, which is not ideal.
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 encountered a code line that looks like this: if ($users == 'all' || $_POST['user'] == 1 && $users == 'admins' || $_POST[ 'user' ] == 0 && $users == 'mods') ... I don't understand how are all these conditions met because there are not parentheses between them :( Is || more important than && ? Which parts get evaluated first?
Why is Maven unable to resolve dependency with maven central when configured with our local Nexus Repository? I setup an in-house Sonatype Nexus repository and configure the maven to check my local Nexus instead of getting artifacts directly from public repositories. Our project was able to download the most artifacts except one artifact in Maven central. Here is the build error: Failed to execute goal on project shindig-gadgets: Could not resolve dependencies for project org.apache.shindig:shindig-gadgets:jar:3.0.0-SNAPSHOT: Could not find artifact com.ibm.icu:icu4j:jar:4.6 in nexus (http://m
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?
Can you just take a tent, take some food and stay for a few days in national park in Sri Lanka? First of all is it legal to do so? For example are campfires allowed? And if it is legal is it safe? Are there any dangerous animals?
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.
Winform application. Is it possible to have devexpress master-detail grid control in winforms where the master and detail grid have no relation between them?? In web application devexpress detal grid doesn't require a relation between the master grid. So is this possible in Winforms application???
I know I can start the emulator AVD by typing emulator.exe @avdname But is there a command to list the available avdnames? Where are this AVD configuration stored?
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 new to iOS application development and I am using XCode4. I am trying to develop an application which uses the camera. For testing is there a way to integrate the built in camera of mac book to iOS simulator..? Thanks.
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
I'm trying to develop my first visual studio extensions project, I have VS10 SDK installed and was able to create a new project and can build it fine, however when I attempt to debug symbols are not loaded. I know that I can debug to VSIX project since I have downloaded a sample project online and it symbols are loaded and break points are being hit fine http://weshackett.com/2009/11/configure-vsix-project-to-enable-debugging/). So must be something specifically to do with the way I have created the VSIX project ( maybe !). One thing I do notice is that the dll and files aren't being copied ov
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 am using several plugins, custom widgets and some other libraries from jQuery. As a result, I have several .js and .css files. I need to create a loader for my site because it takes some time to load. It will be nice if I can display the loader before importing all the: <script type="text/javascript" src="js/jquery-1.6.2.min.js"></script> <script type="text/javascript" src="js/myFunctions.js"></script> <link type="text/css" href="css/main.css" rel="stylesheet" /> ... .... etc. I have found several tutorials that enable me to import a JavaScript library asynchronously. For example, I can do s
I have placed all tld on proper place and checked all setting, still I am in same well. <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> Can not find the tag library descriptor for "http://struts.apache.org/tags-bean"
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.