Search Results

Search found 221 results on 9 pages for 'danny b'.

Page 1/9 | 1 2 3 4 5 6 7 8 9  | Next Page >

  • Intro On AppFabric on EndPoint.tv (Steve & Danny)

    - by Benny Mathew
    http://channel9.msdn.com/shows/Endpoint/endpointtv-Pro-Windows-Server-AppFabric/   Here is a nice intro to Windows Server Appfabric by a good friend and colleague Steve and Danny.Cutting through all the hype and misunderstandings especially between AppFabric in the Cloud vs. Windows Server AppFabric. Also on when to position BizTalk versus Windows Server AppFabric.

    Read the article

  • CEO Is the New CRM

    - by andrea.mulder
    Danny Rippon launched his blogging career last week with The Marketer outlining how CRM has evolved from managing customer data to 'CEM' - Customer Experience Management, and for true market leaders it is moving towards 'CEO' - Customer Experience Optimisation. Or as we like to say here in the states Customer Experience Optimization (with a "z"). Click here to hear Danny's thought on why CEO Is the New CRM.

    Read the article

  • No Alias's when sudo'ing

    - by Danny Roberts
    I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using sudo: danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' danny@kaon:~$ ll -d / drwxr-xr-x 23 root root 4096 2011-01-06 20:29 // danny@kaon:~$ sudo -i root@kaon:~# ll -d / drwxr-xr-x 23 root root 4096 2011-01-06 20:29 // root@kaon:~# exit logout danny@kaon:~$ sudo ll -d / sudo: ll: command not found Is there any reason why you cannot use aliases whilst using sudo?

    Read the article

  • Aliases not available when using sudo

    - by Danny Roberts
    I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using sudo: danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' danny@kaon:~$ ll -d / drwxr-xr-x 23 root root 4096 2011-01-06 20:29 // danny@kaon:~$ sudo -i root@kaon:~# ll -d / drwxr-xr-x 23 root root 4096 2011-01-06 20:29 // root@kaon:~# exit logout danny@kaon:~$ sudo ll -d / sudo: ll: command not found Is there any reason why you cannot use aliases whilst using sudo?

    Read the article

  • Le Web serait-il en danger face à la montée en puissance du mobile ? Pour l'écrivain et chercheur Danny Crichton, le « Web est en train de mourir »

    Le web serait-il en danger face à la montée en puissance du mobile ? Les applications natives plus plébiscitées sur mobileLe web serait-il en danger face à la montée en puissance du mobile ? Oui, pour le chercheur et écrivain Danny Crichton, pour qui le web se meurt lentement et surement à l'aube de son 25e anniversaire.Tout d'abord, il est important de définir le web, qui représente « une collection de protocoles (HTP) et de langages (HTML) qui permet à l'utilisateur de produire et de consommer...

    Read the article

  • PHP: Can pcntl_alarm() and socket_select() peacefully exist in the same thread?

    - by DWilliams
    I have a PHP CLI script mostly written that functions as a chat server for chat clients to connect to (don't ask me why I'm doing it in PHP, thats another story haha). My script utilizes the socket_select() function to hang execution until something happens on a socket, at which point it wakes up, processes the event, and waits until the next event. Now, there are some routine tasks that I need performed every 30 seconds or so (check of tempbanned users should be unbanned, save user databases, other assorted things). From what I can tell, PHP doesn't have very great multi-threading support at all. My first thought was to compare a timestamp every time the socket generates an event and gets the program flowing again, but this is very inconsistent since the server could very well sit idle for hours and not have any of my cleanup routines executed. I came across the PHP pcntl extensions, and it lets me use assign a time interval for SIGALRM to get sent and a function get executed every time it's sent. This seems like the ideal solution to my problem, however pcntl_alarm() and socket_select() clash with each other pretty bad. Every time SIGALRM is triggered, all sorts of crazy things happen to my socket control code. My program is fairly lengthy so I can't post it all here, but it shouldn't matter since I don't believe I'm doing anything wrong code-wise. My question is: Is there any way for a SIGALRM to be handled in the same thread as a waiting socket_select()? If so, how? If not, what are my alternatives here? Here's some output from my program. My alarm function simply outputs "Tick!" whenever it's called to make it easy to tell when stuff is happening. This is the output (including errors) after allowing it to tick 4 times (there were no actual attempts at connecting to the server despite what it says): [05-28-10 @ 20:01:05] Chat server started on 192.168.1.28 port 4050 [05-28-10 @ 20:01:05] Loaded 2 users from file PHP Notice: Undefined offset: 0 in /home/danny/projects/PHPChatServ/ChatServ.php on line 112 PHP Warning: socket_select(): unable to select [4]: Interrupted system call in /home/danny/projects/PHPChatServ/ChatServ.php on line 116 [05-28-10 @ 20:01:15] Tick! PHP Warning: socket_accept(): unable to accept incoming connection [4]: Interrupted system call in /home/danny/projects/PHPChatServ/ChatServ.php on line 126 [05-28-10 @ 20:01:25] Tick! PHP Warning: socket_getpeername() expects parameter 1 to be resource, boolean given in /home/danny/projects/PHPChatServ/ChatServ.php on line 129 [05-28-10 @ 20:01:25] Accepting socket connection from PHP Notice: Undefined offset: 1 in /home/danny/projects/PHPChatServ/ChatServ.php on line 112 PHP Warning: socket_select(): unable to select [4]: Interrupted system call in /home/danny/projects/PHPChatServ/ChatServ.php on line 116 [05-28-10 @ 20:01:35] Tick! PHP Warning: socket_accept(): unable to accept incoming connection [4]: Interrupted system call in /home/danny/projects/PHPChatServ/ChatServ.php on line 126 [05-28-10 @ 20:01:45] Tick! PHP Warning: socket_getpeername() expects parameter 1 to be resource, boolean given in /home/danny/projects/PHPChatServ/ChatServ.php on line 129 [05-28-10 @ 20:01:45] Accepting socket connection from PHP Notice: Undefined offset: 2 in /home/danny/projects/PHPChatServ/ChatServ.php on line 112

    Read the article

  • OS X Keeps prompting me for SSH private key passphrase (OS X 10.6.8)

    - by Danny Englander
    I have a private key to ssh into my server and the connection works. In my hosts file I have: Host myhost HostName xxx.xxx.xxx.xx GlobalKnownHostsFile ~/.ssh/known_hosts port 22 User myuser IdentityFile ~/.ssh/mykey_dsa IdentitiesOnly yes .. and then I type ssh myhost Every time I connect, I get the Mac OS X keychain prompt and I tell OS X to remember the passphrase but then when I disconnect from ssh and re-connect, I am prompted to add the passphrase to the keychain again. This is only a recent problem so I suspect and issue with Keychain? To be clear, I can 're-add' to keychain every time and connect but this defats the purpose. The permissions on my dsa key are set at 600 or -rw-------@ I tried repairing disk permissions but that did no good. My Google-foo is also failing me, nothing of use came up. So I am not sure if this an OS X / keychain issue or an SSH issue. update: When I try ssh -vvv myhost, I think it reveals the issue: debug1: Trying private key: /Users/danny/.ssh/mykey_dsa debug1: PEM_read_PrivateKey failed debug1: read PEM private key done: type <unknown> debug3: Not a RSA1 key file /Users/danny/.ssh/mykey_dsa. debug1: read PEM private key done: type DSA Identity added: /Users/danny/.ssh/mykey_dsa (/Users/danny/.ssh/mykey_dsa) debug1: read PEM private key done: type DSA debug3: sign_and_send_pubkey debug2: we sent a publickey packet, wait for reply debug1: Authentication succeeded (publickey). ... and after that I get connected. I think this crux of the matter is: PEM_read_PrivateKey failed

    Read the article

  • Disk space suddenly 100% used?

    - by dannymcc
    I'm trying to identify why, suddenly, 100% of our disk space is in use. I have already rebooted but the issue persists. Here are the outputs of some commands that are showing some strange (for me) results: danny@hydrogen:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/cciss/c0d0p1 130G 122G 949M 100% / none 1.9G 196K 1.9G 1% /dev none 2.0G 0 2.0G 0% /dev/shm none 2.0G 40K 2.0G 1% /var/run none 2.0G 0 2.0G 0% /var/lock none 2.0G 0 2.0G 0% /lib/init/rw danny@hydrogen:/$ sudo du -chs / du: cannot access `/proc/1662/task/1662/fd/4': No such file or directory du: cannot access `/proc/1662/task/1662/fdinfo/4': No such file or directory du: cannot access `/proc/1662/fd/4': No such file or directory du: cannot access `/proc/1662/fdinfo/4': No such file or directory danny@hydrogen:/$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/cciss/c0d0p1 135342296 128144108 323104 100% / none 1991336 196 1991140 1% /dev none 1995788 0 1995788 0% /dev/shm none 1995788 40 1995748 1% /var/run none 1995788 0 1995788 0% /var/lock none 1995788 0 1995788 0% /lib/init/rw danny@hydrogen:/$ mount /dev/cciss/c0d0p1 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) none on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) none on /dev type devtmpfs (rw,mode=0755) none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) none on /dev/shm type tmpfs (rw,nosuid,nodev) none on /var/run type tmpfs (rw,nosuid,mode=0755) none on /var/lock type tmpfs (rw,noexec,nosuid,nodev) none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) danny@hydrogen:/$ sudo du -h --max-depth=1 634M ./premvet_sync 5.6M ./etc 4.0K ./opt 16K ./lost+found 7.4M ./bin 623M ./lib 196K ./dev 0 ./sys 4.0K ./srv 4.0K ./cdrom 8.0K ./media 52K ./tmp ... it hangs for ages here..... The server is running Ubuntu 10.04.4 LTS. System load: 2.85 Temperature: 8 C Usage of /: 94.7% of 129.07GB Processes: 132 Memory usage: 39% Users logged in: 0 Swap usage: 0% IP address for eth0: 192.168.1.124 => / is using 94.7% of 129.07GB I'm struggling to comprehend why this is happening! Any pointers would be appreciated.

    Read the article

  • SQL SERVER – Signal Wait Time Introduction with Simple Example – Wait Type – Day 2 of 28

    - by pinaldave
    In this post, let’s delve a bit more in depth regarding wait stats. The very first question: when do the wait stats occur? Here is the simple answer. When SQL Server is executing any task, and if for any reason it has to wait for resources to execute the task, this wait is recorded by SQL Server with the reason for the delay. Later on we can analyze these wait stats to understand the reason the task was delayed and maybe we can eliminate the wait for SQL Server. It is not always possible to remove the wait type 100%, but there are few suggestions that can help. Before we continue learning about wait types and wait stats, we need to understand three important milestones of the query life-cycle. Running - a query which is being executed on a CPU is called a running query. This query is responsible for CPU time. Runnable – a query which is ready to execute and waiting for its turn to run is called a runnable query. This query is responsible for Signal Wait time. (In other words, the query is ready to run but CPU is servicing another query). Suspended – a query which is waiting due to any reason (to know the reason, we are learning wait stats) to be converted to runnable is suspended query. This query is responsible for wait time. (In other words, this is the time we are trying to reduce). In simple words, query execution time is a summation of the query Executing CPU Time (Running) + Query Wait Time (Suspended) + Query Signal Wait Time (Runnable). Again, it may be possible a query goes to all these stats multiple times. Let us try to understand the whole thing with a simple analogy of a taxi and a passenger. Two friends, Tom and Danny, go to the mall together. When they leave the mall, they decide to take a taxi. Tom and Danny both stand in the line waiting for their turn to get into the taxi. This is the Signal Wait Time as they are ready to get into the taxi but the taxis are currently serving other customer and they have to wait for their turn. In other word they are in a runnable state. Now when it is their turn to get into the taxi, the taxi driver informs them he does not take credit cards and only cash is accepted. Neither Tom nor Danny have enough cash, they both cannot get into the vehicle. Tom waits outside in the queue and Danny goes to ATM to fetch the cash. During this time the taxi cannot wait, they have to let other passengers get into the taxi. As Tom and Danny both are outside in the queue, this is the Query Wait Time and they are in the suspended state. They cannot do anything till they get the cash. Once Danny gets the cash, they are both standing in the line again, creating one more Signal Wait Time. This time when their turn comes they can pay the taxi driver in cash and reach their destination. The time taken for the taxi to get from the mall to the destination is running time (CPU time) and the taxi is running. I hope this analogy is bit clear with the wait stats. You can check the Signalwait stats using following query of Glenn Berry. -- Signal Waits for instance SELECT CAST(100.0 * SUM(signal_wait_time_ms) / SUM (wait_time_ms) AS NUMERIC(20,2)) AS [%signal (cpu) waits], CAST(100.0 * SUM(wait_time_ms - signal_wait_time_ms) / SUM (wait_time_ms) AS NUMERIC(20,2)) AS [%resource waits] FROM sys.dm_os_wait_stats OPTION (RECOMPILE); Higher the Signal wait stats are not good for the system. Very high value indicates CPU pressure. In my experience, when systems are running smooth and without any glitch the Signal wait stat is lower than 20%. Again, this number can be debated (and it is from my experience and is not documented anywhere). In other words, lower is better and higher is not good for the system. In future articles we will discuss in detail the various wait types and wait stats and their resolution. Read all the post in the Wait Types and Queue series. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, PostADay, SQL, SQL Authority, SQL DMV, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQL Wait Stats, SQL Wait Types, T SQL, Technology

    Read the article

  • SQL SERVER – Single Wait Time Introduction with Simple Example – Wait Type – Day 2 of 28

    - by pinaldave
    In this post, let’s delve a bit more in depth regarding wait stats. The very first question: when do the wait stats occur? Here is the simple answer. When SQL Server is executing any task, and if for any reason it has to wait for resources to execute the task, this wait is recorded by SQL Server with the reason for the delay. Later on we can analyze these wait stats to understand the reason the task was delayed and maybe we can eliminate the wait for SQL Server. It is not always possible to remove the wait type 100%, but there are few suggestions that can help. Before we continue learning about wait types and wait stats, we need to understand three important milestones of the query life-cycle. Running - a query which is being executed on a CPU is called a running query. This query is responsible for CPU time. Runnable – a query which is ready to execute and waiting for its turn to run is called a runnable query. This query is responsible for Single Wait time. (In other words, the query is ready to run but CPU is servicing another query). Suspended – a query which is waiting due to any reason (to know the reason, we are learning wait stats) to be converted to runnable is suspended query. This query is responsible for wait time. (In other words, this is the time we are trying to reduce). In simple words, query execution time is a summation of the query Executing CPU Time (Running) + Query Wait Time (Suspended) + Query Single Wait Time (Runnable). Again, it may be possible a query goes to all these stats multiple times. Let us try to understand the whole thing with a simple analogy of a taxi and a passenger. Two friends, Tom and Danny, go to the mall together. When they leave the mall, they decide to take a taxi. Tom and Danny both stand in the line waiting for their turn to get into the taxi. This is the Signal Wait Time as they are ready to get into the taxi but the taxis are currently serving other customer and they have to wait for their turn. In other word they are in a runnable state. Now when it is their turn to get into the taxi, the taxi driver informs them he does not take credit cards and only cash is accepted. Neither Tom nor Danny have enough cash, they both cannot get into the vehicle. Tom waits outside in the queue and Danny goes to ATM to fetch the cash. During this time the taxi cannot wait, they have to let other passengers get into the taxi. As Tom and Danny both are outside in the queue, this is the Query Wait Time and they are in the suspended state. They cannot do anything till they get the cash. Once Danny gets the cash, they are both standing in the line again, creating one more Single Wait Time. This time when their turn comes they can pay the taxi driver in cash and reach their destination. The time taken for the taxi to get from the mall to the destination is running time (CPU time) and the taxi is running. I hope this analogy is bit clear with the wait stats. You can check the single wait stats using following query of Glenn Berry. -- Signal Waits for instance SELECT CAST(100.0 * SUM(signal_wait_time_ms) / SUM (wait_time_ms) AS NUMERIC(20,2)) AS [%signal (cpu) waits], CAST(100.0 * SUM(wait_time_ms - signal_wait_time_ms) / SUM (wait_time_ms) AS NUMERIC(20,2)) AS [%resource waits] FROM sys.dm_os_wait_stats OPTION (RECOMPILE); Higher the single wait stats are not good for the system. Very high value indicates CPU pressure. In my experience, when systems are running smooth and without any glitch the single wait stat is lower than 20%. Again, this number can be debated (and it is from my experience and is not documented anywhere). In other words, lower is better and higher is not good for the system. In future articles we will discuss in detail the various wait types and wait stats and their resolution. Read all the post in the Wait Types and Queue series. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, PostADay, SQL, SQL Authority, SQL DMV, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQL Wait Stats, SQL Wait Types, T SQL, Technology

    Read the article

  • visual basic coach needed [closed]

    - by Danny
    0 down vote favorite I am trying to learn visual basic. I used to program in gw-basic and have trouble learning vb.net by reading and googling all the time. It takes so much time to find the answers to my programming problems and even then i do not understand the why it have to be done that way. I have beginners questions like finding childwindows using enumwindow. Then googling for hours and hours i do not seem to grasp it (must be my old age). I would like to get someone i could learn from by asking questions about what i want to program and learn from it. not to just finish the program but to learn and understand it too. Someone who dont find questions stupid to ask as i try to build my understanding of the visual basic environment. I hope to communicate by using skype voice or chat or other direct means when time permits it. Cheers, Danny

    Read the article

  • state: pending & public-address: null :: Juju setup on local machine

    - by Danny Kopping
    I've setup Juju on a local VM inside VMWare running on Mac OSX. Everything seems to be working fine, except when I deployed MySQL & WordPress from the examples, I get the following when I run juju status: danny@ubuntu:~$ juju status machines: 0: dns-name: localhost instance-id: local instance-state: running state: down services: mysql: charm: local:oneiric/mysql-11 relations: db: wordpress units: mysql/0: machine: 0 public-address: 192.168.122.107 relations: db: state: up state: started wordpress: charm: local:oneiric/wordpress-31 exposed: true relations: db: mysql units: wordpress/0: machine: 0 open-ports: [] public-address: null relations: {} state: pending state: pending and public-address: null Can't find any documentation relating to this issue. Any help very much appreciated - wonderful idea for a project!

    Read the article

  • Email Net::SMTPFatalError when sending email from Rails App

    - by Danny McClelland
    Hi Everyone, I have setup my application to send an email when a new case is created. if @kase.save UserMailer.deliver_contact_confirmation(@user) I have added the following to my user_mailer.rb def contact_confirmation(user) @subject = 'Message Subject' @body = "Message content" @from = "[email protected]" end but...when I create a new case and click submit I get the following: Net::SMTPFatalError in KasesController#create 555 5.5.2 Syntax error. x1sm110877wbx.1 I have added the SMTP details to the environment.rb as follows: ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.smtp_settings = { :enable_starttls_auto => true, :address => "smtp.gmail.com", :port => "587", :domain => "XXXX.co.uk", :authentication => :plain, :user_name => "[email protected]", :password => "XXXX" } Any ideas? Thanks, Danny

    Read the article

  • Include dynamic info in Rails emails

    - by Danny McClelland
    Hi Everyone, I have managed to get my email problem sorted so now everytime a case is created an email goes out to the specified address. I have a usermailer.rb def makeakase(email, name, jobno, casesubject) recipients email from "no-reply@your_rails_app.com" subject "FW: Kase creation from Survey Manager" sent_on Time.now body :name => name end and I have the kases_controller.rb: if @kase.save UserMailer.deliver_makeakase("[email protected]", "Highrise") In the body I would like to use the tags that I use in the kase show view such as: <%=h @kase.jobno %> - <%=h @kase.casesubject %> but they don't work, I get the following error: wrong number of arguments (2 for 4) Any ideas? Thanks, Danny

    Read the article

  • Detecting your application's install path in Java?

    - by Danny King
    Hi, I have made a small application in Java and I would like to make a windows installer for it using the Nullsoft Scriptable Install System (http://nsis.sourceforge.net/Main_Page). The application I made needs to save user preferences somewhere and it currently saves it in the user's home directory (e.g. c:\Users\danny or /home/users/danny). However if the windows installer installs the application to e.g. c:\Program Files\whatever\ I should probably save the preferences file there too, right? How would I detect that directory path in Java? What would be a good cross-platform approach to this without losing the benefits of a windows uninstaller for windows users e.g. start menu icons, installer option, etc? Should I just continue saving my preferences in the user's home path and clutter it up? Thanks very much,

    Read the article

  • NoMethodError Rails multiple file uploads

    - by Danny McClelland
    Hi Everyone, I am working on getting multiple file uploads working for an model in my application, I have included the code below: delivers_controller.rb # POST /delivers def create @deliver = Deliver.new(params[:deliver]) process_file_uploads(@deliver) if @deliver.save flash[:notice] = 'Task was successfully created.' redirect_to(@deliver) else render :action => "new" end end protected def process_file_uploads(deliver) i = 0 while params[:attachment]['file_'+i.to_s] != "" && !params[:attachment]['file_'+i.to_s].nil? deliver.assets.build(:data => params[:attachment]['file_'+i.to_s]) i += 1 end end deliver.rb has_many :assets, :as => :attachable, :dependent => :destroy validate :validate_attachments Max_Attachments = 5 Max_Attachment_Size = 5.megabyte def validate_attachments errors.add_to_base("Too many attachments - maximum is #{Max_Attachments}") if assets.length > Max_Attachments assets.each {|a| errors.add_to_base("#{a.name} is over #{Max_Attachment_Size/1.megabyte}MB") if a.file_size > Max_Attachment_Size} end assets_controller.rb class AssetsController < ApplicationController def show asset = Asset.find(params[:id]) # do security check here send_file asset.data.path, :type => asset.data_content_type end def destroy asset = Asset.find(params[:id]) @asset_id = asset.id.to_s @allowed = Deliver::Max_Attachments - asset.attachable.assets.count asset.destroy end end asset.rb class Asset < ActiveRecord::Base has_attached_file :data, belongs_to :attachable, :polymorphic => true def url(*args) data.url(*args) end def name data_file_name end def content_type data_content_type end def file_size data_file_size end end Whenever I create a new deliver item and try to attach any files I get the following error: NoMethodError in DeliversController#create You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] /Users/danny/Dropbox/SVN/railsapps/macandco/surveymanager/trunk/app/controllers/delivers_controller.rb:60:in `process_file_uploads' /Users/danny/Dropbox/SVN/railsapps/macandco/surveymanager/trunk/app/controllers/delivers_controller.rb:46:in `create' new.html.erb (Deliver view) <% content_for :header do -%> Deliver Repositories <% end -%> <% form_for(@deliver, :html => { :multipart => true }) do |f| %> <%= f.error_messages %> <p> <%= f.label :caseref %><br /> <%= f.text_field :caseref %> </p> <p> <%= f.label :casesubject %><br /> <%= f.text_area :casesubject %> </p> <p> <%= f.label :description %><br /> <%= f.text_area :description %> </p> <p>Pending Attachments: (Max of <%= Deliver::Max_Attachments %> each under <%= Deliver::Max_Attachment_Size/1.megabyte%>MB) <% if @deliver.assets.count >= Deliver::Max_Attachments %> <input id="newfile_data" type="file" disabled /> <% else %> <input id="newfile_data" type="file" /> <% end %> <div id="attachment_list"><ul id="pending_files"></ul></div> </p> <p> <%= f.submit 'Create' %> </p> <% end %> <%= link_to 'Back', delivers_path %> Show.html.erb (Delivers view) <% content_for :header do -%> Deliver Repositories <% end -%> <p> <b>Title:</b> <%=h @deliver.caseref %> </p> <p> <b>Body:</b> <%=h @deliver.casesubject %> </p> <p><b>Attached Files:</b><div id="attachment_list"><%= render :partial => "attachment", :collection => @deliver.assets %></div></p> <%= link_to 'Edit', edit_deliver_path(@deliver) %> | <%= link_to 'Back', deliver_path %> <%- if logged_in? %> <%= link_to 'Edit', edit_deliver_path(@deliver) %> | <%= link_to 'Back', delivers_path %> <% end %> _attachment.html.erb (Delivers view) <% if !attachment.id.nil? %><li id='attachment_<%=attachment.id %>'><a href='<%=attachment.url %>'><%=attachment.name %></a> (<%=attachment.file_size/1.kilobyte %>KB) <%= link_to_remote "Remove", :url => asset_path(:id => attachment), :method => :delete, :html => { :title => "Remove this attachment", :id => "remove" } %></li> <% end %> I have been banging my head against the wall with the error all day, if anyone can shed some light on it, I would be eternally grateful! Thanks, Danny

    Read the article

  • Multiple choice search in Wordpress.

    - by Danny Tonkin
    Hi there, does any one know how to createa search panel similar to the "quick find" bar on this site? http://www.thebedandbreakfastclub.co.uk I've been trying to find a plugin or tutorial but have had no luck at all. I'm looking for some thing that filters child categories according the the parent category the user has clicked on. Please could some one point me in the right direction. Thanks very much Danny

    Read the article

  • Is this a good way to do a game loop for an iPhone game?

    - by Danny Tuppeny
    Hi all, I'm new to iPhone dev, but trying to build a 2D game. I was following a book, but the game loop it created basically said: function gameLoop update() render() sleep(1/30th second) gameLoop The reasoning was that this would run at 30fps. However, this seemed a little mental, because if my frame took 1/30th second, then it would run at 15fps (since it'll spend as much time sleeping as updating). So, I did some digging and found the CADisplayLink class which would sync calls to my gameLoop function to the refresh rate (or a fraction of it). I can't find many samples of it, so I'm posting here for a code review :-) It seems to work as expected, and it includes passing the elapsed (frame) time into the Update method so my logic can be framerate-independant (however I can't actually find in the docs what CADisplayLink would do if my frame took more than its allowed time to run - I'm hoping it just does its best to catch up, and doesn't crash!). // // GameAppDelegate.m // // Created by Danny Tuppeny on 10/03/2010. // Copyright Danny Tuppeny 2010. All rights reserved. // #import "GameAppDelegate.h" #import "GameViewController.h" #import "GameStates/gsSplash.h" @implementation GameAppDelegate @synthesize window; @synthesize viewController; - (void) applicationDidFinishLaunching:(UIApplication *)application { // Create an instance of the first GameState (Splash Screen) [self doStateChange:[gsSplash class]]; // Set up the game loop displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(gameLoop)]; [displayLink setFrameInterval:2]; [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; } - (void) gameLoop { // Calculate how long has passed since the previous frame CFTimeInterval currentFrameTime = [displayLink timestamp]; CFTimeInterval elapsed = 0; // For the first frame, we want to pass 0 (since we haven't elapsed any time), so only // calculate this in the case where we're not the first frame if (lastFrameTime != 0) { elapsed = currentFrameTime - lastFrameTime; } // Keep track of this frames time (so we can calculate this next time) lastFrameTime = currentFrameTime; NSLog([NSString stringWithFormat:@"%f", elapsed]); // Call update, passing the elapsed time in [((GameState*)viewController.view) Update:elapsed]; } - (void) doStateChange:(Class)state { // Remove the previous GameState if (viewController.view != nil) { [viewController.view removeFromSuperview]; [viewController.view release]; } // Create the new GameState viewController.view = [[state alloc] initWithFrame:CGRectMake(0, 0, IPHONE_WIDTH, IPHONE_HEIGHT) andManager:self]; // Now set as visible [window addSubview:viewController.view]; [window makeKeyAndVisible]; } - (void) dealloc { [viewController release]; [window release]; [super dealloc]; } @end Any feedback would be appreciated :-) PS. Bonus points if you can tell me why all the books use "viewController.view" but for everything else seem to use "[object name]" format. Why not [viewController view]?

    Read the article

  • Rails date select options?

    - by Danny McClelland
    Hi Everyone, I have a date_select field in my rails application as follows: <%= f.date_select :dateinstructed %> I would like to re-order the drop down lists show they output as: DD/MM/YYYY According to what I have read you can use the :order option, but I am unsure how to actually use this option: <%= f.date_select :dateinstructed, :order = {:day, :month, :year} %> Obviously this isn't right, but what am I supposed to put in place of the: :day, :month, :year Any help would be appreciated! Thanks, Danny

    Read the article

  • Rails config use input field to change?

    - by Danny McClelland
    Hi Everyone, Following on from a previous question: I have created a config.yml file which is used to generate the content for the following: <%= configatron.site_name % So now, anywhere I have the above code snippet, will display the following: development: &local site_name: Survey Manager site_url: localhost:3000 What I am trying to work out, is how do I have a text field somewhere in the application that will edit the site_name? Thanks, Danny

    Read the article

  • Passing existing cookie to Web service

    - by danny.lesnik
    HI have the following scenario: 1) i'm authenticated against some aSP.NET web site and my session time out expires in 24 hours. 2) after several time I would like to run query against asp.net Web Service located on the site using existing authentication. What should I add to cookie Container? I how do sent existing cookie to Web service? Thank you in Advance. Danny.

    Read the article

  • Rails on server syntax error?

    - by Danny McClelland
    Hi Everyone, I am trying to get my rails application running on my web server, but when I run the rake db:migrate I get the following error: r oot@oak [/home/macandco/rails_apps/survey_manager]# rake db:migrate (in /home/macandco/rails_apps/survey_manager) == Baseapp: migrating ======================================================== -- create_table(:settings, {:force=>true}) -> 0.0072s -- create_table(:users) -> 0.0072s -- add_index(:users, :login, {:unique=>true}) -> 0.0097s -- create_table(:profiles) -> 0.0084s -- create_table(:open_id_authentication_associations, {:force=>true}) -> 0.0067s -- create_table(:open_id_authentication_nonces, {:force=>true}) -> 0.0064s -- create_table(:roles) -> 0.0052s -- create_table(:roles_users, {:id=>false}) -> 0.0060s rake aborted! An error has occurred, all later migrations canceled: 555 5.5.2 Syntax error. g9sm2526951gvc.8 Has anyone come across this before? Thanks, Danny Main Migration file c lass Baseapp < ActiveRecord::Migration def self.up # Create Settings Table create_table :settings, :force => true do |t| t.string :label t.string :identifier t.text :description t.string :field_type, :default => 'string' t.text :value t.timestamps end # Create Users Table create_table :users do |t| t.string :login, :limit => 40 t.string :identity_url t.string :name, :limit => 100, :default => '', :null => true t.string :email, :limit => 100 t.string :mobile t.string :signaturenotes t.string :crypted_password, :limit => 40 t.string :salt, :limit => 40 t.string :remember_token, :limit => 40 t.string :activation_code, :limit => 40 t.string :state, :null => :false, :default => 'passive' t.datetime :remember_token_expires_at t.string :password_reset_code, :default => nil t.datetime :activated_at t.datetime :deleted_at t.timestamps end add_index :users, :login, :unique => true # Create Profile Table create_table :profiles do |t| t.references :user t.string :real_name t.string :location t.string :website t.string :mobile t.timestamps end # Create OpenID Tables create_table :open_id_authentication_associations, :force => true do |t| t.integer :issued, :lifetime t.string :handle, :assoc_type t.binary :server_url, :secret end create_table :open_id_authentication_nonces, :force => true do |t| t.integer :timestamp, :null => false t.string :server_url, :null => true t.string :salt, :null => false end create_table :roles do |t| t.column :name, :string end # generate the join table create_table :roles_users, :id => false do |t| t.column :role_id, :integer t.column :user_id, :integer end # Create admin role and user admin_role = Role.create(:name => 'admin') user = User.create do |u| u.login = 'admin' u.password = u.password_confirmation = 'advices' u.email = '[email protected]' end user.register! user.activate! user.roles << admin_role end def self.down # Drop all BaseApp drop_table :settings drop_table :users drop_table :profiles drop_table :open_id_authentication_associations drop_table :open_id_authentication_nonces drop_table :roles drop_table :roles_users end end

    Read the article

  • Rails application settings?

    - by Danny McClelland
    Hi Everyone, I am working on a Rails application that has user authentication which provides an administrators account. Within the administrators account I have made a page for sitewide settings. I was wondering what the norm is for creating these settings. Say for example I would like one of the settings to be to change the name of the application name, or change a colour of the header. What I am looking for is for someone to explain the basic process/method - not necessarily specific code - although that would be great! Thanks, Danny

    Read the article

  • Rails routes creating additional info in URL

    - by Danny McClelland
    Hi Everyone, Say if I have a model called 'deliver' and I am using the default URL route of: # Install the default routes as the lowest priority. map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' So the deliver URL would be: http://localhost:3000/deliver/123 What I am trying to work out, is how to use another field from the database alongside or instead of the ID. For example. If I have a field in the create view called 'deliveraddress', how do I put that into the routes? So I can have something link this: http://localhost:3000/deliver/deliveraddress Thanks, Danny

    Read the article

  • Prawn PDF with Rails mailer?

    - by Danny McClelland
    Hi Everyone, I have successfully created an email that sends on creation of a Kase, but now I need to attach a PDF that is created on the fly by Prawn and Prawno. Basically when you visit a kase such as application.com/kase/1 you just append the URL with .pdf i.e. application.com/kase/1. I spent ages getting the PDF to work and look how I wanted, but I can't figure out how to add the PDF to an auto sending email - mainly because I cannot work out how to give it a link as it's auto generated. Has anyone ever managed to get this to work? Thanks, Danny

    Read the article

1 2 3 4 5 6 7 8 9  | Next Page >