fasttext_score
float32 0.02
1
| id
stringlengths 47
47
| language
stringclasses 1
value | language_score
float32 0.65
1
| text
stringlengths 49
665k
| url
stringlengths 13
2.09k
| nemo_id
stringlengths 18
18
|
---|---|---|---|---|---|---|
0.028362 | <urn:uuid:7c4a292e-3453-4e6d-a2c5-1b57634249f3> | en | 0.883251 | Take the 2-minute tour ×
While working with a web project in VS2012 on a win8 machine I have gotten an error that is quite commonly found on google, namely the
HTTP Error 500.19 - Internal Server Error
The solution mentioned everywhere is to locate the C:\Windows\System32\inetsrv\Config\applicationHost.config file and change the following:
section name="handlers" overrideModeDefault="Allow"
Alas, i still get exactly the same error.
Things I have tried:
Removing and reenabling IIS in the Windows features menu as this was mentioned as a solution.
Double checked that my app is running as an application, not virtual folder.
share|improve this question
My poor tumbleweed. :( – Bjørn Oct 5 '12 at 12:13
add comment
1 Answer
Provided your not misinterpreting the section that cannot be accesed (error details should mention what section it is) and your app is adding handlers, you could be running afoul of UAC vitualization.
The file gets a virtual version as you try to access it going forward this will be the version you allways get however the real file will still be served to IIS. A way to check is to trigger change that should be writen to aphost from IIS manager (such as windows authentication settings for app different from defaults) and see if you get it when viewing the file
The following goes into details on UAC including VirtualStore http://technet.microsoft.com/en-us/magazine/2007.06.uac.aspx
Try opening file under as admin, disabling UAC is also an option. You can aslo add handlers to your application using IIS manager and removed them from web.config.
Failing all that there are tools provided by IIS to manage configuration such as powershell module and command line.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/12490818/iis-not-picking-up-override-configured-in-applicationhost-config | dclm-gs1-215320000 |
0.054231 | <urn:uuid:bbd0daef-5f28-4ca9-89d1-0130fe6dd005> | en | 0.872669 | Take the 2-minute tour ×
I am struggling how to set a custom property which is suppose to point to an instance of my custom class on an ASP.NET webcontrol.
Sample web control:
public class CustomControl : System.Web.UI.WebControls.Panel
public IFactory Factory { get; set; }
Code behind:
public partial class Main : System.Web.UI.Page
public IFactory GetFactory {
get { return new CustomFactory(); }
public class CustomFactory : IFactory {}
The custom factory get initialized on the code behind. In my markup (not in code behind), I need to set the Factory property on my CustomControl to the instance in my code behind. Any variation of inline code that I tried did not work:
<asp:CustomControl ID="MyCustomControl" Factory="<%GetFactory%>" runat="server" />
<asp:CustomControl ID="MyCustomControl" Factory="<%=GetFactory%>" runat="server" />
Can anyone assist how to do this?
share|improve this question
Why does it have to be in the markup? – Dave Zych Oct 3 '12 at 18:32
To keep the code behind cleaner. – BlueChameleon Oct 3 '12 at 18:37
I'm not sure that's good reasoning - by attempting to keep the code behind cleaner, you're mucking up the markup. I don't necessarily see how adding one line of code makes the code behind messy. – Dave Zych Oct 3 '12 at 18:39
My line of thinking was that the user drops the control into the aspx and sets all its properties there and does not have to go to the code behind to do anything else. – BlueChameleon Oct 3 '12 at 18:42
add comment
1 Answer
up vote 1 down vote accepted
You just can't assign it on the control tag markup, the tag markup is rendered as html and has no logic to do it that way, html won't interpret te result of GetFactory. What you can do is to set if on your markup, not it the control tag property, but inside code brackets just like this:
<%MyCustomControl.Factory = this.GetFactory;%>
share|improve this answer
I tried this, but on the OnInit of the custom control the Factory property is null. Does that code above execute on OnPreRender? – BlueChameleon Oct 3 '12 at 18:43
Doesn't matter if Factory property is null, because you're setting its value to this.GetFactory. What might be null is the control. In order to better understand this, check out what happens on page lifecycle (see Render section) – danielQ Oct 3 '12 at 18:51
What I was trying to say is that I can do what you suggested, but that assignment will happen after the OnPreRender event and that is way too late for me. – BlueChameleon Oct 4 '12 at 13:36
add comment
Your Answer
| http://stackoverflow.com/questions/12714462/how-to-set-custom-object-property-on-asp-net-webcontrol-through-markup?answertab=oldest | dclm-gs1-215350000 |
0.089635 | <urn:uuid:6bff3b77-3bf0-44b6-929e-aad1e48b5e09> | en | 0.778226 | Take the 2-minute tour ×
I have a core data database that is filled up with data coming from a json webservice. But I have a problem with the date. This date is coming back like a string. So first thing I want to do is to transform this string to a NSDate. The second thing is to transform this NSDate in the right format so that I can add a sort descriptor on date.
This is what I have at the moment for how I store my date in the core data database.
NSDateFormatter* df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"MM/dd/yyyy"];
NSDate* d = [df dateFromString:[genkInfo objectForKey:CALENDAR_DATE]];
kalender.date = d;
And how I get my data.
- (void)getKalender // attaches an NSFetchRequest to this UITableViewController
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"Kalender"];
request.sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"date" ascending:YES]];
self.fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:request
Any idea how to do this?
Kind regards and thank in advance
When I do the following log. I get for each record the correct date and a null value
NSLog(@"date = %@",kalender.date);
2012-10-08 19:17:12.125 RacingGenk[596:c07] date = 2013-09-02 22:00:00 +0000
2012-10-08 19:17:12.125 RacingGenk[596:c07] date = (null)
share|improve this question
It is not clear - are you presenting what you have already tried and found not to be working? If so, in what way? On initial inspection, your code looks fine. Your NSSortDescriptor should work with the NSDate object as-is. – NSBum Oct 8 '12 at 17:11
I've edited my code. and it is still not sorting – Stef Geelen Oct 8 '12 at 17:17
"When I log kalender.date I get for each record the correct date and a null value" - What does that mean exactly? kalender has only one date property. Perhaps you can add the NSLog() commands to your code to make clear what is being logged. – Martin R Oct 8 '12 at 17:31
I've edited my code again. Hope this helps. – Stef Geelen Oct 8 '12 at 17:37
So the output is from 2 different objects? One has a valid date and the other not? How is the string from the web service formatted? You should check that [df dateFromString:...] does not return nil. – Martin R Oct 8 '12 at 17:40
show 3 more comments
1 Answer
up vote 1 down vote accepted
As it turned out in the discussion, the format used by the date formatter did not match for date format sent by the web service. Using
[dateFormatter setDateFormat:@"dd/MM/yyyy"]
fixed the problem.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/12786245/sorting-a-fetchrequest-on-date | dclm-gs1-215370000 |
0.202689 | <urn:uuid:4824b9ad-c7db-4503-afc0-91092e27360d> | en | 0.886471 | Take the 2-minute tour ×
I'm referring to RemoteObjects specified in the Chrome Debugging API 1.0 documentation.
I'm trying to associate subsequent call frames to previous call frames.
Let's say: I set breakpoints on the functions a,b,c,d. I run the following: a(b(c(d())));
The execution pauses, and I receive the Debugger.paused notifications for each function and resume each time. On each Debugger.paused notification, I receive an array of CallFrames. However, the objectIds in each CallFrame object and its properties are all unique. As such, I am unable to compare them by their id.
Anyone knows some way to do this?
The Runtime.callFunctionOn and Runtime.evaluate allow me to execute code on single objects based on their id, however, it doesn't seem to allow me to execute code on multiple objects so I can't do something like check CallFrameA.objectX === CallFrameB.objectY (for example).
I'm also not sure if retrieving the objects through the API and doing a deep equality check is a good idea. One way would be doing a recursive Runtime.getProperties call and checking equality of all the properties except for the unique objectId.
share|improve this question
add comment
1 Answer
1. I suggest you file an issue against the Chromium or WebKit to support unique ids for objects – a thing implemented V8's native debug protocol.
2. Actually you can provide several ids to Runtime.callFunctionOn via its arguments parameter.
share|improve this answer
Thank you for pointing out that I can pass multiple arguments in the Runtime.callFunctionOn method. I missed that, somehow. I'm trying that out now and will see how far I go with that. – sirhc Oct 18 '12 at 21:56
add comment
Your Answer
| http://stackoverflow.com/questions/12850471/how-do-you-compare-remoteobjects-during-remote-debugging?answertab=active | dclm-gs1-215390000 |
0.037544 | <urn:uuid:9b325b44-4bf8-4cba-a6a1-c6e62b63fd39> | en | 0.888451 | Take the 2-minute tour ×
Does boost chrono provides time stamp with nanoseconds resolution?? If yes how to get the time stamp?
share|improve this question
As you insist. The best you can theoretically get since Vista is by using HPET (High Precision Event Timer). See here en.wikipedia.org/wiki/High_Precision_Event_Timer. The problem is how to get it via QueryPerformanceCounter() that uses the HPET when available and set in BIOS. – SChepurin Oct 18 '12 at 15:15
@SChepurin "The best you can theoretically get since Vista is by using HPET"? Why if my processor works with 3.33 GHz it is because it is the fastes clock in OS? – Narek Oct 19 '12 at 8:40
add comment
2 Answers
up vote 2 down vote accepted
Nanoseconds resolution ? On which hardware do you want to run your program ? On my PC, my performance counter has a frequency of approx. 4 Mhz, so a tick last 250 ns.
As answered here, boost chrono can give you the nanosecond resolution, but you will not be sure of the measure's accuracy.
share|improve this answer
So how to know my performance counter frequency? And is this the only criterion that indicates the precision? – Narek Oct 18 '12 at 18:11
as stated by @SChepurin, QueryPerformanceFrequency() retrieve your HPET's frequency clock (in Hz) if you work on Windows. For Linux, there should be a equivalent function, but I do not know its name. For more info : mindcontrol.org/~hplus/pc-timers.html – georgesl Oct 18 '12 at 19:47
I mean if you processor is 3.33GHz it is not enough to obtain time in nanoseconds? Why would we concern about HPET's frequency? – Narek Oct 19 '12 at 8:35
you can use CPU time ( a lot of methods are posted here ) but remember that we don't know the accuracy of the CPU's clock frequency (is it 3.33Ghz or 3.00 Ghz ?) nor the CPU's optimization ( wall time, load balancer if several cores, ...). I think the result given by CPU time measurement does not have any significant figures below the microsecond. – georgesl Oct 19 '12 at 9:08
add comment
In order to easily get time stamps with boost chrono for different measurements you can use boost CPU Timers. A table about the timer accuracy is also given on this site.
To measure the resolution yourself on your specific hardware use boost's cpu_timer_info.cpp.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/12956956/get-time-stamp-via-boost-chrono-in-resolution-of-nanoseconds/12957224 | dclm-gs1-215400000 |
0.116132 | <urn:uuid:40600128-84ca-40df-ab23-45ded076ec2a> | en | 0.767516 | Take the 2-minute tour ×
Could you please help me out how to calculate the no. of business days between start date and end date by excluding weekends & business specific holidays. Let's say if we take start date, end date and custom holiday table with list of holiday dates as mentioned below.
Start date (mm/dd/yyyy hh24:mi:ss) : '10/15/2012 08:00:00'
End date (mm/dd/yyyy hh24:mi:ss) : '10/23/2012 10:30:00'
holiday_table.business_holiday_date values (mm/dd/yyyy):
Need to calculate business days by taking into consideration of the time portion of dates in the calculation (so can expect business days with fractions as well ex. 1.25, 3.7 etc)
Appreciate if you can help me on this ASAP.
share|improve this question
Hello James and welcome to StackOverflow. Consider expanding your question with what have you attempted so far. See How to Ask for details. – bytebuster Oct 20 '12 at 0:15
add comment
2 Answers
SELECT(end_date - start_date) -
(select count(*)
from holiday_table
where business_holiday_date >= start_date
and business_holiday_date <= end_date)
FROM dual
Here is a fiddle
share|improve this answer
add comment
I have a function that use only 2 dates but you can improve it. Here you go...
1. First check how many days you got in the holiday table, excluding weekend days.
2. Get business days (MON to FRI) between the 2 dates and after that subtract the holiday days.
create or replace
FUNCTION calculate_business_days (p_start_date IN DATE, p_end_date IN DATE)
RETURN NUMBER IS
v_holidays NUMBER;
v_start_date DATE := TRUNC (p_start_date);
v_end_date DATE := TRUNC (p_end_date);
IF v_end_date >= v_start_date
SELECT COUNT (*)
INTO v_holidays
FROM holidays
WHERE day BETWEEN v_start_date AND v_end_date
AND day NOT IN (
SELECT hol.day
FROM holidays hol
WHERE MOD(TO_CHAR(hol.day, 'J'), 7) + 1 IN (6, 7)
RETURN GREATEST (NEXT_DAY (v_start_date, 'MON') - v_start_date - 2, 0)
+ ( ( NEXT_DAY (v_end_date, 'MON')
- NEXT_DAY (v_start_date, 'MON')
/ 7
* 5
- GREATEST (NEXT_DAY (v_end_date, 'MON') - v_end_date - 3, 0)
- v_holidays;
RETURN NULL;
END IF;
END calculate_business_days;
After that you can test it out, like:
calculate_business_days('21-AUG-2013','28-AUG-2013') as business_days
from dual;
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/12984009/business-days-calculation-by-including-time-portion-between-start-date-and-end?answertab=oldest | dclm-gs1-215410000 |
0.058184 | <urn:uuid:4c2f37da-2483-476e-9789-906185876ea0> | en | 0.835856 | Take the 2-minute tour ×
I would like to restrict users from my website to stop redirection to another website. For example my website is www.paktutorial.com and there is a link to website www.google.com. but i want that user do not navigate to google.com ( I want that link over there but do not the redirection).
Thanks in advance.
share|improve this question
Why dont you disable the link. Show the link but disable them. – Abhishek Saha Oct 28 '12 at 7:40
that's not possible. It is something coming out of jquery really complex code and written by someone else. I tried many things but not working. just I would like to stop navigation. – محمد خليل Oct 28 '12 at 7:44
I understand it might be complex. But if you want to disable them, its just 2 lines of code. – Abhishek Saha Oct 28 '12 at 8:37
add comment
2 Answers
This is what I understood from your question.
<a href="www.google.com">link 1</a>
<a href="www.paktutorial.com">link 2</a>
$('a').on("click", function(e){
So basically I would look in the window's URL and see if the target URL of the anchor tag clicked has the same host, and if not, prevent the window from redirecting.
share|improve this answer
add comment
As a solution to your problem please refer the below HTML code snippet . You need to define anchor tag in following manner.
<a href="javascript:void(0);">link</a>
Specifying javascript:void(0) in href property of anchor element will prevent its default behaviour since void operator returns null as a result of which browser will not be able to load new page.
For more documentation about javascript:void(0) please refer the documentation mentioned in below url http://www.tizag.com/javascriptT/javascriptvoid.php
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/13107142/restrict-users-from-my-website-to-redirect-to-another-website/13107185 | dclm-gs1-215420000 |
0.298953 | <urn:uuid:c45895bf-a14c-4bbe-8d8b-4146522e4451> | en | 0.895913 | Take the 2-minute tour ×
Possible Duplicate:
Get the seventh digit from an integer
I have an integer and I want a pair number from it.
var myDigit = 2345346792;
I need the 5th and 6th number out from myDigit namely 34.
What is the mathematical way of getting them without any use of substring?
Additional question from my previous thread: Get the seventh digit from an integer
share|improve this question
add comment
marked as duplicate by Ondrej Tucny, ColinE, Mario, Alan, amit Dec 6 '12 at 23:07
1 Answer
up vote 1 down vote accepted
Repeat your previous solution, using 100 instead of 10 for the modulus and adjusting the division.
share|improve this answer
add comment
| http://stackoverflow.com/questions/13754204/get-a-pair-of-integers-from-an-integer?answertab=active | dclm-gs1-215480000 |
0.018519 | <urn:uuid:3aff2d3a-f6bf-4ce6-8ba5-3f2920e4bdf3> | en | 0.761753 | Take the 2-minute tour ×
I'm fan of Reactive Extension and especially ReactiveUI I have DP in other solution's project than mine. I'd like to convert this into observable Class containing this DP is internal and derived from DependencyObject thus I cannot use Class.ObservableFromDP because class must be derived from FrameworkElement
I have this solution
public static IObservable<T> ToObservable<T>(this DependencyObject dependencyObject, DependencyProperty property)
return Observable.Create<T>(o =>
var des = DependencyPropertyDescriptor.FromProperty(property,
var eh =
new EventHandler(
(s, e) => o.OnNext((T) des.GetValue(dependencyObject)));
des.AddValueChanged(dependencyObject, eh);
return () => des.RemoveValueChanged(dependencyObject, eh);
But target class is internal, I cannot access property DependencyProperty in this class
How can I get Observable from this property
Is there any method as
obj.ObservableFromDP(x=>x.ActiveEditor) working on obj not derived from FrameworkElement?
share|improve this question
add comment
1 Answer
up vote 1 down vote accepted
This is actually fixed in >= ReactiveUI 4.0. Now all you do is:
// WhenAny now works on any object, will detect DependencyObject automatically
obj.WhenAny(x => x.ActiveEditor, x => x.Value)
.Subscribe(/* ... */)
share|improve this answer
Paul, may I ask you? Why you removed ObservableFromDP from ReactiveUI 4 instead of making it deprecated? – takayoshi Dec 14 '12 at 9:18
It's not removed, just generalized. WhenAny now works with DependencyObjects and DependencyProperties, not just ViewModel objects. The same functionality is there, the name is just different – Paul Betts Dec 14 '12 at 9:47
add comment
Your Answer
| http://stackoverflow.com/questions/13875432/dependency-property-to-observable | dclm-gs1-215490000 |
0.758132 | <urn:uuid:0d9abd03-e5f5-4df4-a298-f4d98341f617> | en | 0.735784 | Take the 2-minute tour ×
I am trying to get the compass bearing in degrees (i.e. 0-360) using the following method:
float[] mGravity;
float[] mGeomagnetic;
public void onSensorChanged(SensorEvent event) {
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER)
mGravity = event.values;
if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD)
mGeomagnetic = event.values;
if (mGravity != null && mGeomagnetic != null) {
float R[] = new float[9];
float I[] = new float[9];
boolean success = SensorManager.getRotationMatrix(R, I, mGravity,
if (success) {
float orientation[] = new float[3];
SensorManager.getOrientation(R, orientation);
float azimut = orientation[0];
bearing.setText("Bearing: "+ azimut);
The azimuth value (i.e. orientation[0]) should be 0<=azimuth<360 but I am getting only values from -3 to 3 as I rotate my device. Can someone please tell me what the problem might be please?
share|improve this question
add comment
2 Answers
up vote 3 down vote accepted
The values are in radian, you have to convert to degree
int azimut = (int) Math.round(Math.toDegrees(orientation[0]);
share|improve this answer
Thank you very much @Hoan Nguyen – user1135357 Mar 1 '13 at 16:33
add comment
It is true that it is in Radians. Thanks Hoan. I added some logic to get that bearing in degrees from 0 to 360 becuase if I only converted it to degrees, I was getting values from -180 to 180.
float azimuthInRadians = orientation[0];
float azimuthInDegress = (float)Math.toDegrees(azimuthInRadians)+360)%360;
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/15155985/android-compass-bearing | dclm-gs1-215560000 |
0.152772 | <urn:uuid:143c191f-f119-41ee-84f4-a1d4a02d180c> | en | 0.810569 | Take the 2-minute tour ×
I'm trying to count median for prices. I founded answer how to do it here- Simple way to calculate median with MySQL, but it doesn't work for me, I get empty result. Can anyone help?
SELECT x.price from mediana as x, mediana y
GROUP BY x.price
HAVING SUM(SIGN(1-SIGN(y.price-x.price))) = (COUNT(*)+1)/2
share|improve this question
Can you demonstrate this with a sqlfiddle? – Jack Mar 11 '13 at 12:32
Have you tried most voted (not accepted) answer from the linked question? Example of execution – default locale Mar 11 '13 at 12:40
sqlfiddle.com/#!2/b3fe7e/1 – Alex K Mar 11 '13 at 12:44
@defaultlocale, thanks, it works, but a little bit not as I expected. If I have price - 1,2,3,4 median should be 2.5, but I get 3 – Alex K Mar 11 '13 at 13:00
@AlexK Yes it doesn't handle even number of records (mean of 2 middle elements). Try this I haven't tested it, though. – default locale Mar 11 '13 at 13:11
show 3 more comments
1 Answer
up vote 1 down vote accepted
AFAIU your question.
This answer by @velcrow calculates median value successfully. Unfortunately when there is even number of rows instead of calculating the mean value of 2 middle rows query just returns second value. I've made a couple of modifications to the query to fit your needs:
--average value for middle rows
SELECT avg(t1.price) as median_val FROM (
SELECT @rownum:=@rownum+1 as `row_number`, d.price
FROM mediana d, (SELECT @rownum:=0) r
-- put some where clause here
ORDER BY d.price
) as t1,
SELECT count(*) as total_rows
FROM mediana d
-- put same where clause here
) as t2
--this condition should return one record for odd number of rows and 2 middle records for even.
AND t1.row_number>=total_rows/2 and t1.row_number<=total_rows/2+1;
Test on sample data on sqlfiddle
share|improve this answer
this returns wrong result , it return 2 – echo_Me Mar 11 '13 at 13:35
For prices 1,2,3,4 it returns - 2.5, for 1,2,3,4,4 returns 3, so it's correct ;) – Alex K Mar 11 '13 at 13:40
add comment
Your Answer
| http://stackoverflow.com/questions/15338584/mysql-count-median-value | dclm-gs1-215580000 |
0.064866 | <urn:uuid:d147f0aa-343f-4dad-bb10-9b8f4b4456d6> | en | 0.867186 | Take the 2-minute tour ×
Sorry for asking second time about specialization, but I haven't good understanding of what the heck is going on yet...
So, I have one project (Gomoku game with AI), and I decided to use my own simple and dirty @specialized ad-hoc collections in the hot part of it, because I must store primitive types without boxing. The problem is that this doesn't really help, because in jvisualvm's Sampler I clearly see
eating up thousands of ms when the optimal move search starts running.
The project: https://github.com/magicgoose/Gomoku
The file with the poor "collections": https://github.com/magicgoose/Gomoku/blob/master/src/magicgoose/gomoku/ai/SpecializedCollections.scala
The method, which causes boxing (one of them, I think):
trait Indexed[@specialized T] extends Enumerable[T] {
@inline def length: Int
@inline def apply(i: Int): T
// ...
@inline final def findIndex(fun: T => Boolean) = {
@tailrec def find(i: Int): Int = {
if (i < length) {
if (fun(this(i))) i
else find(i + 1)
} else -1
I have seen another project (debox: https://github.com/non/debox), which tries to accomplish the similar thing (data collections without primitive boxing), but I don't really understand how it is done there.
share|improve this question
add comment
1 Answer
up vote 4 down vote accepted
This has an easy answer: Function1 is not specialized on Short arguments, only Int, Long, Float, and Double. So when you call fun you need to box on the way in.
Either use your own function class--sadly lacking the convenient shorthand!--or make sure you are not using Short => Boolean but rather Int => Boolean (and the types know it). Note that when I said it was easy, I meant only easy to explain the problem: neither solution is all that easy to implement, but at the moment this is what's necessary.
share|improve this answer
Oops. This is so strange. Btw, I can get rid of Short and use Int everywhere and pack 2 Ints to Int instead of packing 2 Bytes to Short, this is dirty, but ok for this particular application, since the ranges of valuaes are anyway limited. Now I'll try it and see if there will be an improvement. – Sarge Borsch Mar 11 '13 at 14:27
I have switched to Ints and now there is no boxing. – Sarge Borsch Mar 11 '13 at 15:11
add comment
Your Answer
| http://stackoverflow.com/questions/15340247/scala-2-10-1-and-specialization-cant-get-it-working-right/15340989 | dclm-gs1-215590000 |
0.245966 | <urn:uuid:fc3e4ea9-801b-4a3e-b46c-ccd9e1712754> | en | 0.855828 | Take the 2-minute tour ×
I am very new to prolog and am having some issues understanding some basic arithmetic. I want to create a functor that will recursively multiply. IE: 3*4 = 3+3+3+3 = 12.
I put it through SWIPL's trace command and it fails when decrementing Count.
Here is the code I have so far but it does not work.
multn(_, Count ,Return) :- Count is Count-1,
Return is 0,
Return is Return + _.
EDIT: made some new changes based on what you said about the functionality of "is".
multn(_, Count ,Return) :- Count1 is (Count-1),
Return is (Return1 + _).
Now it is making it all the way down the recursion chain to the base case and when it starts it way back up it fails out trying to todo Return is (Return1+ _). It seems to be changing the _ variable. here it my trace:
[trace] ?- multn(3,2,X).
Call: (6) multn(3, 2, _G388) ? creep
^ Call: (7) _L142 is 2+ -1 ? creep
^ Exit: (7) 1 is 2+ -1 ? creep
Call: (7) multn(_L160, 1, _L143) ? creep
^ Call: (8) _L163 is 1+ -1 ? creep
^ Exit: (8) 0 is 1+ -1 ? creep
Call: (8) multn(_L181, 0, _L164) ? creep
Exit: (8) multn(_L181, 0, 0) ? creep
^ Call: (8) _L143 is 0+_G461 ? creep
ERROR: is/2: Arguments are not sufficiently instantiated
^ Exception: (8) _L143 is 0+_G461 ? creep
Exception: (7) multn(_L160, 1, _L143) ? creep
Exception: (6) multn(3, 2, _G388) ? creep
Last EDIT: Finally figured it out, using _ was causing the weird change in value. Thanks for your help.
share|improve this question
yeah, all _s are different, even if inside one rule. You should name your variables - variables with same name are the same variable. All Xs in X*(N+1)=X*N+X must be the same. – Will Ness Apr 28 '13 at 9:23
add comment
1 Answer
It looks like your don't understand how Prolog works.
The key thing to understand is that both Count in Count is Count-1 are the same, they must have the same value. It's like variables in algebra - all Xs in an equation means the same value. So Count is Count-1 will always fail.
Similar problems with Return variable.
In Prolog you have to introduce new variables to do what you intended, like NewCount is Count-1.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/16257298/prolog-recursive-arithmetic/16257601 | dclm-gs1-215610000 |
0.021811 | <urn:uuid:ecc3bc93-cf9b-40c5-9846-0f4c51aaf2fc> | en | 0.795666 | Take the 2-minute tour ×
I have two Qt projects. The first project builds a library that provides a widget for the main window. The second project then uses this library and creates custom widgets to plug into it and define implementation.
Everything works properly except for the graphics not showing up in the second project that includes the library. The widgets show up just fine, but nothing from the stylesheet is displayed.
Is there something else I'm forgetting to do?
For example, I've made this frame...
namespace saiwidgets {
class SAIWIDGETSSHARED_EXPORT Frame : public QFrame {
explicit Frame(QFrame* parent = nullptr);
Frame(QWidget* widget, QFrame* parent = nullptr);
void addWidget(QWidget* value);
virtual void mouseMoveEvent(QMouseEvent *e) override;
QVBoxLayout layout;
And load the stylesheet like this...
QApplication a(argc, argv);
QFile styleFile( %path to the stylesheet% );
styleFile.open( QFile::ReadOnly );
QString style( styleFile.readAll() );
a.setStyleSheet( style );
Implementation omitted...
SOLUTION: Well, the solution is simple and obvious — just apply the stylesheet to the parent window.
share|improve this question
Welcome to StackOverflow! You haven't shown any code, which is going to make it very hard for anybody to troubleshoot the problem. What have you tried? – Lynn Crumbling May 22 '13 at 3:46
Thank you. Well, I just inherited Qt widgets and placed them into the library... but okay :3 I'll add the example. – Newlifer May 22 '13 at 3:56
Also I tried to apply the stylesheet manually right in the custom widget, it works, of course... – Newlifer May 22 '13 at 4:32
add comment
Your Answer
Browse other questions tagged or ask your own question. | http://stackoverflow.com/questions/16683104/linking-in-a-custom-library-with-custom-stylesheets-and-graphics-solved | dclm-gs1-215640000 |
0.97121 | <urn:uuid:b8658625-9470-44a2-b9fc-b8bdf8e0893d> | en | 0.80149 | Take the 2-minute tour ×
I'm new to eclipse CLP and I want to implement a predicate that gets all the angles equivalent to a specific sinusoidal function, something like
:- lib(ic).
solve(L) :-
L = [X,Y,Z],
cos(X) #= sin(Y) + sin(Z),
I know that this scheme probably works for integral values of the variables; so I need an alternative solution that also uses CLP.
share|improve this question
add comment
1 Answer
Ok I figured it out,
V = [X,Y,Z],
V::[0 .. 180],
cos(X*pi/180) $= sin(Y*pi/180) + sin(Z*pi/180),
N.B: the cos and sin predicates work with radians
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/17389496/using-trigonometric-functions-in-eclipse-clp | dclm-gs1-215680000 |
0.399576 | <urn:uuid:13959371-91b7-487c-bd47-fb44e774d276> | en | 0.888333 | Take the 2-minute tour ×
I have a User model which has many Committees a Committee also belongs to a user.
Because users are a mixture of Admins and regular web users, I've developed a new concept, where a User can favorite a Committee.
Is it possible to associate the User and Committee models in a second way?
Where a user:
has_many :favorites
has_many :committees, through: :favorites
Obviously this will collide with the above User.first.committees but is there a way I could use another noun but still keep the basic through logic?
This would be awesome if possible.
share|improve this question
add comment
1 Answer
Yes you can have two associations to the same model. Something like this.
has_many :committees
has_many :favorites
has_many :favorite_committees, through: :favorites
Thus you will have three models User, Committee and Favorite.
You can also refer this.
share|improve this answer
Mixing UK and US spelling there. – GeorgeMillo Aug 19 '13 at 1:44
Sorry about that. Corrected. :) – Bot Aug 19 '13 at 1:47
add comment
Your Answer
| http://stackoverflow.com/questions/18305324/is-it-possible-to-associate-models-in-two-different-ways/18305372 | dclm-gs1-215730000 |
0.525651 | <urn:uuid:edfe58c7-50e7-4f20-bdfa-e5a98f787ca9> | en | 0.765852 | Take the 2-minute tour ×
im using entity framewok and who have a problem.
when i get data,i dont use return type a model class.so who have created a class and entity framework returns type of my class as below:
List<MixedArticle> lstMxa=new List<MixedArticle>();
Model.BlogDBEntities bdbe = new Model.BlogDBEntities();
SqlParameter sp = new SqlParameter("@count", count);
object[] parameters = new object[1] { sp };
lstMxa = bdbe.Database.SqlQuery<Facade.MixedArticle>("select * from fn_GetLastXArticles(@count)", parameters).ToList();
but i can use toList method as like
when i tried this way visual studio rejects and says that it was not TSource.
so,how do i use ToList() method?
share|improve this question
add comment
1 Answer
up vote 2 down vote accepted
You can use a projection that selects the properties you have in MixedArticle from the Articles table in the database:
lstMxa = bdbe.Articles
.Where(x => x.Count == count)
.Select(x => new Facade.MixedArticle
SomePropertyInMixedArticle1 = x.SomeProperty1,
SomePropertyInMixedArticle2 = x.SomeProperty2,
// etc.
You could also load the full Article entity from the database and then map the needed properties over to MixedArticle (for example using a tool like AutoMapper). But the benefit of a projection with Select is that it doesn't load more column values from the database than you actually need in MixedArticle - but at the expense that you have to list and assign all those properties manually in the Select expression.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/18621585/entity-framework-tolist-method-tsource | dclm-gs1-215740000 |
0.42898 | <urn:uuid:c451549b-7a7e-45d8-9b95-1884a2c1e277> | en | 0.895583 | Take the 2-minute tour ×
I am trying to build an ADF application using ANT from the command line, by making use of OJDeploy.
In the build.xml OJDeploy is executed on the CMD line using an exec task, I need to display the output from this task on the same command line.
I have tried running ANT with the -v option, and writing the output to a file but it does not give any of the output from OJDeploy executing.
share|improve this question
You're going to be way better off using the ojdeploy ant task. – thekbb Oct 16 '13 at 14:25
Please can you explain why. – LDM91 Oct 16 '13 at 16:31
For starters, all of it's output would show up in the right place. It's just genearlly cleaner to keep it all in ant, rather than exec out. You'll have nice named parameters to the task rather than many arg values to exec. – thekbb Oct 16 '13 at 18:50
add comment
2 Answers
See How can I ensure all output from Ant's exec task goes to stdout?
Or perhaps.
<exec outputproperty="output" ... />
<echo message="${output}" />
share|improve this answer
add comment
I solved the problem by simply calling "ojdeploy64" instead of "ojdeploy". After I did that the output was shown in the command line as I expected.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/19402187/how-do-i-display-ant-exec-task-output-in-the-same-cmd-window | dclm-gs1-215750000 |
0.098047 | <urn:uuid:72f7cae0-8249-4b8b-b581-62d550e7f6f4> | en | 0.811988 | Take the 2-minute tour ×
Possible Duplicate:
See title ^
Code causing this:
NSManagedObjectContext *context = [fetchedResultsController managedObjectContext];
Name *name = (Name *)[NSEntityDescription insertNewObjectForEntityForName:@"Name" inManagedObjectContext:context];
Feature *feature = (Features *)[NSEntityDescription insertNewObjectForEntityForName:@"thing" inManagedObjectContext:context];
[feature setName:app];
[name addFeaturesObject:feature];
app is an NSString defined earlier.
Things I've tried:
in viewDidLoad:
if (managedObjectContext == nil)
managedObjectContext = [(IsidoreAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext];
share|improve this question
add comment
marked as duplicate by Tim Cooper, Kev Jul 28 '12 at 13:30
2 Answers
Your managed object context is probably not set and the entity "Name" is obviously not valid for a nil context.
In viewDidLoad, you are setting the "managedObjectContext" instance variable for your view controller by using the app delegate which is fine, but then your problem code is using the managed object context from the fetched results controller. Has that been setup yet?
Also, check out this answer to Core Data and UITabBar Controller - help?!
share|improve this answer
it's all there... – Matt S. Jan 3 '10 at 16:52
add comment
I've ran into the same issue. I created a separate project in xCode4, using "Navigation Based Application" and "Use Core Data" options. Then I copied over the table view with persistent data over to my other application. This is when I ran into the issue. I've defined the Entity along with all the fields, and then had the +entityForName: could not locate an NSManagedObjectModel for entity name 'Name' error
Good thing is it is rather easy to fix: If you are working along the same path as I did, add this line to your App delegate at the point where you instantiate the controller:
yourViewController.managedObjectContext = self.managedObjectContext;
share|improve this answer
add comment
| http://stackoverflow.com/questions/1993977/iphone-core-data-error-entityforname-could-not-locate-an-nsmanagedobjectmode?answertab=oldest | dclm-gs1-215760000 |
0.338177 | <urn:uuid:bd561651-f593-4835-963c-f702c57e6885> | en | 0.747676 | Take the 2-minute tour ×
I'm currently developing a feature in my application that will allow users to invite their Facebook friends and for that they and the friend will receive a reward/gift.
So for that purpose I using the Facebook request option. So I went over the following 2 docs:
Now this works great if both devices have the application installed and I send request from one to another and can retrieve additional data that the sender sent using this method:
private void getRequestData(final String inRequestId) {
// Create a new request for an HTTP GET with the
// request ID as the Graph path.
Request request = new Request(Session.getActiveSession(),
inRequestId, null, HttpMethod.GET, new Request.Callback() {
public void onCompleted(Response response) {
// Process the returned response
GraphObject graphObject = response.getGraphObject();
FacebookRequestError error = response.getError();
// Default message
String message = "Incoming request";
if (graphObject != null)
CupsLog.d(TAG, "getRequestData -> graphObject != null: "+ graphObject.toString());
// Check if there is extra data
if (graphObject.getProperty("data") != null)
CupsLog.d(TAG, "getRequestData -> graphObject.getProperty(data) != null");
// Get the data, parse info to get the key/value info
JSONObject dataObject = new JSONObject((String)graphObject.getProperty("data"));
// Get the value for the key - badge_of_awesomeness
String reward = dataObject.getString("reward");
// Get the value for the key - social_karma
String coffeeCups = dataObject.getString("coffee_cups");
// Get the sender's name
JSONObject fromObject = (JSONObject) graphObject.getProperty("from");
String sender = fromObject.getString("name");
String title = sender+" sent you a gift";
// Create the text for the alert based on the sender
// and the data
message = title + "\n\n" +
"reward: " + reward +
" coffeeCups: " + coffeeCups;
} catch (JSONException e) {
message = "Error getting request info";
} else if (error != null) {
message = "Error getting request info";
CupsLog.d(TAG, "getRequestData -> graphObject.getProperty(data) == null");
Toast.makeText(SocialFeaturesActivity.this, message, Toast.LENGTH_LONG).show();
// Execute the request asynchronously.
The Question: If the receiver will get this request in Facebook, but will not have it installed, this request will redirect him to Google Play to install the app. After he installs the app and open it for the first time? Is there s way to receive this data anyway?
Thanks in advance.
share|improve this question
Currently, no. You will need to keep track of it server side (if you have one). – Ming Li Dec 5 '13 at 19:04
How can I keep track of it in server? I will have to log every time one of my users sent a request to each one of his friends and then verify that this user has logged in my application. This is impossible in my case... – Emil Adz Dec 5 '13 at 21:13
@MingLi is there maybe another way in Facebook framework to perform this action? – Emil Adz Dec 5 '13 at 21:13
add comment
Your Answer
Browse other questions tagged or ask your own question. | http://stackoverflow.com/questions/20404170/will-the-user-receive-facebook-request-data-if-the-application-not-installed | dclm-gs1-215780000 |
0.418268 | <urn:uuid:91c468d8-0397-47fe-a569-09715573fb4e> | en | 0.948223 | Take the 2-minute tour ×
Hallo I want to develop an android app, that is able to communicate with other devices that have the app opened at the same time and are connected to the same WIFI network.
I want to upload/update the mac adress and the bssid of every device, that opens the app to determine which other devices are in the same network and online. Is it a good practice I (mean issues such as privacy) to simply store the bssids and macs in the world wide web even if they are encrypted?
I could use WIFI-Direct, but the procedure to connect all the devices to one groupowner takes too long and is annoying in case of my use-case.
share|improve this question
Google does this (along with storing the GPS coordinates of the network) in order to provide more accurate geolocation, so I see no reason why you would not be able to do it. However this may be different from country to country, according to their respective legislation. – Raging Scallion Dec 12 '13 at 1:33
Devices on the same WiFi could find each other without having to transmit their WiFi information - For example by doing something similar to SSDP – zapl Dec 12 '13 at 2:31
But than how to determine whether the device has the app opened or not? It would find also all the other devices such as laptops – vacetahanna Dec 12 '13 at 3:08
This question appears to be off-topic because it is about security or cryptography and doesn't include a programming problem. – Duncan Dec 12 '13 at 8:32
add comment
put on hold as off-topic by Duncan, laalto, giammin, Sahil Mahajan Mj, John Willemse Mar 13 at 9:25
| http://stackoverflow.com/questions/20533375/store-current-encrypted-bssid-in-an-online-database | dclm-gs1-215800000 |
0.04291 | <urn:uuid:1d61c7f7-d197-4448-9071-30fc412f09a8> | en | 0.929188 | Take the 2-minute tour ×
I am currently developing a crossplatform app, this should run on a Google GLASS (Android 4.0.4), a smartphone (Android 4.0.4 or newer) and another wearables. At least it will be ICS – Ice Cream Sandwich version.
This app provides me with event-driven different Views, triggered by the user or the system (Network - Event).
For the controlling by the user, I want to implement speech recognition, which just needs to recognize numbers or at least single digits and the commands forward and backward. It is important that it also works offline, it should work in background when the application is running and shouldn’t cover the user interface.
Related Work :
SpeechRecognizer seems to have the offline functionality only with jellybean, (haven’t found a way to use it on Android 4.0.4).
Implementing a custom IME and the use of VoiceTyping seems to me to be very expensive and dirty. (like Utter!, btw. really nice work!)
First attempts to use pocketsphinx haven’t been successful yet...
Would be very happy about your help and any suggestions what could be helpful for me.
share|improve this question
for offline speech recognition on icecream sandwich you can try recently updated pocketsphinx demo for android cmusphinx.sourceforge.net/wiki/tutorialandroid – Nikolay Shmyrev Jan 14 at 15:52
I have already tried this demo, the app is installed, but the commands are not recognized ... I have not yet figured it out why. in logcat I can see no error, everything seems to load ... – AlexejWagner.java Jan 15 at 7:32
The demo creates raw files in /mnt/sdcard/data/Android/edu.cmu.pocketsphinx, share them. – Nikolay Shmyrev Jan 15 at 11:17
@NikolayShmyrev I'm sure you mean the /mnt/sdcard/Android/data/edu.cmu.pocketsphinx.demo/files dir... raw files thx – AlexejWagner.java Jan 15 at 12:03
Can you share logcat too? Also are you using the version from yesterday? It was broken before but was updated just yesteray. – Nikolay Shmyrev Jan 15 at 14:10
show 1 more comment
2 Answers
up vote 1 down vote accepted
The offline voice capabilities of Jelly Bean are handled by the Google Search application internally. There has been no change to either the RecognizerIntent or the SpeechRecognizer API.
This isn't ideal for what you want to achieve, as having a dependency to a closed sourced application that isn't cross platform will throw a spanner in the works.... Regardless of that, a simple offline = true parameter is nowhere to be seen and you'll end up having to coerce this behaviour. I have requested this parameter by the way!
Google handle their wake up phrase with a dedicated processor core, but it looks unlikely that the manufacturers intend to expose this functionality to anyone other than OEMs.
That leaves other alternative recognition providers, that have RESTful services, such as iSpeech, AT&T and Nuance, but again, you'll be murdering the battery and using significant data if you take this approach. Not to mention the audio conflicts that occur on the Android platform.
Finally, you end up with Sphinx. At present, I consider it the only viable solution to lower the resource usage, but it doesn't get around the audio conflict issues. I've been working on getting it running within my application for a long time, but I still have major issues with false positives that have stopped me including it in production.
It is probably your only option until Google, processor manufactures and OEMs work out how to offer such functionality, without every application installed on the device wanting a piece of the action, which is inevitable.....
I'm not sure this response actually provided and answer, more excludes some!
Good luck
EDIT: In an environment of wearables, such products will have access to the dedicated cores - at least they need to make sure they do and use a processor with such capabilities. From my interaction with companies developing such tech, they often overlook this or are unaware of its necessity.
share|improve this answer
Thanks for the comprehensive overview, I'll try with PocketSphinx lib to implement it probably. I see that you already have a lot of experience in this case. So I mark this answer as accepted, and I hope that soon there will come an better offline solution. – AlexejWagner.java Jan 16 at 11:38
add comment
I want to propose a partial answer to your question. Since you want the speech recognition not to interfere with the UI, you could create a Service, with it you can make it a continuous speech recognizer, avoid the graphical widget and avoid the "beep" sound. I used the following way and worked fine for me: Android Speech Recognition Continuous Service
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/21110975/inapp-voice-trigerred-controlling-and-offline-speechrecognition-on-android-ics | dclm-gs1-215810000 |
0.345311 | <urn:uuid:f6d4f1b9-309c-4488-9207-f756c37574e6> | en | 0.79532 | Take the 2-minute tour ×
anyway to see in IE 8 Developer Tools the list of the .js associated with a page?
In the same way as in Firebug.
share|improve this question
add comment
1 Answer
up vote 2 down vote accepted
In the 'Script' tab there's a select list next to the 'Start debugging' button, that lists all the loaded resources.
share|improve this answer
Thanks! --------- – ziiweb Mar 17 '10 at 8:54
add comment
Your Answer
| http://stackoverflow.com/questions/2460779/anyway-to-see-in-ie-8-developer-tools-the-list-of-the-js-associated-with-a-page | dclm-gs1-215860000 |
0.229416 | <urn:uuid:11c5429b-e73f-4b3b-95f6-f567678223ba> | en | 0.703835 | Take the 2-minute tour ×
I need to force any time related operations to GMT/UTC, regardless the timezone set on the machine. Any convenient way to so in code?
To clarify, I'm using the DB server time for all operations, but it comes out formatted according to local timezone.
share|improve this question
possible duplicate of stackoverflow.com/questions/308683/… – Yuval Adam Apr 13 '10 at 8:23
Actually, his problem is a subset of mine, but I found a solution. – SyBer Apr 13 '10 at 8:31
add comment
7 Answers
up vote 28 down vote accepted
The OP answered this question to change the default timezone for a single instance of a running JVM, set the user.timezone system property:
java -Duser.timezone=GMT ... <main-class>
If you need to set specific time zones when retrieving Date/Time/Timestamp objects from a database ResultSet, use the second form of the getXXX methods that takes a Calendar object:
Calendar tzCal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
ResultSet rs = ...;
while (rs.next()) {
Date dateValue = rs.getDate("DateColumn", tzCal);
// Other fields and calculations
Or, setting the date in a PreparedStatement:
PreparedStatement ps = conn.createPreparedStatement("update ...");
ps.setDate("DateColumn", dateValue, tzCal);
// Other assignments
These will ensure that the value stored in the database is consistent when the database column does not keep timezone information.
The java.util.Date and java.sql.Date classes store the actual time (milliseconds) in UTC. To format these on output to another timezone, use SimpleDateFormat. You can also associate a timezone with the value using a Calendar object:
TimeZone tz = TimeZone.getTimeZone("<local-time-zone>");
Date dateValue = rs.getDate("DateColumn");
Calendar calValue = Calendar.getInstance(tz);
share|improve this answer
One thing to note about setting the timezone for the entire JVM is that it affects everything, including such things as logging. Just something to keep in mind if that's the desired effect. – Herminator Apr 13 '10 at 10:16
Yep, that fine. Just one point to mention, that I actually set the user.timezone directly in code, rather then via the -D parameter. – SyBer Apr 13 '10 at 21:10
@SyBer: That works but you must ensure that you set this before any method calls the TimeZone.getDefault() method. If not you will have some confusion since the default is cached after the first execution. This also means it could be a problem if you do this inside an API/library (hidden from plain view) - be sure to document heavily what you are doing. – Kevin Brock Apr 14 '10 at 0:24
add comment
I would retrieve the time from the DB in a raw form (long timestamp or java's Date), and then use SimpleDateFormat to format it, or Calendar to manipulate it. In both cases you should set the timezone of the objects before using it.
See SimpleDateFormat.setTimeZone(..) and Calendar.setTimeZone(..) for details
share|improve this answer
add comment
I had to set the JVM timezone for Windows 2003 Server because it always returned GMT for new Date();
Or your appropriate time zone. Finding a list of time zones proved to be a bit challenging also...
Here are two list;
share|improve this answer
add comment
for me, just quick SimpleDateFormat,
private static final SimpleDateFormat GMT = new SimpleDateFormat("yyyy-MM-dd");
private static final SimpleDateFormat SYD = new SimpleDateFormat("yyyy-MM-dd");
static {
then format the date with different timezone.
share|improve this answer
add comment
You could change the timezone using TimeZone.setDefault() - even only temporarily, for some operations.
share|improve this answer
add comment
Also if you can set JVM timezone this way
System.setProperty("user.timezone", "EST");
or -duser.timezone=GMT in the JVM args.
share|improve this answer
add comment
create a pair of client / server, so that after the execution, client server sends the correct time and date. Then, the client asks the server pm GMT and the server sends back the answer right.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/2627992/force-java-timezone-as-gmt-utc?answertab=votes | dclm-gs1-215900000 |
0.023574 | <urn:uuid:1fa387b2-36b3-426f-bf9a-db3574fdddad> | en | 0.902429 | Take the 2-minute tour ×
I edit PHP in Vim and have enjoyed the auto-indenting, but PHP's alternative syntax doesn't auto-indent how I would like. For instance, in an HTML template, Vim doesn't recognize the open control structure in the same way it does when using braces. Example:
<?php if (1==1): ?>
This line should be indented.
<?php endif; ?>
I want Vim to recognize the open control structure and indent the HTML within it. Another example which uses pure PHP:
if (1==1):
echo "This line gets indented";
echo "This one doesn't";
The indentation is terminated by the semicolon, even though the control structure is still open.
Does anybody know how to get Vim to work in these situations? Thanks.
share|improve this question
add comment
3 Answers
Check this out, this one as well
share|improve this answer
Actually I am already using those. The second link is included by default in Vim 7, and the first one sources the second one and adds the HTML inter-operation. – njbair Apr 17 '10 at 17:31
add comment
up vote 1 down vote accepted
It would seem that this is not possible given the currently available Vim plugins, nor is it likely to be addressed.
share|improve this answer
add comment
It is too late but me by help others. I found this plugin work very well with indentation in html+php files vim-html-enhanced
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/2659119/making-vim-auto-indent-php-html-using-alternative-syntax | dclm-gs1-215910000 |
0.230261 | <urn:uuid:67ae062a-2d41-46ce-a262-a992f54f9564> | en | 0.846124 | Take the 2-minute tour ×
I like to think I'm not a dummy, but I can't get my jQuery horizontal slideshow to animate smoothly especially in FireFox (on a Mac). Anyone have advice?
Animation is being done like so:
$('#lookbook').stop().animate({left: -((lookbook-1)*825)+'px'}, { duration: 800, complete: cap_fade(1)});
Example link:
share|improve this question
add comment
3 Answers
I've tested in Firefox, Chrome(dev) and Safari on windows and the animation stutters in all browsers(but more in FF though).
To increase JavaScript performance you could get rid of all the getElementById or $("div#mydividentyfier") calls. If you store them in variables instead they will be cached. Example: It could increase performance quite a bit to do this:
var lookbook = $('#lookbook');
var look_caption = $('#look_caption');
if (lookbook.length) {
lookbook.width(lookbook).width()*$('#lookbook img').length)
if (look_caption) {
Instead of:
if ($('#lookbook').length) {
$('#lookbook').width($('#lookbook').width()*$('#lookbook img').length)
if ($('#look_caption')) {
I would also recommend using data URIs for the images as it reduces the amount of httpRequests you have to make to get the page loaded.
share|improve this answer
add comment
The animation looks smooth for me in Chrome. However, I believe there are several things you can do to improve smoothness:
First, it's fine to preload all of the images in advance as you do here (at the top). However, displaying them all at once, as in the "Example link", hurts performance, as they are all animating at once:
<div id="lookbook">
<div><img src="/q_images/lib/lookbook/1.jpg"></div>
<div><img src="/q_images/lib/lookbook/2.jpg"></div>
<div><img src="/q_images/lib/lookbook/15.jpg"></div>
Instead of doing this, you can simply cue up the next and previous image on either side of the current image, but then don't have the rest of the images in the page until they're needed. (Preloading them is still fine though.)
Other things which can improve performance slightly are things like the following:
1. Use smaller (by pixels and/or file size) images.
2. Make minor code optimizations by computing things in advance.
3. Use a stand-alone animation library instead of jQuery.
share|improve this answer
add comment
You may also want to use this
.animate({left:'-=825'}); //next
.animate({left:'+=825'}); //previous
Instead of
share|improve this answer
I appreciate what you're getting at but, that breaks the "snapping". – J.Milly May 8 '10 at 20:10
add comment
Your Answer
| http://stackoverflow.com/questions/2761379/jquery-animations-are-choppy-and-stutter-in-firefox/2784428 | dclm-gs1-215920000 |
0.074109 | <urn:uuid:f964ee76-5039-49b5-80fe-a800121d7b25> | en | 0.793322 | Take the 2-minute tour ×
This is probably pretty simple, but here:
Say I've got two models, Thing and Tag
class Thing < ActiveRecord::Base
has_and_belongs_to_many :tags
class Tag < ActiveRecord::Base
has_and_belongs_to_many :things
And I have an instance of each. I want to link them. Can I do something like:
@thing = Thing.find(1)
@tag = Tag.find(1)
If not, what is the best way to do this? Thanks!
share|improve this question
add comment
1 Answer
up vote 1 down vote accepted
I think the best way is to use find_or_create.
tag = @thing.tags.find_or_create_by_name('tagname')
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/2816035/creating-relationship-between-two-model-instances/2816088 | dclm-gs1-215930000 |
0.541938 | <urn:uuid:454bfb29-7d76-42f7-af0a-d9c74078d72e> | en | 0.865063 | Take the 2-minute tour ×
Much like this question, I too am using Ryan Bates's nifty_scaffold. It has the desirable aspect of using Mocha's any_instance method to force an "invalid" state in model objects buried behind the controller.
Unlike the question I linked to, I'm not using RSpec, but Test::Unit. That means that the two RSpec-centric solutions there won't work for me.
Is there a general (ie: works with Test::Unit) way to remove the any_instance stubbing? I believe that it's causing a bug in my tests, and I'd like to verify that.
share|improve this question
add comment
2 Answers
up vote 11 down vote accepted
As it happens, Mocha 0.10.0 allows unstubbing on any_instance().
str = "Not Stubbed!"
puts str.to_s # "Stubbed!"
puts str.to_s # "Not Stubbed!"
share|improve this answer
add comment
Mocha does not provide such a functionality. However you can implement it yourself.
The first thing we should know about mocha is that mocha actually replaces the original methods when you stub them. So in order to be able to restore these methods later, you must keep a reference to the former ones. It can be easily achieved by: alias new_method old_method. It must be done before mocking the old_method.
Now, to unmock a method, you only need to alias old_method new_method.
Consider the following code:
class A
def a
class TestA < Test::Unit::TestCase
def test_undo_mock
a = A.new
A.class_eval {alias unmocked_a a}
assert a.a, "b"
A.class_eval {alias a unmocked_a}
assert a.a, "a"
share|improve this answer
Excellent. This looks like something that could be added/monkeypatched into Mocha too. – Craig Walker May 24 '10 at 16:05
I've never felt the need for this functionality, but there is a ticket - floehopper.lighthouseapp.com/projects/22289-mocha/tickets/… if you want to lobby for the change. It would be great if you have some examples of why you'd want to use it. – James Mead Sep 26 '10 at 16:51
I have added unstubbing functionality - Mocha::ObjectMethods#unstub - see mocha.rubyforge.org/classes/Mocha/ObjectMethods.html#M000009 – James Mead Dec 2 '10 at 11:08
Mocha now has this; see my new answer. – Craig Walker Dec 21 '11 at 19:30
add comment
Your Answer
| http://stackoverflow.com/questions/2894331/is-there-a-way-to-undo-mocha-stubbing-of-any-instance-in-testunit/8595233 | dclm-gs1-215940000 |
0.19987 | <urn:uuid:40c57b05-fada-4d95-acd5-981d7251574d> | en | 0.882679 | Take the 2-minute tour ×
I have developed one Active directory webpart that get uer information from Active Directory department wise( Department name is specific hard coded). i want to give specific department after deploying into sharepoint. is it possible and how. please give me reference for the same.
Thank you.
share|improve this question
add comment
2 Answers
You can add your own custom properties to a web part that can be configured at runtime using the web part pane.
See this example.
share|improve this answer
add comment
The first answer is of course correct. But if you need something completely runtime, you can always use the querystring parameters and access the page with the WP using parameters in the URL, it depends on what you are trying to accomplish
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/3165623/how-to-developed-webpart-that-take-argument-run-timeafter-deployed-in-sharepoin | dclm-gs1-215970000 |
0.4763 | <urn:uuid:c1dbf1c6-3272-434f-a1b2-b9e77c454f08> | en | 0.953714 | Take the 2-minute tour ×
I have a set of data on which I need to perform a topological sort, with a few assumptions and constraints, and I was wondering if anyone knew an existing, efficient algorithm that would be appropriate for this.
• The data relationships are known to form a DAG (so no cycles to worry about).
• An edge from A to B indicates that A depends on B, so B must appear before A in the topological ordering.
• The graph is not necessarily connected; that is, for any two nodes N and M there may be no way to get from N to M by following edges (even if you ignore edge direction).
• The data relationships are singly linked. This means that when there is an edge directed from A to B, only the A node contains information about the existence of the edge.
The problem can be formulated as follows:
Given a set of nodes S in graph G which may or may not have incoming edges, find a topological ordering of the subgraph G' consisting of all of the nodes in G that are reachable from any node in set S (obeying edge direction).
This confounds the usual approaches to topological sorting because they require that the nodes in set S do not have any incoming edges, which is something that is not true in my case. The pathological case is:
A --> B --> D
| ^ ^
| | |
\---> C ----/
Where S = {B, C}. An appropriate ordering would be D, B, C, but if a normal topological sort algorithm happened to consider B before C, it would end up with C, D, B, which is completely wrong. (Note that A does not appear in the resulting ordering since it is not reachable from S; it's there to give an example where all of the nodes in S might have incoming edges)
Now, I have to imagine that this is a long-solved problem, since this is essentially what programs like apt and yum have to do when you specify multiple packages in one install command. However, when I search for keyphrases like "dependency resolution algorithm", I get results describing normal topological sorting, which does not handle this particular case.
I can think of a couple of ways to do this, but none of them seem particularly elegant. I was wondering if anyone had some pointers to an appropriate algorithm, preferably one that can operate in a single pass over the data.
share|improve this question
add comment
2 Answers
up vote 3 down vote accepted
I don't think you'll find an algorithm that can do this with a single pass over the data. I would perform a breadth-first search, starting with the nodes in S, and then do a topological sort on the resulting subgraph.
share|improve this answer
Eventually went with this, though I'd still be interested to know if there's anything better and less brute-force out there. – Tyler McHenry Jul 24 '10 at 4:14
add comment
I think you can do a topological sorting of the entire graph and then select only the nodes which are reachable from the set of nodes (you can do some depth first searches from the nodes in the set, in the order resulted after the sorting, and you'll get in the subtree of a node if it wasn't visited before).
share|improve this answer
It's not really practical for me to sort the entire graph, since the graph is very large, the portion I want to sort is going to be quite small, and the node information comes out of a database, which would make sorting the whole graph very, very slow. – Tyler McHenry Jul 22 '10 at 13:31
Ok, so you can make the depth first searches entering in a node if the node wasn't visited before, so you'll get the subgraph and then sort the subgraph. The time complexity is o(k + m), where k is the size of the subgraph and m is the number of links in that subgraph. – Teodor Pripoae Jul 22 '10 at 13:48
add comment
Your Answer
| http://stackoverflow.com/questions/3309263/topological-sort-variant-algorithm | dclm-gs1-215980000 |
0.203541 | <urn:uuid:da7aabc6-32a5-4478-aa01-3e6b33e8e1cd> | en | 0.879452 | Take the 2-minute tour ×
Just wondering if anyone has an example of communicating from console app to windows form or vice versa. Thanks
share|improve this question
What do you mean my communicating? Passing data to each other, calling methods remotely? Are both on a machine or are they to communicate via network communication? – jlafay Jul 22 '10 at 14:16
Are they even different processes, or you just mean, e.g., reading from the console and writing to a form? – Mau Jul 22 '10 at 14:17
add comment
2 Answers
I'd try with Inter-Process Communication mechanisms (IPCs) or with writing/reading temp files. It depends on your application.
share|improve this answer
add comment
What form of communication are you talking about?
Information can be written to and read from a flat text file, XML files, a database etc.
There could be direct communication via sockets.
Or are you talking about one application "controlling" the other in some way?
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/3309769/communicate-between-windows-form-and-console | dclm-gs1-215990000 |
0.998526 | <urn:uuid:8d9e2a39-db7a-4fa5-9ed9-0cac9f7c0aff> | en | 0.899335 | Take the 2-minute tour ×
In windows scheduled tasks properties, you can only choose "at system startup" without being able to assign a specific delay such as 20 minutes, so I wonder how can I setup a schedule task if I want it to run after the system "fully" starts up(you know how fast this can be in XP)? Hope you guys know the answer. Thanks
share|improve this question
Not an answer, but I will note that the Windows 7 task scheduler is much improved and has this option. – driis Aug 9 '10 at 16:31
add comment
1 Answer
up vote 5 down vote accepted
Create a scheduled task to run an app you've written, have the app you've written sleep for 20 minutes and then run the original app.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/3442083/how-to-run-a-windows-scheduled-task-20-mins-after-system-startup?answertab=oldest | dclm-gs1-216000000 |
0.073739 | <urn:uuid:a0392673-b98e-4b64-8260-1e198b91024a> | en | 0.92151 | Take the 2-minute tour ×
Could more than one RFCOMM channels be created per time?
Testing method:
Create connections from Cellphone(Samsung GALAXY S) to two terminals in the PC. PC has two different bluetooth devices(build-in and USB dongle) and using different COM ports, say COM1 and COM2.
1. Testing each connection from cellphone to different bluetooth devices in PC using SPP, separately. ----> OK, cellphone could read what PC has sent in terminal using each bluetooth device. This means PC, bluetooth device 1(BD1), bluetooth device 2(BD2) are working fine via SPP. Now, I am going to test two connections simultaneously.
2. Establish one connection, say cellphone-> BD1. ---> OK. Cellphone could read data from terminal 1 in PC using this connection.
2.1 Establish another connection( cellphone -> BD2). ---> OK. No exception be threw and the link was established successfully.
Once the second connection was established, what I typed in terminal 1 will be forward and received by second connection. In the other hand, no data will be received in connection 2 that was typed in terminal 2.
Discussion I paste my bug report HERE. If I were right, the blue font part is the process that establish first connection, and the black font, under the blue font, is the process to establish second connection.
The reason I doubt that "more than one RFCOMM could be established" is in the bug report, I put it as bold fonts. We could see that both of them are using "rc chan 1", does this mean they ues the same RFCOMM??
Any recommend or suggestions are very very welcome!
share|improve this question
There is a similar problem...posted as follow:android.git.kernel.org/?p=platform/frameworks/… – user462358 Oct 4 '10 at 17:23
add comment
1 Answer
had the same problem on android 2.1, try android 2.2 and you will have 2 concurrent SPP/RFCOMM sessions working correctly (with none of that crosstalk). Im trying to get 3 and above concurrent connections up and running here on a Galaxy S phone (to 3 SPP slave devices) but it isnt connecting any more than 2 devices. Anyone know where this limit is being enforced? The straight BlueZ stack doesnt have this limitation.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/3857508/could-more-than-one-rfcomm-channels-be-created-per-time?answertab=active | dclm-gs1-216040000 |
0.035112 | <urn:uuid:182f8249-0d72-48bf-b1a2-573ff2ecfd7e> | en | 0.751578 | Take the 2-minute tour ×
I have an input field I want to assign a new value and fire an .onchange() event. I did the following:
Where range is my input Id. I get the following error:
Uncaught TypeError: Cannot read property 'target' of undefined
Is there a way to define the 'target'? Thank you
share|improve this question
add comment
5 Answers
up vote 5 down vote accepted
The error about target is because there's code in the event handler that's trying to read the target property of the Event object associated with the change event. You could try passing in an faux-Event to fool it:
var range= document.getElementById('range');
range.onchange({target: range});
or, if you can, change the handler code to use this instead of event.target. Unless you are using delegation (catching change events on child object from a parent, something that is troublesome for change events because IE doesn't ‘bubble’ them), the target of the change event is always going to be the element the event handler was registered on, making event.target redundant.
If the event handler uses more properties of Event than just target you would need to fake more, or go for the ‘real’ browser interface to dispatching events. This will also be necessary if event listeners might be in use (addEventListener, or attachEvent in IE) as they won't be visible on the direct onchange property. This is browser-dependent (fireEvent for IE, dispatchEvent for standards) and not available on older or more obscure browsers.
share|improve this answer
add comment
Try using fireEvent or dispatcEvent (depending on browser) to raise the event:
if (document.getElementById("range").fireEvent) {
} else if (document.getElementById("range").dispatchEvent) {
var clickevent=document.createEvent("MouseEvents");
clickevent.initEvent("click", true, true);
share|improve this answer
I think fireEvent() is an IE-only thing. Standards-compliant browsers use dispatchEvent(). – Pointy Oct 22 '10 at 12:18
I am getting an "Uncaught TypeError: Object #<an HTMLInputElement> has no method 'fireEvent'" error with this – Mircea Oct 22 '10 at 12:18
@Pointy: you are right, I updated - thanks – GôTô Oct 22 '10 at 12:27
Thanx, it works! – Mircea Oct 22 '10 at 12:43
add comment
This seems to work for me (see this fiddle). Do you have any other code that may be the problem? How did you define your onchange handler?
Are you calling e.target in your onchange handler? I suspect this may be the issue... since you are doing the change programmatically, there is no corresponding window event.
share|improve this answer
add comment
from : http://www.mail-archive.com/[email protected]/msg44887.html
Sometimes it's needed to create an event programmatically. (Which is different from running an event function (triggering)
This can be done by the following fire code
> var el=document.getElementById("ID1")
> fire(el,'change')
> function fire(evttype) {
> if (document.createEvent) {
> var evt = document.createEvent('HTMLEvents');
> evt.initEvent( evttype, false, false);
> el.dispatchEvent(evt);
> } else if (document.createEventObject) {
> el.fireEvent('on' + evttype);
> } } looks like this trick is not yet in jQuery, perhaps for a
> reason?
share|improve this answer
add comment
Generally, your code should work fine. There might be something else that's issuing the problem, though.
• Where do you run those two lines?
• Are you sure that the element with the range id is loaded by the time you run the code (e.g. you run it in document.ready).
• Are you sure that you only have one element with id range on the page?
• What is your onchange() function doing (could be helpful to post it here)?
Apart from that, I would recommend using jQuery (if possible):
or just
But as I mentioned, your case should work fine too: http://jehiah.cz/a/firing-javascript-events-properly
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/3996616/javascript-manually-firing-onchange-event?answertab=oldest | dclm-gs1-216050000 |
0.885058 | <urn:uuid:1efd53ce-395c-48ff-bb5b-0ca1db3b9c68> | en | 0.852957 | Take the 2-minute tour ×
I have some asp code with an asp:Repeater object.
I am familiar with using <%# Eval("field") to print dataitem.field to the HTML code. However, what can I do if I want to get the result of Eval("field") saved to a string literal for further processing?
Update: I feel like I owe an apology for not being more specific. As the first answerer suggetss, I am planning to use the result in an ItemTemplate. However, what about field of the current record that are not strings? What if I have some complex type that contains all sorts of weird ** and I want to refer to the fields in my item template, and not as strings?
share|improve this question
I can't believe that there is no answer to this except to try to do what I'm doing some other way. – Daniel Allen Langdon Nov 9 '10 at 21:16
add comment
5 Answers
I'm not sure if this is what you're asking for, but if you want to do an Eval in a context outside of .aspx markup, you can use the DataBinder.Eval method directly in your code.
share|improve this answer
add comment
You should use Server Control for this:
<asp:Repeater ID="aRepeater" runat="server">
<asp:HiddenField ID="SomeHiddenField" runat="server" value='<%# Eval("FieldID") %>' />
You can retrieve the value of "FieldID" later by accessing the "Value" property of the HiddenField control.
share|improve this answer
add comment
Another way to approach this is to use a specialized view class which is either built from the data you're using, or is simply a wrapper around your class. Deal with the 'complex' operations in your C# code and expose the result as a property on the class you pass to your aspx file.
share|improve this answer
add comment
As Arief said, you need to use a server control for this.
To access the data in the code behind, you need to loop through the repeater items, find the control, and then access the value.
So, assuming you have a repeater with a literal in the item template (ltlFieldId), here is how you can access the value stored in the literal:
For Each ri As RepeaterItem In MyRepeater.Items
Dim ltlFieldId As Literal = ri.FindControl("ltlFieldId")
Dim FieldId As Integer = CType(ltlFieldId.Text, Integer)
share|improve this answer
add comment
Have you tried casting the return of Eval() to whatever type you're expecting?
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/4138275/how-to-get-result-of-evalx-in-my-c-sharp-code/4138775 | dclm-gs1-216070000 |
0.27163 | <urn:uuid:318f16d2-1c9c-4884-b369-385b965a3c32> | en | 0.90551 | Take the 2-minute tour ×
I am currently working on a project that involves many subprojects that all have the same directory structure. I would like to setup a system where I can run ant build and ant will go through each folder and run it's target on each of the folders.
There are multiple tasks like this besides compiling that I need to execute on each of the subprojects.
Does there already exist a method to handle this? Do I need to resort to scripting solutions?
share|improve this question
You should consider using Maven builds. In my experience, ANT scripts are evil if greater than 2 pages, and really evil, when they call each other. – Gábor Lipták Nov 10 '10 at 12:26
I've always wondered about Maven. For this case specifically, how would having Maven builds help? – Sandro Nov 10 '10 at 21:53
add comment
1 Answer
up vote 4 down vote accepted
look here good tutorial http://www.javaranch.com/journal/200603/AntPart1.html But in summary the subAnt task should work
share|improve this answer
Perfect! That is exactly what I was looking for. – Sandro Nov 10 '10 at 4:03
add comment
Your Answer
| http://stackoverflow.com/questions/4138956/ant-how-can-i-perform-tasks-on-multiple-projects | dclm-gs1-216080000 |
0.604311 | <urn:uuid:0e144db2-5ae3-4af1-b61f-e9ec1d48840f> | en | 0.705063 | Take the 2-minute tour ×
I'm new spring and I'm wondering if its possible to use numerous transaction managers in the same application?
I have two data access layers - one for both of the databases. I'm wondering, how do you go about using one transaction managers for one layer and different transaction manager for the other layer. I don't need to perform transactions across both databases - yet. But I do need perform transactions on each database individually. I've created an image to help outline my problem:
alt text
Here is my application context configuration:
<context:component-scan base-package="cheetah.repositories" />
<tx:annotation-driven />
<bean id="entityManagerFactory"
<property name="persistenceUnitName" value="accounts" />
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<bean id="transactionManager"
Here is an example that uses this configuration:
public class JpaAccountRepository implements AccountRepository {
@PersistenceContext(unitName = "cheetahAccounts")
private EntityManager accountManager;
public Account findById(long id) {
Account account = accountManager.find(Account.class, id);
return account;
So for the account repository, I want to use an entity manager factory with the persistence unit set to accounts. However, with my BusinessData Repository, I want to use an entity manager factory with a different persistence unit. Since I can only define one transaction manager bean, how can I go about using different transaction managers for the different repositories?
Thanks for any help.
share|improve this question
add comment
2 Answers
up vote 24 down vote accepted
Where you use a @Transactional annotation, you can specify the transaction manager to use by adding an attribute set to a bean name or qualifier. For example, if your application context defines multiple transaction managers with qualifiers:
<bean id="transactionManager1"
<property name="entityManagerFactory" ref="entityManagerFactory1" />
<qualifier value="account"/>
<bean id="transactionManager2"
<property name="entityManagerFactory" ref="entityManagerFactory2" />
<qualifier value="businessData"/>
You can use the qualifier to specify the transaction manager to use:
public class TransactionalService {
public void setSomethingInAccount() { ... }
public void doSomethingInBusinessData() { ... }
share|improve this answer
Nice one - good answer . :-) – David Victor Nov 3 '11 at 16:34
What about if there is a method that reads data from the database where you dont need to use the @Transactional annotation for database reads. – ziggy May 24 '12 at 11:58
add comment
This Spring Jira entry discusses the issue a bit:
I think it could be one transaction manager per connection if you're not using two-phase commit. You just need to create two transaction managers and inject them with the appropriate connection.
But I must ask the question: why do you think you need two transaction managers? You can have more than one database connection. The DAOs that use the connections can and should be instantiated by different services, each of which can be annotated with their own transactional settings. One manager can accommodate both. Why do you think you need two?
share|improve this answer
I thought I needed two transaction managers because the transaction manager specifies the entity manager factory, which in turn specifies the persistence unit to be used. – Brian DiCasa Dec 12 '10 at 18:26
@Brian that sounds reasonable @Duffymo +1 – Sean Patrick Floyd Dec 12 '10 at 21:02
add comment
Your Answer
| http://stackoverflow.com/questions/4423125/spring-is-it-possible-to-use-multiple-transaction-managers-in-the-same-applica | dclm-gs1-216110000 |
0.102169 | <urn:uuid:a5319ebe-0452-43be-afd9-ce5dcb990b5d> | en | 0.816563 | Take the 2-minute tour ×
I'm new to a lot of what I'm trying to do with the development of a new MVC2 web application so this is a beginner question.
I need to understand my options for control and content layout on a web page. I’m using MVC2 so I’m using Controllers, Views, ViewModels, and View Templates. What I need to spin up on…fast…is control the granular layout of controls and content on any particular view.
Below I’ve pasted two examples of auto generated templates that illustrate my challenge. I see that layout is controlled by CSS in my Site.css document. In the first example I get a sequential flow of DisplayLabel and DisplayField. I prefer the adjacent layout of DisplayLabel on the same line as DisplayField produced from example 2. However, example 2 is too simple because the formatting is applied to the Label and the Field.
I think the correct way to tackle this learning curve is Microsoft Expression but I don’t have personal bandwidth at the moment to tackle Expression.
Can anyone point me to a resource that will expose me to lots of examples for CSS formatting? I have lots of syntax questions. For instance, I believe is referencing the Site.css but I can’t find a "display-label" section in Site.css.
Example 1
<div class="display-label">DocTitle</div>
<div class="display-field"><%: Model.DocTitle %></div>
<div class="display-label">DocoumentPropertiesID</div>
<div class="display-field"><%: Model.DocumentPropertiesID %></div>
Example 2
<h2>Title: <%: Model.DocTitle %></h2>
<h2>Created: <%: Model.Created %></h2>
<h2>Modified: <%: Model.Modified %></h2>
<h2>Author: <%: Model.tbl_Author.Name %></h2>
<h2>Genre: <%: Model.tbl_DocumentGenre.GenreName %></h2>
share|improve this question
add comment
2 Answers
up vote 2 down vote accepted
The examples you posted uses two different HTML elements for structure and the way the content is displayed is different in these examples. First example uses a <div> tag for displaying property name and another one for displaying the value. You can show it in the same line like this:
<div>DocTitle:<%: Model.DocTitle %></div>
<div>DocumentPropertiesID:<%: Model.DocumentPropertiesID %></div>
It's just like the 2nd example. Both the property name and its value is in the same tag. <h2> tag is used for displaying headings. If you get similar layout, CSS may have some rules for displaying texts larger in div. If you can't find rules for those classes, look up rules for div.
Note: It's not a good idea to display content directly in block elements like div. You could place them in a span tag.
Here's a few resources for HTML and CSS:
share|improve this answer
Thanks for the resources. I did end up at w3school's yesterday. I also went to Barnes & Noble to kick start my brain. – Cory Mathewson Dec 31 '10 at 15:49
add comment
It looks like you want something like along these lines
<span class = "display-label">Title:</span>
<span class = "display-field"><%: Model.DocTitle %></span>
<span class = "display-label">Created:</span>
<span class = "display-field"><%: Model.Created %></span>
<span class = "display-label">Modified:</span>
<span class = "display-field"><%: Model.Modified %></span>
<span class = "display-label">Author:</span>
<span class = "display-field"><%: Model.tbl_Author.Name %></span>
<span class = "display-label">Genre:</span>
<span class = "display-field"><%: Model.tbl_DocumentGenre.GenreName %></span>
Of course, you'll need to tune the CSS for display-field and display-label. You'll want to remove their block definition if they have one.
In addition, if you don't have time enaugh to take the initial CSS learning step, you may have to be pragmatic and fallback on a <table> in order to simplify the layout tuning.
BTW, the stock Site.css of an ASP.NET MVC app does contain a .display-label definition. Please double-check. If you don't have one, then... simply the corresponding formatting will not be applied (stock display-label is gray text IIRC).
share|improve this answer
Thanks for the response. You're spot on from where I ended up after reading and poking about. As Ufuk pointed out above I had to recognize I was using the wrong tags. What I ended up with looks almost exactly like your example. VS 2010 has a great CSS tool. When you are view the Site.css page there is a tool bar for creating CSS code such as Styles and Style Rules. With this tool you can quickly code Elements and Classes in the site CSS. There is more to the tool but my brain is smoking. – Cory Mathewson Dec 31 '10 at 15:56
add comment
Your Answer
| http://stackoverflow.com/questions/4555608/mvc-2-view-layout-css-control-layout | dclm-gs1-216130000 |
0.091109 | <urn:uuid:37ddccd4-9311-4757-8f63-6b075e02c446> | en | 0.850479 | Take the 2-minute tour ×
I am wondering whether it is a good idea to refactor my Rails code from Rails Willpaginate to JQuery datatables as I am finding it takes lot of time to code Sorting, Ajaxing the calls, Exporting to CSV/Excel etc.
Any experience so far from others about datatables? Do you recommend to go for it with Rails?
Thanks, Arshad
share|improve this question
add comment
1 Answer
jQuery Datatables work out of the box independent from a rails app. If you have a lot of rows you might consider to sort them on the server side.
Here is a example for a PHP integration that you might use for orientation for your ruby implementation: http://www.datatables.net/examples/data_sources/server_side.html
This is a rails plugin for datatables: https://github.com/phronos/rails_datatables
So you can perfectly use will_paginate for tables you cover with datatables via ajaxsource.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/4573111/willpaginate-plugin-vs-jquery-datatables | dclm-gs1-216150000 |
0.142467 | <urn:uuid:a188b1d3-c5f6-4868-bc7d-8bde3da56c24> | en | 0.87128 | Take the 2-minute tour ×
I have a problem where I must analyse 500C5 combinations (255244687600) of something. Distributing it over a 10 node cluster where each cluster processes roughly 10^6 combinations per second means the job will be complete in about 7hours.
The problem I have is distributing the 255244687600 combinations over the 10 nodes. I'd like to present each node with 25524468760, however the algorithms I'm using can only produce the combinations sequentially, I'd like to be able to pass the set of elements and a range of combination indicies eg: [0-10^7) or [10^7,2.0 10^7) etc and have the nodes themselves figure out the combinations.
The algorithms I'm using at the moment are from the following:
A logical question
I've considered using a master node, that enumerates each of the combinations and sends work to each of the nodes, however the overhead incurred in iterating the combinations from a single node and communicating back and forth work is enormous, and will subsequently lead to the master node becoming the bottleneck.
Are there any good combination iterating algorithms geared up for efficient/optimal distributed enumeration?
share|improve this question
Not much experience in this area, but it sounds like a problem that google MapReduce could be applied to. – Merlyn Morgan-Graham Jan 15 '11 at 8:27
MapReduce is irrelevant here, as the question is about the "Map" part of the term: How does one efficiently map a n-choose-k space problem into m parts without the need for a central distributor. – Matthieu N. Jan 15 '11 at 8:30
@Reyzooti: Hence the "not much experience". Happy to be corrected, though. – Merlyn Morgan-Graham Jan 15 '11 at 8:34
Permutations can be systematically numbered using the factorial number system. In your case only one out of each 495!*5! permutation is a relevant combination. So I gather, you can probably compute the start permutation = combination for each node, then just go on from there. This idea may pan out or not. Depending on the details; it's just an idea. ;-) Cheers & hth., – Cheers and hth. - Alf Jan 15 '11 at 8:50
@Alf: Can you please provide a more in pdeth explanation please. – Matthieu N. Jan 15 '11 at 9:15
show 1 more comment
2 Answers
You may have some success with combinatorial numbers, which allow you to retrieve the N'th (n/10th) k-combination with a simple algorithm; then run the next_combination algorithm n/10 times on each of the ten nodes to iterate.
Sample code (in C#, but quite readable for a C++ programmer) can be found on MSDN.
share|improve this answer
The James McCaffrey article, where he describes a method to get the Nth combination is too expensive. Using next_combination (links) mutates the original range, perhaps something that can determine what the range looks like at the Nth combination, because one could pass that specific range to a compute node. – Matthieu N. Jan 15 '11 at 9:20
Why is it too expensive? You only need to run this 10 times on the master, then run next_combination on the compute nodes. – larsmans Jan 15 '11 at 9:46
@Reyzooti: if you have an index-based thing, then turning it into a RandomAccessIterator is easy --> keep a pointer to the sequence and an index in the iterator :) – Matthieu M. Jan 15 '11 at 13:04
What's with the downvoting? – larsmans Feb 23 '11 at 10:01
add comment
Have node number n process every tenth combination, starting from the nth.
share|improve this answer
Still requires each node to iterate over every n-choose-k combos, which results in 90% iteration redudancy per node, less overhead than the master node solution however still more than distributing ranges of combinations. – Matthieu N. Jan 15 '11 at 9:14
add comment
Your Answer
| http://stackoverflow.com/questions/4698630/enumerating-combinations-in-a-distributed-manner | dclm-gs1-216160000 |
0.161403 | <urn:uuid:c6061c1a-ae09-47c4-88d8-07e5430d8fec> | en | 0.837353 | Take the 2-minute tour ×
In JavaScript there is the possibility to create getters and setters the following way:
function MyClass(){
var MyField;
return MyField;
MyField = value;
But is there a way to get the Getter or Setter FUNCTION? I think of something like this:
var obj = new MyClass();
I need such a functionality when extending base classes. For example: Class "A" has field "a", Class "B" extends from "A" and also wants to have a field "a". To pass values from the "a"-field of a "B"-object to the "a"-field of a "A"-object I need to get the setter/getter function before overriding them.
Hope you understand what I mean.
Thanks for your help!
Ok I found the functions I wanted. Their names are lookupSetter and lookupGetter
share|improve this question
I would advice against relying on that non-standard syntax. – ChaosPandion Jan 27 '11 at 23:04
you can add the answer as an answer and select it since you found it for yourself – zzzzBov Jan 27 '11 at 23:05
add comment
3 Answers
up vote 6 down vote accepted
__lookupGetter__ and __lookupSetter__ are what you're after.
share|improve this answer
add comment
Take a look at lookupGetter.
share|improve this answer
add comment
In Google Chrome lookupGetter/lookupSetter is broken: http://code.google.com/p/chromium/issues/detail?id=13175
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/4822953/javascript-get-getter-function | dclm-gs1-216170000 |
0.437575 | <urn:uuid:7e081672-bee1-4db3-947a-06fd07730f1c> | en | 0.93752 | Take the 2-minute tour ×
I have two app servers (in this case Tomcat but it needn't be this container) which are running the same application with a load balancer directing work to them.
Behind these servers I have a single database which both servers wish to connect to via Hibernate. I want to cache common object requests using EhCache. In a single server setup this is a trivial configuration change to Hibernate to use the EhCache provider.
However, I don't want each server to have its own cache, I think I want a central cache which both servers use.
Originally, I thought this would be a simple matter of setting up the standalone EhCache server and pointing the hibernate configuration at them. However, I have been unable to identify how this can be performed (if at all).
My questions are: Can this setup exist and how does one set it up?
If this isn't possible, is there some other way (or other caching provider) in which I maintain a common hibernate cache between applications?
share|improve this question
add comment
1 Answer
up vote 1 down vote accepted
I am not aware of any EhCache server that can be accessed from several machines. You might write it yourself and expose e.g. REST API, but you would also have to implement your own CacheRegionFactory for Hibernate to use the remote server behind the scenes. A lot of work and the result will most likely be unsatisfactory due to network latency.
Another approach is to have a shared CacheManager that can be used by several application within one JVM. But since you have several JVMs, this is not an option. Also it requires that EhCache.JAR is laoded only once by a parent class-loader since it uses simple static field to preserve single instance.
Finally, the answer to your question is either using cache replication or Terracotta. While Terracotta is very sophisticated product, EhCache cache replication is very mature and stable.
The idea is simple: each server has an independent instance of cache manager, but the cache managers are discovering themselves automatically using UDP and network broadcast. When a change occurs in one of the caches, it is propagated to other peers. It is not very scalable, but for two server it should work fine.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/4949778/running-multiple-applications-using-hibernate-with-a-single-standalone-ehcache-s | dclm-gs1-216190000 |
0.083175 | <urn:uuid:1d2ba3fe-3e4c-4432-9be6-d4fc0ed43c09> | en | 0.790756 | Take the 2-minute tour ×
I have a user_mailer with a layout.
For one of my actionmailer methods I want the mailer to NOT use the default layout. But I can't see to find a setting for No Layout.
Any ideas?
share|improve this question
add comment
2 Answers
up vote 14 down vote accepted
Simply specify in your mailer:
layout false
You can also append :only => my_action (or :except) to limit the methods it applies to.
(applicable API documentation)
share|improve this answer
Andrew, thanks but I want this for one mailer, not all. Where would this go when I have something like def XXX mail(:to => ....) end – AnApprentice Mar 7 '11 at 1:21
See updated answer. There is, always, more detail in the API as well. – Andrew Marshall Mar 7 '11 at 1:24
add comment
The layout method can accept the name of a method; use the method to determine whether to show a layout and return that name or false.
layout :choose_layout
def choose_layout
if something
return false
return 'application'
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/5214738/rails-for-actionmailer-how-to-disable-a-layout-for-a-certain-mailer?answertab=active | dclm-gs1-216230000 |
0.01945 | <urn:uuid:d7ba67ab-4baa-4668-ad28-647ab816364c> | en | 0.910806 | Take the 2-minute tour ×
I notice that Mail.app, iTunes and even Finder have a similar template, with a various columns, but often, a left Column with "folders" and "files". Is this a sort of standard template, that I can use so as to not reinvent the wheel?
share|improve this question
add comment
2 Answers
up vote 1 down vote accepted
No, Apple does not provide a control that acts like a finder window, etc., although it is a common request and you might want to file a bug report at http://bugreport.apple.com making this request...it would help push them along to provide such a standard control.
However, there are several controls that implement various aspects that you may want to take a look at like NSTableView, NSOutlineView, NSCollectionView & IKImageBrowser.
Although, to get everything you want, you may have to reinvent the wheel. I have generally found these control hard to customize if they do not provide everything you need out-of-the-box...but they do provide a lot out-of-the-box.
share|improve this answer
Brilliant, that's just what I needed to know. Thanks Eric.. I'm copying the post into a local note so I will remember, and will file a request on Radar.. Thanks again. David – David DelMonte Mar 7 '11 at 4:53
I hope there is an NSFileOutlineView in Lion (subclass of NSOutlineView). – user142019 Mar 7 '11 at 11:12
@radek well, file a bug report. – ericgorr Mar 7 '11 at 13:38
add comment
Nopes, but you can create your own templates so you only have to reinvent the wheel once.
By the way, you can decompile nibs from some applications by copying two files from an empty nib into them.
By the way, if you decompile Finder's nibs, you see that they are very messy and the sidebar is in a separate nib. I guess they are combined programmatically.
By the way, iTunes uses Carbon nibs while Finder and Mail use Cocoa nibs.
By the way, Mail is soon to be replaced with a new version that has a totally different lay-out.
share|improve this answer
hmm. Hi Radek.. "you can decompile nibs from some applications by copying two files from an empty nib into them". Could you say more about that. And thanks for answering.. – David DelMonte Mar 7 '11 at 4:02
I did hear about this sample code that at least has the left side columnsbuilt: developer.apple.com/library/mac/#samplecode/SourceView – David DelMonte Mar 8 '11 at 2:31
@David DelMonte well, the Hulu app has nibs that are not compiled. There are two files in them that are missing in the nibs from the Finder. If you copy these two files in the Finder nibs than you can open them. Google 'nib decompiler hulu'. – user142019 Mar 8 '11 at 11:58
add comment
Your Answer
| http://stackoverflow.com/questions/5214801/xcode-for-mac-programming-are-there-standard-templates | dclm-gs1-216240000 |
0.287161 | <urn:uuid:0f5f0a61-54f9-414f-8004-a3f5001f2f53> | en | 0.657476 | Take the 2-minute tour ×
I have server in C++ writen with boost.asio and php client. when i send over small amount of data i get all the data but when i send long string i loose most of it.
Here is the part where i send data from my server, it says i have sent out 65536 bytes
void handle_write(const boost::system::error_code& /*error*/,
size_t size/*bytes_transferred*/) {
cout <<size<<endl;
void handler_read(const boost::system::error_code&, std::size_t size) {
istream is(&buffer);
string myString;
getline(is, myString);
Manager myManager(myString);
string response = myManager.getResponse();
boost::bind(&tcp_connection::handle_write, shared_from_this(),
Here i make the string i will be sending
string getMap(string name, string pass) {
if (name == "admin" && pass == "123") {
string response = "";
ConvertTypes types;
response = types.intToString(MAP_HEIGHT) + " ";
response += types.intToString(MAP_WIDTH) + "\r\n";
for (int i=0; i<MAP_HEIGHT;i++) {
for (int j=0;j<MAP_WIDTH;j++) {
response += types.intToString(
worldMap[i][j].getHeight()) + " ";
response += types.intToString(
worldMap[i][j].getIsTown()) + " ";
response += string (1, worldMap[i][j].getTetrain())
return response;
} else {
return "";
On php side i read the sent data, stream_get_meta_data says i only received 8183 bytes of data.
for ($i=0; $i<$MAP_HEIGHT;$i++) {
for ($j=0; $j<$MAP_WIDTH;$j++) {
$this->response = $this->socket->readLine();
$this->response = explode(' ', $this->response);
echo "<p>";
echo "$i $j <br>";
echo '<br>';
$map[$i][$j] = array_combine($keyArray, $this->response);
} }
share|improve this question
I don't know PHP, however there's no guarantee that network packets will all be delivered in one block, if you wait a bit and then try reading again, is there more information available? – forsvarir Mar 17 '11 at 15:45
add comment
2 Answers
I've found a answer. I was sending data from server in unsafe way. When async_write gave up controll to something else rest of the data was lost.
You have to pass string to this class:
class shared_const_buffer {
// Construct from a std::string.
explicit shared_const_buffer(const std::string& data)
: data_(new std::vector<char>(data.begin(), data.end())),
// Implement the ConstBufferSequence requirements.
typedef boost::asio::const_buffer value_type;
typedef const boost::asio::const_buffer* const_iterator;
const boost::asio::const_buffer* begin() const { return &buffer_; }
const boost::asio::const_buffer* end() const { return &buffer_ + 1; }
boost::shared_ptr<std::vector<char> > data_;
boost::asio::const_buffer buffer_;
and send this buffer not raw string. That way you don't loose data.
share|improve this answer
add comment
You can send one large block via socket, but receiving side might get several blocks of smaller sizes, for example:
send -> 10000 bytes
receive <- 3000 bytes
receive <- 2000 bytes
receive <- 4500 bytes
receive <- 500 bytes
this is only an example, TCP does not guarantee send and receive blocks will be the same size.
share|improve this answer
+1 one call to send on the server side does not equal one call to recv on the client side. This is an important concept to understand. – Sam Miller Mar 17 '11 at 18:34
add comment
Your Answer
| http://stackoverflow.com/questions/5341258/sent-and-received-data-isnt-the-same-size?answertab=active | dclm-gs1-216260000 |
0.329376 | <urn:uuid:5945485f-712e-4cb9-89ae-82049e74123a> | en | 0.93695 | Take the 2-minute tour ×
How would I play an audio file throughout the entire clip that I am making? It is a recording of myself narrating a video, so it has to start as soon as the video star
share|improve this question
add comment
3 Answers
up vote 1 down vote accepted
Import to the Library, drag to the stage. Make sure there are enough frames to play the whole thing.
share|improve this answer
Okay, so I imported the WAV. file into flash and attached it to the first frame. It is timed amazingly, but there was a DRASTIC degradation in quality. Why is this and how can I fix it? – Kudla69 Mar 18 '11 at 18:22
Vote for my answer and I'll tell you...jk – Sam Mar 19 '11 at 1:36
If you right click on the item in the library, and choose properties, there are some options for compression. By default, I think flash imports at 16kbps which is pretty bad, but small. I would change it to mp3 and set the rate to the lowest value you think sounds good. – Sam Mar 19 '11 at 1:38
add comment
There are timing issues with this.
Video buffering and audio buffering could potently make them out of sink with each other.
Best bet is to edit the video clip and overlay the audio.;
or import them into the fla and have one giant swf at the end.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/5345268/playing-music-throughout-a-flash-video | dclm-gs1-216270000 |
0.8102 | <urn:uuid:6986b876-5d6e-4aaa-9362-420bb13eaff7> | en | 0.895646 | Take the 2-minute tour ×
When I do the following.. anything done to Person b modifies Person a (I thought doing this would clone Person b from Person a). I also have NO idea if changing Person a will change Person b after the linking. Due to my code right now, I can only see this in 1 direction.
Person a = new Person() { head = "big", feet = "small" };
Person b = a;
b.head = "small"; //now a.head = "small" too
Now if I do this instead.. Person a becomes completely separate.
Person b = new Person() { head = a.head, feet = a.feet };
Now this fine and kinda makes sense when comparing this behaviour to other things in C#. BUT, this could get very annoying with large objects.
Is there a way to shortcut this at all?
Such as:
Person b = a.Values;
share|improve this question
Can you give an example of what you're trying to accomplish with this? This isn't the sort of thing that's needed frequently. Maybe there's another way to accomplish your task. – John Saunders Mar 19 '11 at 1:17
It is called "deep copy", search for this. Your example is a very good one for why you rarely actually do this. The odds that one person would have the exact same traits as another one are quite rare. – Hans Passant Mar 19 '11 at 1:18
Note that the word "linking" is not used for what you're doing there. This is an assignment. The question header implies that the question has something to do with the linker. – steinar Mar 19 '11 at 1:22
Sorry about the terminology, I don't know how to properly define everything yet. I'm basically storing a bunch of settings in a object. Then another object takes those settings and builds itself from them. Unfortunately (for me right now), building the second object changes the first object because of this behavior. Maybe I shouldn't be storing my settings in an object, but I don't know how else to do it because of how complex it is. – PiZzL3 Mar 19 '11 at 1:30
This isn't a link at all. They're the same object. You've got two references to the same object. – John Saunders Mar 19 '11 at 1:30
add comment
5 Answers
up vote 9 down vote accepted
Is there a way to shortcut this at all?
No, not really. You'll need to make a new instance in order to avoid the original from affecting the "copy". There are a couple of options for this:
1. If your type is a struct, not a class, it will be copied by value (instead of just copying the reference to the instance). This will give it the semantics you're describing, but has many other side effects that tend to be less than desirable, and is not recommended for any mutable type (which this obviously is, or this wouldn't be an issue!)
2. Implement a "cloning" mechanism on your types. This can be ICloneable or even just a constructor that takes an instance and copies values from it.
3. Use reflection, MemberwiseClone, or similar to copy all values across, so you don't have to write the code to do this. This has potential problems, especially if you have fields containing non-simple types.
share|improve this answer
Thanks, that sums it up nicely. I think I'll have to figure out a different way to store my data or make a special constructor. – PiZzL3 Mar 19 '11 at 2:11
add comment
What you are looking is for a Cloning. You will need to Implement IClonable and then do the Cloning.
class Person() : ICloneable
public string head;
public string feet;
#region ICloneable Members
public object Clone()
return this.MemberwiseClone();
Then You can simply call the Clone method to do a ShallowCopy (In this particular Case also a DeepCopy)
Person b = (Person) a.Clone();
You can use the MemberwiseClone method of the Object class to do the cloning.
share|improve this answer
Do not use IClonable: blogs.msdn.com/b/brada/archive/2003/04/09/49935.aspx – Robert Levy Mar 19 '11 at 1:26
@Robert Levy: I know the difference arise between Shallow Copy and Deep Copy, when you have Reference type of members in the class. – Shekhar_Pro Mar 19 '11 at 1:32
add comment
a and b are just two references to the same Person object. They both essentially hold the address of the Person.
There is a ICloneable interface, though relatively few classes support it. With this, you would write:
Person b = a.Clone();
Then, b would be an entirely separate Person.
You could also implement a copy constructor:
public Person(Person src)
// ...
There is no built-in way to copy all the fields. You can do it through reflection, but there would be a performance penalty.
share|improve this answer
@Robert, 1. The difference between deep copy and shallow copy is irrelevant here, because the class only has two fields, both with immutable types. 2. I didn't recommend ICloneable. I listed it as an option. 3. That is not an official guideline, just a discussion of a plan to add it to the official guidelines (I don't know if it made it). – Matthew Flaschen Mar 19 '11 at 1:37
it did make it to the official guidelines – Robert Levy Mar 19 '11 at 2:07
@Robert, can you post the official link, so I can see the details? – Matthew Flaschen Mar 19 '11 at 2:47
section 8.5 of the book (second edition) amazon.com/Framework-Design-Guidelines-Conventions-Libraries/dp/… – Robert Levy Mar 19 '11 at 3:32
show 1 more comment
You could do it like this:
var jss = new JavaScriptSerializer();
var b = jss.Deserialize<Person>(jss.Serialize(a));
For deep cloning you may want to take a look at this answer: http://stackoverflow.com/a/78612/550975
share|improve this answer
add comment
This happens because "Person" is a class, so it is passed by reference. In the statement "b = a" you are just copying a reference to the one and only "Person" instance that you created with the keyword new.
The easiest way to have the behavior that you are looking for is to use a "value type".
Just change the Person declaration from
class Person
struct Person
share|improve this answer
This just makes it harder to have a class. 'Cannot have instance initalizers in structs' – Bonzo Oct 6 '12 at 18:34
add comment
Your Answer
| http://stackoverflow.com/questions/5359318/how-to-clone-objects/5359336 | dclm-gs1-216280000 |
0.106869 | <urn:uuid:5240fc03-44f0-4418-a5c8-10df3284a4ad> | en | 0.906073 | Take the 2-minute tour ×
I have a way to set should_receive expectations on a mock object, but it strikes me as a bit odd.
def mock_fax_event(stubs={})
@mock_fax_event ||= mock_model(FaxEvent, stubs)
it "should notify facility/admin of failed faxes" do
FaxEvent.should_receive(:find_by_fax_id).with(@fax_event.fax_id).and_return(mock_fax_event(:notify_failure => true))
post :create, :TransactionID => @fax_event.fax_id
To me, I would like to do something like the following, but it doesn't work:
it "should notify facility/admin of failed faxes" do
post :create, :TransactionID => @fax_event.fax_id
I think I understand why the above doesn't work, but I think the way I'm doing it now is unclear. I would also like to only test if notify_failure is actually called, not the find_by_fax_id part.
Is there a better way to do what I'm trying to do?
share|improve this question
add comment
1 Answer
Your second example doesn't work because it's a chicken-and-egg kind of problem. You're setting an expectation on an object after the post call which is what causes that object to become assigned in the first place. And you can't just swap the lines because assigns doesn't have anything to return yet.
If you don't care about whether or not find_by_fax_id gets called, the best you can do is call FaxEvent.stub(:find_by_fax_id).and_return(...), but that's not much better.
This is one of the reasons I like using Mocha. You can do this:
post :create, :TransactionID => @fax_event.fax_id
It lets you skip the annoying "find my mock object instead of what you'd actually find" step.
Also, :TransactionID goes against naming conventions, it should be :transaction_id.
share|improve this answer
Thanks, I will check out Mocha; I am becoming overwhelmed by testing frameworks. As far as the TransactionID, it's posted into the controller via an external service that I can not control, so not much I can do about it :) Will wait around to see if anyone else has something to say before awarding the answer, thanks for your comment. – Preston Marshall Apr 22 '11 at 6:52
add comment
Your Answer
| http://stackoverflow.com/questions/5725557/more-readable-understandable-way-to-define-should-receive-expectations-before-th | dclm-gs1-216300000 |
0.346139 | <urn:uuid:2a264023-9c56-4808-983d-39ed7c716466> | en | 0.75368 | Take the 2-minute tour ×
How can I show/hide the desktop icons programatically, using C#?
I'm trying to create an alternative desktop, which uses widgets, and I need to hide the old icons.
share|improve this question
add comment
3 Answers
up vote 11 down vote accepted
You can do this using the Windows API. Here is sample code in C# that will toggle desktop icons.
[DllImport("user32.dll", SetLastError = true)] static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", SetLastError = true)] static extern IntPtr GetWindow(IntPtr hWnd, GetWindow_Cmd uCmd);
enum GetWindow_Cmd : uint
GW_HWNDFIRST = 0,
GW_HWNDLAST = 1,
GW_HWNDNEXT = 2,
GW_HWNDPREV = 3,
GW_OWNER = 4,
GW_CHILD = 5,
[DllImport("user32.dll", CharSet = CharSet.Auto)] static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);
private const int WM_COMMAND = 0x111;
static void ToggleDesktopIcons()
var toggleDesktopCommand = new IntPtr(0x7402);
IntPtr hWnd = GetWindow(FindWindow("Progman", "Program Manager"), GetWindow_Cmd.GW_CHILD);
SendMessage(hWnd, WM_COMMAND, toggleDesktopCommand, IntPtr.Zero);
This sends a message to the SHELLDLL_DefView child window of Progman, which tells it to toggle visibility (by adding or removing the WS_VISIBLE style) of it's only child, "FolderView". "FolderView" is the actual window that contains the icons.
To test to see if icons are visible or not, you can query for the WS_VISIBLE style by using the GetWindowInfo function, shown below:
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool GetWindowInfo(IntPtr hwnd, ref WINDOWINFO pwi);
public struct RECT
private int _Left;
private int _Top;
private int _Right;
private int _Bottom;
struct WINDOWINFO
public uint cbSize;
public RECT rcWindow;
public RECT rcClient;
public uint dwStyle;
public uint dwExStyle;
public uint dwWindowStatus;
public uint cxWindowBorders;
public uint cyWindowBorders;
public ushort atomWindowType;
public ushort wCreatorVersion;
public WINDOWINFO(Boolean? filler)
: this() // Allows automatic initialization of "cbSize" with "new WINDOWINFO(null/true/false)".
cbSize = (UInt32)(Marshal.SizeOf(typeof(WINDOWINFO)));
Here is a function that calls the above code and returns true if the window is visible, false if not.
static bool IsVisible()
IntPtr hWnd = GetWindow(GetWindow(FindWindow("Progman", "Program Manager"), GetWindow_Cmd.GW_CHILD), GetWindow_Cmd.GW_CHILD);
WINDOWINFO info = new WINDOWINFO();
info.cbSize = (uint)Marshal.SizeOf(info);
GetWindowInfo(hWnd, ref info);
return (info.dwStyle & 0x10000000) == 0x10000000;
The windows API code along with more information about the window styles can be found here: http://www.pinvoke.net/default.aspx/user32/GetWindowInfo.html
share|improve this answer
Awesome, im going to put that into all my apps from now on and toggle() it randomly. :) – Gleno Jun 19 '11 at 15:13
It doesn't seem to work on my computer... I'm using windows 7. Is this OS dependent? Should it work on all versions of windows? If it is, I will be looking for another solution that works on multiple versions of windows... – Tibi Jun 19 '11 at 18:40
Update: It does work, apparently I had to restart explorer.exe, but now it works. Thank you very much. Another question... how can I know if it is on or off? – Tibi Jun 19 '11 at 19:15
This isn't "using the Windows API", it's more like "abusing the Windows API". None of this is officially documented. – David Heffernan Jun 19 '11 at 19:59
ToggleDesktopIcons doesn't work in Windows 8 – Chuck Savage Dec 4 '12 at 3:46
show 3 more comments
You can create a full screen view application and make it the top most window.
Then make your application to be start up with windows.
share|improve this answer
If I make it top most, it will be on top of all other applications... it needs to be exactly the opposite, the bottom most window, except for the taskbar. – Tibi Jun 19 '11 at 14:20
add comment
You are going about this the wrong way. What you are really trying to do is to replace the shell. Windows provides for this so you should just take advantage of it. Write your own shell to replace explorer.
share|improve this answer
I'm not trying to replace the shell, just the desktop. Instead of having boring icons, I will have some nice widgets. – Tibi Jun 20 '11 at 4:59
add comment
Your Answer
| http://stackoverflow.com/questions/6402834/how-to-hide-desktop-icons-programatically | dclm-gs1-216320000 |
0.037807 | <urn:uuid:c55d505e-a960-4d2c-af55-182b0cc5d0e4> | en | 0.906212 | Take the 2-minute tour ×
We are implementing a voting-system inside an facebook app. The users are able to upload content and vote the content of other users. We are aiming for a low entry-barrier for users who only want to vote other users content. As we want unique votes, we have to identify the users somehow. Is it possible to identify users that did not grant permissions for the app? The signed request does only contain statistic data for the current user (country, locale, age-range) and no session. We do not need any specific data of the user, just something unique per user.
We are using an iframe-app.
share|improve this question
add comment
2 Answers
Basic authentication will give you user ids -- probably the best way to uniquely identify a Facebook user, although it adds friction.
Alternatively for a very low barrier to entry you could use a Like Button and query the Graph for number of votes. If you decide to use the like button, and there is a prize based on the number of votes, please make sure to check Facebook policy on contests.
share|improve this answer
We already thought about using like-buttons but it would be difficult to show a list of our items sorted by votes. The problem with authentication is that we have two kinds of users and we need quite some permissions for those users that participate in the app. It is difficult up to not possible to decide between those user-groups. Tho it is possible to ask for different permissions per user, it is not possible to ask for more permissions later on (or so I believe). – marsbear Jul 22 '11 at 22:43
add comment
up vote 1 down vote accepted
It is not possible to identify a facebook-user that has not granted permissions to the app.
However it is possible to run a layered permission system. The app can ask for basic-authentication and upgrade the permessions later on if need be.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/6792421/how-to-identify-users-that-did-not-grant-access-to-an-app/6860266 | dclm-gs1-216350000 |
0.126547 | <urn:uuid:c09df947-3ec4-4693-9178-b4e393d86fd3> | en | 0.858452 | Take the 2-minute tour ×
We use a private certificate authority powered by OpenSSL to authenticate our customers. We provide a simple web-based utility which allows them to upload a CSR file for the certificate authority to sign.
At the moment, we can only issue certificates for a fixed period, currently 365 days. However, our customers have asked if they can specify the validity period of their certificates instead.
I would prefer not to have to ask the user what validity period they want, since they have to specify a validity period when they generate their CSR, and it makes sense to extract this period from the CSR when signing the certificate. However I can't work out how to do it: the normal things that OpenSSL lets you do to debug CSRs, certificates and keys don't show the relevant information: here's an example of the output of "openssl req -text -noout < csrfile":
$ openssl req -text -noout < my.csr
Certificate Request:
Version: 0 (0x0)
Subject: C=GB, L=London, O=example.com, CN=customer/[email protected]
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (1024 bit)
Modulus (1024 bit):
Exponent: 65537 (0x10001)
Signature Algorithm: sha1WithRSAEncryption
No mention of the requested validity period anywhere.
Any suggestions?
share|improve this question
add comment
3 Answers
I've been trying to figure out how to request a specific validity period in a CSR, and as far as I can tell, the CSR simply doesn't carry that information. The CSR's structure is defined in PKCS#10 / RFC2986, and it doesn't have a field specifically for a requested validity period. The attributes and extensions that can be put in the CSR are listed in PKCS#9, and there's nothing there about validity periods. And finally, I can do a openssl asn1parse on my generated CSRs and find that there's no validity-period-related information included regardless of what I pass to openssl req.
share|improve this answer
add comment
Though you request for a certain validity period for your certificate, while generating the CSR, its uncertain to expect that validity to be acceptable by CA. Most CA's would prefer a predefined validity period and few CA's are OK with the requested validity period and generate the CSR accordingly. Now coming to the point, the CSR ASN.1 structure according to PKCS#10 standard does not specify the validity period. And thus you cannot extract that information from the CSR.
share|improve this answer
add comment
Try to add -days xx parameter to your request creation command
share|improve this answer
Dmitry: your comment doesn't quite answer my question: I already know how to use -days when generating a CSR, and also how to use it when issuing a certificate. What I want to know is how to extract the value for -days that was used when the CSR was generated. – Gavin Brown Apr 7 '09 at 9:51
add comment
Your Answer
| http://stackoverflow.com/questions/721283/extract-requested-validity-period-from-a-certificate-signing-request-using-opens | dclm-gs1-216400000 |
0.895476 | <urn:uuid:8e7f2fc1-d98f-4467-8d01-8fc4b9665a56> | en | 0.953574 | Take the 2-minute tour ×
I would say that I'm bridging the gap between the beginner and intermediate user in SQL Server. I've taught myself through google searches, but I can't find anything decent related to this question.
I have a DB that has gone through many changes and each change has added a full backup set and some size to my backup file. I'm seeing this as a burden as I'm pretty sure I don't need the older backup sets, but would like to keep them in case.
Can anyone point me to a good tutorial or best practices for keeping SQL Backups, or just offer some good advice?
share|improve this question
add comment
2 Answers
up vote 1 down vote accepted
For the time when your app will be in use and has real data in the database, you need to take "real" backups as dougajmcdonald already explained in his answer.
However, as long as your project is still in the development phase, you are taking the backups basically because you want to keep track of things like table definition changes, correct?
If yes, how about storing your changes as T-SQL scripts in source control, together with your actual code that accesses the database?
There are tools that generate CREATE TABLE scripts and stuff like that for an existing database.
Here are a few links to related SO questions:
(search for "sql server source control" if you want to find more)
There are also open source projects like FluentMigrator that help you to track database changes in source code (.net in this case, but there are similar tools for other languages).
Here is a tutorial from the original author of Fluent Migrator, explaining what Fluent Migrator is, why you might need it and how it works.
share|improve this answer
add comment
Normally you would take a backup each (hour/day/week) depending on need, and make these overwrite each previous backup.
You'd then archive these individual files off to perhaps tape, offsite, another server etc etc, and choose how many you wanted to keep based on business/legal need.
So in answer to your question, to keep the backup set down to a sensible size, set it to overwrite existing backups in the file, and then archive the file off to a seperare location at whatever interval you feel is appropriate.
share|improve this answer
Does this still apply if I'm still in development and I don't have any real data? For example I will test my application by entering false data then restoring sever times each week. – John the Ripper Sep 8 '11 at 12:17
If you are in development I would still use a similar method, but not as frequently. I would tend to ensure that changes to the DB are scripted so they can be undone/rolled back anyway, these scripts can then be source controlled too – dougajmcdonald Sep 8 '11 at 12:44
add comment
Your Answer
| http://stackoverflow.com/questions/7347341/managing-sql-backup-sets/7347838 | dclm-gs1-216420000 |
0.175585 | <urn:uuid:5f65245f-7a35-4717-87ca-17621e1629d8> | en | 0.731174 | Take the 2-minute tour ×
I'm using customized tableviewcell and adding image view to the cell. When I'm trying to add accessory discloser indicator to that cell, the accessory view's background is changing to gray color(which is default).
Please see this image Cell
Can any one tell the solution for this??
share|improve this question
add comment
2 Answers
up vote 0 down vote accepted
You can set the default color or any color you want:
cell.backgroundColor=[UIColor clearColor];
cell.backgroundColor=[UIColor blueColor];
share|improve this answer
Try to avoid [UIColor clearColor] on UITableViewCells as it impacts scroll speed negatively due to the extra blending that needs to be done. – hypercrypt Oct 7 '11 at 2:56
add comment
Set the background colour of the cell in tableView:willDisplayCell:forRowAtIndexPath:, e.g.:
cell.backgroundColor = [UIColor blueColor];
share|improve this answer
Fine thank you its working – MohanVydehi Sep 30 '11 at 9:12
add comment
Your Answer
| http://stackoverflow.com/questions/7607549/issue-with-custom-tableviewcell-imageview-and-accessory-view | dclm-gs1-216440000 |
0.020913 | <urn:uuid:8c1141f3-a71f-46dc-a6a7-245fc80226f2> | en | 0.894635 | Take the 2-minute tour ×
I am developing a web app with django 1.2.4, but I am having a problem with the Site model. I try:
from django.contrib.sites.models import Site
if Site._meta.installed:
I am getting the error undefined variable from import: _meta in the if statement, any help?
share|improve this question
Where are you running that? Devserver? – Lycha Nov 3 '11 at 23:51
Works in 1.3.0. I know that doesn't answer your question, but maybe take a look at the change logs. Or, just look in the Site class. – sberry Nov 3 '11 at 23:52
@Lycha I am running in localhost for now – juankysmith Nov 4 '11 at 6:42
By adding an "OK!" to your title, did you mean to imply that you've solved the problem? If so, it might be better simply delete your question, or if you think others may benefit from your solution, post and answer with the details and mark it as the answer. – Shawn Chin Nov 7 '11 at 9:44
No, it was an error: I unintentionally pressed Enter. Can you help me? – juankysmith Nov 7 '11 at 9:47
show 3 more comments
1 Answer
up vote 2 down vote accepted
Unless you've fiddled with the django source, there really should be any problems with the Sites._meta.installed variable. _meta.installed is assigned from within the metaclass of all models (using contribute_to_class()) so it would affect ALL models if the code were broken.
A quick search for relevant tickets does not reveal such a problem for that version (or any other version) of django.
Are you by any chances running django via pydev? If so, perhaps this post is relevant: How do I fix PyDev "Undefined variable from import" errors?
That's of course a wild speculation on my part. If you can post a Trackback of your error, we might be able to get a better insight into your problem.
Response to comments:
"I get the error in the IDE (apatana Studio 3)"
Aptana uses PyDev and so will exhibit the same problem. Here's a possible fix taken from this blog post:
1. Open up Aptana Studio
2. Open Window > Preferences > PyDev > Editor > Code Analysis
3. Select the “Undefined” tab
4. Add DoesNotExist at the end of the “Consider the following names as globals” list
5. Apply and restart
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/8003323/django-incorrect-import | dclm-gs1-216460000 |
0.139057 | <urn:uuid:1c092672-5f40-449e-82b2-e74b7283a7c1> | en | 0.891111 | Take the 2-minute tour ×
I have conflicting branches, branch2 branched from branch1.
Let's say when rebasing branch2 on current branch1, while resolving conflicts, I decide to take some (not all) of "their" (i.e. branch1) files as-is. How do I do that?
I tried:
git checkout branch1:foo/bar.java
fatal: reference is not a tree: TS-modules-tmp:foo/bar.java
git checkout refs/heads/branch1:foo/bar.java
fatal: reference is not a tree: refs/heads/TS-modules-tmp:foo/bar.java
share|improve this question
Note: if you're rebasing branch2 onto branch1, the replaying happens relative to branch1, so "theirs" is actually branch2 and "ours" is branch1. git.661346.n2.nabble.com/… – Mr Fooz May 29 '12 at 22:20
add comment
3 Answers
up vote 48 down vote accepted
I think you are looking for
git checkout --theirs foo/bar.java
git add foo/bar.java
Then you can git rebase --continue after you've resolved all conflicts.
Edit 7/16/2013: I believe my answer is correct for the question asked. The question asked is how to choose branch1's version when rebasing branch2 on branch1. When rebasing branch2 onto branch1, branch1's commits are unwound up to the parent node and branch2's commits are pushed onto branch1, then branch1's commits are added on top of branch2's commits. In the case of a conflict, branch2's commits are ours and branch1's commits become theirs. I realize this is a bit confusing, but I just tried it in a test repository and it works like I describe.
It is possible when the question asks, "I decide to take some (not all) of "their" (i.e. branch1)", it is certainly possible that the mapping of "their" to "branch1" was unintended, but actually correct.
share|improve this answer
snap and before me :-) – Adrian Cornish Nov 16 '11 at 6:10
Is there any way to avoid "fatal: --ours/--theirs is incompatible with switching branches."? – Mr Fooz May 29 '12 at 22:19
I'm not familiar with this error. Does this happen while resolving merge conflicts? Are you using any other arguments to the checkout command? The switching branches message seems odd, are you specifying -b to git checkout? I apologize if this is not much help :-( – Nathan Fox May 30 '12 at 21:25
--theirs is exactly wrong during rebase, which is completely counterintuitive, but IGEL has it right below. – slinkp Jan 24 '13 at 5:05
This caused some trouble for me, @iGEL has it right below. – calvintennant Jul 16 '13 at 20:19
add comment
As Mr Fooz said, you probably want to use
git checkout --ours foo/bar.java
git add foo/bar.java
If you rebase a branch feature_x on master, during rebasing ours refers to the master and theirs to feature_x. See http://git.661346.n2.nabble.com/Counter-intuitive-results-for-git-show-and-git-checkout-during-rebase-with-conflict-td2370354.html
share|improve this answer
add comment
If you want to pull a particular file from another branch just do
git checkout branch1 -- filenamefoo.txt
This will pull a version of the file from one branch into the current tree
share|improve this answer
This would probably be a bad idea in the middle of a rebase as it would pull the file from the head of that branch not at the detached head point you would be at in a conflicted rebase state – Clintm Sep 19 '13 at 21:39
add comment
Your Answer
| http://stackoverflow.com/questions/8146289/git-how-to-get-theirs-in-the-middle-of-conflicting-rebase | dclm-gs1-216470000 |
0.613463 | <urn:uuid:f593fabd-8340-4b05-958a-254039702b05> | en | 0.899723 | Take the 2-minute tour ×
This is going to sound so basic as to make one think I made zero effort to find the answer myself, but I swear I did search for about 20 minutes and found no answer.
If a private c++ class member variable (non-static) is a pointer, and it is NOT initialized in the constructor (either through an initialization list or an assignment in the constructor), what will its value be when the class is fully instantiated?
Bonus question: If the answer to the above question is anything other than NULL, and I wish to always initialize a particular member pointer variable to NULL, and I have multiple constructors, do I really have to put an explicit initialization for that pointer in every constructor I write? And if so, how do the pros handle this? Surely nobody actually puts redundant initializers for the same member in all their constructors, do they?
EDIT: I wish I could've chosen two answers here. The smart pointers recommended by Bleep Bloop seem to be the elegantest approach, and it got the most up votes. But since I didn't actually use smart pointers in my work (yet), I chose the most illustrative answer that didn't use smart pointers as the answer.
share|improve this question
add comment
4 Answers
up vote 4 down vote accepted
You're thinking correctly. If you don't initialise it, it could be anything.
So the answer to your question is yet, either initialise it with something, or give it a NULL (or nullptr, in the most recent C++ standard).
class A
class B
A* a_;
B() : a_(NULL) { };
B(a* a) : a_(a) { };
Our default ctor here makes it NULL (replace with nullptr if needed), the second constructor will initialise it with the value passed (which isn't guaranteed to be good either!).
share|improve this answer
Great, thanks, well illustrated. What if you had a third constructor that did not take an A* pointer as an argument. Would it need to explicitly initialize a_ to NULL? Or can it somehow "chain" off of the initializer list you wrote for the no-arg constructor? – John Fitzpatrick Dec 6 '11 at 21:19
It would also need to initialize it to NULL / nullptr. What I tend to do if I have a multiple constructors that need to do common initialisation, is to implement a private commonConstruct() method which does default initialization for me. – Moo-Juice Dec 6 '11 at 21:21
Is there NULL and 0 the same? Could it be B():a_(0){}; with an identical effect? – arjacsoh Dec 6 '11 at 22:22
@arjacsoh, yes it expands to 0 or 0L. However, in C++11, you actually have a nullptr keyword. The biggest advantage of this is that you can now distinguish between a pointer that is null, and an integer that is 0 :) – Moo-Juice Dec 7 '11 at 6:40
add comment
The value will be uninitialised so yes you do need to explicitly initialise it to nullptr.
Using smart pointers (std::unique_ptr, std::shared_ptr, boost::shared_ptr, etc.) would mean that you don't need to do this explicitly.
share|improve this answer
This is certainly the better long term solution, and I will eventually use smart pointers. But I need to learn a bit more about them before I start using them so I am going with Moo-Juice's recommendation. – John Fitzpatrick Dec 9 '11 at 8:32
add comment
the value of any uninitialized pointer is always garbage, it's some random memory address.
in your constructors, you can use initializer lists to initialize your pointer
MyClass::MyClass() : myPointer(nullptr)
trying to reference an uninitialized pointer triggers undefined behavior. so ALWAYS initialize your pointer.
share|improve this answer
fertilizer lists? Do pointers grow? :D – jrok Dec 6 '11 at 21:19
@jrok grr @ autocomplete lol.. firefox – johnathon Dec 6 '11 at 21:21
Thanks for the chuckle ;) – jrok Dec 6 '11 at 21:22
@jrok more than welcome – johnathon Dec 6 '11 at 21:22
add comment
Value will be undefined.
You may have one "ultimate" ctor which will initialize all fields and add "short-cut" ctors with only part of parameters, which will pass these params to ultimate ctor along with default values for the rest of params.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/8406931/pointer-member-variable-initialization-in-c-classes | dclm-gs1-216510000 |
0.020402 | <urn:uuid:4c03dd11-5224-46e6-85b5-576a77f14dce> | en | 0.85109 | Take the 2-minute tour ×
Well i've been looking how to do an auto updater on google, however no success.
What i would plan is to create an updater (ANother exe called by QProcess though the principal exe) but here ihave some questions:
How do i make the QProcess silent? If there's a new version, how do i show a notification on the window from where the process has been started (I meant i've create the process in Game.exe, i want to send a notification to Game.exe from Updater.exe that there's a new version available.)
Thanks for the answers.
share|improve this question
You need Inter-process communication, Qt has a collection of D-Bus classes that are good for this. – cmannett85 Dec 17 '11 at 10:25
add comment
1 Answer
First, I've never encountered a need to create anything other than a QThread to handle my update needs. The QProcess would be helpful if, once the user updates, you want to download, install, and relaunch the program while the user continues with the main program. (But this can all be achieved with a shell script, python script, even BAT file)
When you use QProcess, you will have to rely on the signals readyReadStandardError() and readyReadStandardOutput(). Then the application that your process is calling should send its output to stderr or stdout. Updater.exe should write to either of these files.
I would imagine your Updater to make use of QNetworkAccessManager::finished(QNetworkReply *reply). When this slot is called, please do something nicer than this:
void Updater::replyFinished(QNetworkReply *reply){
QString r(reply->readAll());
qDebug() << "yes";
qDebug() << "no";
If Updater.exe is going to be a full blown GUI application, do not call the show() method unless it's needed and it should appear to run in the background. I would prefer a script, but you know me.
Then your Game.exe will set up a QProcess. You can pass arguments to the process within the QProcess::start() function.
Good arguments that will help direct your update process would be:
• Game.exe version number
• "check_for_updates"
• "ignore_updates"
• "download_update"
finally, in Game.exe:
void Game::readProcessReply(){
QString r(process->readAllStandardError());
//show your dialog here
//do nothing
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/8543775/auto-updater-examples?answertab=oldest | dclm-gs1-216530000 |
0.492103 | <urn:uuid:9869e607-16e8-4a2a-89d7-55a9029120fc> | en | 0.860035 | Take the 2-minute tour ×
I have 2 tables. Table A has just one column called ID which has a list of Ids 1 ,2 ....n Table B has 3 columns: ID (references ID column in table A); key,value So table B goes like this:
1 x true
1 y false
1 z true
2 x false
2 y false
2 z false
.. ..... So each ID from table A has got 3 entries in table B I need a query that fetches all Ids from table A that has got x,y, and z all marked as false in table B. So if any of x, y, z is true for a particular Id, we do not select it. I tried this but this is wrong:
select A.id from A,B where A.id = B.id and B.key in ('x','y','z') and B.value = 'false'
Can you please help me with the right query?
share|improve this question
add comment
2 Answers
up vote 1 down vote accepted
Nearly there:
select A.id
from A,B
group by A.id
having count(distinct B.key)=3
share|improve this answer
Thank you very much sir. This is super elegant – Victor Dec 29 '11 at 17:29
add comment
select id from a where a.id not in (select id from b where value = 'true')
should do the trick
It does assume that there is a x, y and z entry for every id.
share|improve this answer
I think the question implies that B.key can have values other than 'x', 'y' or 'z'. – Mark Bannister Dec 29 '11 at 17:20
Possible. I let him decide by picking your answer or mine or provide more details. :-) – Jens Schauder Dec 29 '11 at 17:22
add comment
Your Answer
| http://stackoverflow.com/questions/8670967/issue-with-oracle-select-query | dclm-gs1-216540000 |
0.300525 | <urn:uuid:7b3b7172-1783-4091-b3a9-9b1ae4c5ddc1> | en | 0.854187 | Take the 2-minute tour ×
I usually don't have any problems setting up the classpath and running programs, but I'm running into a bit of a problem. I'm working on a program that will download a series of reports. If the working directory is called Report downloader, my project resides in
and the jar files I'm working with reside in
When I'm going to compile my project (I'm in windows :( ) I type in
javac -classpath .;..\..\..\..\..\lib.transfer.jar; ..\..\..\..\..\lib.someotherjar.jar; ReportGrabber.java ReportDriver.java
I get an error message saying
ReportDriver.java:12: error:package com.transfer does not exist
import com.transfer.*;
1 error
And I don't really understand why. I'm trying to import a valid package, and I showed it where to find the jar in the classpath and it's still giving me grief.
I'm losing my mind, I feel so dumb for asking about this. I could give up and just use eclipse but I really want to figure this out.
EDIT: When I type
java -cp .;..\..\..\..\lib\transfer.jar; ..\..\..\..\lib\someotherjar.jar; ReportDriver
to run the file, I get an error saying
Error: could not find or load main class ..\..\..\..\lib\someotherjar.jar;
Any ideas?
share|improve this question
You realize your classpath has a lib.transfer.jar and not lib\transfer.jar ? – Kal Dec 29 '11 at 17:26
What have you tried? – hellectronic Dec 29 '11 at 17:30
@Kal that was a typo – Tom Dec 29 '11 at 17:47
add comment
2 Answers
up vote 2 down vote accepted
Why are there 5 .. instead of 4?
to access your lib directory from reportdownloader, you have to do
share|improve this answer
Seems to me the right thing. +1 for that. Regards – nIcE cOw Dec 29 '11 at 17:40
Yes thank you that worked. I knew it was something dumb. If you could look at the edit I made, it is saying that it can't find or load the main class in one of my jars. – Tom Dec 29 '11 at 17:47
@Tom Glad it worked for you. Can you please accept this answer then. – Adel Boutros Dec 29 '11 at 18:30
add comment
Using a relative path seems like a bad idea to me.
Why not do this:
... -classpath /lib/transfer.jar /lib/someother.jar
or in windows:
... -classpath c:\lib\transfer.jar c:\lib\someother.jar
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/8671042/having-trouble-with-java-packages-setting-classpath | dclm-gs1-216550000 |
0.364147 | <urn:uuid:8345c0a5-d4c1-4721-b150-03216e63f7bf> | en | 0.8366 | Take the 2-minute tour ×
I'm try to make an Android magazine application. Until now, the best and the simplest way is using APPMK http://www.appmk.com/. and my questions are :
1. Is it possible customize between using APPMK and coding in eclipse editor?
2. Can I retrieve the magazine's content from HTML, XML or JSon? Because in APPMK, the content get from pdf files.
share|improve this question
add comment
Your Answer
Browse other questions tagged or ask your own question. | http://stackoverflow.com/questions/8814032/creating-android-magazine-application-with-appmk | dclm-gs1-216560000 |
0.037419 | <urn:uuid:fa15de23-0689-48fd-9937-1d592a7dc58b> | en | 0.877897 | Take the 2-minute tour ×
I work for a big company - we are not to big on "open" technologies. Our security people are so paranoid that we cannot even login to most web-services (including Google!).
Us devs really like Google technologies, in particular the App engine. Given that we cannot host company services outside the company infrastructure can we do the opposite? I'd like to use some of our department's servers to make a small GAE-compatible grid and use them to run my own application.
We do not need the whole of the GAE experience, for example we do not need Google's APIs - I just want to use the Google BigTable technology for our private projects.
Can this be done?
FYI, We have about 10 servers available for this project (they do not have to all be used). And to complicate matters, most of our machines run Windows.
share|improve this question
add comment
4 Answers
up vote 4 down vote accepted
AppScale http://github.com/AppScale/appscale
AppScale is an open-source hybrid cloud platform. AppScale implements a number of popular APIs including those of Google App Engine, MapReduce (via Hadoop), MPI and others. AppScale executes as a guest virtual machine (guestVM) over any virtualization layer that can host an Ubuntu Lucid image.
Typhoon App Engine http://code.google.com/p/typhoonae/
The TyphoonAE project aims at providing a full-featured and productive serving environment to run Google App Engine (Python) applications. It delivers the parts for building your own scalable App Engine while staying compatible with Google's API.
share|improve this answer
add comment
Check out CapeDwarf (http://www.jboss.org/capedwarf):
JBoss CapeDwarf is an implementation of the Google App Engine API, which allows applications to be deployed on JBoss Application Servers without modification. Behind the scenes, CapeDwarf uses existing JBoss APIs such as Infinispan, JGroups, PicketLink, HornetQ and others.
share|improve this answer
add comment
There are to popular clones of the Google's BigTable: HBase and Cassandra. Both implement the same concept but are built completely different internally. Selection between them depends on Your requirements for the consistency and high availability.
share|improve this answer
add comment
There is the the open source project AppScale which mimics the App Engine framework.
It being in development for quite some time and can be hosted on a private cloud.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/9077578/is-it-possibly-to-privately-host-a-gae-compatible-grid?answertab=active | dclm-gs1-216590000 |
0.221351 | <urn:uuid:ff3788b8-7bb3-4eca-aa1d-bc7a3663217d> | en | 0.731959 | Take the 2-minute tour ×
I'm trying to copy my databases from my internal storage to external, but it's not copying the database. It's just creating a new empty sqlite file. Any ideas what I'm missing actually?
Here is what I'm using :
public static void copyFile(String currentDBPath, String backupDBPath){
try {
File sd = Environment.getExternalStorageDirectory();
//File data = Environment.getDataDirectory();
if (sd.canWrite()) {
File currentDB = new File(currentDBPath);
File backupDB = new File(backupDBPath);
if (currentDB.exists()) {
FileChannel src = new FileInputStream(currentDB).getChannel();
FileChannel dst = new FileOutputStream(backupDB).getChannel();
dst.transferFrom(src, 0, src.size());
} catch (Exception e) {
and using it like this :
File database = new File("/sdcard/Stam/Data/");
RPCCommunicator.copyFile("/data/data/" + this.getPackageName()+ "/databases/stam_sys_tpl.sqlite","/sdcard/Stam/Data/system.sqlite");
So using this, it's creating the system.sqlite, but it's empty without any tables. The thing that I want to do is to move the database from it's current directory to a new one without loosing any data.
Any ideas why it's not working properly?
share|improve this question
are u sure extension is .sqlite and not .db? – Seshu Vinay Jan 31 '12 at 11:46
i'm pretty sure – Android-Droid Jan 31 '12 at 11:47
It's usually better never to assume that the external storage is called "/sdcard" - always use Environment#getExternalStorageDirectory(). Also, do not manually construct the path to your database file, use Context#getDatabasePath("stam_sys_tpl.sqlite"). – Jens Jan 31 '12 at 12:41
Ok, I've just tried to use it in your way...still creating a new empty file. Is it possible to copy database file to sd card without loosing any data. that's what I need actually. I can copy an empty one from my assets folder, but i need to keep users data. – Android-Droid Jan 31 '12 at 12:53
Are you closing the SQLiteOpenHelper you used to create the database prior to copying it? – Jens Jan 31 '12 at 13:22
show 3 more comments
2 Answers
you cannot copy database file to external storage.
you can create a new database in the external storage.
query the internal database and insert in the new database you have created
share|improve this answer
That sounds odd. Worked just fine on Android 2.3 with a simple table & straight forward copying. – Jens Jan 31 '12 at 12:49
add comment
Use Context.getDataBasePath() to get your db file!
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/9078915/android-copying-database-from-internal-to-external-storage-return-empty-database | dclm-gs1-216600000 |
0.812669 | <urn:uuid:babb2c05-0177-4a0f-a04c-03e8fc4b01a0> | en | 0.850097 | Take the 2-minute tour ×
How does one use the existing Python API documentation for Blender (2.62) to locate the method that returns a material given its name, ie: "Material.001", etc.?
Normally, I'd use the console to see what Python calls are being generated as I do manual operations involving materials, but for some reason the most it will show is:
Note: This is not so much a request for the name of the method as a request for meta-information -- information on how to obtain that information. I have, of course, tried all the obvious routes: blender site API searches, google searches, stackoverflow searches w/tags, etc.
share|improve this question
add comment
1 Answer
Have you seen Witold Jaworski tutorials: http://airplanes3d.net/pydev-000_e.xml
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/9351289/how-to-use-blender-api-documentation | dclm-gs1-216610000 |
0.158037 | <urn:uuid:d1e88629-ee76-4e2e-a4a0-62b9dac880b4> | en | 0.837243 | Take the 2-minute tour ×
How can i see only VIEWS in SQLite.
.tables command list both views as well as tables. I want to see only VIEWS and not tables.
share|improve this question
add comment
1 Answer
up vote 1 down vote accepted
You can do:
SELECT sql FROM sqlite_master WHERE type = 'view';
In order to fine-tune it:
.headers on
select * from sqlite_master;
you will know what columns are available there.
share|improve this answer
thanks. its perfect! – Saumitra Feb 28 '12 at 9:56
add comment
Your Answer
| http://stackoverflow.com/questions/9479540/show-only-views-in-sqlite | dclm-gs1-216620000 |
0.828454 | <urn:uuid:276e72e7-e71d-40ee-91b1-ddf7902a6b1f> | en | 0.73592 | Take the 2-minute tour ×
I read about in C#, covariance and contravariance enable implicit reference conversion for array types, delegate types, and generic type arguments.
I'm wondering can I use the covariance and contravariance for Anonymous Types (which are class types derive directly from object) and how would that works ?
share|improve this question
add comment
1 Answer
up vote 7 down vote accepted
Can I use covariance and contravariance of generic interfaces and delegates with anonymous types?
Yes. Anonymous types are reference types; variance only works with reference types.
Interface covariance:
var sequenceOfAnonymous = from c in customers select new {c.Name, c.Age};
var sequenceOfObject = (IEnumerable<object>)sequenceOfAnonymous;
Array covariance:
var arrayOfAnonymous = sequenceOfAnonymous.ToArray();
var arrayOfObject = (object[]) arrayOfAnonymous;
To demonstrate delegate covariance you need to use a generic type inference trick:
static Func<R> MakeFunc(Func<R> f) { return f; }
var funcOfAnonymous = MakeFunc( ()=>new { X = 123 } );
var funcOfObject = (Func<object>)funcOfAnonymous;
Interface contravariance needs a slightly different trick: casting by example:
interface IFrobber<in T> { void Frob(T t); }
class Frobber<T> : IFrobber<T>
public void Frob(T t) { Console.WriteLine(t); }
static IFrobber<T> FrobByExample<T>(IFrobber<T> frobber, T example)
{ return frobber; }
var frobberOfObject = new Frobber<object>();
var frobberOfAnonymous = FrobByExample(frobberOfObject, new { X = 0 });
And similarly for delegate contravariance:
static Action<A> ActionByExample<A>(Action<A> action, A example)
{ return action; }
var actionOfObject = (Action<object>) x => { Console.WriteLine(x); }
var actionOfAnonymous = ActionByExample(actionOfObject, new { X = 0 } );
Make sense?
share|improve this answer
Thanks! There are good examples and clear my doubts. – Turbot Mar 17 '12 at 23:27
add comment
Your Answer
| http://stackoverflow.com/questions/9746433/covariance-and-contravariance-anonymous-types | dclm-gs1-216650000 |
0.034927 | <urn:uuid:bfa6c62f-99d5-4779-b7e5-b433ae55f6ac> | en | 0.882843 | Take the 2-minute tour ×
Ok, so basically I have this part of the .htaccess partly working, but not quite fully just yet. I have two subdirectories on my server for an english and a french site (the subdirectories are en, and fr, respectively). When a user enters something in the URL bar I want whatever they typed in to be added to en or fr (depending on whatever the user's default language is on their computer).
If they type in domain.com/test (and their language is set to english), I want it to redirect to domain.com/en/test/. I ONLY want this to happen if test is not a folder, directory, file, or ANYTHING that is in the root directory.
Here is my .htaccess code so far that kind of works:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP:Accept-Language} ^en [NC]
RewriteRule ^(.*)$ /en/$1/ [R=301,L]
The problem with my code though, however, is that if a user entered in something like domain.com/test/ (WITH the slash), it will not work because I have another part in my .htaccess that forces a slash on the end of everything. If a user entered in domain.com/test.html (and that is a file in the root of the domain), it will not work because I have another part in my .htaccess that removes .html extensions.
Basically, I need this redirect to work in absolutely all situations except where it logically shouldn't.
Anyways, if any of you could please help me out I would really appreciate it.
share|improve this question
add comment
1 Answer
up vote 2 down vote accepted
OK. This is how I do it:
Always require the language suffix /en, /fr etc no matter what. So set that as a URL GET. With PHP you can force it to be inserted.
RewriteRule ^([a-z]{2})/?$ index.php?language=$1
RewriteRule ^([a-z]{2})/register/?$ register.php?language=$1
With PHP or whatever scripting you use, you can check the IP, set the country GET automatically, &/or set a session. build the session into all your URLS, so all your links have
Make the slash optional with /? as in above examples.
I do not use {REQUEST_FILENAME}, instead i have a list of all the possible main urls - but you can use {REQUEST_FILENAME} as well if you like, but you will need to account for real directories.
share|improve this answer
I do not want to use PHP at all, I am only interested in using .htaccess file. Like I said in the OP, I have it partly working. It adds /en/ if the URL entered doesn't have a slash on the end. But it also rewrites the URL in some case where I don't want it to... Such as: if the file is already in the root folder. – shootingrubber Apr 3 '12 at 8:03
There's also another problem with my original code as well. When I am actually in the en/ subdomain, it adds another en/ onto the URL as well. So if I am on domain.com/en/test, and then I click on the example, it will go to domain.com/en/en/example. – shootingrubber Apr 3 '12 at 8:10
Thanks, it helped me to. – Elkas Dec 20 '12 at 17:11
add comment
Your Answer
| http://stackoverflow.com/questions/9989109/htaccess-multiple-language-site/9989322 | dclm-gs1-216670000 |
0.423221 | <urn:uuid:73e8869b-0f7d-41fa-baee-f445bf6c5fb4> | en | 0.819615 | 184,730 reputation
bio website SeaPlusPlus.com
location Redmond, WA
age 28
visits member for 4 years, 7 months
seen 7 mins ago
I'm a C++ and generic programming aficionado, and the 25th legendary Stack Overflow contributor.
I am a senior engineer on the Visual C++ team at Microsoft, where I design C++ libraries and am responsible for the C Runtime (CRT). In my spare time, I'm working on the Boost-licensed CxxReflect native reflection implementation for the Windows Runtime. | http://stackoverflow.com/users/151292/james-mcnellis?tab=badges&sort=name | dclm-gs1-216680000 |
0.083201 | <urn:uuid:ba8498a1-305d-4293-b306-80cea490061b> | en | 0.945933 | 766 reputation
bio website evansmurphy.wix.com/…
visits member for 1 year, 5 months
seen 2 days ago
My research is focused on spatial statistics in ecological applications, species distribution modeling, climate change, landscape genetics, Bayesian statistics, Lidar and spectral remote sensing and gradient modeling. I have ridden horses for 35 years and was a member of the US Equestrian team. I have also played guitar in several swing and bluegrass bands | http://stackoverflow.com/users/1739350/jeffrey-evans?tab=tags | dclm-gs1-216690000 |
0.040019 | <urn:uuid:486ef449-bc8b-43b0-bdf7-859a07ee6ef9> | en | 0.884265 | Take the 2-minute tour ×
I'd like to use HandBrake to compress some video that was taken via a camera that was mounted upside down.
I found a reference to a command-line rotate option, but I can't find it in the GUI.
Am I just missing it?
share|improve this question
add comment
5 Answers
From a recent post iPhone video rotation (and compression)
HandBrake (or at least the GUI) does not offer a way to rotate video. The HandBrake CLI does have a "rotate" option, however I found it is not a true rotation. Rather, it simply flips on an axis. The documentation is poor, but I found that a value of 1 flips on X, 2 flips on Y, and 3 flips on X and Y. So using a value of 3 is the same as doing a 180° rotation, which is useful for videos that are upside down, but not for videos that are sideways.
mencoder can do proper rotation.
While this refers to a Mac OS-X platform, I guess it should work for you too. Find a mencoder binary for your platform.
share|improve this answer
I am just asking about flipping the video. Is this option in the handbrake GUI anywhere? – nonot1 May 3 '12 at 2:35
I couldn't find the rotate option in the GUI either. If you set everything else up and then "Add To Queue" when you "Show Queue" there is an option to create a batch script of the full queue. Do that then edit the batch file and add --rotate to the files that you want rotated. Then just run the bat file. This avoids most of the work of building up the command line – Craig Dec 31 '12 at 22:29
Command line options that are not visible in the GUI can be entered in the text box under the advanced tab. – user199190 Feb 14 '13 at 11:03
@Matt That text box seems to be for x264 options, not Handbrake options. – duozmo Apr 14 '13 at 0:17
add comment
for the latest version of handbrake (0.99) I was able to achieve a 90 deg rotation by putting:
, --rotate=4 on the Extra Options under Video tab
It doesnt work without the initial comma and without the space, (took forever to figure that out, as the documentation made no mention of that!
share|improve this answer
worked like a charm :) Maybe the comma works like closing the x264 options and add it to the other one (like SQL injection) – otakun85 Dec 12 '13 at 20:03
This worked! Needs more upvotes. – dtbarne Feb 6 at 2:25
add comment
I've tried putting
-7 --rotate <3>
into the box in the Video tab under Optimise Video: Extra Options box.
It worked and flipped my video on the XY axis (180 degree rotation).
share|improve this answer
This works, thanks! Much better than having to switch to another tool. – Jörn Zaefferer Oct 9 '13 at 9:44
I tried that in the Mac Handbrake, but it didn't work. I noticed that the added options build the "x264 unparse" string, so I tried also in the format separated with colons, e.g. "7:rotate=3" and variations. Does anybody know how to effect this on the Mac? – ttarchala Nov 16 '13 at 13:35
add comment
From the Handbrake documentation:
--rotate Flips images axes
<M> (default 3)
To rotate 90° I used:
HandBrakeCLI -i source -o target.m4v --preset="Universal" --rotate="4"
with success. No luck getting this to work from the GUI.
note: I'm not sure why the above referenced blog post says:
"3" is said to be default and as such should do no rotation at all. I've found this to be true.
share|improve this answer
add comment
In Winx64 the syntax is:
No leading or trailing comma, space, etc.
share|improve this answer
add comment
Your Answer
| http://superuser.com/questions/418985/can-handbrake-flip-rotate-a-video | dclm-gs1-216730000 |
0.04377 | <urn:uuid:1d9b0d79-66ac-4e65-9354-3d089336c3c3> | en | 0.939795 | Take the 2-minute tour ×
My computer has an HDMI out port, but it doesn't seem to work. Motherboard is H61M/U3S3. The monitor I use is hooked into an added video card, but I would also like it to be hooked up to my TV via HDMI. There doesn't seem to be any drivers for the HDMI on this motherboard. I'm using Windows 7 64-bit.
share|improve this question
if the motherboard has the hdmi port but you are overriding and using the added video card, it is unlikely it will work. If the video card had the hdmi you might have a way to get it to work. use either the video card on the mobo or a video card that has one – datatoo Jul 14 '12 at 23:59
This seems to be the case. I uninstalled the video card and now the motherboard HDMI and DVI work. If you add your comment as an answer, I'll accept it. – Ben Walker Jul 15 '12 at 0:27
add comment
1 Answer
up vote 1 down vote accepted
Adding a video card overrides the onboard hdmi of the motherboard. Get a video card with hdmi, or disable the addon card so the integrated video hdmi is what is used by the system instead.
share|improve this answer
add comment
Your Answer
| http://superuser.com/questions/448985/no-hdmi-driver-for-h61m-u3s3-cant-connect-to-tv | dclm-gs1-216750000 |
0.06086 | <urn:uuid:64990767-c4bf-4859-a412-7c797325e62b> | en | 0.913141 | Take the 2-minute tour ×
In my regular shell I have PROMPT_COMMAND set up to run a script which keeps track of certain information about all the commands I run from any host I connect to. This is very helpful. I often find myself using the emacs shell though, and commands that I run in the emacs shell are not subject to that archiving that I so value. Is there a way to make them go through the same PROMPT_COMMAND script every time I run one?
share|improve this question
add comment
Your Answer
Browse other questions tagged or ask your own question. | http://superuser.com/questions/497825/how-can-i-use-the-prompt-command-feauture-in-emacs-shell | dclm-gs1-216790000 |
0.038198 | <urn:uuid:63a1a1fc-9c06-4cee-9213-8d0f5fd99435> | en | 0.932922 | 128 reputation
bio website
location United States
age 22
visits member for 2 years, 5 months
seen Mar 25 '12 at 16:30
Just a student of programming, math, and logic. For better or for worse, perl was the first language I learned.
This user has not answered any questions
3 Votes Cast
all time by type
3 up 0 question
0 down 3 answer | http://tex.stackexchange.com/users/8703/intide | dclm-gs1-216840000 |
0.971731 | <urn:uuid:a008773c-8115-41e8-a045-41cda7df98dd> | en | 0.942611 | In response to:
Incoherent Immigration Reform
This is just willful intransigence. You are hiding your hatred of undocumented hispanics behind a facade. They disrespect our laws no more than do whole armies of U.S. citizens who exceed higway speed limits on their daily commute. They break this law because the law is at odds with reality and the needs of our economy. Because this real economic need is met by an illegal system, it is easy to abuse that system to do things like displace citizens from jobs.
Nothing about illegal immigration quite adds up.
| http://townhall.com/social/flamingliberalmulticulturalist-17084/incoherent-immigration-reform-n1506387_cmt_6339073 | dclm-gs1-216920000 |
0.061091 | <urn:uuid:c5318980-5e81-4639-a059-d0bd8a14c113> | en | 0.970131 | In response to:
Merry Christmas, Comrades
gmallast Wrote: Dec 27, 2012 5:52 AM
Sorry John, the so-called neo-conservatives are still around in the D.C. area as they have been for decades. Of course neoconservatives aren't conservatives at all, but militarists seeking an ever expanded military establishment and more wars to justify it. On the other hand there are also plenty of liberal Republicans still in the party establishment. Would someone please explain to me why flaming liberal Republicans are called "moderates."? The liberals and militarists keep shoving in the face the demonstrably false myth that real conservatives and libertarians can't win. Just as they have been since they tried to block the nomination of Barry Goldwater. There is a really big fight going on for the soul of the Republican Party.
Marie150 Wrote: Dec 27, 2012 6:24 AM
Most Republicans are not conservatives and do not have a clue what our founding fathers were doing or why. They are just pee their pants excited that they have been elected into a powerful position in our federal government. They are full of themselves.
CVN65 Wrote: Dec 27, 2012 9:48 AM
They are certainly full of something.
ellykaye Wrote: Dec 27, 2012 10:01 AM
You just described all the politicians in Washington, Democrat or republican. I do not use the terms liberal and conservative. I voted this year for the lesser of 2 evils. Not so much FOR Romney but AGAINST Obama. I am leaning more right, and this is definitely not how I was for 49 of my voting years. Only reason for this is because I disagree with the left's platform lst election and this election. Neither party defines their plan for the next 4 years, so we just coast into oblivion as a nation??? Unless it furthers their cause, no one really cares about us peons and what is best for our nation.
Wendy60 wrote: The neoconservatives are the reason why Boehner is not putting up a fight. The neocons do the thinking for the Republican leadership on all matters of strategy and morality in politics. Boehner wouldn't take a dump if the neocons told him not to, and if they told him to do so, he would strain for hours. Neocons want tax increases, because paying higher taxes is a sacrifice. Neocons believe that the little people have to be forced into sacrificing for the "collective self," i.e., the state, because that is the only way to preserve the social order. What they... | http://townhall.com/social/gmallast-540716/merry-christmas-comrades-n1474513_cmt_6088397 | dclm-gs1-216930000 |
0.301624 | <urn:uuid:5eccba9b-f5dc-4457-ae45-925fdf0172a0> | en | 0.981988 | • Manchester United Message Board
• Robert M Robert M Dec 21, 2011 14:43 Flag
Terry to be prosecuted...
If the police and CPS are to get involved like this, should they also investigate every act of physical assault on the pitch?
SortNewest | Oldest | Most Replied Expand all replies
• No, I didn't say that. I said I thought it was less serious than being deliberately, repeatedly provocatively racist.
People should control their tempers and their words. It's what socialisation of little boys is all about.
• So, you think it's ok to be momentarily racist ?
• "If Terry is found guilty he has to be given the same punishment as Suarez"
I think it likely that Terry would be given the same punishment and I would have no complaints if he was. But I don't see that it is necessary. What we know about the two cases suggests that Terry's misdemeanour was a once-off, probably through temporarily losing his temper. Suarez's abuse appears to be pre-meditated, repeated and calculated at upsetting Evra. That would seem to me to be rather more serious.
If you read the report into the United-Chelsea mess at SB in 2008 you'll see that the panel deliberated plenty of subtlety like this and I expect FA reports into these two cases to be as thorough.
The suggestion that punishments for offences have to be the same to avoid complaints of racism really shouldn't stand up. Punishments should fit the crime, and not be determined by racial background. If a punishment for crime B is set higher to be the same as the punishment for crime A purely because offender B is English but offender A is not, that is in itself racist.
• Two aspects of the timing of this are curious.
First, the CPS chose to announce the intended prosecution the day after the Suarez announcement. This may or may not be coincidence (I'm inclined to think someone got a rocket up their backside when they realised the Suarez verdict was due). Either way, Suarez's ban being fresh in people's minds is likely to prejudice thinking about Terry. I think the CPS should have been more careful than this.
Second, the court system in this country is extreeeeemely slow. I notice there is a hearing in March. I would guess that if Terry pleads not guilty then the full hearing would be held later. Given the general speed of the courts (in non-riot times) this is likely to be months later. Very likely it would be after Euro 2012. If Capello stands by his word that Terry is innocent until proven guilty and so has no reason to lose the England captaincy it would follow that he would still be England captain for Euro 2012 whereas if there was an earlier guilty judgement it would seem likely he would lose the England captaincy.
But that could be completely wrong. The racist ranting woman on the train has already been through the courts, although her case was rather more urgent.
• If I Remember Correctly
I didn't quite. But the thrust of it was correct. Don't you think Keane's pre-meditated physical assault was rather more worthy of police concern than Terry's alleged abuse?
• Indeed. Well said.
• There's rather a lot of anecdotal evidence that the police do not take very seriously everything reported to them by the public...
Even if they did feel the need to follow this up I would have thought good old fashioned bobbying would have been to have a quiet word with him about the advisability of keeping his temper and a lid on his language. Maybe even issue a caution. But the exceptionalism of it does seem to suggest a motive for prosecution related to Terry's fame.
• The difference between Terry and Suarez is that a complaint was made to the police and they have a duty to investigate.I think, although I`m not 100% sure, that no complaint means no investigation. For the CPS the decision to prosecute is based not on how many times racial abuse occurs but whether there is a reasonable chance that it can be proved in court. Here the existence of tv footage which appears to show Terry using racist language would in the eyes of the CPS increase the chances of a conviction. As for the fa I think here again how many times racist comennts are made is irrelevant, once is enough. If Terry is found guilty he has to be given the same punishment as Suarez, anything less would open the fa itself to an accusation of racism with one rule for English players and another for those from overseas.
• Robert, I am confused by why this has gone to the Police. i think its a very different case to that of Suarez. In that match Suarez repeated his terminology many times and it was this persistent use of the word(s) which persuaded the 'jury' that it was not a mistake given cultural differences, but an attempt to deliberately to abuse. However Terry appears to have 'exploded' in a single unfortunate episode. How many of us can honestly say we haven't done the same sort of thing once or twice? Rap over the knuckles, maybe a fine and a match suspension to make it clear its not acceptable behaviour. But a Police action? Totally out of context in my humble opinion.
• A member of the public complained so the police were duty bound to follow the complaint up.
This has happened several times before, although probably not in a racist context.
• View More Messages | http://uk.eurosport.yahoo.com/mb/?bn=37a5f925-9c89-36bb-a3aa-ee8b56c54c53&tid=1324478591000-c244897e-667a-3709-87ec-74853c3c342b | dclm-gs1-216990000 |
0.030648 | <urn:uuid:b6a065ad-d50c-4cc4-938c-0094f94fc05d> | en | 0.896336 | or Login to see your representatives.
Public Statements
Issue Position: Economy
Issue Position
Location: Unknown
* Create new jobs and recruit new industry but preserve and protect existing business.
* Eliminate the "Business Privilege Tax".
* Eliminate business personal property tax.
* Return to reappraisals of real property every four years.
* Hold regular legislative sessions every other year with emergency sessions called as needed.
* Lower taxes which will necessitate a reduction in the size and scope of government resulting in decreased spending.
Back to top | http://votesmart.org/public-statement/509952/issue-position-economy | dclm-gs1-217040000 |
0.112884 | <urn:uuid:2dd383b6-2efa-4a14-b27c-e45f5e3784ad> | en | 0.932598 | Now Playing
Canada's New $100 Bills Melt When It's Hot
The Bank of Canada released the high-tech bills in 2011. The goal was to make the money indestructible. But some Canadians who have their hands on the banknotes say the plastic bills melt when subjected to extreme heat. Publicly, the Bank of Canada isn't confirming the flaw. | http://wamu.org/audio-player?nid=76301 | dclm-gs1-217060000 |
0.946837 | <urn:uuid:d698e1a9-d64b-460d-8b32-476e801669e9> | en | 0.807734 | Take the 2-minute tour ×
If I want to scroll to a particular paragraph in Google Docs, or a particular cell in Google spreadsheets, is there a way to do that via Google Apps script?
share|improve this question
add comment
1 Answer
up vote 4 down vote accepted
For Google Doc Spreadsheet, you just need to set the active selection, the scroll is then done directly:
var file = SpreadsheetApp.getActiveSpreadsheet();
var sheet = file.getActiveSheet();
var row = LineToScrollTo;
share|improve this answer
add comment
Your Answer
| http://webapps.stackexchange.com/questions/15628/is-there-a-google-docs-or-spreadsheets-api-to-scroll-the-view/25559 | dclm-gs1-217080000 |
0.035946 | <urn:uuid:98c8c2aa-879c-4492-a336-312820c4c33d> | en | 0.973187 | Kyrgyzstan's new leader tackles challenging job
Otunbayeva -- a former Soviet official, United Nations representative, Kyrgyz ambassador to the United States and United Kingdom, and and Kyrgyz foreign minister -- is not a newcomer to this business. A short, unpretentious woman, it's clear the weight on her shoulders is intense. She's working long hours, taking no time off.
Her immediate challenge is dealing with the deposed Kyrgyz president, Kurmanbek Bakiyev, in hiding in the southern part of the country. She has called on him to resign. He has refused. She has offered him free passage out of the country. He hasn't responded.
Beyond that, the interim government has managed to restore law and order in the capital, Bishkek. In the days following the fall of the old government last week, looters ransacked and torched department stores and the national tax office.
Otunbayeva also needs to find out what happened to all the government's money. The deposed regime apparently made off with tens of millions of dollars, though she says the state coffers do have more than the 16 million euros ($21 million) initially claimed by some of her aides. | http://whatreallyhappened.com/node/62860 | dclm-gs1-217090000 |
0.025959 | <urn:uuid:aa15b467-886e-43e3-bfc1-e6727111ce28> | en | 0.83829 | Personal Health
comments_image Comments
Why You Should Fear Your Sofa, Baby Stroller and Nursing Pillow
Flame retardants in everyday products cause cancer, birth defects or endocrine disruption in every animal species studied.
Continued from previous page
Ruth Rosen, a former columnist for the Los Angeles Times and San Francisco Chronicle is a professor emerita of history who teaches at U.C. Berkeley. | http://www.alternet.org/story/145215/why_you_should_fear_your_sofa%2C_baby_stroller_and_nursing_pillow?page=0%2C1 | dclm-gs1-217220000 |
0.053856 | <urn:uuid:40578705-4d9d-4154-af9a-4498fc786339> | en | 0.905881 | RSS 2.0 Feed
» Welcome Guest Log In :: Register
Posts: 3037
Joined: Sep. 2006
(Permalink) Posted: Dec. 14 2006,12:18
they probably all discuss it on their Double-Secret Creationist List (You know, the one where you're prohibited from discussing the age of the earth.)
And if HIV causes AIDS.
"Regardless of whether the science cuts any ice against evolution, one of the virtues is that it could provide a kind of model for how religiously motivated people can go into the lab."
To do what? Okay, they're in a "lab," but who wants to bet that they'll never come out again?
Wow, Steve Fuller is really full of it. And these people really do not get it! They have created a parody of sciency stuff to look really sciency, but they have no methodology and nothing to work with, and in the meantime true research will leave them in the dust of their Genesis.
ID Dudes. Read this. I am a chick. A chick gets this science stuff. A chick friggin' belly dancer lit-nerd gets it, and you don't. Embarrassed yet? :angry:
Which came first: the shimmy, or the hip?
AtBC Poet Laureate
Track this topic Email this topic Print this topic
| http://www.antievolution.org/cgi-bin/ikonboard/ikonboard.cgi?act=SP;f=14;t=3889;p=42264 | dclm-gs1-217270000 |
0.023341 | <urn:uuid:7c73ec14-30ff-4c10-b67a-183cbcc0803e> | en | 0.943639 | House of Representatives Committees
| Joint Standing Committee on Electoral Matters
Navigation: Previous Page | Contents | Next Page
Dissenting report – Senator Lee Rhiannon, The Australian Greens
The inquiry has been a missed opportunity to make key advances in federal election funding reform. New South Wales and Queensland have introduced recent legislative reforms to restrict donations and campaign expenditure which must be undertaken at a federal level as a move toward national uniform reform to enhance and protect our democratic system of government.
It is disappointing that the inquiry rejected the opportunity to place caps on election expenditure, to place a total ban on corporate donations, or to support a ban on all donations from the tobacco, gambling, alcohol and property development industries. These four industries have all made large donations to political parties and there is substantial evidence that such donations influence government policies that affect those industries. Prohibiting these industries from making political donations would be a first step in combating the corrupting influence of donations in politics.
In particular, the inquiry missed the opportunity to support the Australian Greens’ Commonwealth Electoral Amendment (Tobacco Industry Donations) Bill 2011 that will ban donations from manufacturers or wholesalers of tobacco products by political parties, to end the culture of Big Tobacco buying influence in Parliament.
The inquiry report recommends some small though significant changes to the electoral funding system, which the Australian Greens support. By lowering the donation disclosure threshold to $1000, and counting all donations to related political parties when determining if a donor has exceeded this threshold, a much larger proportion of donations to parties will be disclosed, enhancing the transparency of the donations disclosure process.
It is encouraging that the inquiry recommends that any donation of over $100,000 must be disclosed within fourteen days. However, the decision that this rule will not apply cumulatively to multiple donations from the same donor has created a massive loophole. It will not be difficult for a donor to avoid the $100,000 donation disclosure threshold by making a series of smaller donations over a few days.
The Greens vision for electoral funding
The Australian Greens aim to see elections in Australia funded through a combination of public funding and small donations from individuals, with speedy and transparent public disclosure of donations to allow voters to have access to full information about the source of funding of political parties.
To this end, the Australian Greens recommend:
n A ban on all donations from all entities other than individuals.
n A cap on the amount of money that can be donated in a year from a single individual to a political party or candidates.
n Caps on expenditure by political parties, candidates and third parties.
n Adequate public funding for political parties, including both funding for election campaigning and for other administrative work of the party, with funding based on the percentage of the vote received by each party.
n Continuous disclosure of all political donations above $100, within two weeks of all donations being made.
Over the last three decades the scale of spending in Australian elections has sky-rocketed, with both major parties engaging in a funding arms race that has seen a rapid increase in the amount of money spent in Australian federal and state elections. The spending increase has outstripped the availability of public funding, and thus private donations to major political parties have increased markedly, particularly from business and lobby groups who are most affected by government legislation.
This growth in donations has seen a culture develop where large donors have gained privileged access to ministers and MPs, and policy decisions have benefited large donors such as property developers. This has contributed to a perception that corporate donors are buying influence. In some cases there is evidence that this perception accurately reflects the real relationship between politicians and donors.
In some states, such as New South Wales and Western Australia, these issues have resulted in a series of scandals where ministers have been exposed making decisions to benefit key donors. Property developers have particularly developed inappropriate relationships with local councillors and state politicians who make decisions about property development. While this poisonous culture has been most obvious in states like New South Wales and Queensland, donations continue to buy influence in federal politics and in every state in the country.
Current electoral funding laws not only allow these large donations, but they make it difficult for most people to identify who is donating to whom. High disclosure thresholds and loopholes allow many tens of thousands of dollars to be donated to a political party from a single company without being disclosed. Lengthy disclosure periods mean that donations made in the lead up to an election are kept secret until well after the election is held. While it is easy to dismiss concern about the corrupting influence of donations as a mere perception of corruption, it is impossible to have definitive answers as long as large political donations can remain a secret.
The Greens NSW launched the Democracy for Sale research project’s website in 2002 in order to shine a light on the influence of donations on the political process. This website has compiled information from donations returns to the Australian Electoral Commission and the NSW Electoral Funding Authority, classified donations by donor industry and provided them in a transparent and easily accessible format that allows the public to view at a glance where political parties are sourcing their funding. Official disclosure websites have often failed to do this.
We have now begun to see some movement in the states. New South Wales passed new laws in late 2010 that placed caps on donations, put limits on campaign expenditure, and banned donations from certain industries. Following the 2011 state election, the new government in New South Wales has proposed legislation to impose further restrictions on campaign donations. The Queensland government has also begun to make moves in the direction of restricting donations and campaign expenditure.
Federal legislation is central to tackling the issue of reforming the culture of political donations. Australia’s political parties are mostly national organisations and money regularly flows from one state to another. It is impossible for states to effectively reform the electoral funding system without reform on the federal level. For example, the new laws in NSW can still be effectively circumvented by donating to a federal election campaign. These donations can still have a corrupting influence on state politics.
Internationally there is a trend towards electoral funding reform. The Australian government is falling out of step with other western democracies that are strengthening their democratic processes.
Short term measures
While the Australian Greens support comprehensive reforms to the electoral funding system there are a number of interim steps that should be implemented to increase transparency and public trust in the electoral funding system.
1. Common funding rules for Commonwealth and State elections
Electoral funding rules vary enormously between the Commonwealth and the various states. This is a most serious issue when it comes to the disclosure of donations and expenditure. Efforts at a state level to regulate money in politics have been undermined by the ability of donors to funnel money into party federal election accounts which are not under the jurisdiction of state election funding laws.
While it may be difficult to reach agreement about a standard for caps on expenditure and bans on some types of donations, there are other areas where gaps and loopholes could more easily be closed.
Different jurisdictions vary in terms of how large a donation can be without being disclosed and in terms of what time period is covered by each return. In addition, different jurisdictions vary in terms of the definition of a ‘donation’, and how much detail must be covered. All of these variations make it hard to compare like with like, and reduce transparency in the system.
Recommendation 1: Efforts are made to reach agreement with state governments to ensure there is uniformity between states and the Commonwealth in regard to donations disclosure thresholds, time periods for disclosures, and the definitions of donations and other incomes that must be disclosed.
2. Detailed disclosure of electoral expenditure
Political parties are now required to provide an overall amount of expenditure by the party in their annual return to the Australian Electoral Commission, yet there is no requirement for any more detail. If we are serious about having a strong disclosure regime, it is important to know how parties spend their campaign funds. More information will assist the assessment of appropriate levels of expenditure caps.
Recommendation 2: Political parties are required to disclose how much was spent during the election period on each type of expenditure, such as wages, advertising and printing.
3. Ban on donations from certain key industries
There is a pressing need to ban donations from certain industries with a record of using political donations to try and influence policy. In particular the property development, tobacco, alcohol and gambling industries are all dependent on government policy and have funnelled large amounts of money to both political parties.
The Australian Greens and the Australian Labor Party do not take donations from the tobacco industry, but other parties continue to take these donations. These industries are now banned from giving donations for NSW state elections under NSW legislation.
Recommendation 3: Ban donations from the property development, tobacco, alcohol and gambling industries.
Long term solutions
4. Public funding of elections
The Australian Greens support a system of full public funding for elections. The Canadian electoral funding system serves as a good model as it includes:
n a ban on corporate donations and caps individual donations;
n caps on election campaign expenditure;
n reimbursement for election expenditure based on percentage of vote;
n payment of an annual allowance (adjusted for inflation) to political parties for operational and administrative costs.
Recommendation 4: A move towards the full public funding of elections campaigns.
5. A ban on all donations except from individuals and bequests
There is widespread cynicism in the community about the influence of donations over political parties and politicians.
There is a common perception that the payment of donations is a form of corruption, and that corporate donors are buying access to decision makers which is not available to the average person.
The best way to restore trust in the democratic process is to restrict political donations to only those made by individuals and bequests. This would ban businesses and lobby groups from using donations to push an agenda while allowing individuals on the electoral roll to give a limited amount of money.
While there is no doubt that individuals may also have a political agenda, the sense of corruption is much less in the case of individuals. It is also important that there is still room for modest donations from individuals to help fund new parties.
It is also legitimate for parties to gain funds from many individuals giving small amounts of money, and this can be a way to raise money without effectively selling influence.
Recommendation 5: Ban all forms of donations and fundraising payments except those received from individuals on the electoral roll and from bequests.
6. Caps on donations by individuals
While individuals should be permitted to donate to candidates and parties, it is necessary that these donations are restricted to smaller amounts that do not have the danger of corruptly influencing parties or members of Parliament.
Recommendation 6: Restrict donations by individuals to a maximum of $1000 in any one year to any political party, with donations to different branches of the same political party counting towards a single cap of $1000.
Recommendation 7: Restrict donations by individuals to a maximum of $1000 in any one year to candidates from the same political party, with donations to different candidates of the same political party counting towards a single cap of $1000.
7. Continuous disclosure of donations
At the moment, donations are not revealed to the public until the regular cycle of electoral returns and party annual returns are usually months after the federal election. This time lag dramatically reduces the accountability of parties and candidates. Voters have the right to know about donations before they go to the polls.
This committee has taken a small step in the right direction by recommending that any single donation of over $100,000 is disclosed within 14 days of receipt. This requirement can be easily avoided by spreading a donation out over a number of occasions, possibly in a very short period of time. This loophole should be immediately closed. Moves should be made now to ensure continuous disclosure of all significant donations.
Recommendation 8: If at any point a donor has given over $100,000 to a political party or candidate the party or candidate is then required to disclose all donations from that donor within fourteen days of the cumulative donations exceeding $100,000.
Recommendation 9: All donations from donors whose cumulative donations over the course of a year exceed $1000 be disclosed.
Recommendation 10: The government provide sufficient funding to the Australian Electoral Commission to develop a system to allow for immediate submission of returns for all donations of $1000 or more within seven days of the donation being given.
Recommendation 11: Once it is technically feasible, parties and candidates are required to disclose all donations from donors who have donated $1000 or more in that financial year within fourteen days of the donation being received.
8. Limits on spending during election campaigns
In the fiercely competitive environment of electoral politics, there will always be the temptation for parties and candidates to try to attract greater amounts of donations than their rivals, regardless of what rules are imposed restricting their ability to receive donations.
Restricting the level of expenditure is an effective way to bring fairness to the electoral system and stop the election funding arms race that has engulfed Australian politics.
Recommendation 12: A cap is imposed on election expenditure for each state for political parties and for each House of Representatives electorate for candidates for the three months prior to election day.
Recommendation 13: Penalties are imposed for violation of election expenditure caps, including loss of public funding, large fines, and in extreme cases disqualification as a candidate or as a Member of Parliament.
Senator Lee Rhiannon
Navigation: Previous Page | Contents | Next Page
Back to top
Facebook LinkedIn Twitter Add | Email Print | http://www.aph.gov.au/parliamentary_business/committees/house_of_representatives_committees?url=em/political%20funding/report/dissentinggreens.htm | dclm-gs1-217280000 |
0.249434 | <urn:uuid:75a702cc-8250-4597-9ca4-f2079bdf8bdc> | en | 0.868392 | Auction Result: If I was a maid by Rita Ackermann
This Rita Ackermann artwork, If I was a maid, was at auction. Find details below, browse more lots by Ackermann, or see full cataloging and price information in the artnet Price Database.
If I was a maid by Rita Ackermann
Share |
Rita Ackermann
TitleIf I was a maid
Mediumacrylic and pencil on canvas
Year of Work1994
SizeHeight 54 in.; Width 106.4 in. / Height 137.2 cm.; Width 270.2 cm.
Sale of*
Get access to the data you need now
| http://www.artnet.com/artists/rita-ackermann/if-i-was-a-maid-AZPchx31KXmMA5dUhcznmQ2 | dclm-gs1-217320000 |
0.019209 | <urn:uuid:d49e0263-3381-43f1-9bbf-0b8bf4aa5811> | en | 0.973126 | What Is Rafael Nadal Famous for?
Rafael Nadal is famous for playing tennis and has been ranked number one since August 2008. He has achieved a lot in his tennis career as he has defeated good tennis players and has gained tennis titles and awards. He was born on 3rd June 1986 in the Balearic Island.
2 Additional Answers
Ask.com Answer for: what is rafael nadal famous for
Rafael Nadal
Born: June 3, 1986
Birthplace: Manacor, Mallorca, Spain
Rafael Nadal is a Spanish professional tennis player who formely was ranked No. 1.
Rafael Nadal was 19 years and two days old when he won the 2005 French Open in his very first appearance at the event. A left-hander with a booming forehand, Nadal had been known as a clay-court specialist since playing his first pro tournaments in 2001.
Q&A Related to "What Is Rafael Nadal Famous for"
He is famous for being a professional tennis player and more specifically for his success on clay. He was the world no 1 tennis player and has won numerous grand slams. He is also
Nadal's favorite colors are yellow
1. For starters, Nadal's fitness level is extraordinary. His ability to play a tough match with high intensity and without fatiguing is part genetics, part work ethic. In order to
I think that some of the hate comes from Roger Federer's fans. But it faded away lately, considering it's not a two man show any more. Imagine you support this graceful player on
Explore this Topic
The Rafael Nadal family is very close. Rafael Nadal is a tennis legend, but more than that he is a very family oriented individual. This is a virtue that seems ...
Rafael Nadal is a Spanish professional tennis player currently ranked No. 1 in the world. He is 6-1 (185cm) and weighs 188 pounds. ...
Rafael Nadal. ... | http://www.ask.com/question/what-is-rafael-nadal-famous-for | dclm-gs1-217350000 |
0.031626 | <urn:uuid:17c91b86-0cfe-4002-a4f3-c47e7bdc5d50> | en | 0.946577 | September 18th, 2009 - 1:12 pm
Love Happens
To say that Love Happens should’ve gone straight to video is an insult to films that have gone straight to video. The story of Burke Ryan (Aaron Eckhart, dishy but dull), a self-help guru who can’t seem to help himself, is so tone deaf, so muddled, so poorly put together, I can only assume that the parts of the movie that made sense were left on the cutting room floor.
For starters, what kind of self help guru is Burke? His mission appears to be helping people get over a recent loss, but his motto is a smarmy and facile, “I’m A-Okay!” So is Burke, whose wife died in a car accident, supposed to be a sensitive guy with real insight into human suffering (except for his own)? Or a cheesy hack?
Burke’s world is turned upside down by the arrival of florist Eloise (Jennifer Aniston). I think Eloise is supposed to be quirky and full of life—she wears hats and drives a vintage truck, tell tale movie shorthands for free-spiritedness—but the only thing we really know about her is that she’s a vandal: She writes obscure words on the back of paintings. This completely arbitrary trait is the film’s idea of character development.
And so it goes: Eloise takes Burke to see a rock show atop a construction truck—inexplicably. They go to visit Eloise’s mom (Frances Conroy), who is a fan of Burke’s—and while the scene should give us some insight into Eloise and her past, it just sits there, utterly useless. There’s a parrot to be released in the wild, some random scenes at a poetry slam, and another scene that seems to advocate the soul-cleansing powers of shopping at Home Depot.
Clearly, the filmmakers should’ve skipped the self help aisle and gone straight to Screenwriting 101.
12 issues for $18! | http://www.baltimoremagazine.net/maxspace/2009/09/love-happens | dclm-gs1-217440000 |
0.022613 | <urn:uuid:2b56a70e-a794-4d41-ad2e-cb8826263f0f> | en | 0.971801 | There's one doctor's appointment Ann Ferguson never likes to miss.
"All women need to have it done," said Ferguson. "Whether you want to or not, it needs to be done."
Every year, right on schedule, Ferguson shows up at Bedford Memorial Hospital to get a mammogram.
"I chose Bedford for the convenience, because I live in Bedford," said Ferguson.
That choice is something many small towns don't have.
Bedford is unique for not only having its own full-service medical center, but also some of the latest technology. This month the hospital introduced a new digital imaging device, specifically for mammograms.
"It's a state-of-the-art machine," said Lisa Jordan, imaging services manager for Bedford Memorial Hospital. "It's the newest on the market."
The hospital's board of directors spent more than $300,000 on the equipment, a sizable portion of the facility's annual budget.
"It's a big deal and it's not cheap," said James Lynde, a radiologist who conducts mammograms at Bedford Memorial hospital. "It took a lot of commitment from the board and we're really proud that we have it."
Lynde believes the new technology gives Bedford an advantage.
"Basically it's a service that we can do as well as any large hospital and it makes it convenient for the people of Bedford," Lynde said.
Hospital officials say convenience is important. When it's easy for a woman to get a mammogram, she's more likely to get screened.
"We have a lot of elderly people in this community that sometimes don't want to travel all the way to Lynchburg or Roanoke," said Jordan.
Ferguson said she'd get an annual mammogram, regardless of how far she had to travel, but having the option close to home means a lot.
"They're doing everything that they can to make it easy for women who need these exams," said Ferguson. | http://www.baltimoresun.com/news/wdbj7-bedford-hospital-begins-offering-digital-mammography-20130416,0,6315311.story | dclm-gs1-217450000 |
0.041037 | <urn:uuid:ecd3204c-ad73-4584-9dae-f29dff856f56> | en | 0.923684 |
Camo Black Ice - Camo Brewing Company
Camo Black IceCamo Black Ice
Displayed for educational use only; do not reuse.
53 Ratings
no score
(send 'em beer!)
Ratings: 53
Reviews: 38
rAvg: 1.95
pDev: 47.69%
Brewed by:
Camo Brewing Company
Nevada, United States
Style | ABV
American Malt Liquor | 10.50% ABV
Availability: Year-round
Notes/Commercial Description:
No notes at this time.
(Beer added by: bditty187 on 12-29-2006)
View: Beers (6) | Events
Beer: Ratings & Reviews
Sort by: Latest | High | Low | Top Reviewers
Ratings: 53 | Reviews: 38 | Show All Ratings:
Photo of bsturges
5/5 rDev +156.4%
Camo Black is good for one thing - a high ABV. To discuss its qualities in detail would be akin to evaluating the finer points of Taco Bell. That being said, it really tastes no worse than any other malt liquor I've had, and it is extremely inexpensive. Seeing people mention here that they have picked it up for 1.25 makes me extremely jealous, as in my area I have never seen it cost under 1.75 after tax.
Serving type: can
05-14-2007 05:58:43 | More by bsturges
Photo of staticparadox
3.43/5 rDev +75.9%
While it's one of the most bitter flavors I've ever had from a tallboy, CAMO Black Ice will really get you the most bang for your buck. This stuff carries a serious bite. The initial taste, although strong, is actually not that horrible. It WILL, however, give your face an oogly-moogly expression if you're not accustomed to drinking it. The nice thing about it is how quickly it can get you on the level. For the average person a single tallboy will get you a healthy buzz and anything beyond 2 is guaranteed tipsy-status. If you can get past the aftertaste this stuff makes a long day at work seem like less of a big deal at the end of the day.
Serving type: can
02-05-2012 19:50:50 | More by staticparadox
Photo of friendofthefog
3.4/5 rDev +74.4%
Subjective tastes:
Wife: tastes like bourbon...hates!
Me: Tastes like bourbon...loves!
My wife says this beer taste like bourbon...and says she hates it.
I say it taste likes bourbon...and I say I love it!
Draw your own conclusions from this highly "scientific" taste test.
Serving type: can
09-21-2012 20:15:29 | More by friendofthefog
Photo of Nathaniel_Marx
3.2/5 rDev +64.1%
Hmm... yes yes. This brewed beverage has a slight taste of nutmeg with hints of cedar, cinnamon, copper, petrol, and bolshevism.
I do believe that if I weren't completely deluded and asinine this might be a very decent & high ABV beverage.
Seriously, it doesn't taste bad considering its high alcohol content & it smells very strongly of alcohol--almost like rubbing alcohol. Even though it smells very strongly of alcohol it doesn't taste bad-- actually, there is very little taste, you can feel the carbonation and cold liquid but the taste is pretty much absent. There is a faint aftertaste of alcohol and hops.
BTW this website is crawling with narcissistic morons. I've read dozens of reviews ( I like to try all kinds of micro brewery beers and like to know their general ratings beforehand) and on every review you find very pretentious and illogical morons, so I just wanted to say: get a grip on reality you nutmeg, cinnamon, black olive tasting douchebags.
Serving type: can
12-02-2013 03:20:29 | More by Nathaniel_Marx
Photo of 86sportster883
New Jersey
2.7/5 rDev +38.5%
I really didn't have high hopes for the Camo Black Ice high gravity lager, but I actually found it to be pretty smooth and drinkable from start to finish. It's a malt liquor, through and through, from its clear pale amber color to its mildly dry finish. The smell was the only aspect that really put me off, but the taste was much better than that. It does a decent job of masking its whopping 10.5% alcohol level, and the black ice remains drinkable at a wide range of temps. You'll find that out, as it takes a while to work your through a 24oz can. One thing's for certain, by the time you finish one of these you're going to have a different outlook on things.
Serving type: can
01-20-2008 23:25:10 | More by 86sportster883
Photo of kguyty
2.68/5 rDev +37.4%
For it's 10.5% alcohol by volume mark, this beer is not the worst I have ever had. But beware! You must keep this can ice cold, lest you drink warm Camo, which is something I would not give to my worst enemy. A 24oz. can does me well, and for the price it's not bad - the taste is bad, but if you are a week from payday and need a beer to get you through an awful Royals game, this is the one to reach for - not Evil Eye.
Serving type: can
10-01-2008 21:48:04 | More by kguyty
Photo of BuckeyeNation
2.35/5 rDev +20.5%
Malt Likkapalooza X is here at last. Since I'm having trouble finding new malt liquors, there may not be too many more of these head-to-head grudge matches. This is the second of these competitions in a row to feature a Camo product. Will Black Ice do as well as Camo 900 High Gravity Lager? There's only one way to find out.
Rich amber that is almost as orange as it is yellow. The French vanilla colored crown looks pretty damn good. It's firmly creamy, is micropitting and is depositing an amazing amount of soon-to-be crusty lace. This is one of the best looking malt liquors that I've ever seen. Trash the brown paper bags, guys. Use a glass.
The nose is tremendously floral, almost perfumy. It's odd for a beer of this style, and not exactly 'tough guy' in nature, but I like it because it covers up the usual graininess and grain alcohol essence that these things usually deliver.
To my surprise, the flavor is where Camo Black Ice falls back to the level of its foe. I need to get deeper into the cans to pick a clear favorite, but they're close. The floralness and green apple flavor are a bit much. Okay in small doses. Less tolerable over all 24 ounces.
It's hard to completely obliterate a 10.5% ABV, and probably unfair to expect in a malt liquor, but a little more finesse wouldn't hurt. Of course no one who drinks malt liquor is looking for finesse... or probably even knows what finesse means.
It's hard to imagine the folks who usually drink this stuff standing around on the street corner discussing viscosity and the pleasures of 'energetic, yet soft-edged carbonation'. Hey, that describes the mouthfeel pretty well.
The appearance score might put Camo Black Ice over the top when it comes to the final score, but malt liquors are made for drinking (and, yes, tasting), so Schlitz High Gravity is my favorite beer of Malt Likkapalooza X no matter how it shakes out in the end. Looks like Camo 900 High Gravity is the best Camo of them all.
Serving type: can
03-27-2008 15:12:23 | More by BuckeyeNation
Photo of Vdubb86
2.23/5 rDev +14.4%
Served in a tulip
This is part of swillfest...I'm so sorry body.
This is a pale straw color that isn't really appetizing to the eyes. The nose has some puffed rice and anise. I really think this smells like butthole. I truly don't think it's a very favorable taste as well. There is a lot of corn syrup and pain. It's seriously hard to get down. Overall this is a terrible beer. 'Nuff said.
Serving type: can
07-03-2011 01:23:50 | More by Vdubb86
Photo of hopdog
2.13/5 rDev +9.2%
24oz can acquired in trade with Kevin (thanks, I guess!).
I've been trying to get the local PA crew to drink this one for a while now, but for some reason, it took some arm twisting and constant urging!
Poured a medium yellow color with an averaged sized head. Yep, smells and tastes like a Malt Liquor - corny and just nasty.
Notes from: 3/14/08
Serving type: can
01-13-2009 15:08:03 | More by hopdog
Photo of Lauthaha
2.1/5 rDev +7.7%
look: 3.5 | smell: 4 | taste: 1.5 | feel: 2.5 | overall: 1
Poured from a 24-ounce can into a half-liter beer glass. Not all at once.
Appearance: Slightly heavier than "straw-colored" and with a pretty decent head which recedes quickly leaving behind light-to-moderate lacing. Doesn't really look all that bad.
Smell: I actually kind of appreciate the scent here. There's a very distinct wine-like aroma with quite a bit of corniness to it. As a "beer" I would fail it, but being a "malt liquor" gives it a little leeway there. Slightly sweet'n'sour grape/rubbing alcohol.
Taste/Mouthfeel: Dear God. It starts out very smooth, nothing too over-the-top. Beer is moderately oily with low carbonation. As it bubbles down, however, you get the feeling you have just imbibed some watered-down gasoline. Bitter to a fault, pointless alcohol content. On the plus side, it rinses very clean, leaving you free to eat some chips or something to wash away the taste.
Drinkability: Only drink it to get drunk for next-to-nothing. Would certainly never recommend this beer to anyone for any purpose.
Serving type: can
11-04-2010 02:50:45 | More by Lauthaha
Photo of TheSarge
2/5 rDev +2.6%
Pours decently for a malt liquor style lager. Nice head of white foam, and a clear dark golden body.
The aroma is very astringent, lots of corn and tobacco characteristics. Dry and powdery too.
Taste wise it is very rich in the tobacco flavor, and kind of leathery and buttery.
Crisp and lots of carbonation up front. Delves into a burning ethyl feel for the finish. It almost feels/tastes like somebody dumped a shot of shitty whiskey into a beer.
Serving type: bottle
10-15-2010 22:38:45 | More by TheSarge
Photo of longbongsilver
1.93/5 rDev -1%
Felt like both something new & something ghetto, this fit the bill. Hence, the 24 oz from a gas station for 1.25.
Typical canary yellow pour, albeit w/ way more white head than I expected. Faint rice smell, followed by AL-CO-HOL. Figured it'd be obvious, but not that much. I'll try anything once though, maybe I'll be surprised...
Tastes weirdly like apple juice, with nowhere near the burn the paint-thinneresque scent suggests. No real mouthfeel to speak of, goes down like water because the carbonation vanishes within a minute.
This doesn't have the standard malt liquor funk to it. Problem is, for that category I kinda LIKE that funk. I'd rather a beer try for flavor and boldly fail than to not even make the attempt.
Enjoy that 1.25, Camo. You're not getting another one from me.
Serving type: can
12-04-2010 03:42:43 | More by longbongsilver
Photo of tpd975
1.9/5 rDev -2.6%
Why Dave why do you insist on doing this to me.
A: Pours a pale yellow with a foamy head. No lace.
S: Aromas of corn, bread, and a cat's litter box.
T: Sweet corn, cane sugar, floor stripper.
M: Light, thin, fizzy.
D: Would rather drink what's in the cat's litter box.
Serving type: can
03-09-2010 18:11:57 | More by tpd975
Photo of tone77
1.9/5 rDev -2.6%
Poured from a 24 oz. can. Has a rich golden color with a 1/2 inch head. Smell is of alcohol, some malts. Taste is of alcohol and not good at all. No real beer flavor here. Feels light with a slight burn in the mouth and is one of the least drinkable beers I have tried. Overall this beer is borderline disgusting.
Serving type: can
04-30-2010 13:37:23 | More by tone77
Photo of TMoney2591
1.9/5 rDev -2.6%
Served in a Surly shaker pint glass.
The eighth entry in SwillFest 2011. It pours a clear straw topped by a finger of off-white foam. The nose comprises bubblegum, vanilla, cream soda, and corn syrup. Boo. The taste holds notes of lemon rind, tart mandarin orange skin, corn syrup, and rotten vanilla bean. More boo. The body is a light medium, with a very light moderate carbonation and a kinda syrupy feel. Overall, a highly objectionable malt lickah, one that I wish followed the harshly sweet smell.
Serving type: can
07-03-2011 19:37:04 | More by TMoney2591
Photo of mrtbeerdesign
1.9/5 rDev -2.6%
For a beer beer aficionado it's cheap swill. For a couch potato redneck it's and acquired taste the improves with time and the next beer. By the time you finish it, you care little for the can design, smell or taste. The mouth-feel can only be described as numb. It may even embolden you to register to a random beer review website to sing it's feint praise before staggering out in search of another can before the buzz wears off and you can again taste and smell again.
The overall rating includes the sack-of-hammers effect of the %10.5 ABV
Serving type: can
03-06-2012 22:48:44 | More by mrtbeerdesign
Photo of DrainBamage
1.75/5 rDev -10.3%
A: Pours a very clear gold color with a surprisingly decent head, going down for 1 inch to a lace.
S: The smell is very watered down, shocking with an ABV of 10.5%, and adjuncts are present also. Probably the worst smelling beer ever. Not to say bad smelling, but more of a lack of.
T: This bad. Real bad. It definitely has the fuel taste, but is extremely sweet. Reminds me of sweeter version of Camo Silver Ice.
M: Mouthfeel is decent, goes down reasonable smooth even with the slight burning sensation.
D: Overall this is a sorry excuse for a malt liquor, and ice beer, or a beer for that matter. I guess if your only goal is to get drunk off your ass, then you might like this. If you actually appreciate beer, then stay away.
Serving type: can
04-29-2008 04:29:26 | More by DrainBamage
Photo of nicksta
1.73/5 rDev -11.3%
"Hmmmm, the National Championship is tonight. I want some beer, but I am hella broke. I know! I shall drink Camo and not just any Camo, but Camo Black Ice!" - me this morning
The beer is a a light straw yellow with no froth and lots of lacing and carbonation. Hot damn! It smells like year old Miller! So sweet, but kinda clean at least. Okay, the taste is like a light beer! Holy shit! It isn't horrible and adjunctly sweet at all! I am going to get blitzed off of these three cans that will go down easy. The only real problem is the alcohol burn at the end. Oh wait, the sweetness effects the chug; oh well! The mouthfeel is weak, by the way.
Maybe I should slow down. After all, it is only halftime.
Serving type: can
01-09-2007 03:33:53 | More by nicksta
Photo of DESTRO
1.65/5 rDev -15.4%
i usually dont drink this stuff, but it is not below me and i did have a can of this the other day during some an intense rockband xbox sesh. i didnt pour it out, but the can is pretty tight. i like the explosion thing and the military style font. unfortunatly its not very good after that. it smells like cornflakes and alcohol. it tastes like cornflakes and paint thinner. mouthfeel? i dunno i was drinking it as fast as possible to avoid the taste. drinkability is low seeing as how its 10.5% and terrible, BUT there is a silver lining, i felt pretty awesome immediatly following consumption. its a double edged sword.
Serving type: can
05-25-2009 17:28:16 | More by DESTRO
Photo of comfortablynumb1
1.65/5 rDev -15.4%
Thought I would switch it from craft brew tonight, and go back to the basics with a little malt liquor. On deck: Camo, and King Cobra. Let's get this party started...
Poured from 24oz can into an Old Raspy pint glass..
A - Pours an apple juice color with a two finger froth head. Head almost immediately dissipates...
S - Smells like wine. Grapes and alcohol...
T - Wow, the alcohol is very apparent. Starts sweet then you are slapped in the face with an alcohol bite. Pour a couple of shots into your morning glass of grape juice, and this will probably be close to the outcome...
M - Light bodied with lots of carbonation...
D - I like to pride myself on being a person that enjoys really good beers, but at the same time can still enjoy swill, but this one goes over the top. Won't be buying this again. If your on a really tight budget, and looking to catch a fast buzz; maybe. Otherwise, I would suggest to look elsewhere...
Serving type: can
10-20-2010 01:16:53 | More by comfortablynumb1
Photo of jsisko01
1.63/5 rDev -16.4%
Appearance - Pours a bright golden color with a half inch head that dissipates somewhat quickly. The foam is literally crackling, it seems very carbonated.
Smell - Pretty sweet with a wine-like scent to it.. maybe some lemon zest. Malts and a sour alcohol aroma as well.
Taste - Oh my GOD.... there is literally no other flavors present to cover up the overbearing alcohol taste. It's like you're drinking gasoline. This taste very similar to a whiskey ale.
Mouthfeel - Light body with high carbonation.
Overall - After a few sips I'm literally gagging.. I'm dumping this tallboy down the drain.
Serving type: can
02-25-2012 03:17:33 | More by jsisko01
Photo of bditty187
1.6/5 rDev -17.9%
Clear, gold in hue; I am pleased the color is not overly thin or sickly. Loud, talkative white head, at the apex the foam was easily three fingers tall. The bubbles popped and left pockmarks as it faded steadily. A small cap lasted the entire consumption (albeit brief consumption). No lacing of note. Overall, the appearance is quite standard.
The nose smells of malt and corn grist with fruit jelly and Vaseline mixed in for good measure. Alcohol is noticeable, it doesnt seem overly hot to me but I fear it will open up once I take a sip. I have smelled worse Malt Liquors (and better ones). Offensive but it will not haunt my memories.
Sweet palate, it is malty for a brief moment before turning rather corny and a tad wheat-like. There are tons of fusel alcohol flavors, fruit jelly, rubbing alcohol, nail polish remover, and apples (grapes too?). The alcohol heat burns my throat on the swallow
I am forced to take little sips. Ive had a couple good Malt Liquors but Camo Brewing Company has yet to delivers one. IMO, Black Ice is borderline awful.
Almost medium in body, minimal carbonation, the mouthfeel is thin but harsh. That is not a winning combo
The mouthfeel is poor but Im not drinking enough of it to really matter.
Drinkable? Um, like, hell no. I purchased a massive 24-ounce can for $1.08 at a local grocery store. Why? So BA member Roydrinksitall can review this beer? Merry Christmas. To the rest of you, avoid this beer.
Serving type: can
12-29-2006 18:41:38 | More by bditty187
Photo of Wetpaperbag
1.6/5 rDev -17.9%
A- Clear golden color with no head. Even though the glass is quite busy with bubbles.
S- Surprisingly enough I actually smell a fruity banana smell. It almost reminds me of a watered down red MD 20/20.
T- I'm a bit scared, so lets see how this goes: wow my gag reflex started to kick in. The can says 10.5%abv and it is there in full force. Wow. I can taste the banana taste but wow this is bad.
M- Feels like beer, I think. Perhaps its the spawn of the devil beer.
D- Hell no.
Edit: Dear god I had to pour this out, it was that bad.
Serving type: can
08-06-2008 05:15:09 | More by Wetpaperbag
Photo of Otacon
1.38/5 rDev -29.2%
Ahh Camo, nothing turns a bad day before pay day intoa worse day before payday faster.
So after a wee bit of a car fire I needed to get slammed and do it as cheaply as possible, and lo and behold 2 big cans of 10.5% ABV swill for 2 bucks at my local mini-mart, "This should do the trick!" I thought as I walked back home to begin drinking my night away.
After I cracked one opened I noticed a distinct paint-thinner like smell, never a good sign.
It tasted something like rubbing alcohol mixed with ground up pennies The good thing is, once you've downed about half a can you begin to not taste it anymore
Unfortunately, this was probably the first time I've ever been hung over just drinking beer.
Now, I'll probably never touch the stuff again, but in it's defense I have to say that it does what it's intended to do very well, which is to get you as shitfaced as possible as quickly and inexpensively as possible.
Serving type: can
07-22-2009 21:06:27 | More by Otacon
Photo of Zorro
1.35/5 rDev -30.8%
look: 3 | smell: 2.25 | taste: 1 | feel: 1 | overall: 1
Picked up in Wyoming mostly for morbid curiosity. How good can it be? Got to see some bad countries on the Earth to appreciate how great most of North America and Europe are compared to most of Africa.
But I have had Super Brew 15 in my mouth so I know bad when I put it in my mouth.
Poured in a glass just to be fair and like most malt liquor it does a passable job at looking like a lager. Clear gold with a small momentary white colored head.
Smells fruity as in fusel alcohol from beer fermented hot and fast. Malty and toffee candy. It is a bit spicy and I got the smell nailed. This smells like spiced caramel apple. There is a strong apple butter scent to this. Might actually give this some credit except I know what Fusel Alcohol does for hangovers. But to be honest doesn't smell that bad.
Moment of truth the taste.
Starts of thin and boozy. Tastes a lot like apple cider. And that is about it, tastes like Vodka and apple juice.
Mouthfeel is thin and the carbonation boils off pretty quick.
Overall this is a beer meant for hardcore alcoholics and college dorm parties.
But you already knew what you were buying a bad beer when you purchased it.
6 OZ drank 18 OZ to clean out the drain.
Serving type: can
01-30-2014 02:06:20 | More by Zorro
Camo Black Ice from Camo Brewing Company
54 out of 100 based on 53 ratings. | http://www.beeradvocate.com/beer/profile/881/34487/?sort=high&start=0 | dclm-gs1-217480000 |
0.019996 | <urn:uuid:cc481948-3e14-49ff-950d-bb15da6473b7> | en | 0.977588 |
What's the deal with Sixpoint?
Discussion in 'Beer Talk' started by dick783, Feb 1, 2013.
1. dan027
dan027 Member
Resin owns. You can't like everything and there are plenty of other beers out there that you would feel much better about spending the money on so try and not get too hung up on it
2. EnronCFO
EnronCFO Member
Had Sweet Action on tap in NYC once and loved it. Like, nearly missed my flight because I stuck around for a second one and then had to hail a cab to LaGuardia in rush hour loved it. However, I've been underwhelmed by all of their canned beers and I'm not a big fan of Resin. I keep giving them a shot though, trying to recapture that first Sweet Action experience!
3. KevinMc79
KevinMc79 Member
I really love Resin. And really enjoyed Bengali Tiger the first time I drank it. Went and bought a second 4 pack, which I rarely do. I think I have the dreaded ticking syndrome. Second time I got it, it tasted completely different. Almost like a White IPA. Didn't like it at all. I probably won't go back to Bengali, but I might go back to Resin.
4. TheSSG
TheSSG Member
I had a similar experience. I gave them a whirl and now avoid them like the plague.
Some of the nastiest stuff ever.
BUT, I guess I'll keep an eye open for some on tap....maybe it was just the other facility...
5. mnguyen281
mnguyen281 Member
I like their 3beans, but not much else. Dont worry about it, youre not supposed to like everything. I personally can't stand st. Arnold or jester king, and i live in houston. I dont even bother trying the new divine reserves or whatever jk throws out for almost 20 a bottle.
6. BJasny
BJasny Member
I recently had basically the exact same experience as the OP; I tried both Bengali Tiger and Righteous Ale because I've heard Sixpoint is a great brewery. I was also let down by that funky taste that was in both beers; I didn't know what to think but it's just strange hearing someone having pretty much the same experience. I was really looking forward especially to the Righteous Ale and still would love to give Diesel and Resin a try, but I just don't know if it's worth it.
7. Giantspace
Giantspace Member
It's a 16 oz 4pack. $7.99 by me at WF. Case of diesel is $44.
I really like diesel and Apollo in cans. Their draft only stuff is great. Mad scientist stuff is really good.
Not a bengali tiger fan.
jaIsPoAn likes this.
8. iKasey
iKasey Member
I felt the same way until I got 3beans this past week. It's amazing. Diesel is okay, Resin is a pretty malty IPA so I can see the liking for it. Bengali is just okay. 3beans, however, is worth it beyond all worth is worth.
9. reverseapachemaster
reverseapachemaster Member
Meh. I tried a couple and was not impressed. Too hoppy for my tastes with hop flavors I don't like. Couldn't figure out the hype.
More for those of you who liked it.
10. BrownAleMale
BrownAleMale Member
I just bought my 1st Sixpoint which was 3beans. I didnt like it at all, as the alcohol over ran the flavor profile. It will probably be a while before I try something else from them.
11. MisterBisco
MisterBisco Member
New York
I like 3Beans, but not as blown away as I was hoping for. Righteous Ale and Sweet Action are my favorites of their regulars; I find Bengali Tiger unbalanced, and the Crisp just isn't for me. Somehow still haven't had Resin. Autumnation was a snooze-fest, and Diesel is tasty but unsurprising.
On tap, Gorilla Warfare is the business.
12. TheLostGringo
TheLostGringo Member
Big fan of Diesel personally and have polished off a couple 4 packs of 3beans and thought it to be very good. Actually Resin might be the least enjoyable of all there beers to me.
13. crossovert
crossovert Member
Not a huge fan of them but the Bengali Tiger is solid, stuff like resin or the crisp are absolute abominations imo.
14. wvsabbath
wvsabbath Member
West Virginia
Dont forget those are 16 oz cans, so thats 5 1/2 12 oz beers for that amount, a good price. Only there special beers, resin-3 bean are 12 oz cans.
They make great beers, uniquie tasting yet spot on for there styles. They were hands my favorite newly tried brewery from 2012. Bengali was my fav but last week i had 3 beans and it floored me.
15. UCLABrewN84
UCLABrewN84 Member
I have had a handful of their beers. I loved a few and thought others were just ok. It's probably just your palate. No worries, there is much more beer to be had.
dick783 likes this.
Share This Page | http://www.beeradvocate.com/community/threads/whats-the-deal-with-sixpoint.65797/page-2 | dclm-gs1-217490000 |
0.915001 | <urn:uuid:d28cdffb-39e5-42b3-8cca-29872cf368fa> | en | 0.957214 | Dispelling Myths About Hunting
Send by email Printer-friendly version Share this
If you don't hunt, you might wonder what's so appealing about this activity. Why, for example, would anyone sit for hours in a chilly duck blind? Or trudge mile after mile through soggy cattail sloughs? And what's the thrill in trying to kill an animal, anyway? If hunters want to be outdoors and see animals, can't they just watch wildlife without shooting them?
Hunting, with a half-million Minnesota participants, must certainly stir the curiosity of those who don't take part.
Why someone hunts is a personal matter. Many do it to spend time outdoors with friends or family. Others hunt to continue a tradition passed down from their parents and grandparents. Some go for the satisfaction of providing their own meat or the challenge of outwitting a wild animal. Many hunt simply because they feel an urge to do so. As environmentalist and hunter Aldo Leopold put it, "The instinct that finds delight in the sight and pursuit of game is bred into the very fiber of the race."
It's hard to generalize what hunters are doing when they go afield each fall. But it is possible to explain what hunters are not doing, and to shed light on some aspects of hunting that might puzzle those who don't participate. Hunters aren't killing animals needlessly.
People who say there's no need to kill animals for meat when it can be bought in a grocery store don't understand how food happens: Whether someone eats venison or beef, a big brown-eyed mammal has to die first. The animal doesn't care whether you pay someone else to kill it or you do it yourself.
Of course, vegetarians don't kill animals. Or do they? Most vegetable production is done at the expense of wild creatures, either by converting wildlife habitat to cropland or requiring the application of chemical pesticides and fertilizers. Soybeans and corn, for example, are often grown on wetlands that have been drained and plowed. Without a place to nest, a hen mallard doesn't die, but she doesn't raise any young, either.
1. Hunters aren't being cruel to wild animals.
Most wild animals don't pass away in comfort, sedated by veterinary medication. They usually die a violent, agonizing death. Though a hunter's bullet or arrow can cause a wild animal pain and trauma, such a death is no worse than the other ways wildlife perish. A deer not shot eventually will be killed by a car, predator, exposure, or starvation. An old, weakened pheasant doesn't die in its sleep. It gets caught by a hawk and eaten.
Of course, hunters don't do individual wild animals any favors by killing them, but they also don't do anything unnaturally cruel.
2. Hunters aren't dangerous, inept, or trigger-happy.
Hunting would seem more prone to accidents and fatalities than outdoor activities that don't use firearms. Not so. According to National Safety Council statistics, far more people per 100,000 participants are injured while bicycling or playing baseball than while hunting. And the Council's most recent statistics show that while roughly 100 people die nationwide in hunting accidents each year, more than 1,500 die in swimming-related incidents.
One reason for hunting's safety record: Most states require young hunters to pass a firearms safety course. In Minnesota alone, 4,000 volunteer instructors give firearms safety training to 20,000 young hunters each year.
Just as they handle their gun cautiously, so do most hunters strive to kill game as cleanly as possible. Hunters practice their marksmanship, study wildlife behavior and biology, and take pains to follow a wounded animal to ensure any suffering ends quickly.
As do all activities, hunting has its share of scofflaws. But most hunters obey the law and act ethically. To nab the wrongdoers among them, hunters created Turn In Poachers, a nonprofit organization that offers rewards for information leading to the arrest of fish and game law violators.
3. Hunters aren't harming wildlife populations.
Hunters see to that out of self-interest. That's why they support state and federal conservation agencies limiting seasons to just a few weeks or months a year, limiting the number of animals they kill, and placing restrictions on killing females of some species. These regulations help ensure that wildlife populations stay healthy. They also make the pursuit of game more difficult, requiring hunters to use their wits, patience, and hunting skills.
4. Hunters aren't using non-hunters' tax dollars.
Hunters pay their own way, and then some. Minnesota hunters fund almost all Department of Natural Resources habitat acquisition and wildlife research with their license fees and a federal excise tax on hunting equipment. In addition, their financial support pays to improve populations of non-game wildlife. Wetland destruction has wiped out the habitats of many bird species, causing their numbers to decline. Were it not for wetlands bought and improved with state and federal waterfowl stamp revenue and with the contributions of hunting conservation organizations, hunters and others who like to watch wildlife would today see fewer marsh wrens, pied-billed grebes, Forster's terns, and other wetland birds. These are some things that hunters aren't doing.
What I suspect most are doing--if they hunt for the reasons I do--is fulfilling a need to be part of the natural world that observation alone can't satisfy.
hunter25's picture
This is an excellent article
This is an excellent article trying to help people understand why we do what we do but I have tried to explain this to non hunters before and the facts of the matter and relaying a lifetime of experiences to them just don't seem to sink in. A few people get it a little or at least say they have no problem with what we do but to really get the point accross I have had the best results by getting them to go with for a day. Even a fishing trip or maybe a camping trip gives them a better fealing of what the out doors is all about. | http://www.biggamehunt.net/news/dispelling-myths-about-hunting | dclm-gs1-217500000 |
0.161485 | <urn:uuid:adb4e68e-5f74-47d7-93b5-3b63389a31bb> | en | 0.930823 | Figure 5.
Short-term plasticity is altered during synaptic depression. A:Paired pulses applied with 50 ms interstimulus intervals (ISI) to the auditory pathway in rat brain slices revealed paired pulse facilitation (ppf). Typical EPSC traces evoked by paired pulses (with EPSC1 and EPSC2) in a PnC giant neuron under control conditions (control) and during synaptic depression (SD), immediately after application of a 100 burst sequence. Scale bars: vertical 30 pA, horizontal 30 ms. B: Mean EPSC1 amplitudes before (control) and during synaptic depression (SD). Measurements were repeated 10 times at 1 Hz and traces were subsequently averaged for each cell. The absolute EPSC1 amplitude was not changed by synaptic depression (n = 17). C: Mean paired pulse ratio (EPSC2/EPSC1) of paired pulses before (control) and during synaptic depression (HSD). The paired pulse ratio was significantly reduced during synaptic depression (n = 17). Error bars indicate S.E.M. D: Analysis of the amplitudes of the first response (gray line) within the cEPSCs elicited by 100 bursts revealed that these did not decay as much as the overall cEPSC amplitudes (filled circles) in both auditory (top) and trigeminal (bottom) synapses. During the first 20 bursts, there was no decay of the first response at all, whereas cEPSC amplitudes exponentially declined. This implicates that predominately late responses within the cEPSC are reduced, and that this reduction accounted for most of the decline in overall cEPSC amplitudes. The inset shows a typical cEPSC trace, where the single responses could be distinguished.
Simons-Weidenmaier et al. BMC Neuroscience 2006 7:38 doi:10.1186/1471-2202-7-38
Download authors' original image | http://www.biomedcentral.com/1471-2202/7/38/figure/F5 | dclm-gs1-217510000 |
0.135446 | <urn:uuid:bb61f44a-e9df-4e06-8907-ca98328f43e6> | en | 0.960298 | Sponsor Content
SBA loans for business buyers
An SBA loan can be used for a variety of purposes including the acquisition of materials, property or equipment of an existing business. Although the SBA's guarantee is a powerful incentive, SBA lenders don't take the approval process lightly. Buyers still have to adhere to an assortment of criteria if they hope to get a green light.
Financial requirements
Right off the bat, an SBA lender wants to make sure the borrower meets certain financial requirements. If the borrower's credit rating is less than stellar, there are a couple of options. First, the borrower can review his credit report and work with previous lenders to remove items that have a detrimental effect on his overall score. Although lenders are generally willing to work with borrowers to clear their report and improve their rating, the borrower will probably have to make some progress before the report will improve enough to make a difference.
Another option is for the borrower to simply delay the purchase until he can demonstrate a trend of positive borrowing. This could take a while, but if it makes the difference between getting a loan and not getting a loan, the time will be well-spent.
Yet even the most immaculate credit rating won't be able to help a borrower who isn't able to come up with the minimum downpayment. SBA loans typically require a downpayment in the 10% to 30% range, depending on the type of collateral the borrower is able to offer as security for the loan. Since an adequate downpayment can represent a big chunk of change in a business purchase, it's not uncommon for buyers to beg, borrow and steal (OK, maybe not steal) it from the equity in their homes, their retirement programs or even relatives.
Sponsor Content
Report: Younger, more diverse buyers look to acquire retiring baby boomer businesses
Driven in large part by an increase in the number of buyers and sellers on the market, the small business transaction market grew substantially in 2013,…
4 things business buyers need to know about seller financing
Sponsor Content
Want to buy a business? Here are 4 places to find help
Buying a business is an exciting but sometimes overwhelming experience. It’s not always easy identifying a business opportunity that fits your personal… | http://www.bizjournals.com/bizjournals/how-to/buy-a-business/bizbuysell/2012/12/sba-loans-for-business-buyers.html?page=2 | dclm-gs1-217520000 |
0.027963 | <urn:uuid:35c15d0f-b924-48c5-83d1-45d6f3c02ec2> | en | 0.896494 |
Magician: Apprentice
by Raymond E. Feist
ISBN 0553564943 / 9780553564945 / 0-553-56494-3
Publisher Bantam
Language English
Edition Softcover
Find This Book
Find signed collectible books: 'Magician: Apprentice'
Book summary
Fantasy - At Crydee, a frontier outpost in the tranquil Kingdom of the Isles, an orphan boy, Pug, is apprenticed to a master magician - and the destinies of two worlds are changed forever. Suddenly the peace of a Kingdom is destroyed as mysterious alien invaders swarm through the land. Pug is swept up into the conflict but for him and his warrior friend, Tomas, an odyssey into the unknown has only just begun... [via] | http://www.bookfinder.com/dir/i/Magician-Apprentice/0553564943/ | dclm-gs1-217560000 |
0.054719 | <urn:uuid:659321a9-9b9f-4e8d-8d5a-9ba595bf0d15> | en | 0.904917 | Forgot your password?
Related Topics
The Tenant of Wildfell Hall Activities & Classroom Projects
Purchase our The Tenant of Wildfell Hall Lesson Plans
Fun Activities
1. Chapter Re-Write
Rewrite a chapter of this novel, changing the setting to present day.
2. Wedding Planner
Plan the wedding of Mr. Markham to Helen.
3. Painting
Recreate one of Helen's paintings based on the description of it in the novel.
4. Diary
Write more of Helen's diary where hers leaves off.
5. Soundtrack
Make a 10 song soundtrack that reflects "The Tenant of Wildfell Hall." Include short rationales explaining why each song is included.
6. Quiz Questions
Write at least five quiz questions based on this novel.
7. Tabloid
Make a...
(read more Fun Activities)
This section contains 375 words
(approx. 2 pages at 300 words per page)
Purchase our The Tenant of Wildfell Hall Lesson Plans
The Tenant of Wildfell Hall from BookRags. ©2009 BookRags, Inc. All rights reserved.
Follow Us on Facebook | http://www.bookrags.com/lessonplan/the-tenant-of-wildfell-hall/funactivities.html | dclm-gs1-217570000 |
0.158508 | <urn:uuid:baa7dae8-7de7-40bd-b6b2-4af3858cdac3> | en | 0.810931 | dynamic microphone
The topic dynamic microphone is discussed in the following articles:
principles of operation
• TITLE: microphone (electroacoustic device)
...displacement of the diaphragm may cause variations in the resistance of a carbon contact (carbon microphone), in electrostatic capacitance (condenser microphone), in the motion of a coil (dynamic microphone) or conductor (ribbon microphone) in a magnetic field, or in the twisting or bending of a piezoelectric crystal (crystal microphone). In each case, motion of the diaphragm produces...
• TITLE: electromechanical transducer (instrument)
SECTION: Types of transducers
Most microphones use either an electromagnetic or an electrostatic technique to convert sound waves into electrical signals. The dynamic microphone is constructed with a small magnet that oscillates inside a coil attached to the diaphragm. When a sound wave causes the diaphragm of the microphone to vibrate, the relative motion of the magnet and coil creates an electrical signal by magnetic... | http://www.britannica.com/print/topic/175127 | dclm-gs1-217610000 |
0.026229 | <urn:uuid:41893ea2-a9d1-473e-8b17-9c43adfbbbc5> | en | 0.899602 | The topic bracteole is discussed in the following articles:
• TITLE: angiosperm (plant)
SECTION: The receptacle
...When the flowers are borne in an inflorescence, the peduncle is the internode between the bract and the inflorescence; the internode between the receptacle of each flower and its underlying bracteole is called a pedicel. Thus, in inflorescences, bracteole is the equivalent of bract, and pedicel is the equivalent of peduncle.
• TITLE: gnetophyte (plant)
SECTION: Pollination and embryogeny
...stage in the mature seed. A seed consists of an embryo with two seed leaves (cotyledons), a stem axis, and a root, embedded in nutritive tissue of the female gametophyte. The pair of protective bracteoles become hard, and the seed is also surrounded by fleshy bracts that may become ivory, red, or orange in colour, perhaps an adaptation for animal dispersal. There appears to be no resting...
• TITLE: gnetophyte (plant)
SECTION: Reproductive structures and function
...or a microsporangiophore, which terminates in a cluster of sporangia, called microsporangia, that house the haploid reproductive cells (spores). The microsporangia are surrounded by a pair of bracteoles (scalelike leaves). Meiotic divisions in cells of the microsporangia produce the haploid pollen grains. | http://www.britannica.com/print/topic/76741 | dclm-gs1-217620000 |
0.01937 | <urn:uuid:106fcb39-3bbd-479f-a7e8-c5a173329fb4> | en | 0.96539 | Misregulated genes may have big autism role
A genetic pathway involving proteins in the endosomes of cells appears to be misregulated in the brains of children with autism, according to a newly published statistical analysis in the journal Molecular Psychiatry. Previously the genes were shown to cause rare forms of the disease but the new study suggests they have a wider role. | http://www.brown.edu/research/news/2013-03/misregulated-genes-may-have-big-autism-role | dclm-gs1-217640000 |
0.074124 | <urn:uuid:263a1da2-4a84-4293-8d35-f8c167378bcd> | en | 0.864818 | The Job You Selected Has Expired...
Jobs like **Randstad Open House - Woburn Area** TODAY at Randstad US (Expired)
| http://www.careerbuilder.com/Jobs/ExpiredJob.aspx?job_did=J3J26978CLDZKCZH8D6&exjob=true&IPath=JELX | dclm-gs1-217730000 |
0.019908 | <urn:uuid:f70cb314-1807-4311-ade0-f5692f57b334> | en | 0.963187 | « Prev CHAPTER IV Next »
God sends into that heart another ray of love, which, diffusing itself, fills the soul and revives the body.—There is nothing but exceeding love and joy, until this love, which is wholly from God, has completed its work.
God once more infused into the Soul another ray of love, and by its superabundance the body also was refreshed, and there was nothing but love and rejoicing of heart, for the Soul believed herself in paradise. In this state the Soul continued until every love except that of God was entirely consumed, and with his love alone she remained until she was wholly absorbed in him. He bestowed upon her many graces and sent her many sweet consolations, upon which she fed as do all those who share the divine love. He spoke to her also in those loving words which, like flame, penetrate the hearts of those who hear them. The body, moreover, was so inflamed, that it seemed as if the Soul must quit it in order to unite herself with her Love. This was to her a season of great peace and consolation, for all her nourishment was the food of eternal life.
In this state she feared neither martyrdom nor hell nor any opposition or adversity that might befall her, for it seemed to her that with this love she could endure all things. O loving and rejoicing heart! O happy soul that has tasted this love! Thou canst no longer enjoy or behold aught beside, for thou hast attained thy rest for which thou wert created! O sweet and secret love: whoever tastes thee can no longer exist without thee! Thou, O man! who wert created for this love, how canst thou be satisfied and at peace without it? How canst thou live? In it is comprised all that can be desired, and it yields a satisfaction so entire that man can neither obtain it for himself nor even conceive it until he has experienced it. O love! in which are united all bliss and all delight, and which satisfies all desire!
Whoever could express the emotions of a heart enamored of God, would break every other heart with longing, although it were harder than the diamond and perverser than the devil. O flame of love! thou dost consume all rust, and so completely removest every shadow of defect that the least imperfection disappears before thee. So perfectly dost thou thy work in the Soul, that she is cleansed even from those defects that are seen by thine eye alone, to which even that which seems to us perfection is full of faults.
O Love! thou dost wholly cleanse and purify us; thou dost enlighten and strengthen our understanding, and dost even perform for us our necessary works, and this through thy pure love alone which meets with no return from us.
And now this Soul, filled with astonishment at beholding God so enamored of her, questions him concerning his love.
« Prev CHAPTER IV Next »
Please login or register to save highlights and make annotations
Corrections disabled for this book
Proofing disabled for this book
Printer-friendly version
| http://www.ccel.org/ccel/catherine_g/life.v.ii.iv.html | dclm-gs1-217800000 |
0.030439 | <urn:uuid:158c3beb-585d-4fb3-8b47-5700b9481eea> | en | 0.95742 |
Swin Cash
Top Swin Cash Articles see all
Displaying items 1-5
• BY THE NUMBERS: A Few That Show The Caliber Of Basketball UConn Women Play
• UNIFORM NUMBERS: Why The Husky Players Chose To Wear A Certain One
What's in a number? Well, apparently it depends on what number and how attached a player has become to wearing it during their careers. When Renee Montgomery played for the UConn women she wore No. 20 and then put it on again when the WNBA's Minnesota...
Spotlight On Sue Bird
Bird came to UConn after a spectacular high school career at Christ the King in New York but her freshman season was cut short by a knee injury sustained in practice eight games into the season. But she rebounded quite well, becoming one of the most...
Spotlight On Svetlana Abrosimova
Abrosimova, 29, was born in St. Petersburg, Russia and while playing for Petrogradskoi N86 (high school) began training with the Russian national team. She was MVP of the 1998 European Basketball Championships after being recruited by UConn through the...
It has been three seasons since the UConn women have won a national basketball championship or played in the Final Four, a minor setback for a program with five national championships since 1995. Still, watching Baylor, Maryland and Tennessee win... | http://www.courant.com/topic/sports/swin-cash-hpa3625.topic?page=1&sortby=taxrankprof | dclm-gs1-217900000 |
0.064026 | <urn:uuid:9886c6d1-eea2-4362-b8ea-dd698a269cc6> | en | 0.946173 | Comment: CFTC ceased operations
(See in situ)
DJP333's picture
CFTC ceased operations
due to the shutdown and then almost 2 million ounces notional gold were flushed into the gold futures markets dumping the price of gold to 3-month lows. Really?
| http://www.dailypaul.com/comment/3226761 | dclm-gs1-217910000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.