Is it possible to search through blob text using sql statement?
I can do select * from $table where f1 like '%foo%' if the f1 is varchar, how about f1 is a blob? Any counter part for this?
Can someone point me at what I should be doing under scala 2.10 in place of this deprecated type witness on Manifest?
reflect.ClassManifest.singleType(foo) <:< barManifest
Honestly, my goal here is just to replace it with something that doesn't raise a deprecation warning. I'm happy to use the new reflection API.
Here's the code in question in context, if that's important:
https://github.com/azavea/geotrellis/blob/master/src/main/scala/geotrellis/feature/op/geometry/geometry.scala#L45
I have data that looks like this:
foo 78 xxx
bar yyy
qux 99 zzz
xuq xyz
They are tab delimited.
How can I extract lines where column 2 is empty, yielding
bar yyy
xuq xyz
I tried this but doesn't seem to work:
awk '$2==""' myfile.txt
Hi Folks,
Can someone tell me since which ECMA version the IN operator is available and which browsers (versions) support it ?
Explanation:
The IN-operator can be used like the following:
var myObject = {
Firstname: 'Foo',
Lastname: 'Bar'
};
if('Lastname' in myObject){
// Lastname is an attribute of myObject
}
Hi,
I want to create a template class in C#, for example:
public class Foo<T>
where T must inherit from a known class.
I cant seem to find the syntax for that.
Thanks, Malki.
How to declare an array in method declaration in gen-class?
(ns foo.bar
(:gen-class
:methods [[parseString [String Object] Object]]))
That works fine. But the return type is really an array. How I can declare that so Java can understand it?
I am unable to get this event to fire:
$("#about").click(function()
{ //I have put alert("foo") here, won't fire
$("#about_stuff").toggle();
});
snip
<li ><a href="#a" id="about">About</a>
I've tested the toggle line in Firebug and it successfully works - I am at my wits end, I've checked it against multiple examples and it persistently refuses to work.
Hi,
I am getting the following error: Invalid authorization specification
I've narrowed down the error to my connection string. I have verified the server name, database, user & password are correct. Here is the string:
"Provider=SQLOLEDB;Server=xxxxx.db.12345.hostedresource.com;Database=foo;UID=fooUser;PWD=fooPW"
The SQL server is hosted on Godaddy so I don't have access to its settings.
Please help, I've scoured the internet for a solution!
In Zend Framework how can I set the title properties of option elements within a select?
Desired output:
<option value="foo" title="bar">option</option>
The unmanaged function(pure c++):
void fooC(float& result);
I define the wrapper as (managed wrapper, c++\cli):
void foo(float% result) //managed interface
{
fooC(???);//how to call unmanaged function?
}
how to pass reference parameter in the wrapper?
I have a POCO (Plain Old CLR Object)
public Foo
{
public virtual int Id { get; set; }
public virtual Dictionary<string, string> Stuff { get; set; }
public virtual string More { get; set; }
}
Using the model first approach (i.e. I don't have a data model yet), how would I handle persisting Stuff (Dictionary)?
Given an IList<Foo> with a data set that looks like this:
ID CHILD PARENT TYPE
1 102 101 UPSELL
1 103 101 UPSELL
2 102 101 BONUS
2 104 103 BONUS
3 102 101 BONUS
4 102 101 PRODUCT
4 104 102 PRODUCT
How can I use LINQ to find the intersection of Parent and Child values withing each ID?
Desired output is
ID CHILD PARENT TYPE
4 102 101 PRODUCT
I'm looking to write a custom route that would allow the following
http://localhost/blog/tags/foo
Currently this is what actually works
http://localhost/tags/Index/nhibernate
I've tried the following with no success - any help would be appreciated
routes.MapRoute(
"Tags",
"{controller}/{id}",
new { Controller = "Tags", action = "Index", id = UrlParameter.Optional }
);
routes.MapRoute(
"Tags",
"blog/{controller}/{id}",
new { Controller = "Tags", action = "Index", id = "" }
);
I want to modify an internal webpage to strip away some of the onclick behavior of certain links.
The internal webpage has a bunch of links like:
<a href="/slm/detail/ar/3116370" onclick="rallyPorthole.showDetail('/ar/view.sp','3116370','pj/b');return false;">foo de fa fa</a>
How can I do an extension to Chrome so it does the following:
for link in all_links:
if link's href attribute matches '/slm/detail/ar/...':
remove the onclick attribute
Hello
I have a loop created with each, check this example:
$('.foo').each(function(i){
//do stuff
});
Is there any possibility to run a functions when this loop has ended? Couldn't find it on docs or Google.
I can make it work without this kind of solution, but it's always good to search for and use the simpliest methods.
Martti Laine
module FooHelper
def foo
haml_tag(:div) do
haml_content("bar")
end
end
end
When I test this I get:
NoMethodError: undefined method `haml_tag'
This code is perfectly valid and works in a development/production environment.
It's something to do with having the haml helpers properly loaded in the test environment.
Thanks!
I'm in a Windows Command Line and want the parent folder in a variable.
Assuming current directory is "C:\foo\bar", how can I get the value "bar"?
I'm expecting something like a "find last backslash in CD and that's it".
And please, no powershell references; I want plain old Windows Command Line operations.
I know the process id of an application in Mac OS X. How can I switch to it (using applescript, or python, or whatever)?
By "switch", I mean, put in focus.
The usual solution is to use the applescript code tell application "Foo" activate, but here the name is not useful because I have many instances of the same application running. I am however able to get the process id of the application.
How can I switch to this application programmatically?
Right now I cant find a way to generate a callback between lines 1 and 2 here:
f = Foo.new
f.some_call
f.save!
Is there any way to simulate what would be effectively an after_new callback? Right now I'm using after_initialize but there are potential performance problems with using that since it fires for a lot of different events.
I have some nested datastructures, each something like:
[ ('foo', [ {'a':1, 'b':2},
{'a':3.3, 'b':7} ]),
('bar', [ {'a':4, 'd':'efg', 'e':False} ]) ]
I need to compare these structures, to see if there are any differences. Short of writing a function to explicitly walk the structure, is there an existing library or method of doing this kind of recursive comparison?
How can I loop through all members in a JavaScript object including values that are objects.
For example, how could I loop through this (accessing the "your_name" and "your_message" for each)?
var validation_messages = {
"key_1": {
"your_name": "jimmy",
"your_msg": "hello world"
},
"key_2": {
"your_name": "billy",
"your_msg": "foo equals bar"
}
}
I want to pass data to id
<script language="javascript" src="/foo.aspx?id=1"></script>
I have this code in a aspx page.
The data should be passed on load, before this code is being executed.
how can i do that?
I want to open files using the class loader. However I always get a FileNotFoundException. How do I create a new File using the URL? I don't want to open it as a stream just as a file.
URL url = VersionUpdater.class.getResource("xslt/screen/foo");
File f = ...