Can anyone help me to draw a data flow diagram for a travel request form for a company in which an employee can request for travel and request approval by his/her by project manager and HR department.
Regards
Nils
I'm trying to setup a tiny sandbox on a local machine to play around with Drupal. I created a few CCK types; in order to create a few nodes I wrote the following script:
chdir('C:\..\drupal');
require_once '.\includes\bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
module_load_include('inc', 'node', 'node.pages');
$node = array('type' => 'my_type');
$link = mysql_connect(..);
mysql_select_db('my_db');
$query_bldg = '
SELECT stuff
FROM table
LIMIT 10
';
$result = mysql_query($query_bldg);
while ($row = mysql_fetch_object($result)) {
$form_state = array();
$form_state['values']['name'] = 'admin';
$form_state['values']['status'] = 1;
$form_state['values']['op'] = t('Save');
$form_state['values']['title'] = $row->val_a;
$form_state['values']['my_field'][0]['value'] = $row->val_b;
## About another dozen or so of similar assignments...
drupal_execute('node_form', $form_state, (object)$node);
}
Here are a few relevant lines from php_errors.log:
[12-Jun-2010 05:02:47] PHP Notice: Undefined index: REMOTE_ADDR in C:\..\drupal\includes\bootstrap.inc on line 1299
[12-Jun-2010 05:02:47] PHP Notice: Undefined index: REMOTE_ADDR in C:\..\drupal\includes\bootstrap.inc on line 1299
[12-Jun-2010 05:02:47] PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\..\drupal\includes\bootstrap.inc:1299) in C:\..\drupal\includes\bootstrap.inc on line 1143
[12-Jun-2010 05:02:47] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\..\drupal\includes\bootstrap.inc:1299) in C:\..\drupal\includes\bootstrap.inc on line 1143
[12-Jun-2010 05:02:47] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\..\drupal\includes\bootstrap.inc:1299) in C:\..\drupal\includes\bootstrap.inc on line 709
[12-Jun-2010 05:02:47] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\..\drupal\includes\bootstrap.inc:1299) in C:\..\drupal\includes\bootstrap.inc on line 710
[12-Jun-2010 05:02:47] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\..\drupal\includes\bootstrap.inc:1299) in C:\..\drupal\includes\bootstrap.inc on line 711
[12-Jun-2010 05:02:47] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\..\drupal\includes\bootstrap.inc:1299) in C:\..\drupal\includes\bootstrap.inc on line 712
[12-Jun-2010 05:02:47] PHP Notice: Undefined index: REMOTE_ADDR in C:\..\drupal\includes\bootstrap.inc on line 1299
[12-Jun-2010 05:02:48] PHP Fatal error: Allowed memory size of 239075328 bytes exhau sted (tried to allocate 261904 bytes) in C:\..\drupal\includes\form.inc on line 488
[12-Jun-2010 05:03:22] PHP Fatal error: Allowed memory size of 239075328 bytes exhausted (tried to allocate 261904 bytes) in C:\..\drupal\includes\form.inc on line 488
[12-Jun-2010 05:04:34] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
At this point any action php takes results in the last error shown above. I tried increasing the value of memory_limit in php.ini before the final Fatal error which obviously didn't help.
How can the error be eliminated? Am I on a correct path to migrating data into Drupal or should the cck tables be operated on directly?
Windows XP
PHP 5.3.2 VC6
Apache 2.2
I've always thought that the concept of Marshalling had a bit of a funny name.
My mental conception of the process would always involve an ol' wildwest gunslinging marshall who would coerce objects into serialized form at gunpoint.
I just found out the real reason Marshalling is called what it's called and chuckled.
Do you know the real reason, or perhaps you too are familiar with my gunslinger?
i am currently working on a web application that needs to accept video uploaded by users in any format (.avi, .mov, etc.) and convert them to flv for playing in a flash-based player.
Since the site is OpenCms-based, the best solution would be a ready-made plugin for OpenCms that allowed to upload and play videos doing the transcode operation in background, but just a set of Java classes to do the transcode would be great and then i could make the uploading form and playback part on my own.
I am building a form with winforms - and should add a view and editable time span value.
Which controls works best for this ?
A normal edit control shows the value correctly - but it's not really nice for changing values
the normal date time picker doesn't work
the masked edit control doesn't have got any standard mask for this
Does anybody have a good idea for a control for this task ?
I have some data in this form:
@"Managers Alice, Bob, Charlie
Supervisors Don, Edward, Francis"
I need a flat output like this:
@"Managers Alice
Managers Bob
Managers Charlie
Supervisors Don
Supervisors Edward
Supervisors Francis"
The actual "job title" above could be any single word, there's no discrete list to work from.
Replacing the , with \r\n is easy enough, as is the first replacement:
Replace (^|\r\n)(\S+\s)([^,\r\n]*),\s
With $1$2$3\r\n$2
But capturing the other names and applying the same prefix is what is eluding me today. Any suggestions?
I've a MySQL table that has a UTF-8 charset and upon attempting to insert to it via a PHP form, the database gives the following error:
PDOStatement::execute():
SQLSTATE[HY000]: General error: 1366
Incorrect string value: '\xE8' for
column ...
The character in question is 'è', yet I don't see why this should be a problem considering the database and table are set to UTF-8.
Consider the following models and form:
class Pizza(models.Model):
name = models.CharField(max_length=50)
class Topping(models.Model):
name = models.CharField(max_length=50)
ison = models.ManyToManyField(Pizza, blank=True)
class ToppingForm(forms.ModelForm):
class Meta:
model = Topping
When you view the ToppingForm it lets you choose what pizzas the toppings go on and everything is just dandy.
My questions is: How do I define a ModelForm for Pizza that lets me take advantage of the Many-to-Many relationship between Pizza and Topping and lets me choose what Toppings go on the Pizza?
I am creating a web form for uploading small movie clips to a HTTP server. However, while my HTML file input control gets shown on an ipod touch, the button is completely disabled and I cannot click it to upload files.
What do I have to do to use the input control to upload files (e.g. movie clips or pictures) to my HTTP server. My page is XHTML MP 1.2 compliant.
greetings all
i have an app that will send emails from different emails
emails are in the form[email protected]
and i need to make a listener on the server
to listen to each incoming email to each different email then do some action
i don't have any idea where to start, if someone can give me a simple overview of what I need to do or where to look up some examples how this would be done it would be very useful
thank you.
I have been playing with creating little windows forms apps without visual studio.
I create my source in Notepad++ and compile with a NAnt build file.
When I run the application a command window is also displayed as well as the application window. How can I prevent the command window showing up?
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Media;
using System.IO;
namespace mynamespace
{
class MyForm : Form
{
public Button btnPlay;
MyForm()
{
this.SuspendLayout();
this.Text = "My Application";
InitialiseForm();
this.ResumeLayout(false);
}
private void InitialiseForm()
{
btnPlay = new Button();
btnPlay.Location = new System.Drawing.Point(30,40);
btnPlay.Text = "Play";
btnPlay.Click += new System.EventHandler(btnPlay_Click);
this.Controls.Add(btnPlay);
}
protected void btnPlay_Click(object sender, EventArgs e)
{
string wav = "testing123.wav";
Stream resourceStream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(wav);
SoundPlayer player = new SoundPlayer(resourceStream);
player.Play();
}
public static void Main()
{
Application.Run(new MyForm());
}
}
}
Build file
<?xml version="1.0"?>
<project name="myform" default="build" basedir=".">
<description>My Form app</description>
<property name="debug" value="true" overwrite="false"/>
<target name="clean" description="Remove all generated files">
<delete dir="build"/>
</target>
<target name="build" description="Compile the source" depends="clean">
<mkdir dir="build"/>
<csc target="exe" output="build\MyForm.exe" debug="${debug}" verbose="true">
<resources>
<include name="app\resources\*.wav" />
</resources>
<sources>
<include name="app\MyForm.cs"/>
</sources>
</csc>
</target>
</project>
Hello everyone,
I want to know if I can create a WebBrowser through code in Vb.NET, instead of dragging a webbrowser into the form. Simple enough to say, I would greatly appreciate your help.
Hi all,
I implemented a WebView in my android app displaying a web form. One of the fields ask for the user to manually enter his phone number (in case the phone does not allow extracting of phone number).
Right now, the qwerty soft keyboard pops up when user selects the field. Is there a way I can have the numberpad display instead?
(Remember I'm using HTML and not native controls)
Thanks!
Shaun
Um so I was in for a little bit of a surprise tonight. I spent a good 20 mins trying to figure out why I was able to submit a form knowing that what I entered into the recaptcha field was invalid. Is it true that you don't need to input the exact words it displays? If it shows me two words and I misspelled one of the words, I still pass validation? Same goes if "hello world" and I input "hell man" it still works.
I'm using jqGrid for a JIRA plugin and have included the jquery and jqgrid libraries as web resources.
I've set up a column in jqGrid as required and when I try to submit the form with the respective column empty I get an error in firebug: jQuery.jgrid is undefined
jQuery.jgrid is null but $.jgrid has the correct data.
Does anyone know how I can set up jqgrid so that it points to the $.jgrid without having to change all the source code? or any other way round this?
Thanks
I am tracking AJAX goals in Google Analytics with no problems.
But I would like to use Google Website Optimizer to see what buttons or headlines get the most leads in our newsletter subscription form.
Since a new subscription only triggers AJAX/Javascript, I cannot add a separate success/thankyou.html page to track in Google Website Analyzer.
There is not much to find in Google's documentation about this.
Has anyone been able to do this?
hi,
I have a win form that creates a site in IIS7.
One function needs to open the web.config file and make a few updates. (connection string, smtp, impersonation)
However I do not have the virtual path, just the physical path.
Is there any way I can still use WebConfigurationManager?
I need to use it's ability to find section and read/write.
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration
Thanks!!
I have a project in C# and I get this error every time I try to compile the project :
(Unable to copy file "obj\Debug\Project1.exe" to "bin\Debug\Project1.exe". The process cannot access the file 'bin\Debug\Project1.exe' because it is being used by another process.), so I have to close the process from the task manager.
my project is only one form and there is no multithreading. what is the solution (without restarting VS or Killing the process)?
Most projects now need some form of a database. When someone says database, I usually think relational databases, but I still hear about flat file XML databases.
What parameters do you take into consideration when deciding between a "real" database and a flat-file XML database. When should one be used over the other, and under what circumstances should I never consider using a flat file (or vice versa a relational) database?
Hi All,
Currently i can access nsf all nsg files.But once i uninstall Lotus Notes form my machine program doesn't work.
I am using "Introp.Domino.dll".
Language: C#
Regards,
Preeti
The web-based application I’m currently working on is growing arms and legs! It’s basically an administration system which helps users to keep track of bookings, user accounts, invoicing etc. It can also be accessed via a couple of different websites using a fairly crude API.
The fat-client design loosely follows the MVC pattern (or perhaps MVP) with a php/MySQL backend, Front Controller, several dissimilar Page Controllers, a liberal smattering of object-oriented and procedural Models, a confusing bunch of Views and templates, some JavaScripts, CSS files and Flash objects.
The programmer in me is a big fan of the principle of “Separation of Concerns” and on that note, I’m currently trying to figure out the best way to separate and combine the various concerns as the project grows and more people contribute to it.
The problem we’re facing is that although JavaScript (or Flash with ActionScript) is normally written with the template, hence part of the View and decoupled from the Controller and Model, we find that it actually encompasses the entire MVC pattern... Swap an image with an onmouseover event - that’s Behaviour. Render a datagrid - we’re manipulating the View. Send the result of reordering a list via AJAX - now we’re in Control. Check a form field to see if an email address is in a valid format - we’re consulting the Model.
Is it wise to let the database people write up the validation Model with jQuery? Can the php programmers write the necessary Control structures in JavaScript? Can the web designers really write a functional AJAX form for their View? Should there be a JavaScript overlord for every project?
If the MVC pattern could be applied to the people instead of the code, we would end up with this:
Model - the database boffins - “SELECT * FROM mind WHERE interested IS NULL”
Control - pesky programmers - “class Something extends NothingAbstractClass{…}”
View - traditionally the domain of the graphic/web designer - “”
…and a new layer:
Behaviour - interaction and feedback designer - “CSS3 is the new black…”
So, we’re refactoring and I’d like to stick to best practice design, but I’m not sure how to proceed. I don’t want to reinvent the wheel, so would anyone have any hints or tips as to what pattern I should be looking at or any code samples from someone who’s already done the dirty work? As the programmer guy, how can I rewrite the app for backend and front end whilst keeping the two separate?
And before you ask, yes I’ve looked at Zend, CodeIgnitor, Symfony, etc., and no, they don’t seem to cross the boundary between server logic and client logic!
Hi everyone,
I am pulling data from Twitter's api and the return date is UTC in the following form:
Sat Jan 24 22:14:29 +0000 2009
Can MySQL handle this format specifically or do I need to transform it? I am pulling the data using Python.
Thanks,
Brock
I have a problem with some automating posting to bulletin board... If I send the posting form to the vBulletin board, I get corrupted entities.
Feel free to copy-paste the script and try it...
It looks like the board's expecting some decoded utf8, but if I send the message decoded the entities are still wrong.
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
use Digest::MD5 qw(md5_hex);
my $mech = WWW::Mechanize->new();
my $base_url = 'http://www.boerse.bz/';
my $username = 'MrMirror';
my $password = 'test';
$mech->get($base_url);
print "Login\n";
$mech->form_number(1);
$mech->field('vb_login_username' => $username);
$mech->field('vb_login_password' => $password);
$mech->field('vb_login_md5password' => md5_hex($password));
$mech->field('vb_login_md5password_utf' => md5_hex($password));
$mech->submit();
unless ($mech->content() =~ m!Weiterleitung!gi)
{
print "No Rediction!\n";
exit;
}
print "Redict\n";
$mech->get($base_url);
unless ($mech->content() =~ m!Logout!gi)
{
print "Login Failed!\n";
exit;
}
$mech->get($base_url .'/newthread.php?do=newthread&f=173');
$mech->form_number(3);
$mech->field('subject' => 'MrMirror makes some testing ä ö ü ß');
$mech->field('message' => "ä ö ü ß");
### everything allright here
$mech->dump_forms();
### preview submit, don't wanna spam around ;)
$mech->click('preview');
print "\n\n\n---------------------------------------------------------------------\n\n\n";
### same form, wrong entities :(
$mech->dump_forms();
I'm working on a personal project to build a small web app that is built using AJAX requests and talks to a RESTful API rather than traditional HTML pages and form submissions.
Are there any online articles or tutorials or any books that people could recommend that cover design patterns for this kind of thing?
I'm currently implementing a client application that POST's a file over HTTP and have implemented base64 encoding on the file's data parameter.
However, it appears that when inspecting the traffic between a simple HTML page with a file upload form and the server that no Content-Transfer-Encoding header is sent in the body when describing the file's parameter.
Is this the preferred way of POST'ing a file over HTTP?