I've just gone to installed RoR on my snow leopard mac.. and found the rails gem was already installed..
is this normal? Does it need updating?
Does this get installed along with textmate?
I am using jdbc to connect to a postgresql database in a java application (actually the app is written in Groovy). I have postgresql set up to use the 'trust' authentication method. Is it possible to open a jdbc connection without specifying a password? When I try to use the normal constructor with a blank password, it fails with
Exception in thread "Thread-2" org.postgresql.util.PSQLException: FATAL: password authentication failed for user "myuser"
Even though, from the command line, this works fine
psql -U myuser mydatabase
Welcome to psql 8.3.5, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
Which route should I take?
A) Using a SharePoint 2010 Visual Studio Project
B) Building a normal asp.net website and incluing my pages using the "Web Part Page" web part in SharePoint
Basically I'll be doing some workflows, like filling out travel expenses forms, with approval and feedback.
I'm writing to many files in a threaded app and I'm creating one handler per file. I have HandlerFactory class that manages the distribution of these handlers. What I'd like to do is that
thread A requests and gets foo.txt's file handle from the HandlerFactory class
thread B requests foo.txt's file handler
handler class recognizes that this file handle has been checked out
handler class puts thread A to sleep
thread B closes file handle using a wrapper method from HandlerFactory
HandlerFactory notifies sleeping threads
thread B wakes and successfully gets foo.txt's file handle
This is what I have so far,
def get_handler(self, file_path, type):
self.lock.acquire()
if file_path not in self.handlers:
self.handlers[file_path] = open(file_path, type)
elif not self.handlers[file_path].closed:
time.sleep(1)
self.lock.release()
return self.handlers[file_path][type]
I believe this covers the sleeping and handler retrieval successfully, but I am unsure how to wake up all threads, or even better wake up a specific thread.
I would like to make notice of some wierd thing. I designed an entire package application using VB.Net in Visual Studio 2008. I changed the normal backgrounds to Black, to make a diffrerence. but the problem is i1mm getting changing back ground colors when i install it on other systems.which does have all supports required.
What should i do to supress this problem.
I refered this link.I am using the uri for streetview:
Uri.parse("google.streetview:cbll=" + sv_lat_val + ","+ sv_long_val + "&cbp=1,45,,45,0.0&mz=0.0")
But the zoom level always in Zoomed state. 1.0 is the normal zoom. so i set it for 0.0 . still its not zoomed out. why? But it working in default Google maps App? Any idea?
I don't quite understand how to control y - axis when using plt.hist plot in python. I read my .txt data file - it contains 10 columns with various data. If I want to plot distribution of strain on x axis I take column n.5. But what kind of value appears on y axis ??? Don't understand that.
here is the code:
import numpy
import matplotlib.pyplot as plt
from pylab import *
from scipy.stats import norm
import sys
strain = []
infile = sys.argv[1]
for line in infile:
ret = numpy.loadtxt(infile)
strain += list(ret[:,5])
fig = plt.figure()
plt.hist(strain, bins = 20)
plt.show()
Thanks for help!
Hi ,
I have this code in my block and i would like to have the two columns left and right . Now the 2-nd one is under the first column .
<style type="text/css">
a img{border:none;}
#planninglaunchbox
{
background:#f3f8e7;
color:#1f1f1f;
font:normal 11px Arial,sans-serif;
margin:0 10px 10px 0;
overflow:hidden;
width:235px;
}
#planninglaunchbox .inner
{
padding:10px 0 10px 10px;
}
#planninglaunchbox a{color:#1f1f1f;text-decoration:none;}
#planninglaunchbox a:active,
#planninglaunchbox a:hover{text-decoration:underline;color:#579BC3;}
#planninglaunchbox h3
{
color:#1f1f1f;
font:normal 12px Georgia,serif;
margin:0 0 5px;
text-transform:lowercase;
width:215px;
}
#planninglaunchbox h4
{
font:bold 12px Arial,sans-serif;
margin:0 0 10px;
}
#planninglaunchbox ul
{
list-style:none;
margin:0 0 5px;
padding:0;
}
#planninglaunchbox ul.first{margin-right:10px;}
#planninglaunchbox ul.first,
#planninglaunchbox ul.last
{
float:left;
}
#planninglaunchbox ul li
{
background:none;
margin-bottom:5px;
padding:0;
}
#planninglaunchbox ul li img
{
margin-right:6px;
vertical-align:middle;
}
#planninglaunchbox .seeall
{
clear:both;
margin:0;
padding:0;
width:auto;
}
</style>
<div id="planninglaunchbox">
<div class="inner">
<h3> Theme</h3>
<ul class="first">
!--Some links--
</ul>
<ul class="last">
!--Some links--
</ul>
</div>
</div>
When configuring a Linux kernel, I normally start with my distribution's kernel config file. I often want to turn off some entries, but they are sometimes unchangeable because other CONFIG options that depend on it are enabled.
I can look up the dependencies manually, which often have dependencies of their own. It can be pretty time consuming to did through them all, especially if you're trying to turn off something like CONFIG_KALLSYMS.
Is there a way to specify a CONFIG option you want gone, and have all dependencies automatically selected/disselected as nessisary for you? I looked through all the make options and in the scripts directory, and didn't see anything available for this.
I have a sgen step in my .NET 3.5 library, producing a correct XYZ.XmlSerializers.dll in the output directory.
Still having poor serialization performance, I discovered that .NET was still invoking a csc at runtime. Using process monitor, I saw that .NET was searching for a dll named "XYZ.XmlSerializers.-1378521009.dll".
Why is there a '-1378521009' in the filename ? How to tell .NET to use the 'normal' DLL produced by sgen ?
I know at some point I'd come across a Google service built into their API that would provide local information as markers on the viewport (schools, hospitals, etc.)-- I believe this was a simple control that could be added just like the normal map controls, to allow users to turn it on or off with a checkbox or button.
I can't seem to find this feature documented anywhere in the v3.0 API docs. Can anyone provide some information on this, or let me know if it was deprecated?
Thanks
Is there any way to properly integrate Subversion control into VS2008? I'm currently using the TortoiseSVN shell extensions, but I keep forgetting to check in new files and it's easy to get in a confused mess.
On another project I use VS2008 with SourceSafe, and it's really nice having most things automated or controlled simply by using VS in its normal way.
How do I represent integer array as attribute of a class in Visual Studio 2010's UML class diagrams? I know hot to add normal integers, but I'm hoping that there is a way to do it other than adding [] to integer's name.
I'm new to UML, so I could be missing something obvious here.
Should I use Is ordered and Is unique?
Hi,
i have a wcf service which runs perfectly on my dev machine (vs2010, target 3.5) but once deployed, it shows me the code behind of the service (actually the plain text of the .svc file) and not the normal service page:
<%@ ServiceHost Language="C#" Debug="true" Service="SilverlightPoc.Web.FinanceData" CodeBehind="FinanceData.svc.cs" %>
Anyone any idea why the .svc file is rendered as plain text and not as wcf service?
Hi,
I have 5 pictures, and I will overlap these 5.
I read a lot of HowTo CSS / Div and overlapping, but I didn't get it at all.
I have a normal 500 width div container as "content" filler.
Into this div, I will have 5 pictures that are overlapping each other.
I try all "position:", but nothing fills what I want.
Hello,
I have a comment box, if they enter long one word, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
the box will break(text out of div), i have used overflow:hidden but my friend want it to break like normal text.
Any idea how to fix ?
Hi all. I can't figure out the formula to compute the bank (roll) angle from the up and lookat vectors, though I feel this angle must be measured in tha plan normal to the lookat vector. Any hint appreciated. FYI I use WPF.
self.mood_scale = {
'-30':"Panic",
'-20':'Fear',
'-10':'Concern',
'0':'Normal',
'10':'Satisfaction',
'20':'Happiness',
'30':'Euphoria'}
I need to set two variables: max_mood and min_mood, so I can put some limits on a ticker.
What's the easiest way to get the lowest and the highest keys?
I am trying to parse Youtube Gdata to see if video with given id exists. But there isn't normal tag but with namespace. On the link http://gdata.youtube.com/feeds/api/videos?q=KgfdlZuVz7I there is tag:
<openSearch:totalResults>1</openSearch:totalResults>
There is namespace openSearch:
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
but I dont know how to deal with it in Nokogiri and Ruby.
Here is part of code:
xmlfeed = Nokogiri::HTML(open("http://gdata.youtube.com/feeds/api/videos?q=#{video_id}"))
xmlfeed.at_xpath("openSearch:totalResults")
It gives error:
Undefined namespace prefix: openSearch:totalResults
In my Visual Studio 2010 project I have files with .mm file extension, that need to be compiled as normal C++ files. Is there a way to make a build rule for new extensions or something like that? In VS 2008 there were options for that, but they are gone in 2010.
Hello,
I'm using a linux server that display directories in a bold font, and files in a normal font.
e.g. $ ls produces
afile.txt afolder anotherfile.txt anotherfolder
I'd like to use this feature on some other servers. How can it be done? with the .bash_profile?
If anyone has other ideas on how to differentiate folders from file, they'd be good to know?
Hi, looking at a database dump file, and I see many records in various tables with their version number set in values other than 0 (even 94 in one case). I understand it has to do with hibernate locking strategy, but my concern is that today is Sunday, and the site has almost no visitors so is: is this normal ? Or is there a known hibernate bug or even some programming malpractice producing this ?
Thanks in advance.
Currently image_tag("file.jpg") produces normal image html tag, BUT src="file.jpg*?7485793246*" what the hell are those numbers anyway and how to disable them?
I have a client supplied file that is loaded in to our SQL Server database. This file contains text based date values i.e. (05102010) and I need to read them from a db column and convert them to a normal date time value = '2010-05-10 00:00:00.000' as part of a clean-up process.
Any guidance would be greatly appreciated.
Hi
I have the following relations (tables) in a relational model
Person
person_id, first_name, last_name, address
Student
person_id, matr_nr
Teacher
person_id, salary
Lecture
lecture_id, lect_name, lect_description
Attendees
lecture_id, person_id, date
I'm wondering about the functional dependencies of Student and Teacher.
Do these tables respect the 3rd normal form? Which should be the primary keys of these tables?