When I do
:colorscheme vilight
it loads the color scheme fine.
So I added
colorscheme vilight
to my .vimrc but its not loading it on start. Am I missing something?
I have a Model which has fields username, data, tags, date, votes. I have form using form_for that creates a new item and puts it into the database. However, as you can guess I want the votes field to equal 0 and the date field to equal the current date when it is placed into the database. How and where would I set/apply these values to the item?
I can get it to work with hidden fields in the form but this comes with obvious issues (someone could set the votes field to a massive number.
I am struggling with getting Inno Setup to set the check box to true whether a desktop icon should be created. The documentation has not been any helpful concerning this issue as well as Googlism and Stackoverflow.
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
My thought was a value like "checked" for "Flags" but the documentation told me, that Flags isn't responsible for this.
I have the following code:
use Imager::Screenshot 'screenshot';
my $img = screenshot(hwnd => 'active', left => 450, right => 200, top => 50, bottom => 50);
$img->write(file => 'screenshot.png', type => 'png' ) || print "Failed: ", $img->{ERRSTR} , "\n";
it returns:
"Can't call method "write" on undefined value at line 3"
but when I do:
use Imager::Screenshot 'screenshot';
my $img = screenshot(hwnd => 'active', left => 100, right => 300, top => 100, bottom => 300);
$img->write(file => 'screenshot.png', type => 'png' ) || print "Failed: ", $img->{ERRSTR} , "\n";
it does take a screenshot. Why would the left, right, top and bottom values matter here?
I am deploying my Java application with Ant. Unfortunately my test deployment on the local machine doesn't work because of Vista. The Program Files directionaries are protected and i don't want to start Ant or Eclipse as an Admin. So i had the idea to move my webapps folder to a workspace subfolder, so i can use relative paths in Ant as well.
The solutions seems to be to modify the Host element in the server.xml. With Linux it isn't such a deal:
<Host name="localhost" appBase="/path/to/webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
But with Windows i don't get it right. I tried every possible combinations i could imagine, like:
C://Users//maerch//Workspaces//Tomcat6.0_webapps
C:/Users/maerch/Workspaces/Tomcat6.0_webapps
C:\Users\maerch\Workspaces\Tomcat6.0_webapps
C:\\Users\\maerch\\Workspaces\\Tomcat6.0_webapps
C://Users//maerch//Workspaces//Tomcat6.0_webapps\\
C:/Users/maerch/Workspaces/Tomcat6.0_webapps/
C:\Users\maerch\Workspaces\Tomcat6.0_webapps\
C:\\Users\\maerch\\Workspaces\\Tomcat6.0_webapps\\
The path is also correct, but it doesn't work. There are also no error messages in the log files neither the browser shows a 404 message or anything else. Just a white page without title and so on. Can anyone help?
Hello!
I want to programaticly open androids image application to show only images from speciffic directory on the SDcard. Is there any way to do it? I just cant find a way.
I have created this widget
class DateTimeWidget(forms.TextInput):
attr = {'class': 'datetimepicker'}
class Media:
js = ('js/jquery-ui-timepicker-addon.js',)
Then I use it on my form
class SessionForm(forms.ModelForm):
class Meta:
model = Session
def __init__(self, *args, **kwargs):
super(SessionForm, self).__init__(*args, **kwargs)
self.fields['start_time'].widget = DateTimeWidget()
self.fields['end_time'].widget = DateTimeWidget()
No css class is applied to my fields (I'm expecting datetimepicker applied to both start_time & end_time).
I imagine I have put attr at a wrong location. Where am I supposed to specify it ?
I have this Model:
class Occurrence(models.Model):
id = models.AutoField(primary_key=True, null=True)
reference = models.IntegerField(null=True, editable=False)
def save(self):
self.collection = self.id
super(Occurrence, self).save()
I want for the reference field to be hidden and at the same time have the same value as id. This code works if the editable=True but if i want to hide it it doesnt change the value of reference.
how can i fix that?
Hi All,
I want to change the behavior of eclipse's parent-first classloader policy to child-first classloader policy.
The scenario would be :
Plugin A has class C in dependent external jar.
When the classloader of the jar looks for "META-INF" folder - it should find the META-INF folder of the jar and not the one found by its parent classloader - that is the plugin A's META-INF folder.
So I want to change the classloader policy to 'child-first' rather than 'parent-first'
Is it possible to do this by changing the plugin A's Manifest or plugin.xml?
I'm using drupal 6.16 and have a set of taxonomy terms that are set up as a multi-select box. I would like for the first item to be selected when the user loads the page. I dont know if I need to add code to a file or just simply change a setting. I should warn you I do not have a lot of experience, but would rate myself as a low intermediate level programmer.
Thanks in advance
msindle
Googled for this to no avail. Didn't find anything in the API either. I was expecting some kind of class method or configuration option to set it...
So, rather than calling
from "[email protected]"
for every method, it could be called automatically.
Is there an easy way to set the Localizable property to true for newly created usercontrols / forms? The scope of the setting should ideally be a solution or a project.
In other words I want to say that this project/solution should be localizable, and then if I add a new form or control VS should automatically set the property to true.
My app allows the user to update a field via a drop down box using jeditable. When the program is loaded i created this function to get the selected value and set it as the selected value in jeditable.
But after i change the value, the selected tag stays set as the old value. how can i make it change to the new value?
this is the function
function updateType(ID,type){
$(document).ready(function(){
$('#tweekType-'+ID).editable("edit.php?type=tweekType", {
data : " {'copywriting':'Copywriting','design':'Design','code':'Code', 'selected':'"+type+"'}",
type : 'select'
});
});
this is the wrapper around the tag.
<span id="tweekType-<?php echo $getTweaksReturned->tweekID; ?>">
<?php type($getTweaksReturned->type); ?>
<script>updateType('<?php echo $getTweaksReturned->tweekID; ?>','<? echo $getTweaksReturned->type; ?>'); </script>
</span>
The same tag is replicated on the page the returns the new variable.
Hi,
I am working in a Login page and teh logic is like -
try
{
DirectoryEntry LDAPLogin = new DirectoryEntry(ConfigurationSettings.AppSettings ["LDAPPath"].ToString(), Usuario, Txt_Contrasenia.Text.ToString());
if (LDAPLogin.NativeGuid != LDAPLogin.Name)
ValidarGrupo();
}
catch (Exception exc)
{
Label_Info.Text = "Sus credenciales no son validas: " + Usuario.ToString() + " " + exc.Message;
}
If the user enters the rights credentials I call a method ValidarGrupo that implements a lookup in the AD for a group of the user
I would like to replace the username and password with UseDefaultCredentials in order to avoid that the user has to enter the username and password and the Login pages use the credentials of the user that is login on the machine.
How does C++ handle function pointers in relation to functions with defaulted parameters?
If I have:
void foo(int i, float f = 0.0f);
void bar(int i, float f);
void (*func_ptr1)(int);
void (*func_ptr2)(int, float);
void (*func_ptr3)(int, float = 10.0f);
Which function pointers can I use in relation to which function?
My problem stems from Emacs inserting the coding system headers into source files containing non-ascii characters:
# -*- coding: utf-8 -*-
My coworkers do not like these headers being checked into our repositories. I don't want them inserted into my files because Emacs automatically detects that the file should be UTF-8 regardless so there doesn't seem to be any benefit to anyone.
I would like to simply set Emacs to use UTF-8 automatically for all files, yet it seems to disagree with this idea. In an effort to fix this, I've added the following to my .emacs:
(prefer-coding-system 'utf-8)
(setq coding-system-for-read 'utf-8)
(setq coding-system-for-write 'utf-8)
This does not seem to solve my problem. Emacs still inserts the coding-system headers into my files. Anyone have any ideas?
EDIT:
I think this problem is specifically related to ruby-mode. I still can't turn it off though.
With the new Eclipse 3.5.2 Update manager, I am not able to find, how do I specify installation directory for my plugins. I use it, so that I can manage multiple installation of eclipse, without installation plugins again. Can anybody provide me settings, so that I can specify location for plugin, while installing it ?
There's tons of documentation out there on how to override the appearance of Drupal modules, but I keep finding the docs for writing the original theme to be a little lacking. On this note, how can I tell Drupal to use a specific CSS file for my custom module's block output?
Hi, whenever I add a new domain into my new Plesk control panel on my dedicated server it creates a whole bunch of test files in the cgi-bin, httpdocs and httpsdocs.
There must be some setting somewhere where I can tell Plesk not to do this?
I've done a good Google search but must now turn to the StackOverflow masses :)
Yours,
Chris
Hi,
I am using Google Minify and I want a timestamped URI.
The readme.txt suggests this:
<link rel="stylesheet" type="text/css" href="<?php echo Minify_groupUri('css'); ?>" />
<script type="text/javascript" src="<?php echo Minify_groupUri('js'); ?>"></script>
but it also says:
'Before including this file, /min/lib must be in your include_path.'
Where is the include_path set??
A.
Hi, I have an input file HTML form and I want to set the initial value for the file path in an HTML form . I try to change tag "value" but it doesn't work anyway.
<input type="file" name="testcase" value= "C:\test.txt">
Please give me some advice for this small problem. Thanks.
RDS uses the same set of parameters for all instance sizes and they don't seem to be that far from defaults (max_packet_size being too small etc.)
Has anyone looked at them and reviewed them for how sensible they are, especially on relatively bigger instances?
I'm using symfony 2.1.2 with FOSUserBundle.
I extend the User from FOS and define a many-to-one (bidirectional) association to a Customer entity. I don't want to use primary key for the association (referencedColumnName). I will use another integer uniqe column: customer_no
use FOS\UserBundle\Entity\User as BaseUser;
/**
* @ORM\Entity
* @ORM\Table(name="t_myuser")
*/
class MyUser extends BaseUser
{
/**
* @ORM\ManyToOne(targetEntity="Customer", inversedBy="user")
* @ORM\JoinColumn(name="customer_no", referencedColumnName="customer_no", nullable=false)
*/
$public $customer;
}
/**
* @ORM\Entity
* @ORM\Table(name="t_customer")
*/
class Customer extends BaseEntity // provides an id (pk)
{
/**
* @ORM\Column(type="integer", unique=true, nullable=false)
*/
public $customer_no;
/**
* @ORM\OneToMany(targetEntity="MyUser", mappedBy="customer")
*/
public $user;
}
When I try to persist (via a form) a new MyUser entity with an (already in db existing and) loaded Customer entity from db, I get this error:
Notice: Undefined index: customer_no in ...\vendor\doctrine\orm\lib\Doctrine\ORM\Persisters\BasicEntityPersister.php line 608
The schema on the db is all right.
//update:
I fix the inversedBy and mappedBy stuff, but this is not the problem.
I'm setting up a simple webpage using Wordpress. You can watch it at www.unistore.se. My question is: How can I include a horizontal menu just below the header? I would like to be able to create new links in the menu with the "New page"-function in the wordpress admin.
Thanks!
I there a simple way when using ASP.NET 4.0 routing with Web Forms to produce a route that will act as some kind of wildcard?
It seems to me that within WebForms, you have to specify a route for every page - I am looking for some kind of generic route that can be used where nothing specific is required, perhaps mapping directly from path to path so...
http://somedomain.com/folder1/folder2/page would possibly map to folder1/folder2/page.aspx
Any suggestions?
Thanks