How can I build a web page that allows a logged on user of a Windows 2003 domain change details of his account (probably just First Name, Surname, and Phone number)?
I am not working with XSLT not too long. I read that variable of XSLT can't be updated on the fly, so how can i do the following task.
I want to sum up Purchase & Sales and put them into a variable, and make some decision according to these values. (For example, if Purchase is greater then sales then do something if not, do something else)
<rows>
<row>
<col attr2="Purchase" >100.00</col>
<col attr2="Sales" >100.00</col>
</row>
<row >
<col attr2="Purchase" >19.16</col>
<col attr2="Sales" >12.94</col>
</row>
<row >
<col attr2="Purchase" >0.67</col>
<col attr2="Sales" >2.74</col>
</row>
<row >
<col attr2="Purchase" >71.95</col>
<col attr2="Sales" >61.54</col>
</row>
<row >
<col attr2="Purchase" >3.62</col>
<col attr2="Sales" >14.72</col>
</row>
<row >
<col attr2="Purchase">8.80</col>
<col attr2="Sales">1.22</col>
</row>
<row >
<col attr2="Purchase" >-4.28</col>
<col attr2="Sales" >6.53</col>
</row>
</rows>
if anyone knows, please help me.
Hi guys,
I've got the scenario with two NSManagedObjects, Arm and Person. Between them is a many-to-one relationship Person.arms and inverse Arm.owner.
I'd like to write a simple NSPredicate where I've got the NSManagedObject *arm and I'd like to fetch the NSManagedObject *person that this arm belongs to. I could make a textual representation and look for that, but is there a better way where I can look it up by identity? Something like this perhaps?
NSEntityDescription *person = [NSEntityDescription entityForName:@"Person" inManagedObjectContext:MOC];
NSPredicate *personPredicate = [NSPredicate predicateWithFormat:@"%@ IN arms", arm];
Cheers
Nik
I'm a little new to drupal but have been using things like devel module and theme developer to speed up the learning process.
My question, is it possible to theme an entire views BLOCK from a single views tpl.php page OR even a preprocess?
When I'm grabbing the $view object I can see results $node-result, it has all of the results, but it doesn't have all my views fields. I'm missing things like, node path, taxonomy titles and paths, etc.
From my understanding, Drupal wants you to individually theme EACH output field. It seems rather superfluous to create so many extra templates when I've already got over HALF of my results coming through the $view object
Would outputting node over field make this easier? Or am going in the wrong direction with $view-result?
Thanks!
I've read the terms of service, and, from what I understand, I'm not allowed to store any information I retrieve from the Google Maps API. Are there any exceptions to this?
More to the point, I'm planning on building an application that shows the user several points of interest (like restaurants, libraries etc) at a certain distance around a location he chooses (it can be in one city or more, depending on the distance he chooses). There are two problems:
The first problem is that (at least for my country) the geocoder doesn't locate exact addresses, at best it only locates street names (but completely ignores street numbers) in larger cities. It is even worse for smaller rural areas. So the only way to accurately show the places on the map is by storing their coordinates in the database.
Another problem seems to be with calculating distances. To show the points located below a certain distance from the user, it would mean I would have to use GDirections to get all distances between the user's location and the other points, to see which ones to show. That would be really slow for the user (since I also have to set a small delay between requests), and it would also send a pretty large amount of requests to google. Would I be allowed to store those distances in a database?
The users would not be able to access a list of all the stored information, they would only see the names of the places, and a map with some markers on it.
Thank you.
I have the following code:
HttpClient FETCHER
HttpResponse response = FETCHER.execute(host, httpMethod);
Im trying to read its contents to a string like this:
HttpEntity entity = response.getEntity();
InputStream st = entity.getContent();
StringWriter writer = new StringWriter();
IOUtils.copy(st, writer);
String content = writer.toString();
The problem is, when i fetch http://www.google.co.in/ page, the transfer encoding is chunked, and i get only the first chunk. It fetches till first "".
How do i get all the chunks at once so i can dump the complete output and do some processing on it ?
If you've used GoToMeeting, that's the type of ID I want. I'd like it to be random so that it obfuscates the number of items being tracked and short, so that it's easy to reference manually; UUIDs are way too long. I'd like to avoid hitting persistent storage merely for performance reasons, but I can't think of any other way to avoid collisions. Is 9 digits enough to do something time-based?
Hi there
I have a recruitment portal that people can use to advertise and search for jobs.
I would like the recruiters to be able to add a small javascript snippet to their personal websites, that will list jobs on my site.
how can i go about this?
I have webservices set up so the javascript can just call that, but i also need the result to be formatted and placed inline.
This should work in a simular way to google adsense.
I would really appreciate a small example
Consider the deletion procedure on a BST, when the node to delete has two children. Let's say i always replace it with the node holding the minimum key in its right subtree.
The question is: is this procedure commutative? That is, deleting x and then y has the same result than deleting first y and then x?
I think the answer is no, but i can't find a counterexample, nor figure out any valid reasoning.
EDIT:
Maybe i've got to be clearer.
Consider the transplant(node x, node y) procedure: it replace x with y (and its subtree).
So, if i want to delete a node (say x) which has two children i replace it with the node holding the minimum key in its right subtree:
y = minimum(x.right)
transplant(y, y.right) // extracts the minimum (it doesn't have left child)
y.right = x.right
y.left = x.left
transplant(x,y)
The question was how to prove the procedure above is not commutative.
Hi,
I have a list of rows in an excel sheet which I need to load as historical transactions into a table in my rails applications. I saved the excel file as a csv file. I tried using csv from the standard library but keep getting the following exception CSV::IllegalFormatError.
Not sure how to even figure out where the problem lies. Any suggestions on how to do this.
thanks,
ash
I have a table that lists number of comments from a particular site like the following:
Date Site Comments Total
---------------------------------------------------------------
2010-04-01 00:00:00.000 1 5 5
2010-04-01 00:00:00.000 2 8 13
2010-04-01 00:00:00.000 4 2 7
2010-04-01 00:00:00.000 7 13 13
2010-04-01 00:00:00.000 9 1 2
I have another table that lists ALL sites for example from 1 to 10
Site
-----
1
2
...
9
10
Using the following code i can find out which sites are missing entries for the previous month:
SELECT s.site
from tbl_Sites s
EXCEPT
SELECT c.site
from tbl_Comments c
WHERE c.[Date] = DATEADD(mm, DATEDIFF(mm, 0, GetDate()) -1,0)
Producing:
site
-----
3
5
6
8
10
I would like to be able to insert the missing sites that is listed from my query into the comments table with some default values, i.e '0's
Date Site Comments Total
---------------------------------------------------------------
2010-04-01 00:00:00.000 3 0 0
2010-04-01 00:00:00.000 5 0 0
2010-04-01 00:00:00.000 6 0 0
2010-04-01 00:00:00.000 8 0 0
2010-04-01 00:00:00.000 10 0 0
the question is, how did i update/insert the table/values?
cheers,
Lee
I do not see any Connection Configure dialog popping up when I try connecting 2 webparts.
I even tried using designer to connect webpart even though it gives me confirmation it does not appear to have been connected.... I am totally clueless.
I (and co-hackers) are building a sort of trivia game inspired by this blog post:
http://messymatters.com/calibration.
The idea is to give confidence intervals and learn how to be calibrated (when you're "90% sure" you should be right 90% of the time).
We're thus looking for, ideally, thousands of questions with unambiguous numerical answers.
Also, they shouldn't be too boring.
There are a lot of random statistics out there -- eg, enclosed water area in different countries -- that would make the game mind-numbing.
Things like release dates of classic movies are more interesting (to most people).
Other interesting ones we've found include Olympic records, median incomes for different professions, dates of famous inventions, and celebrity ages.
Scraping things like above, by the way, was my reason for asking this question:
http://stackoverflow.com/questions/2611418/scrape-html-tables
So, if you know of other sources of interesting numerical facts (in a parsable form) I'm eager for pointers to them.
Thanks!
I have a javascript that is calling a function addData(param1,param2,param3,param4) which is calling addClip at the end
And I need to pass those to a backing bean.
<a4j:form>
<a4j:jsFunction name="addClip" action="#{backingBean.goGo}">
<a4j:actionparam name="param1" assignTo="#{backingBean.param1}"/>
</a4j:jsFunction>
</a4j:form>
But I can't seem to pass any values to the backingbean. I've even tried setting a static value for the actionparam. But when I try to do a Systemout on the setParam1 method it only prints out null. Have I missed anything important?
Hi Guys,
I need to work out a period of 6 months (backwards) from a given date.
Example date:
07/06/2010 00:00:00
needs to count back 6 months and display:
07/12/2009 00:00:00
I have been scanning through: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html and non of these functions make sense to me :(
Hope this makes sense and any help would be appriciated.
Kyle
Hi
I have a file that has a single column of numbers. I have to subtract value in row1 from value in row2, row3-row2; row4-row3 , row5-row4 and so on for all the rows . Could anybody help me out with this ?
I have a vector X that contains positive numbers that I want to bin/discretize. For this vector, I want the numbers [0, 10) to show up just as they exist in the vector, but numbers [10,∞) to be 10+.
I'm using:
x <- c(0,1,3,4,2,4,2,5,43,432,34,2,34,2,342,3,4,2)
binned.x <- as.factor(ifelse(x > 10,"10+",x))
but this feels klugey to me. Does anyone know a better solution or a different approach?
mcpeterson
Is there any common way to decompose an expression created by [NSPredicate predicateWithFormat] to objects NSComprasionPredicate, NSExpression and other?
For below example need to disassemble into components.
[NSPredicate predicateWithFormat:@"(0 != SUBQUERY(collection, $x, $x.name == "Name").@Count)"];
I've got a structure which holds names and ages.
I've made a linked-list of these structures, using this as a pointer:
aNode *rootA;
in my main.
Now i send **rootA to a function like so
addElement(5,"Drew",**rootA);
Because i need to pass rootA by reference so that I can edit it in other functions (in my actual program i have two roots, so return will not work)
The problem is, in my program, i can't say access the structure members.
*rootA->age = 4;
for example doesnt work.
Hopefully you guys can help me out.
Thanks!
I have a LAMP server that uses ubuntu 9.10, apache2, mysql5 and php5.
When I login as root through the shell, I run a "ps aux" command and see something like the following
www-data 3151 0.1 4.3 220024 31032 ? S 12:22 0:00 /usr/sbin/apache2 -k start
www-data 3153 0.2 3.6 214776 26020 ? S 12:22 0:01 /usr/sbin/apache2 -k start
www-data 3162 0.3 5.1 225060 36920 ? S 12:26 0:01 /usr/sbin/apache2 -k start
www-data 3163 0.1 4.1 218872 29664 ? S 12:26 0:00 /usr/sbin/apache2 -k start
How come I see multiple lines for www-data? Does each line represent an actual user on my website?
I run into memory issues at times, so I'm trying to determine if these www-data statistics are related.
Hui folks,
I need to be able to store numbers like 3.5 in my table. So I've used the decimal type field. But if I enter 3.5 it round it up to 4. Am I being stupid or is it not the point of decimal to have a decimal point?
Thanks,
Jonesy
I have a server control that wraps an underlying class which manages a number of indexes to track where it is in a dataset (ie: RenderedRecordCount, ErroredRecordCount, NewRecordCount, etc.). I've got the server control rendering great, but OnDataBinding I'm having an issue as to seems to happen after CreateChildControls and before Render (both of which properly manage the iteration of the underlying indexes).
While I'm somewhat familiar with the ASP.NET page lifecycle, this one seems to be beyond me at the moment. So... How do I hook into the iterative process OnDataBinding uses so I can manage the underlying indexes? Will I have to iterate over the ITemplates myself, managing the indexes as I go or is there an easier solution? [edit: Agh... writing the problem out is very cathartic... I'm thinking this is exactly what I will need to do...]
Also... I implemented the iteration of the underlying indexes during CreateChildControls originally in the belief that was the proper place to hook in for events like OnDataBinding (thinking it was done as the controls were being .Add'd). Now it seems that this may actually be unnecessary. So I guess the secondary question is: What happens during CreateChildControls? Are the unadulterated (read: with various <%-tags in place) controls added to the .Controls collection without any other processing?