Search Results

Search found 75 results on 3 pages for 'noam smadja'.

Page 3/3 | < Previous Page | 1 2 3 

  • django ignoring admin.py

    - by noam
    I am trying to enable the admin for my app. I managed to get the admin running, but I can't seem to make my models appear on the admin page. I tried following the tutorial (here) which says: (Quote) Just one thing to do: We need to tell the admin that Poll objects have an admin interface. To do this, create a file called admin.py in your polls directory, and edit it to look like this: from polls.models import Poll from django.contrib import admin admin.site.register(Poll) (end quote) I added an admin.py file as instructed, and also added the following lines into urls.py: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', ... (r'^admin/', include(admin.site.urls)), ) but it appears to have no effect. I even added a print 1 at the first line of admin.py and I see that the printout never happens, So I guess django doesn't know about my admin.py. As said, I can enter the admin site, I just don't see anything other than "groups", "users" and "sites". What step am I missing?

    Read the article

  • Matlab: convert global coordinates to figure coordinates

    - by noam
    If I get coordinates via coords = get(0,'PointerLocation'); How can I convert them into points gotten via ginput? i.e, I would like to get the same values from coords = get(0,'PointerLocation'); coords=someConversion(coords); As I would have gotten by calling coords=ginput(1); And clicking inside the figure in the same spot as the mouse was in the previous bit of code.

    Read the article

  • Dependency Properties and Data Context in Silverlight 3

    - by Noam
    Hello, I am working with Silverlight 3 beta, and am having an issue. I have a page that has a user control that I worte on it. The user control has a dependency property on it. If the user control does not define a data context (hence using the parent's data context), all works well. But if the user control has its own data context, the dependency property's OnPropertyChanged method never gets called. Here is a sample: My Main Page: <UserControl x:Class="TestDepProp.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:app="clr-namespace:TestDepProp" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="400" Height="100"> <Grid x:Name="LayoutRoot" Background="White"> <Border BorderBrush="Blue" BorderThickness="3" CornerRadius="3"> <StackPanel Orientation="Horizontal"> <StackPanel Orientation="Vertical"> <TextBlock Text="Enter text here:" /> <TextBox x:Name="entryBlock" Text="{Binding Data, Mode=TwoWay}"/> <Button Content="Go!" Click="Button_Click" /> <TextBlock Text="{Binding Data}" /> </StackPanel> <Border BorderBrush="Blue" BorderThickness="3" CornerRadius="3" Margin="5"> <app:TestControl PropOnControl="{Binding Data}" /> </Border> </StackPanel> </Border> </Grid> </UserControl> Main Page code: using System.Windows; using System.Windows.Controls; namespace TestDepProp { public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); MainPageData data = new MainPageData(); this.DataContext = data; } private void Button_Click(object sender, RoutedEventArgs e) { int i = 1; i++; } } } Main Page's data context: using System.ComponentModel; namespace TestDepProp { public class MainPageData:INotifyPropertyChanged { string _data; public string Data { get { return _data; } set { _data = value; if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Data")); } } public MainPageData() { Data = "Initial Value"; } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; #endregion } } Control XAML: <UserControl x:Class="TestDepProp.TestControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:app="clr-namespace:TestDepProp" > <Grid x:Name="LayoutRoot" Background="White"> <StackPanel Orientation="Vertical" Margin="10" > <TextBlock Text="This should change:" /> <TextBlock x:Name="ControlValue" Text="Not Set" /> </StackPanel> </Grid> </UserControl> Contol code: using System.Windows; using System.Windows.Controls; namespace TestDepProp { public partial class TestControl : UserControl { public TestControl() { InitializeComponent(); // Comment out next line for DP to work DataContext = new MyDataContext(); } #region PropOnControl Dependency Property public string PropOnControl { get { return (string)GetValue(PropOnControlProperty); } set { SetValue(PropOnControlProperty, value); } } public static readonly DependencyProperty PropOnControlProperty = DependencyProperty.Register("PropOnControl", typeof(string), typeof(TestControl), new PropertyMetadata(OnPropOnControlPropertyChanged)); private static void OnPropOnControlPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TestControl _TestControl = d as TestControl; if (_TestControl != null) { _TestControl.ControlValue.Text = e.NewValue.ToString(); } } #endregion PropOnControl Dependency Property } } Control's data context: using System.ComponentModel; namespace TestDepProp { public class MyDataContext : INotifyPropertyChanged { #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; #endregion } } To try it out, type something in the text box, and hit the Go button. Comment out the data context in the controls code to see that it starts to work. Hope someone has an idea as to what is going on.

    Read the article

  • Enabling tag libraries in jsp

    - by noam
    I feel like I am missing something - from what it seems, jsp comes out of the box with support for tags, as this question's answer shows (the guy was asking a pure-jsp question and got an answer involving tags). But if I try to run the given code <c:out value="${myString}"/> (with myString defined before, of course), the jsp just writes the above line into the html. Do I have to do something extra to enable it?

    Read the article

  • Why can you reference an imported module using the importing module in python

    - by noam
    I am trying to understand why any import can be referenced using the importing module, e.g #module master.py import slave and then >>>import master >>>print master.slave gives <module 'slave' from 'C:\Documents and Settings....'> What is the purpose of the feature? I can see how it can be helpful in a package's __init__.py file, but nothing else. Is it a side effect of the fact that every import is added to the module's namespace and that the module's namespace is visible from the outside? If so, why didn't they make an exception with data imported from other modules (e.g don't show it as part of the module's namespace for other modules)?

    Read the article

  • django admin gives warning "Field 'X' doesn't have a default value"

    - by noam
    I have created two models out of an existing legacy DB , one for articles and one for tags that one can associate with articles: class Article(models.Model): article_id = models.AutoField(primary_key=True) text = models.CharField(max_length=400) class Meta: db_table = u'articles' class Tag(models.Model): tag_id = models.AutoField(primary_key=True) tag = models.CharField(max_length=20) article=models.ForeignKey(Article) class Meta: db_table = u'article_tags' I want to enable adding tags for an article from the admin interface, so my admin.py file looks like this: from models import Article,Tag from django.contrib import admin class TagInline(admin.StackedInline): model = Tag class ArticleAdmin(admin.ModelAdmin): inlines = [TagInline] admin.site.register(Article,ArticleAdmin) The interface looks fine, but when I try to save, I get: Warning at /admin/webserver/article/382/ Field 'tag_id' doesn't have a default value

    Read the article

  • Why are mercurial subrepos behaving as unversioned files in eclipse AND torotoiseHG

    - by noam
    I am trying to use the subrepo feature of mercurial, using the mercurial eclipse plugin\tortoiseHG. These are the steps I took: Created an empty dir /root cloned all repos that I want to be subrepos inside this folder (/root/sub1, /root/sub2) Created and added the .hgsub file in the root repo /root/.hgsub and put all the mappings of the sub repos in it using tortoiseHG, right clicked on /root and selected create repository here again with tortoise, selected all the files inside /root and added them to to the root repo commited the root repo pushed the local root repo into an empty repo I have set up on kiln Then, I pulled the root repo in eclipse, using import-mercurial. Now I see that all the subrepos appear as though they are unversioned (no "orange cylinder" icon next to their corresponding folders in the eclipse file explorer). Furthermore, when I right click on one of the subrepos, I don't get all the hg commands in the "team" menu as I usually get, with root projects - no "pull", "push" etc. Also, when I made a change to a file in a subrepo, and then "committed" the root project, it told me there were no changes found. I see the same behavior also in tortoiseHG - When I am browsing files under /root, the files belonging directly to the root repo have an small icon (a V sign) on them marking they are version controlled, while the subrepos' folders aren't marked as such. Am I doing something wrong, or is it a bug?

    Read the article

  • Why are mercurial subrepos behaving as unversioned files in eclipse

    - by noam
    I am trying to use the subrepo feature of mercurial, using the mercurial eclipse plugin . I created and added the .hgsub file in the root repo, put all the mappings of the sub repos in it, and committed + pushed. Then, I pulled the root repo in eclipse, using import-mercurial. Now I see that all the subrepos appear as though they are unversioned (no "orange cylinder" icon next to their corresponding folders in the eclipse file explorer). Furthermore, when I right click on one of the subrepos, I don't get all the hg commands in the "team" menu as I usually get, with root projects - no "pull", "push" etc. Also, when I made a change to a file in a subrepo, and then "committed" the root project, it told me there were no changes found.

    Read the article

  • Compressing an uncompressed MSI file

    - by Noam Gal
    We have a setup project that produces an uncompressed MSI file and no Setup.exe at all, to be later compressed by NSIS. In a special build setting, I want to copy that MSI before it's being wrapped by NSIS, change the copy, and keep it. I would also like to compress it, after it has been created by the msbuild. Is there a simple way (command line tool of some kind, maybe?) I can use to just compress an already created msi file?

    Read the article

  • Hibernate Lazy init exception in spring scheduled job

    - by Noam Nevo
    I have a spring scheduled job (@Scheduled) that sends emails from my system according to a list of recipients in the DB. This method is annotated with the @Scheduled annotation and it invokes a method from another interface, the method in the interface is annotated with the @Transactional annotation. Now, when i invoke the scheduled method manually, it works perfectly. But when the method is invoked by spring scheduler i get the LazyInitFailed exception in the method implementing the said interface. What am I doing wrong? code: The scheduled method: @Component public class ScheduledReportsSender { public static final int MAX_RETIRES = 3; public static final long HALF_HOUR = 1000 * 60 * 30; @Autowired IScheduledReportDAO scheduledReportDAO; @Autowired IDataService dataService; @Autowired IErrorService errorService; @Scheduled(cron = "0 0 3 ? * *") // every day at 2:10AM public void runDailyReports() { // get all daily reports List<ScheduledReport> scheduledReports = scheduledReportDAO.getDaily(); sendScheduledReports(scheduledReports); } private void sendScheduledReports(List<ScheduledReport> scheduledReports) { if(scheduledReports.size()<1) { return; } //check if data flow ended its process by checking the report_last_updated table in dwh int reportTimeId = scheduledReportDAO.getReportTimeId(); String todayTimeId = DateUtils.getTimeid(DateUtils.getTodayDate()); int yesterdayTimeId = Integer.parseInt(DateUtils.addDaysSafe(todayTimeId, -1)); int counter = 0; //wait for time id to update from the daily flow while (reportTimeId != yesterdayTimeId && counter < MAX_RETIRES) { errorService.logException("Daily report sender, data not ready. Will try again in one hour.", null, null, null); try { Thread.sleep(HALF_HOUR); } catch (InterruptedException ignore) {} reportTimeId = scheduledReportDAO.getReportTimeId(); counter++; } if (counter == MAX_RETIRES) { MarketplaceServiceException mse = new MarketplaceServiceException(); mse.setMessage("Data flow not done for today, reports are not sent."); throw mse; } // get updated timeid updateTimeId(); for (ScheduledReport scheduledReport : scheduledReports) { dataService.generateScheduledReport(scheduledReport); } } } The Invoked interface: public interface IDataService { @Transactional public void generateScheduledReport(ScheduledReport scheduledReport); } The implementation (up to the line of the exception): @Service public class DataService implements IDataService { public void generateScheduledReport(ScheduledReport scheduledReport) { // if no recipients or no export type - return if(scheduledReport.getRecipients()==null || scheduledReport.getRecipients().size()==0 || scheduledReport.getExportType() == null) { return; } } } Stack trace: ERROR: 2012-09-01 03:30:00,365 [Scheduler-15] LazyInitializationException.<init>(42) | failed to lazily initialize a collection of role: com.x.model.scheduledReports.ScheduledReport.recipients, no session or session was closed org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.x.model.scheduledReports.ScheduledReport.recipients, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:383) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:375) at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:122) at org.hibernate.collection.PersistentBag.size(PersistentBag.java:248) at com.x.service.DataService.generateScheduledReport(DataService.java:219) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy208.generateScheduledReport(Unknown Source) at com.x.scheduledJobs.ScheduledReportsSender.sendScheduledReports(ScheduledReportsSender.java:85) at com.x.scheduledJobs.ScheduledReportsSender.runDailyReports(ScheduledReportsSender.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273) at org.springframework.scheduling.support.MethodInvokingRunnable.run(MethodInvokingRunnable.java:65) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:51) at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) ERROR: 2012-09-01 03:30:00,366 [Scheduler-15] MethodInvokingRunnable.run(68) | Invocation of method 'runDailyReports' on target class [class com.x.scheduledJobs.ScheduledReportsSender] failed org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.x.model.scheduledReports.ScheduledReport.recipients, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:383) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:375) at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:122) at org.hibernate.collection.PersistentBag.size(PersistentBag.java:248) at com.x.service.DataService.generateScheduledReport(DataService.java:219) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy208.generateScheduledReport(Unknown Source) at com.x.scheduledJobs.ScheduledReportsSender.sendScheduledReports(ScheduledReportsSender.java:85) at com.x.scheduledJobs.ScheduledReportsSender.runDailyReports(ScheduledReportsSender.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273) at org.springframework.scheduling.support.MethodInvokingRunnable.run(MethodInvokingRunnable.java:65) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:51) at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636)

    Read the article

  • Bash: How to flush output to a file while running

    - by noam
    I have a small script, which is called daily by crontab using the following command: /homedir/MyScript &> some_log.log The problem with this method is that some_log.log is only created after MyScript finishes. I would like to flush the output of the program into the file while it's running so I could do things like tail -f some_log.log and keep track of the progress, etc.

    Read the article

  • create hgrc file for all paths on a machine

    - by noam
    I want to create a hgrc file to set the username and password for all paths on some machine, e.g no matter in which directory I am in, hg clone some_path will always work without prompting for a username and a password (this is for an auto-deploy script). I followed the instructions and created a file: /etc/mercurial/hgrc.d/deploy.rc it's contents: [auth] default.prefix= http://myrepo default.username = myuname default.password = pwd But when I do hg clone some_path I get abort: error: Connection refused. What Am i doing wrong?

    Read the article

  • how to avoid deadlock in mysql

    - by noam
    I have the following query (all tables are innoDB) INSERT INTO busy_machines(machine) SELECT machine FROM all_machines WHERE machine NOT IN (SELECT machine FROM busy_machines) and machine_name!='Main' LIMIT 1 Which causes a deadlock when I run it in threads, obviously because of the inner select, right? The error I get is: (1213, 'Deadlock found when trying to get lock; try restarting transaction') How can I avoid the deadlock? Is there a way to change to query to make it work, or do I need to do something else?

    Read the article

  • Using Oracle Zero Date

    - by Noam
    I have an application with existing data, that has Zero in the date column. When I look at it from sqlplus I see: 00-DECEMB when I use the dump function on this column, I Get: Typ=12 Len=7: 100,100,0,0,1,1,1 I need to work with the existing data from .Net (no changes to the data,or the data structure or even existing sql statements) How the hack do I read this value, or write it. The db version varies, from 8 to 11. Help would be appreciated

    Read the article

  • Esyndicat usage

    - by Noam
    Hello group, I am helping out a friend with setting up a web site based on eSyndicat. Is anyone here using this platform, can questions be asked here for it? If not, can you recommend a good place for that.

    Read the article

  • jquery element's place when toggeling

    - by Noam Zadok
    i'm building a page, which will have categories that will contain a list of pages to go with them. at first all the list are hidden, and than I click on a category and the list slides down. this is the code of the script: $(document).ready(function() { $('.menu-list').hide(); $('.menu-title').click(function() { if ($(this).next().is(':not(:visible)')) { $('.menu-list:visible').slideUp(); $(this).next().slideDown(); } }); The script works, but the problem is when I'm clicking on a category in a column that has more categories than the other. than the last category is moving to the left and I don't want it to. Here is the code in jsfiddle: http://jsfiddle.net/U7rKX/4/ Can you help me?

    Read the article

  • Zimbra vs. Kerio Connect

    - by rahum
    We've been a Kerio partner for years and have deployed much Kerio Connect. Now we're looking at beginning hosting groupware for our clients and are wrestling over the right backend. Kerio Connect is fantastic, but we have a couple gripes: Kerio is often weeks behind on releases to keep up with major Microsoft and Apple updates that break functionality or at least impede new Apple/Microsoft features in their desktop clients We've been worried that Kerio has a historical habit of corrupting Apple's Open Directory; we know this happened years ago, and have suspected it happening earlier this year There's always some one or two features that are buggy in Kerio, in every release. These usually aren't dealbreakers, just annoyances. Kerio does not have any kind of HA feature set How does Zimbra compare? What are your gripes? Thanks! noam

    Read the article

  • Why Hebrew letters in the address bar break the ARR gateway (Only With Explorer 8,9,10)?

    - by Noamway
    The ARR is working great in all browsers except Internet Explorer 8,9,10. When I paste Hebrew URL directly to the address bar it's working good, but when I surf (click on a simple href URL) from one Hebrew URL page to another Hebrew URL the ARR return me that error: "502 - Web server received an invalid response while acting as a gateway or proxy server." There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server. I checked it number of times including with HTTP analyzer and I saw that the "referer" is making all the problems and cause to that error. For example when I enter to that page: mydomain.com/somehebrewchars (mydomain.com/???? you will need Hebrew install) And click in the page on a link to: mydomain.com/somehebrewchars2 (mydomain.com/???????? you will need Hebrew install) I will get the error above and when you look at the referrer you will see something like that: mydomain.com/עמוד-× ×—×™×ª×” We use other proxies application to others projects and we don't have the same issue like that. For this example we used WIN 2008 and 2012 with ARR 2.5 and also 3 beta. Any help is welcome :-) Thanks, Noam

    Read the article

< Previous Page | 1 2 3