Search Results

Search found 11927 results on 478 pages for 'pete field'.

Page 7/478 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How to provide an inline model field with a queryset choices without losing field value for inline r

    - by Judith Boonstra
    The code displayed below is providing the choices I need for the app field, and the choices I need for the attr field when using Admin. I am having a problem with the attr field on the inline form for already saved records. The attr selected for these saved does show in small print above the field, but not within the field itself. # MODELS: Class Vocab(models.Model): entity = models.Charfield, max_length = 40, unique = True) Class App(models.Model): name = models.ForeignKey(Vocab, related_name = 'vocab_appname', unique = True) app = SelfForeignKey('self, verbose_name = 'parent', blank = True, null = True) attr = models.ManyToManyField(Vocab, related_name = 'vocab_appattr', through ='AppAttr' def parqs(self): a method that provides a queryset consisting of available apps from vocab, excluding self and any apps within the current app's dependent line. def attrqs(self): a method that provides a queryset consisting of available attr from vocab excluding those already selected by current app, 2) those already selected by any apps within the current app's parent line, and 3) those selected by any apps within the current app's dependent line. Class AppAttr(models.Model): app = models.ForeignKey(App) attr = models.ForeignKey(Vocab) # FORMS: from models import AppAttr def appattr_form_callback(instance, field, *args, **kwargs) if field.name = 'attr': if instance: return field.formfield(queryset = instance.attrqs(), *kwargs) return field.formfield(*kwargs) # ADMIN: necessary imports class AppAttrInline(admin.TabularInline): model = AppAttr def get_formset(self, request, obj = None, **kwargs): kwargs['formfield_callback'] = curry(appattr_form_callback, obj) return super(AppAttrInline, self).get_formset(request, obj, **kwargs) class AppForm(forms.ModelForm): class Meta: model = App def __init__(self, *args, **kwargs): super(AppForm, self).__init__(*args, **kwargs) if self.instance.id is None: working = App.objects.all() else: thisrec = App.objects.get(id = self.instance.id) working = thisrec.parqs() self.fields['par'].queryset = working class AppAdmin(admin.ModelAdmin): form = AppForm inlines = [AppAttrInline,] fieldsets = .......... necessary register statements

    Read the article

  • Losing jQuery functionality after postback

    - by David Lozzi
    I have seen a TON of people reporting this issue online, but no actual solutions. I'm not using AJAX or updatepanels, just a dropdown that posts back on selected index change. My HTML is <div id="myList"> <table id="ctl00_PlaceHolderMain_dlFields" cellspacing="0" border="0" style="border-collapse:collapse;"> <tr> <td> <tr> <td class="ms-formlabel" style="width: 175px; padding-left: 10px"> <span id="ctl00_PlaceHolderMain_dlFields_ctl00_lblDestinationField">Body</span> </td> <td class="ms-formbody" style="width: 485px"> <input name="ctl00$PlaceHolderMain$dlFields$ctl00$txtSource" type="text" id="ctl00_PlaceHolderMain_dlFields_ctl00_txtSource" class="ms-input" style="width:230px" /> <select name="ctl00$PlaceHolderMain$dlFields$ctl00$ddlSourceFields" id="ctl00_PlaceHolderMain_dlFields_ctl00_ddlSourceFields" class="ms-input"> <option value="Some Field Name 1">Some Field Name 1</option> <option value="Some Field Name 2">Some Field Name 2</option> <option value="Some Field Name 3">Some Field Name 3</option> <option value="Some Field Name 4">Some Field Name 4</option> </select> <a href="#" id="appendSelect">append</a> </td> </tr> </td> </tr><tr> <td> <tr> <td class="ms-formlabel" style="width: 175px; padding-left: 10px"> <span id="ctl00_PlaceHolderMain_dlFields_ctl01_lblDestinationField">Expires</span> </td> <td class="ms-formbody" style="width: 485px"> <input name="ctl00$PlaceHolderMain$dlFields$ctl01$txtSource" type="text" id="ctl00_PlaceHolderMain_dlFields_ctl01_txtSource" class="ms-input" style="width:230px" /> <select name="ctl00$PlaceHolderMain$dlFields$ctl01$ddlSourceFields" id="ctl00_PlaceHolderMain_dlFields_ctl01_ddlSourceFields" class="ms-input"> <option value="Some Field Name 1">Some Field Name 1</option> <option value="Some Field Name 2">Some Field Name 2</option> <option value="Some Field Name 3">Some Field Name 3</option> <option value="Some Field Name 4">Some Field Name 4</option> </select> <a href="#" id="appendSelect">append</a> </td> </tr> </td> </tr><tr> <td> <tr> <td class="ms-formlabel" style="width: 175px; padding-left: 10px"> <span id="ctl00_PlaceHolderMain_dlFields_ctl02_lblDestinationField">Title</span> </td> <td class="ms-formbody" style="width: 485px"> <input name="ctl00$PlaceHolderMain$dlFields$ctl02$txtSource" type="text" id="ctl00_PlaceHolderMain_dlFields_ctl02_txtSource" class="ms-input" style="width:230px" /> <select name="ctl00$PlaceHolderMain$dlFields$ctl02$ddlSourceFields" id="ctl00_PlaceHolderMain_dlFields_ctl02_ddlSourceFields" class="ms-input"> <option value="Some Field Name 1">Some Field Name 1</option> <option value="Some Field Name 2">Some Field Name 2</option> <option value="Some Field Name 3">Some Field Name 3</option> <option value="Some Field Name 4">Some Field Name 4</option> </select> <a href="#" id="appendSelect">append</a> </td> </tr> </td> </tr> </table></div> The above Div tag is static, and the table is generated from a DataList object. On postback the datalist reloads using a new dataset, for example <div id="myList"> <table id="ctl00_PlaceHolderMain_dlFields" cellspacing="0" border="0" style="border-collapse:collapse;"> <tr> <td> <tr> <td class="ms-formlabel" style="width: 175px; padding-left: 10px"> <span id="ctl00_PlaceHolderMain_dlFields_ctl00_lblDestinationField">Notes</span> </td> <td class="ms-formbody" style="width: 485px"> <input name="ctl00$PlaceHolderMain$dlFields$ctl00$txtSource" type="text" id="ctl00_PlaceHolderMain_dlFields_ctl00_txtSource" class="ms-input" style="width:230px" /> <select name="ctl00$PlaceHolderMain$dlFields$ctl00$ddlSourceFields" id="ctl00_PlaceHolderMain_dlFields_ctl00_ddlSourceFields" class="ms-input"> <option value="Some Field Name 1">Some Field Name 1</option> <option value="Some Field Name 2">Some Field Name 2</option> <option value="Some Field Name 3">Some Field Name 3</option> <option value="Some Field Name 4">Some Field Name 4</option> </select> <a href="#" id="appendSelect">append</a> </td> </tr> </td> </tr><tr> <td> <tr> <td class="ms-formlabel" style="width: 175px; padding-left: 10px"> <span id="ctl00_PlaceHolderMain_dlFields_ctl01_lblDestinationField">URL</span> </td> <td class="ms-formbody" style="width: 485px"> <input name="ctl00$PlaceHolderMain$dlFields$ctl01$txtSource" type="text" id="ctl00_PlaceHolderMain_dlFields_ctl01_txtSource" class="ms-input" style="width:230px" /> <select name="ctl00$PlaceHolderMain$dlFields$ctl01$ddlSourceFields" id="ctl00_PlaceHolderMain_dlFields_ctl01_ddlSourceFields" class="ms-input"> <option value="Some Field Name 1">Some Field Name 1</option> <option value="Some Field Name 2">Some Field Name 2</option> <option value="Some Field Name 3">Some Field Name 3</option> <option value="Some Field Name 4">Some Field Name 4</option> </select> <a href="#" id="appendSelect">append</a> </td> </tr> </td> </tr> </table></div> After the postback and the datalist is reloaded, my JQuery doesn't work anymore. No errors, nothing. I don't see any actual changes in the objects in the HTML that should cause this. How do I fix this? Any workarounds or bandaides I can apply? My JQuery is below <script type='text/javascript'> $(document).ready(function () { $('#myList a').live("click", function () { var $selectValue = $(this).siblings('select').val(); var $thatInput = $(this).siblings('input'); var val = $thatInput.val() + ' |[' + $selectValue + ']|'; $thatInput.val(jQuery.trim(val)); }) }); </script> Thanks!!

    Read the article

  • ASP.NET MVC–How to show asterisk after required field label

    - by DigiMortal
    Usually we have some required fields on our forms and it would be nice if ASP.NET MVC views can detect those fields automatically and display nice red asterisk after field label. As this functionality is not built in I built my own solution based on data annotations. In this posting I will show you how to show red asterisk after label of required fields. Here are the main information sources I used when working out my own solution: How can I modify LabelFor to display an asterisk on required fields? (stackoverflow) ASP.NET MVC – Display visual hints for the required fields in your model (Radu Enuca) Although my code was first written for completely different situation I needed it later and I modified it to work with models that use data annotations. If data member of model has Required attribute set then asterisk is rendered after field. If Required attribute is missing then there will be no asterisk. Here’s my code. You can take just LabelForRequired() methods and paste them to your own HTML extension class. public static class HtmlExtensions {     [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "This is an appropriate nesting of generic types")]     public static MvcHtmlString LabelForRequired<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression, string labelText = "")     {         return LabelHelper(html,             ModelMetadata.FromLambdaExpression(expression, html.ViewData),             ExpressionHelper.GetExpressionText(expression), labelText);     }       private static MvcHtmlString LabelHelper(HtmlHelper html,         ModelMetadata metadata, string htmlFieldName, string labelText)     {         if (string.IsNullOrEmpty(labelText))         {             labelText = metadata.DisplayName ?? metadata.PropertyName ?? htmlFieldName.Split('.').Last();         }           if (string.IsNullOrEmpty(labelText))         {             return MvcHtmlString.Empty;         }           bool isRequired = false;           if (metadata.ContainerType != null)         {             isRequired = metadata.ContainerType.GetProperty(metadata.PropertyName)                             .GetCustomAttributes(typeof(RequiredAttribute), false)                             .Length == 1;         }           TagBuilder tag = new TagBuilder("label");         tag.Attributes.Add(             "for",             TagBuilder.CreateSanitizedId(                 html.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName(htmlFieldName)             )         );           if (isRequired)             tag.Attributes.Add("class", "label-required");           tag.SetInnerText(labelText);           var output = tag.ToString(TagRenderMode.Normal);             if (isRequired)         {             var asteriskTag = new TagBuilder("span");             asteriskTag.Attributes.Add("class", "required");             asteriskTag.SetInnerText("*");             output += asteriskTag.ToString(TagRenderMode.Normal);         }         return MvcHtmlString.Create(output);     } } And here’s how to use LabelForRequired extension method in your view: <div class="field">     @Html.LabelForRequired(m => m.Name)     @Html.TextBoxFor(m => m.Name)     @Html.ValidationMessageFor(m => m.Name) </div> After playing with CSS style called .required my example form looks like this: These red asterisks are not part of original view mark-up. LabelForRequired method detected that these properties have Required attribute set and rendered out asterisks after field names. NB! By default asterisks are not red. You have to define CSS class called “required” to modify how asterisk looks like and how it is positioned.

    Read the article

  • LUKOIL Overseas Holding Optimizes Oil Field Development Projects with Integrated Project Management

    - by Melissa Centurio Lopes
    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} LUKOIL Overseas Group is a growing oil and gas company that is an integral part of the vertically integrated oil company OAO LUKOIL. It is engaged in the exploration, acquisition, integration, and efficient development of oil and gas fields outside the Russian Federation to promote transforming LUKOIL into a transnational energy company. In 2010, the company signed a 20-year development project for the giant, West Qurna 2 oil field in Iraq. Executing 10,000 to 15,000 project activities simultaneously on 14 major construction and drilling projects in Iraq for the West Qurna-2 project meant the company needed a clear picture, in real time, of dependencies between its capital construction, geologic exploration and sinking projects—required for its building infrastructure oil field development projects in Iraq. LUKOIL Overseas Holding deployed Oracle’s Primavera P6 Enterprise Project Portfolio Management to generate structured project management information and optimize planning, monitoring, and analysis of all engineering and commercial activities—such as tenders, and bulk procurement of materials and equipment—related to oil field development projects. A word from LUKOIL Overseas Holding Ltd. “Previously, we created project schedules on desktop computers and uploaded them to the project server to be merged into one big file for each project participant to access. This was not scalable, as we’ve grown and now run up to 15,000 activities in numerous projects and subprojects at any time. With Oracle’s Primavera P6 Enterprise Project Portfolio Management, we can now work concurrently on projects with many team members, enjoy absolute security, and issue new baselines for all projects and project participants once a week, with ease.” – Sergey Kotov, Head of IT and the Communication Office, LUKOIL Mid-East Ltd. Oracle Primavera Solutions: · Facilitated managing dependencies between projects by enabling the general scheduler to reschedule all projects and subprojects once a week, realigning 10,000 to 15,000 project activities that the company runs at any time · Replaced Microsoft Project and a paper-based system with a complete solution that provides structured project data · Enhanced data security by establishing project management security policies that enable only authorized project members to edit their project tasks, while enabling each project participant to view all project data that are relevant to that individual’s task · Enabled the company to monitor project progress in comparison to the projected plan, based on physical project assets to determine if each project is on track to conclude within its time and budget limitations To view the full list of solutions view here. “Oracle Gold Partner Parma Telecom was key to our successful Primavera deployment, implementing the software’s basic functionalities, such as project content, timeframes management, and cost management, in addition to performing its integration with our enterprise resource planning system and intranet portal within ten months and in accordance with budgets,” said Rafik Baynazarov, head of the master planning and control office, LUKOIL Mid-East Ltd. “ To read the full version of the customer success story, please view here.

    Read the article

  • Creating Key Flex Field (KFF) Bean in OAF

    - by Manoj Madhusoodanan
    This blog describes how to create KFF in OAF Page.Here I am going to demonstrate with standard Job KFF. I have created a new structure in Job KFF which I am going to use it in my custom OAF page.Please see the below pic. In the above created structure I have created following segments.You can see the valuesets also. In the custom page I have created an item with following properties. In the Segment List property you can give which segments are going to use in the KFF. The syntax for defining it is  KFF Code|Segment1|Segment2|Segment3|Segment4|Segment N In the table just create a field to hold the code combination.Please click here to see table script. Code combination will goes into JOB_ID field of the table. In the processRequest method of the page controller add following code snippet to attach the KFF structure and CCID column to the KFF bean. Deploy the files belonging to this solution to the server. Following is the output of the above solution. If you click on JobId you can see the KFF window.   Code Combination Id has created in the table.      

    Read the article

  • ODEE Green Field (Windows) Part 5 - Deployment and Validation

    - by AndyL-Oracle
    And here we are, almost finished with our installation of Oracle Documaker Enterprise Edition ("ODEE") in a Windows green field environment. Let's recap what we've done so far: In part 1, I went over the basic process that I intended to show with installing an ODEE on a green field server. I walked you through the basic installation of Oracle 11g database In part 2, I covered the installation of WebLogic application server. In part 3, I showed you how to install SOA Suite for WebLogic. In part 4, we did the first part of the installation of ODEE itself. What remains after all of that, is the deployment of the ODEE components onto the database and application server - so let's get to it! DATABASE First, we'll deploy the schemas to the database. The schemas are created during the ODEE installation according to the responses provided during the install process. To deploy the schemas, you'll need to login to the database server in your green field environment. Open a command line and CD into ODEE_HOME\documaker\database\oracle11g.Run SQLPLUS as SYSDBA and execute dmkr_admin.sql:  sqlplus / as sysdba @dmkr_admin.sql Execute dmkr_asline.sql, dmkr_admin_correspondence_example.sql.  If you require additional languages, run the appropriate SQL scripts (e.g. dmkr_asline_es.sql for Spanish). APPLICATION SERVER Next, we'll deploy the WebLogic domain and it's components - Documaker web services, Documaker Interactive, Documaker dashboard, and more. To deploy the components, you'll need to login to the application server in your green field environment. 1. Open Windows Explorer and navigate to ODEE_HOME\documaker\j2ee\weblogic\oracle11g\scripts.2. Using a text editor such as Notepad++, modify weblogic_installation_properties and set location of MIDDLEWARE_HOME and ODEE HOME. If you have used the defaults you’ll probably need to change the E: to C: and that’s it. Save the changes.3. Continuing in the same directory, use your text editor to modify set_middleware_env.cmd and set the drive and path to MIDDLEWARE_HOME. If you have used the defaults you’ll probably need to just change E: to C: and that’s it. Save the changes.4. In the same directory, execute wls_create_domain.cmd by double-clicking it. This should run to completion. If it does not, review any errors and correct them, and rerun the script.5. In the same directory, execute wls_add_correspondence.cmd by double-clicking it - again this should run to completion. 6. Next, we'll start the AdminServer - this is the main WebLogic domain server. To start it, use Windows Explorer and navigate to MIDDLEWARE_HOME\user_projects\domains\idocumaker_domain. Double-click startWebLogic.cmd and the server startup will begin. Once you see output that indicates that the server status changed to RUNNING you may proceed.  a. Note: if you saw database connection errors, you probably didn’t make sure your database name and connection type match. You can change this manually in the WebLogic Console. Open a browser and navigate to http://localhost:7001/console (replace localhost with the name of your application server host if you aren't opening the browser on the server), and login with the the weblogic credential you provided in the ODEE installation process. b. Once you're logged in, open Services?Data Sources. Select dmkr_admin and click Connection Pool.  c. The end of the URL should match the connection type you chose. If you chose ServiceName, the URL should be: jdbc:oracle:thin:@//<hostname>:1521/<serviceName> and if you chose SID, the URL should be: jdbc:oracle:thin:@//<hostname>:1521/<SIDname> d. An example serviceName is a fully qualified DNS-style name, e.g. "idmaker.us.oracle.com". (It does not need to actually resolve in DNS). An example SID is just a name, e.g. IDMAKER. e. Save the change and repeat for the data source dmkr_asline.  f. You will also need to make the same changes in the ODEE_HOME/documaker/docfactory/config/context/.bindings file - open the file in a text editor, locate the URL lines and make the appropriate change, then save the file.  7. Back in the ODEE_HOME\documaker\j2ee\weblogic\oracle11g\scripts directory, execute create_users_groups.cmd. 8. In the same directory, execute create_users_groups_correspondence_example.cmd. 9. Open a browser and navigate to http://localhost:7001/jpsquery. Replace localhost with the name of your application server host if you aren't running the browser on the application server. If you changed the default port for the AdminServer from 7001, use the port you changed it to. You should see output like this: 10. Start the WebLogic managed servers by opening a command prompt and navigating to MIDDLEWARE_HOME/user_projects/domains/idocumaker_domain/bin/. When you start the servers listed below, you will be prompted to enter the WebLogic credentials to start the server. You can prevent this by providing the credential in the startManagedwebLogic.cmd file for the WLS_USER and WLS_PASS values. Note that the credential will be stored in cleartext. To start the server, type in the command shown. a. Start the JMS Server: ./startManagedWebLogic.cmd jms_server b. Start Dashboard/Documaker Administrator: ./startManagedWebLogic.cmd dmkr_server c. Start Documaker Interactive for Correspondence: ./startManagedWebLogic.cmd idm_server SOA Composites  If you're planning on testing out the approval process components of BPEL that can be used with Documaker Interactive, then use the following steps to deploy the SOA composites. If you're not going to use BPEL, you can skip to the next section.1. Stop the servers listed in the previous section (Step 10) in the reverse order that they were started.2. Run the Domain configuration command: navigate to and execute MIDDLEWARE_HOME/wlserver_10.3/common/bin/config.cmd.3. Select Extend and click next. 4. Select the iDocumaker Domain and click Next. 5. Select the Oracle SOA Suite – 11.1.1.0 (this may automatically select other components which is OK). Click Next. 6. View the Configure JDBC resources screen. You should not make any changes. Click Next. 7. Check both connections and click Test Connections. After successful test, click Next. If the tests fail, something is broken. Go back to configure JDBC resources and check your service name/SID. 8. Check all schemas. Set a password (will be the same for all schemas). Enter the database information (service name, host name, port). Click Next. 9. Connections should test successfully. If not, go back and fix any errors. Click Next. 10. Click Next to pass through Optional Configuration. 11. Click Extend. 12. Click Done. 13. Open a terminal window and navigate to/execute: ODEE_HOME/documaker/j2ee/weblogic/oracle11g/bpel/antbuild.cmd14. Start the WebLogic Servers – AdminServer, jms_server, dmkr_server, idm_server. If you forgot how to do this, see the previous section Step 10. Note: if you previously changed the startManagedWebLogic.cmd script for WLS_USER and WLS_PASS you will need to make those changes again. 15. Start the WebLogic server soa_server1: MIDDLEWARE_HOME/user_projects/domains/idocumaker_domain/bin/startManagedWebLogic.cmd soa_server116. Open a browser to http://localhost:7001/console and login. 17. Navigate to Services?Data Sources and select DMKR_ASLINE. 18. Click the Targets tab. Check soa_server1, then click Save. Repeat for the DMKR_ADMIN data source. 19. Open a command prompt and navigate to ODEE_HOME/j2ee/weblogic/oracle11g/scripts, then execute deploy_soa.cmd. That's it! (As if that wasn't enough?) DOCUMAKER Deploy the sample MRL resources by navigating to/executing ODEE_HOME/documaker/mstrres/dmres/deploysamplemrl.bat. You should see approximately 500 resources deployed into the database. Start the Factory Services. Start?Run?services.msc. Locate the service named "ODDF xxxx" and right-click, select Start. Note that each Assembly Line has a separate Factory setup, including its own Factory service and Docupresentment service. The services are named for the assembly line and the machine on which they are installed (because you could have multiple machines servicing a single assembly line, so this allows for easy scripting to control all the services if you choose to do so. Repeat for the Docupresentment service. Note that each Assembly Line has a separate Docupresentment. Using Windows Explorer, navigate to ODEE_HOME/documaker/mstrres/dmres/input and select one of the XML files, and copy it into ODEE_HOME/documaker/hotdirectory. Note: if you chose a different hot directory during installation, copy the file there instead. Momentarily you should see the XML file disappear! Open browser and navigate to http://localhost:10001/DocumakerDashboard (previous versions 12.0-12.2 use http://localhost:10001/dashboard) and verify that job processed successfully. Note that some transactions may fail if you do not have a properly configured email server, and this is ok. You can set up a simple SMTP server (just search the internet for "SMTP developer" and you'll get several to choose from.  So... that's it? Where are we at this point? You now have a completely functional ODEE installation, from soup to nuts as they say. You can further expand your installation by doing some of the following activities: clustering WebLogic services configuring WebLogic for redundancy configuring Oracle 11g for RAC adding additional Factory servers for redundancy/processing capacity setting up a real MRL (instead of the sample resources) testing Documaker Web Services for job submission and more!  I certainly hope you've enjoyed this and find it useful. If you find yourself running into trouble, visit the Oracle Community for Documaker - there is plenty of activity there and you can ask questions. For more concentrated assistance, you can engage an Oracle consultant who is a subject matter expert to assist you. Feel free to email me [andy (dot) little (at) oracle (dot) com] and I can connect you with the appropriate resource to get started. Best of luck! -Andy 

    Read the article

  • Majoring in computer science, but i'm not to sure I'm in the right field [closed]

    - by user74340
    Throught out my high school years and first year in college, I never thought of studying computer science. I studied biology and chemistry during my first year, and I didn't like the research, nor any type of medical professionals. So I took an introductory CS course, and loved the diverse roles this field can have. So I declare CS as my major. I finished first, and second year CS courses. Then now, I'm doing my co-op(intern) as a web developer. During my first and second year, I was always just an average student. My grades is around low B. But I put so much effort to understand my course' materials. I see many brilliants peers who not only excel at what they do, but have the passion. So I always doubt myself if I don't belong in this field. I'm not good at math, I usually get Cs on my math courses. My internship (a corporate developer job) is okay. But doesn't want to work like this after my graduation). Some aspects of CS that I like is HCI. In my experience in programming, and group projects, I enjoyed designing User interface, and thinking of user experience. I'm also thinking of taking some psychology courses.. I would appreciate any criticism, or advices.

    Read the article

  • Why won't anyone accept public fields in C#?

    - by Dmitri Nesteruk
    Seems like every C# static analyzer wants to complain when it sees a public field. But why? Surely there are cases where a public (or internal) field is enough, and there is no point in having a property with its get_ and set_ methods? What if I know for sure that I won't be redefining the field or adding to it (side effects are bad, right?) - shouldn't a simple field suffice?

    Read the article

  • A dropdownlist list in ASP.NET MVC although not [required] field shows up as required and Model Sta

    - by VJ
    I have the following code- View- <% Html.BeginForm(); %> <div> <%= Html.DropDownList("DropDownSelectList", new SelectList( Model.DropDownSelectList, "Value", "Text"))%> Controller- public ActionResult Admin(string apiKey, string userId) { ChallengesAdminViewModel vm = new ChallengesAdminViewModel(); vm.ApiKey = apiKey; vm.UserId = userId; vm.DropDownSelectList = new List<SelectListItem>(); vm.DropDownSelectList.Add(listItem1); vm.DropDownSelectList.Add(listItem2); vm.DropDownSelectList.Add(listItem3); vm.DropDownSelectList.Add(listItem4); vm.DropDownSelectList.Add(listItem5); vm.DropDownSelectList.Add(listItem6); vm.DropDownSelectList.Add(listItem7); } [HttpPost] public ActionResult Admin(ChallengesAdminViewModel vm) { if (ModelState.IsValid)//Due to the null dropdownlist gives model state invalid { } } ViewModel- public class ChallengesAdminViewModel { [Required] public string ApiKey { get; set; } [Required] public string UserId { get; set; } public List<SelectListItem> DropDownSelectList { get; set; } } I dont know why it still requires the list although not required. I want to have only two attributes as required. So I wanted to know how do i declare or change that list to be not required and have my Model State Valid.

    Read the article

  • Although not [required] List field shows up as required and Model State is not Valid due to it bein

    - by VJ
    I have the following code- View- <% Html.BeginForm(); %> <div> <%= Html.DropDownList("DropDownSelectList", new SelectList( Model.DropDownSelectList, "Value", "Text"))%> Controller- public ActionResult Admin(string apiKey, string userId) { ChallengesAdminViewModel vm = new ChallengesAdminViewModel(); vm.ApiKey = apiKey; vm.UserId = userId; vm.DropDownSelectList = new List<SelectListItem>(); vm.DropDownSelectList.Add(listItem1); vm.DropDownSelectList.Add(listItem2); vm.DropDownSelectList.Add(listItem3); vm.DropDownSelectList.Add(listItem4); vm.DropDownSelectList.Add(listItem5); vm.DropDownSelectList.Add(listItem6); vm.DropDownSelectList.Add(listItem7); } [HttpPost] public ActionResult Admin(ChallengesAdminViewModel vm) { if (ModelState.IsValid)//Due to the null dropdownlist gives model state invalid { } } ViewModel- public class ChallengesAdminViewModel { [Required] public string ApiKey { get; set; } [Required] public string UserId { get; set; } public List<SelectListItem> DropDownSelectList { get; set; } } I dont know why it still requires the list although not required. I want to have only two attributes as required. So I wanted to know how do i declare or change that list to be not required and have my Model State Valid.

    Read the article

  • jQuery - field entry - how to duplicate and convert to seo friendly url

    - by Binyamin
    I have two HTML input fields 'article' and 'url'. How to duplicate field 'article' entry to field 'url' to SEO friendly link!? 'url' allowed symbols 'a-z' (capital letters converted to lowercase), 'url' space symbol replace with dash '-', 'url' other symbols ignored. required typing just in field 'article' <input type="text" name="article"> url field is jquery auto generated and updated by field article value <input type="text" name="url">

    Read the article

  • Is it possible to have an enum field in a class persisted with OrmLite?

    - by htf
    Hello. I'm trying to persist the following class with OrmLite: public class Field { @DatabaseField(id = true) public String name; @DatabaseField(canBeNull = false) public FieldType type; public Field() { } } The FieldType is a public enum. The field, corresponding to the type is string in SQLite (is doesn't support enums). When I try to use it, I get the following exception: INFO [main] (SingleConnectionDataSource.java:244) - Established shared JDBC Connection: org.sqlite.Conn@5224ee Exception in thread "main" org.springframework.beans.factory.BeanInitializationException: Initialization of DAO failed; nested exception is java.lang.IllegalArgumentException: Unknown field class class enums.FieldType for field FieldType:name=type,class=class orm.Field at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:51) at orm.FieldDAO.getInstance(FieldDAO.java:17) at orm.Field.fromString(Field.java:23) at orm.Field.main(Field.java:38) Caused by: java.lang.IllegalArgumentException: Unknown field class class enums.FieldType for field FieldType:name=type,class=class orm.Field at com.j256.ormlite.field.FieldType.<init>(FieldType.java:54) at com.j256.ormlite.field.FieldType.createFieldType(FieldType.java:381) at com.j256.ormlite.table.DatabaseTableConfig.fromClass(DatabaseTableConfig.java:82) at com.j256.ormlite.dao.BaseJdbcDao.initDao(BaseJdbcDao.java:116) at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:48) ... 3 more So how do I tell OrmLite, values on the Java side are from an enum?

    Read the article

  • MS Access "#Name?" in unbound field on SOME machines

    - by alkorya
    I have a datasheet form bound to table. I added 2 unbound fields and set their Control Source properties to user defined VBA functions: 1. ConcatRelated (http://allenbrowne.com/func-concat.html) 2. Custom function that returns a string: Public Function GetLowestSatatus(LookupField As String, JSAID As Integer) As String On Error Resume Next GetLowestSatatus = DLookup(LookupField, "JsaStatuses", "ID=" & DMin("StatusID", "Tasks", "JSAID =" & JSAID)) End Function It works fine on my and some other machines but there are machines I got "#Name?" in these 2 unbound fields. All machines configured identically. Any ideas? Thank you!

    Read the article

  • What is the best way to do Bit Field manipulation in Python?

    - by ZebZiggle
    I'm reading some MPEG Transport Stream protocol over UDP and it has some funky bitfields in it (length 13 for example). I'm using the "struct" library to do the broad unpacking, but is there a simple way to say "Grab the next 13 bits" rather than have to hand-tweak the bit manipulation? I'd like something like the way C does bit fields (without having to revert to C). Suggestions?

    Read the article

  • Adding Descriptive Flex Field (DFF) through OAF Personalization

    - by Manoj Madhusoodanan
    In this blog I will explain how to add a DFF to a existing OAF page through personalization.I am using Supplier Quick Update Page ( /oracle/apps/pos/supplier/webui/SuppSummPG ). If you want to see how to create DFF please click here. In this scenario I am using a custom DFF. Following are the details. Application -> Payables ( Code: SQLAP )Name -> XXCUST_SUPPLIER_DFFTitle -> XXCUST - Supplier DFFTable Name -> AP_SUPPLIERSDFV View name -> XXCUST_SUPPLIER_DFVReference Fields -> ATTRIBUTE_CATEGORY Following are the Context Field Details. Prompt -> Supplier TypeValue Set -> XXCUST_SUP_TYPE ( Values : External and Internal )Reference Field -> ATTRIBUTE_CATEGORY Below table shows the segment details of XXCUST_SUPPLIER_DFF. Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Calibri","sans-serif"; mso-bidi-font-family:"Times New Roman";} Code Segments Column Value Set Global Data Elements Identification Number ATTRIBUTE1 15 Characters External Type ATTRIBUTE2 XXCUST_EXT_SUP_TYPE Values          Domestic           International Internal Department ATTRIBUTE2 15 Characters Following steps you need to perform to create flex item in the Quick Update page. 1) Click on Personalize Page.In the Personalize Page click on Complete View. 2) Click on Create Item.( Based on where you want to place the DFF choose appropriate layout). 3) Create flex item with following details. 4) If you want to arrange the item in the page click on Reorder. Following is the output.

    Read the article

  • SharePoint 2010 Field Expression Builder

    - by Ricardo Peres
    OK, back to two of my favorite topics, expression builders and SharePoint. This time I wanted to be able to retrieve a field value from the current page declaratively on the markup so that I can assign it to some control’s property, without the need for writing code. Of course, the most straight way to do it is through an expression builder. Here’s the code: 1: [ExpressionPrefix("SPField")] 2: public class SPFieldExpressionBuilder : ExpressionBuilder 3: { 4: #region Public static methods 5: public static Object GetFieldValue(String fieldName, PropertyInfo propertyInfo) 6: { 7: Object fieldValue = SPContext.Current.ListItem[fieldName]; 8:  9: if (fieldValue != null) 10: { 11: if ((fieldValue is IConvertible) && (typeof(IConvertible).IsAssignableFrom(propertyInfo.PropertyType) == true)) 12: { 13: if (propertyInfo.PropertyType.IsAssignableFrom(fieldValue.GetType()) != true) 14: { 15: fieldValue = Convert.ChangeType(fieldValue, propertyInfo.PropertyType); 16: } 17: } 18: } 19:  20: return (fieldValue); 21: } 22:  23: #endregion 24:  25: #region Public override methods 26: public override Object EvaluateExpression(Object target, BoundPropertyEntry entry, Object parsedData, ExpressionBuilderContext context) 27: { 28: return (GetFieldValue(entry.Expression, entry.PropertyInfo)); 29: } 30:  31: public override CodeExpression GetCodeExpression(BoundPropertyEntry entry, Object parsedData, ExpressionBuilderContext context) 32: { 33: if (String.IsNullOrEmpty(entry.Expression) == true) 34: { 35: return (new CodePrimitiveExpression(String.Empty)); 36: } 37: else 38: { 39: return (new CodeMethodInvokeExpression(new CodeMethodReferenceExpression(new CodeTypeReferenceExpression(this.GetType()), "GetFieldValue"), new CodePrimitiveExpression(entry.Expression), new CodePropertyReferenceExpression(new CodeArgumentReferenceExpression("entry"), "PropertyInfo"))); 40: } 41: } 42:  43: #endregion 44:  45: #region Public override properties 46: public override Boolean SupportsEvaluate 47: { 48: get 49: { 50: return (true); 51: } 52: } 53: #endregion 54: } You will notice that it will even try to convert the field value to the target property’s type, through the use of the IConvertible interface and the Convert.ChangeType method. It must be placed on the Global Assembly Cache or you will get a security-related exception. The other alternative is to change the trust level of your web application to full trust. Here’s how to register it on Web.config: 1: <expressionBuilders> 2: <!-- ... --> 3: <add expressionPrefix="SPField" type="MyNamespace.SPFieldExpressionBuilder, MyAssembly, Culture=neutral, Version=1.0.0.0, PublicKeyToken=29186a6b9e7b779f" /> 4: </expressionBuilders> And finally, here’s how to use it on an ASPX or ASCX file inside a publishing page: 1: <asp:Label runat="server" Text="<%$ SPField:Title %>"/>

    Read the article

  • FAQ: GridView Calculation with JavaScript - Editable Price Field

    - by Vincent Maverick Durano
    Recently I wrote a series of blog posts that demonstrates how to do calculation in GridView using JavaScripts. You can check the series of posts below: FAQ: GridView Calculation with JavaScript FAQ: GridView Calculation with JavaScript - Formatting and Validation FAQ: GridView Calculation with JavaScript - Displaying Quantity Total Recently a user in the forums is asking how to calculate the total quantity, sub-totals and total amout in GridView  when a user enters the price and quantity in the TextBox field. Obviously the series of post  that I wrote will not work in this case because the price field in those examples are Label (read-only) and not TextBox fields. In this post I'm going to demonstrate how to accomplish this using the same method used in my previous examples. Basically I'm just going to modify the GridView declaration and replace the Label price field with a TextBox so that users can type on it. And finally modify the CalculateTotals() javascript function. Here are the code blocks below: <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> <script type="text/javascript"> function CalculateTotals() { var gv = document.getElementById("<%= GridView1.ClientID %>"); var tb = gv.getElementsByTagName("input"); var lb = gv.getElementsByTagName("span"); var sub = 0; var total = 0; var indexQ = 1; var indexP = 0; var price = 0; var qty = 0; var totalQty = 0; var tbCount = tb.length / 2; for (var i = 0; i < tbCount; i++) { if (tb[i].type == "text") { ValidateNumber(tb[i + indexQ]); sub = parseFloat(tb[i + indexP].value) * parseFloat(tb[i + indexQ].value); if (isNaN(sub)) { lb[i].innerHTML = "0.00"; sub = 0; } else { lb[i].innerHTML = FormatToMoney(sub, "$", ",", "."); ; } if (isNaN(tb[i + indexQ].value) || tb[i + indexQ].value == "") { qty = 0; } else { qty = tb[i + indexQ].value; } totalQty += parseInt(qty); total += parseFloat(sub); indexQ++; indexP++; } } lb[lb.length - 2].innerHTML = totalQty; lb[lb.length -1].innerHTML = FormatToMoney(total, "$", ",", "."); } function ValidateNumber(o) { if (o.value.length > 0) { o.value = o.value.replace(/[^\d]+/g, ''); //Allow only whole numbers } } function isThousands(position) { if (Math.floor(position / 3) * 3 == position) return true; return false; }; function FormatToMoney(theNumber, theCurrency, theThousands, theDecimal) { var theDecimalDigits = Math.round((theNumber * 100) - (Math.floor(theNumber) * 100)); theDecimalDigits = "" + (theDecimalDigits + "0").substring(0, 2); theNumber = "" + Math.floor(theNumber); var theOutput = theCurrency; for (x = 0; x < theNumber.length; x++) { theOutput += theNumber.substring(x, x + 1); if (isThousands(theNumber.length - x - 1) && (theNumber.length - x - 1 != 0)) { theOutput += theThousands; }; }; theOutput += theDecimal + theDecimalDigits; return theOutput; } </script> </head> <body> <form id="form1" runat="server"> <asp:gridview ID="GridView1" runat="server" ShowFooter="true" AutoGenerateColumns="false"> <Columns> <asp:BoundField DataField="RowNumber" HeaderText="Row Number" /> <asp:BoundField DataField="Description" HeaderText="Item Description" /> <asp:TemplateField HeaderText="Item Price"> <ItemTemplate> <asp:TextBox ID="TXTPrice" runat="server" onkeyup="CalculateTotals();"></asp:TextBox> </ItemTemplate> <FooterTemplate> <b>Total Qty:</b> </FooterTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Quantity"> <ItemTemplate> <asp:TextBox ID="TXTQty" runat="server" onkeyup="CalculateTotals();"></asp:TextBox> </ItemTemplate> <FooterTemplate> <asp:Label ID="LBLQtyTotal" runat="server" Font-Bold="true" ForeColor="Blue" Text="0" ></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>Total Amount:</b> </FooterTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Sub-Total"> <ItemTemplate> <asp:Label ID="LBLSubTotal" runat="server" ForeColor="Green" Text="0.00"></asp:Label> </ItemTemplate> <FooterTemplate> <asp:Label ID="LBLTotal" runat="server" ForeColor="Green" Font-Bold="true" Text="0.00"></asp:Label> </FooterTemplate> </asp:TemplateField> </Columns> </asp:gridview> </form> </body> </html>   That's it! I hope someone find this post useful! Technorati Tags: ASP.NET,GridView,JavaScript

    Read the article

  • ODEE Green Field (Windows) Part 4 - Documaker

    - by AndyL-Oracle
    Welcome back! We're about nearing completion of our installation of Oracle Documaker Enterprise Edition ("ODEE") in a green field. In my previous post, I covered the installation of SOA Suite for WebLogic. Before that, I covered the installation of WebLogic, and Oracle 11g database - all of which constitute the prerequisites for installing ODEE. Naturally, if your environment already has a WebLogic server and Oracle database, then you can skip all those components and go straight for the heart of the installation of ODEE. The ODEE installation is comprised of two procedures, the first covers the installation, which is running the installer and answering some questions. This will lay down the files necessary to install into the tiers (e.g. database schemas, WebLogic domains, etcetera). The second procedure is to deploy the configuration files into the various components (e.g. deploy the database schemas, WebLogic domains, SOA composites, etcetera). I will segment my posts accordingly! Let's get started, shall we? Unpack the installation files into a temporary directory location. This should extract a zip file. Extract that zip file into the temporary directory location. Navigate to and execute the installer in Disk1/setup.exe. You may have to allow the program to run if User Account Control is enabled. Once the dialog below is displayed, click Next. Select your ODEE Home - inside this directory is where all the files will be deployed. For ease of support, I recommend using the default, however you can put this wherever you want. Click Next. Select the database type, database connection type – note that the database name should match the value used for the connection type (e.g. if using SID, then the name should be IDMAKER; if using ServiceName, the name should be “idmaker.us.oracle.com”). Verify whether or not you want to enable advanced compression. Note: if you are not licensed for Oracle 11g Advanced Compression option do not use this option! Terrible, terrible calamities will befall you if you do! Click Next. Enter the Documaker Admin user name (default "dmkr_admin" is recommended for support purposes) and set the password. Update the System name and ID (must be unique) if you want/need to - since this is a green field install you should be able to use the default System ID. The only time you'd change this is if you were, for some reason, installing a new ODEE system into an existing schema that already had a system. Click Next. Enter the Assembly Line user name (default "dmkr_asline" is recommended) and set the password. Update the Assembly Line name and ID (must be unique) if you want/need to - it's quite possible that at some point you will create another assembly line, in which case you have several methods of doing so. One is to re-run the installer, and in this case you would pick a different assembly line ID and name. Click Next. Note: you can set the DB folder if needed (typically you don’t – see ODEE Installation Guide for specifics. Select the appropriate Application Server type - in this case, our green field install is going to use WebLogic - set the username to weblogic (this is required) and specify your chosen password. This credential will be used to access the application server console/control panel. Keep in mind that there are specific criteria on password choices that are required by WebLogic, but are not enforced by the installer (e.g. must contain a number, must be of a certain length, etcetera). Choose a strong password. Set the connection information for the JMS server. Note that for the 12.3.x version, the installer creates a separate JVM (WebLogic managed server) that hosts the JMS server, whereas prior editions place the JMS server on the AdminServer.  You may also specify a separate URL to the JMS server in case you intend to move the JMS resources to a separate/different server (e.g. back to AdminServer). You'll need to provide a login principal and credentials - for simplicity I usually make this the same as the WebLogic domain user, however this is not a secure practice! Make your JMS principal different from the WebLogic principal and choose a strong password, then click Next. Specify the Hot Folder(s) (comma-delimited if more than one) - this is the directory/directories that is/are monitored by ODEE for jobs to process. Click Next. If you will be setting up an SMTP server for ODEE to send emails, you may configure the connection details here. The details required are simple: hostname, port, user/password, and the sender's address (e.g. emails will appear to be sent by the address shown here so if the recipient clicks "reply", this is where it will go). Click Next. If you will be using Oracle WebCenter:Content (formerly known as Oracle UCM) you can enable this option and set the endpoints/credentials here. If you aren't sure, select False - you can always go back and enable this later. I'm almost 76% certain there will be a post sometime in the future that details how to configure ODEE + WCC:C! Click Next. If you will be using Oracle UMS for sending MMS/text messages, you can enable and set the endpoints/credentials here. As with UCM, if you're not sure, don't enable it - you can always set it later. Click Next. On this screen you can change the endpoints for the Documaker Web Service (DWS), and the endpoints for approval processing in Documaker Interactive. The deployment process for ODEE will create 3 managed WebLogic servers for hosting various Documaker components (JMS, Interactive, DWS, Dashboard, Documaker Administrator, etcetera) and it will set the ports used for each of these services. In this screen you can change these values if you know how you want to deploy these managed servers - but for now we'll just accept the defaults. Click Next. Verify the installation details and click Install. You can save the installation into a response file if you need to (which might be useful if you want to rerun this installation in an unattended fashion). Allow the installation to progress... Click Next. You can save the response file if needed (e.g. in case you forgot to save it earlier!) Click Finish. That's it, you're done with the initial installation. Have a look around the ODEE_HOME that you just installed (remember we selected c:\oracle\odee_1?) and look at the files that are laid down. Don't change anything just yet! Stay tuned for the next segment where we complete and verify the installation. 

    Read the article

  • Using Domain name in EULA of a software rather than my name in the Licensor field

    - by user17330
    I intend to sell a software solution.I have already registered a domain but i dont have a registered company.Can i use my website/domain name eg:myproduct.com for the licensor field in the EULA rather than using myname.I will renew my domain yearly is there a problem with this.Do you know any software companies that work like this.Im confused about the users point of view will they find it a bit different. Please help me out.

    Read the article

  • How can I generate signed distance fields (2D) in real time, fast?

    - by heishe
    In a previous question, it was suggested that signed distance fields can be precomputed, loaded at runtime and then used from there. For reasons I will explain at the end of this question (for people interested), I need to create the distance fields in real time. There are some papers out there for different methods which are supposed to be viable in real-time environments, such as methods for Chamfer distance transforms and Voronoi diagram-approximation based transforms (as suggested in this presentation by the Pixeljunk Shooter dev guy), but I (and thus can be assumed a lot of other people) have a very hard time actually putting them to use, since they're usually long, largely bloated with math and not very algorithmic in their explanation. What algorithm would you suggest for creating the distance fields in real-time (favourably on the GPU) especially considering the resulting quality of the distance fields? Since I'm looking for an actual explanation/tutorial as opposed to a link to just another paper or slide, this question will receive a bounty once it's eligible for one :-). Here's why I need to do it in real time: There's something else:

    Read the article

  • Structured data: Field missing: price [on hold]

    - by Handi Occasion
    I just set up my site to make it better thanks to the micro-referenced data. After finishing the creation of meta-data, I checked via webmaster tool the result of my work and my a priori data are taken into account (see here). Today I had a look through the webmaster tools - Structured Data and then surprise! I have a groin ad 50 with the error field missing: price while the price is this! any idea? thank you

    Read the article

  • How can I generate signed distance fields in real time, fast?

    - by heishe
    In a previous question, it was suggested that signed distance fields can be precomputed, loaded at runtime and then used from there. For reasons I will explain at the end of this question (for people interested), I need to create the distance fields in real time. There are some papers out there for different methods which are supposed to be viable in real-time environments, such as methods for Chamfer distance transforms and Voronoi diagram-approximation based transforms (as suggested in this presentation by the Pixeljunk Shooter dev guy), but I (and thus can be assumed a lot of other people) have a very hard time actually putting them to use, since they're usually long, largely bloated with math and not very algorithmic in their explanation. What algorithm would you suggest for creating the distance fields in real-time (favourably on the GPU) especially considering the resulting quality of the distance fields? Since I'm looking for an actual explanation/tutorial as opposed to a link to just another paper or slide, this question will receive a bounty once it's eligible for one :-). Here's why I need to do it in real time:

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >