I'm fairly new to cakephp and I'm having a problem with a complicated find function on my models.
I have a number of Groups each containing a number of Users, and each group can make a number of Orders. Each order consists of a number of OrderAmounts which contain an amount and a user_id (relating to a User).
I have a find which finds ...
Hello,
I have constructed a map and loaded it with data. If I iterate over all the elements I see they are all valid. However, the find method doesn't find my item. I'm sure it's something stupid I am doing. Here is snippet:
// definitions
// I am inserting a person class and using the firstname as the key
typedef std::map<char*,Per...
Hello everyone, I am trying to make a find, find next function for my program, which I did manage to do with this code:
int findPos = 0;
private void button1_Click(object sender, EventArgs e)
{
try
{
string s = textBox1.Text;
richTextBox1.Focus();
findPos = richTextBox1.Find(s...
I have several configuration files on Windows Server 2008 nested like such:
C:\Projects\Project_1\project1.config
C:\Projects\Project_2\project2.config
In my configuration I need to do a string replace like such:
<add key="Environment" value="Dev"/>
will become:
<add key="Environment" value="Demo"/>
I thought about using batch ...
I have a folder with a bunch of log files. Each set of log files is in a folder detailing the time and date that the program was run. Inside these log folders, I've got some video files that I want to extract. All I want is the video files, nothing else. I tried using this command to only copy the video files, but it didn't work because ...
From http://search.cpan.org/~pajas/XML-LibXML-1.70/lib/XML/LibXML/Node.pod:
find evaluates the XPath 1.0 expression using the current node as the context of the expression, and returns the result depending on what type of result the XPath expression had. For example, the XPath "1 * 3 + 52" results in a XML::LibXML::Number object bein...
I have a bunch of datatemplates I use to display various sql-views in an ItemsControl. I don't know which datatemplate i'm going to use until run-time. (every view has different columns)
Next to that, I made a generic dynamic datatemplate for all those views that don't need anything special.
When I display the view I want to first look ...
Hello, Ive been making a find, find next function for my richtextbox, so I have these check boxes to let the user search by whole word or case sensitive or both, and I got the first two, to work but I can't get it to work with both case a whole word checked, here's my code:
if (isWhole == true && isCase == true)
{
...
Hey guys,
i wonder how i can solve the following problem.
i have a horizontal scrollbar with floating divs side by side (.picture_holder). I wonder if i can find() this elements and animate a scroll event to the startpoint of every image. If i reach the last div i it to scroll to the first.
#
$('.next').click(function(){
#
$('html, bod...
Hello, I'm using beautiful soup (in Python). I have such hidden input object:
<input type="hidden" name="form_build_id" id="form-531f740522f8c290ead9b88f3da026d2" value="form-531f740522f8c290ead9b88f3da026d2" />
I need in id/value.
Here is my code:
mainPageData = cookieOpener.open('http://page.com').read()
soupHandler = BeautifulSo...
Hi i'm using this for getting data:
Topic.find(:all, :include => ...,
:conditions => @core ? ["cores_topics.id = ? AND visible = 1 AND (distance < ? OR cores.id IN (?))",@core.id, @user_location[3].to_i, @user_friends] :
["visible = 1 AND (distance < ? OR cores.id IN (?))", @user_location[3].to_i, @user_friends],
...
how can i rewri...
So, I've decided to get my feet wet with MongoDB and love it so far. It seems very fast and flexible which is great. But, I'm still going through the initial learning curve and as such, I'm spending hours digging for info on the most basic things.
I've search throughout the MongoDB online documentation and have spent hours Googling th...
I'm trying to find an item in a list of values based on another value using a lambda expression using the Find method. In this example I'm expecting to get back -1000, but for the life of me, I just can't come up with the proper lamda expression. If that sounds confusing I hope the code and comments below explain it better.
TIA.
using S...
I have 3 relevant tables.
User, Orders, and Viewables
The idea is that each User has got many Orders, but at the same time, each User can View specific other Orders that belong to other Users. So Viewables has the attributes of user_id and order_id.
Orders has a
:has_many :Users, :through => :viewables
Is it possible to do a find thr...
Is there any way (or calculator) to determine the relationship between two numbers.
...
The following UNIX one-liner looks for Python files below the CWD and adds them to a TAGS file for Emacs (or we could do the same with Ctags).
find . -name *.py -print | xargs etags
This breaks if the CWD has a space or other unusual character in its name. -print0 or -ls don't seem to help, in spite of what man find says. Is there a n...
Hi All,
I have two tables, photos and tags, with a standard photos_tags link table.
My models show Photos HABTM Tags, and I can update both fine with the links updating too.
My question is: say I now want to find all Photos tagged with both "Sunset" and "Ocean" - how do I go about that?
I've tried doing an inner join as per Nate's Ba...
hi. maybe it's a bit strange - and maybe there are other tools to do this but, well..
i am using the following classic bash command to find all files which contain some string:
find . -type f | xargs grep "something"
i have a great number of files, on multiple depths. first occurence of "something" is enough for me, but find continue...
In VS2008 when I do a find in files across entire website which includes a robots.txt file, I notice that the search pauses for 20-30 secs on robots.txt.
Any ideas how to resolve this issue
...
I have a list of directories
/home
/dir1
/dir2
...
/dir100
Some of them have no files in it. How can I use Unix find to do it?
I tried
find . -name "*" -type d -size 0
Doesn't seem to work.
...