Search Results

Search found 1628 results on 66 pages for 'motivated student'.

Page 13/66 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • choosing the right RAID level

    - by student
    Recently, we bought a "HP-DL380 G6 Server" with 6 146GB (SCSI)HDD for our colleague course management application and website with 10000 daily visitors. we want to choose the best RAID level. how can we choose the right RAID level ? what is the best RAID level for our application ?

    Read the article

  • How to shrink the Remote Desktop Connection Bar in Windows?

    - by Some Noob Student
    Ever since FireFox 4, page tabs have been moved to the top of the window. This gets pretty irritating when surfing the net through a remote desktop session. Often when I want to switch tabs, if I accidentally move my mouse a little to much to the top, I get the remote desktop connection bar blocking the tabs instead, then I'd have to wait a few frustrating seconds before it disappears again. So, are there any methods to shrink or shorten the remote desktop connection bar or delay the appearance of it?

    Read the article

  • saving and searching encrypted mail

    - by student
    I often send and receive gpg-encrypted mail. At the moment I use thunderbird + enigmail (in linux) to do that. As far as I know there is no way in thunderbird to find all encrypted messages which bodies contain particular keywords. There also seems to be no option to save encrypted mails decrypted (so they would be searchable). However for me it is important to be able to search old encrypted mails. So my question is: Is there a way in linux to save incoming mails automatically decrypted in my inbox and save outgoing encrypted mail decrypted in the send folder? Both times adding a line to the body which remarks that the mail was encrypted. It could be another email client for linux that could to that or perhaps a solution using procmail or maildrop. For a procmail solution I guess there could be some problems with encoding (perhaps one have to use emil?) the solution should work well with german special characters in subject and body. Note that the solution should work for multipart encrypted messages (including encrypted attachments) too i.e. with everything which could thunderbird + enigmail generate. Further note that I don't want a discussion about security holes. For me it's ok if messages are stored decrypted on my harddrive (which is encrypted as a whole anyway). In doubt for a first solution it would be ok to store my private key passphrase in cleartext on my harddrive, too. The point is that the mails are encrypted on the mailserver or more generally on their "way through the net".

    Read the article

  • Connect a ssd externally such that hdparm is fully supported

    - by student
    I am just trying some hdparm magic with my new ssd (samsung 840 pro). However I don't want to change my drive over and over so it would be great if I could connect it externally to my laptop. I have a cheap sata-usb Adapter, but I feel it doesn't support the ATA commands send by hdparm. So what's the best way to do this? Are there sata-usb Adapters which fully support the hdparm things? Would it be a good idea to buy a sata-esata adapter to get full control over the drive?

    Read the article

  • Why does my Mac address reset after reconnecting?

    - by Mr.Student
    I have ubuntu 12. I'm changing my mac address with ifconfig wlan0 hw ether xx:xx:xx:xx:xx:xx which works. However when I restart my connection my computer resets my mac to my original mac address. I'm guessing that this happens because something calls... ifconfig wlan0 down ... do something before connecting ifconfig wlan0 up ... connect to designated access point I want my mac address to however be the same no matter how many times I disconnect and reconnect, whether to another network or the same one. Also it would be nice to turn off the auto-connect feature for my network-manager with out having to edit each individual connection. Lastly I would like to know how to connect to a wifi network through the terminal and not via gui network manager ubuntu provides.

    Read the article

  • What does "Don't use the index when searching in file folders for system files" do?

    - by A Student at a University
    I've checked "Don't use the index when searching in file folders for system files", but I don't see a way to tell Windows 7 that I'm looking for a system file. What does this option actually do, and how do I use it to search every file name on the drive for a specified character string? I intend to search file names in an indexed folder that contains non-indexed subfolders and "system" file types, and this option seems to have no effect on the skipping of those subfolders and file types.

    Read the article

  • linux vs windows and web server question

    - by student
    What are the differences from security point of view running a web server on linux and running a web server on windows. I heard that almost nobody going to attack linux machine. Is that true? or Linux is hard to attack and nobody want to waste his time?

    Read the article

  • Lightweight ad-blocker for firefox

    - by student
    On a old machine (512 MB RAM) I am currently running ubuntu jaunty and firefox 3.0.15. I tried the ad blocker addon add block plus but it eats lots of RAM (300 MB). Is high memory load of this add-on a bug, which is fixed in a newer version or just normal? If so, why is the memory usage so high? Is there another ad blocker add-on for firefox or another browser- add-on combination for linux (ubuntu jaunty) which uses significant less RAM?

    Read the article

  • "The usage of semaphores is subtly wrong"

    - by Hoonose
    This past semester I was taking an OS practicum in C, in which the first project involved making a threads package, then writing a multiple producer-consumer program to demonstrate the functionality. However, after getting grading feedback, I lost points for "The usage of semaphores is subtly wrong" and "The program assumes preemption (e.g. uses yield to change control)" (We started with a non-preemptive threads package then added preemption later. Note that the comment and example contradict each other. I believe it doesn't assume either, and would work in both environments). This has been bugging me for a long time - the course staff was kind of overwhelmed, so I couldn't ask them what's wrong with this over the semester. I've spent a long time thinking about this and I can't see the issues. If anyone could take a look and point out the error, or reassure me that there actually isn't a problem, I'd really appreciate it. I believe the syntax should be pretty standard in terms of the thread package functions (minithreads and semaphores), but let me know if anything is confusing. #include <stdio.h> #include <stdlib.h> #include "minithread.h" #include "synch.h" #define BUFFER_SIZE 16 #define MAXCOUNT 100 int buffer[BUFFER_SIZE]; int size, head, tail; int count = 1; int out = 0; int toadd = 0; int toremove = 0; semaphore_t empty; semaphore_t full; semaphore_t count_lock; // Semaphore to keep a lock on the // global variables for maintaining the counts /* Method to handle the working of a student * The ID of a student is the corresponding minithread_id */ int student(int total_burgers) { int n, i; semaphore_P(count_lock); while ((out+toremove) < arg) { n = genintrand(BUFFER_SIZE); n = (n <= total_burgers - (out + toremove)) ? n : total_burgers - (out + toremove); printf("Student %d wants to get %d burgers ...\n", minithread_id(), n); toremove += n; semaphore_V(count_lock); for (i=0; i<n; i++) { semaphore_P(empty); out = buffer[tail]; printf("Student %d is taking burger %d.\n", minithread_id(), out); tail = (tail + 1) % BUFFER_SIZE; size--; toremove--; semaphore_V(full); } semaphore_P(count_lock); } semaphore_V(count_lock); printf("Student %d is done.\n", minithread_id()); return 0; } /* Method to handle the working of a cook * The ID of a cook is the corresponding minithread_id */ int cook(int total_burgers) { int n, i; printf("Creating Cook %d\n",minithread_id()); semaphore_P(count_lock); while ((count+toadd) <= arg) { n = genintrand(BUFFER_SIZE); n = (n <= total_burgers - (count + toadd) + 1) ? n : total_burgers - (count + toadd) + 1; printf("Cook %d wants to put %d burgers into the burger stack ...\n", minithread_id(),n); toadd += n; semaphore_V(count_lock); for (i=0; i<n; i++) { semaphore_P(full); printf("Cook %d is putting burger %d into the burger stack.\n", minithread_id(), count); buffer[head] = count++; head = (head + 1) % BUFFER_SIZE; size++; toadd--; semaphore_V(empty); } semaphore_P(count_lock); } semaphore_V(count_lock); printf("Cook %d is done.\n", minithread_id()); return 0; } /* Method to create our multiple producers and consumers * and start their respective threads by fork */ void starter(int* c){ int i; for (i=0;i<c[2];i++){ minithread_fork(cook, c[0]); } for (i=0;i<c[1];i++){ minithread_fork(student, c[0]); } } /* The arguments are passed as command line parameters * argv[1] is the no of students * argv[2] is the no of cooks */ void main(int argc, char *argv[]) { int pass_args[3]; pass_args[0] = MAXCOUNT; pass_args[1] = atoi(argv[1]); pass_args[2] = atoi(argv[2]); size = head = tail = 0; empty = semaphore_create(); semaphore_initialize(empty, 0); full = semaphore_create(); semaphore_initialize(full, BUFFER_SIZE); count_lock = semaphore_create(); semaphore_initialize(count_lock, 1); minithread_system_initialize(starter, pass_args); }

    Read the article

  • Copy seleted row to another worksheet

    - by ???? ???????
    There are for ex. 10 rows in one worksheet. When user clicks on one row it should be presented on another worksheet. Is it possible? Any help to do it? EDIT: To clarify: In one sheet are presented for example student exam marks on first year: John 10 8 10 7 Nick 8 9 8 9 Maria 7 8 8 7 On 2nd sheet there are student informations on the second year: John 9 9 10 8 Nick 8 8 9 7 Maria 7 6 8 8 I want to have give some kind of final certificate for student so summary information should be presented on the third sheet. I doesn't need to be on click. There could be drop down list on the third sheet.

    Read the article

  • Groups issue on Ubuntu

    - by grobarTN
    Hello, I am member of couple of groups lets say Master, Student, Web. The problem is that by default whatever I do is first created under student group. I need to set it so it is created with Web group. Folder www/ where I need to write file is already mode 770. But because it picks up my student group it does not allow me to write to that folder. Is there any way to change the group that I create files under. If I execute groups it lists all groups so I am member of correct group I just cant write to the folder. Anyone?

    Read the article

  • How to backup/restore OSX Parental Controls before/after complete reimage?

    - by Jim Anderson
    We typically "nuke and pave" users Mac OSX laptops if they have software issue. Prior to doing so, we backup the primary (non-admin) user's home folder. Our standard image has four accounts: Admin (uber admin user); Parent (admin account for the parents of students); Loaner (so our standard image will also work for our loaner laptop pool); Student (this is the primary, non-admin user of the laptop) Our standard image has only minimal Parental controls on the Loaner and Student accounts. Some parents choose to tighten the parental controls. We never know when parents have made changes to parental controls, or what those changes are. Once we have reimaged the machine with our standard image (minimal parental controls) we would like to be able to restore any custom parental controls parents may have placed on their student's account. Any help in this would be appreciated. Thanks.

    Read the article

  • SCP command Clarification

    - by david.colais
    I'm using the scp commands to pull some files from the remote server and one variation of the command is not working. I have 2 files names one.xml and two.xml in a remote server and I'm pulling these two files into the current dir using the following command: scp [email protected]:/student/class/Intermediate/one.xml . scp [email protected]:/student/class/Intermediate/two.xml . The above command works fine but if I use wildcards to pull all the xml files in a single shot as shown below it returns scp: No match. scp [email protected]:/student/class/Intermediate/*.xml . Why is it working if I pull the files individually and not working if I try to pull using wildcards.

    Read the article

  • ADO.NET (WCF) Data Services Query Interceptor Hangs IIS

    - by PreMagination
    I have an ADO.NET Data Service that's supposed to provide read-only access to a somewhat complex database. Logically I have table-per-type (TPT) inheritance in my data model but the EDM doesn't implement inheritance. (Limitation of EF and navigation properties on derived types. STILL not fixed in EF4!) I can query my EDM directly (using a separate project) using a copy of the query I'm trying to run against the web service, results are returned within 10 seconds. Disabling the query interceptors I'm able to make the same query against the web service, results are returned similarly quickly. I can enable some of the query interceptors and the results are returned slowly, up to a minute or so later. Alternatively, I can enable all the query interceptors, expand less of the properties on the main object I'm querying, and results are returned in a similar period of time. (I've increased some of the timeout periods) Up til this point Sql Profiler indicates the slow-down is the database. (That's a post for a different day) But when I enable all my query interceptors and expand all the properties I'd like to have the IIS worker process pegs the CPU for 20 minutes and a query is never even made against the database. This implies to me that yes, my implementation probably sucks but regardless the Data Services "tier" is having an issue it shouldn't. WCF tracing didn't reveal anything interesting to my untrained eye. Details: Data model: Agent-Person-Student Student has a collection of referrals Students and referrals are private, queries against the web service should only return "your" students and referrals. This means Person and Agent need to be filtered too. Other entities (Agent-Organization-School) can be accessed by anyone who has authenticated. The existing security model is poorly suited to perform this type of filtering for this type of data access, the query interceptors are complicated and cause EF to generate some entertaining sql queries. Sample Interceptor [QueryInterceptor("Agents")] public Expression<Func<Agent, Boolean>> OnQueryAgents() { //Agent is a Person(1), Educator(2), Student(3), or Other Person(13); allow if scope permissions exist return ag => (ag.AgentType.AgentTypeId == 1 || ag.AgentType.AgentTypeId == 2 || ag.AgentType.AgentTypeId == 3 || ag.AgentType.AgentTypeId == 13) && ag.Person.OrganizationPersons.Count<OrganizationPerson>(op => op.Organization.ScopePermissions.Any<ScopePermission> (p => p.ApplicationRoleAccount.Account.UserName == HttpContext.Current.User.Identity.Name && p.ApplicationRoleAccount.Application.ApplicationId == 124) || op.Organization.HierarchyDescendents.Any<OrganizationsHierarchy>(oh => oh.AncestorOrganization.ScopePermissions.Any<ScopePermission> (p => p.ApplicationRoleAccount.Account.UserName == HttpContext.Current.User.Identity.Name && p.ApplicationRoleAccount.Application.ApplicationId == 124))) > 0; } The query interceptors for Person, Student, Referral are all very similar, ie they traverse multiple same/similar tables to look for ScopePermissions as above. Sample Query var referrals = (from r in service.Referrals .Expand("Organization/ParentOrganization") .Expand("Educator/Person/Agent") .Expand("Student/Person/Agent") .Expand("Student") .Expand("Grade") .Expand("ProblemBehavior") .Expand("Location") .Expand("Motivation") .Expand("AdminDecision") .Expand("OthersInvolved") where r.DateCreated >= coupledays && r.DateDeleted == null select r); Any suggestions or tips would be greatly associated, for fixing my current implementation or in developing a new one, with the caveat that the database can't be changed and that ultimately I need to expose a large portion of the database via a web service that limits data access to the data authorized for, for the purpose of data integration with multiple outside parties. THANK YOU!!!

    Read the article

  • Dropdown dependent values to be fetch from multiple models using ajax in Yii

    - by newuser
    I searched all the documentation over Yii but not got the answer of it.So I came here finally. I have the following schema Table Schools +------------------+--------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+--------------+------+-----+---------------------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | school_name | varchar(100) | NO | | | | +------------------+--------------+------+-----+---------------------+----------------+ Table Students +------------------+--------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+--------------+------+-----+---------------------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | school_id | int(10) | NO | FK | | | | student_name | varchar(100) | NO | | | | | roll_no | varchar(80) | NO | | | | | class | varchar(20) | NO | | | | | | subjects | varchar(100) | NO | | | | +------------------+--------------+------+-----+---------------------+----------------+ I have made models and CRUD for the both models.In models my relation is like this In Students.php the relation is like public function relations() { // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( 'School' => array(self::BELONGS_TO,'Schools','school_id'), ); } In Schools.php the relation is like public function relations() { // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( 'student' => array(self::HAS_MANY, 'Students', 'school_id'), ); } Now I made the two models rendered in a single page so that I can enter all the respective fields in a single form. In the _form.php file of Students I have made some change in student_name like this <div class="row"> <?php echo $form->labelEx($model,'student_name'); ?> <?php echo $form->dropdownList($model,'student_name', CHtml::listData(Students::model()->findAll(), 'id', 'student_name'), array('empty'=>array('Select'=>'--Select One---'))); ?> <?php echo $form->error($model,'student_name'); ?> Now for this piece of code I got all the student name from the Student model. So my problem is when I am getting the student name from the dropdown list and going to select a student it will also fetch all the respective values of the student to be rendered in the _form.php without click on save button.So that user don't have to put it again manually. I think ajax and json encode will work here but don't know how to make them work here. [Update] Here is StudentsController code public function actionDisCoor() { $model = School::model()->findByPk($_POST['Students']['student_id']); $data=CHtml::listData($data,'id','name'); foreach($data as $value=>$name) { echo CHtml::tag('option',array('value'=>$value),CHtml::encode($name),true); } } Here is _form.php code for Students <div class="row"> <?php echo $form->labelEx($model,'student_name'); ?> <?php $List = CHtml::listData(Students::model()->findAll(), 'id', 'student_name'); ?> <?php echo $form->dropdownList($model,'student_name',$List, array('onChange'=>CHtml::ajax(array( 'url' => CController::createUrl('DisCoor'), 'type' => 'POST', 'update'=>'#school_id', )),'style'=>'width:180px;' ) )?> <?php echo $form->error($model,'student_name'); ?> </div> After all that when I saw in firebug I got the error.Here is the screen shot

    Read the article

  • Future direction for a developer who is expert in latest software technologies…

    - by Muaz Khan
    Hi everyone, If a (new-coming) developer that learns latest technologies as well as can develop amazing stuff with those technologies and did Bachelors in Arts (BA). So what ’ll be the future of this kind of developer? I meant did he can get good job without degree? I think (but it is the universal truth that) no one (org or company) permit these kind of developers to join them because degree is must for job!! I’m worried about why the world depends upon degree? Why degree is necessary for good job? If a developer has a good experience, why he cannot be able to get good job without degree? What is the future of developer that starts his life as a freelancer and learns everything himself with the help of online available resources? Why companies prerequisite the degree for a good job? A developer without degree can be expert than that who have a degree of MSC etc. Because in 3rd world countries especially Pakistan, a BSC level student taught VB6 and the MSC level student learns C/C++. The common student doesn’t know about latest innovative technologies and he think that the world is depending upon VB6 or C/C++. What is the comparison of that students with a developer that do Bachelors in Arts but know (and can do well with) latest technologies.

    Read the article

  • What should I recommend a small company looking for C# developers

    - by Coder
    Here is the issue. I am a senior developer, and one of the start-ups I designed the system (management system/database/web) a long time ago, have grown and need software updates. I have left their system to another developer long time ago, but apparently he has left the job, and so they are asking me if I can suggest them where to find a new one. The problem is that the company has no clue that the IT is not cheap. They expect multiple features to be added for 40$, so that's an issue. Actually one of the reasons why I left the project when I did. Lots of expectations, little pay, also I know those people outside work, so I decided to avoided stressing the nonwork-relationships and left the project gracefully. Today they asked me for an advice, and I told them that the feature list they want is probably going to cost some if they'll get a senior developer for the job. So I guess their best bet is to find someone who loves coding and has just finished the school. Which would give someone a chance to code for money which is good for a student, and at the same time, allow the student to get some hands on experience. Then again, the system is not exactly 20 line console program, there is an MSSQL database, ASP.NET web page and content management system with all the AJAX stuff and some other things. So student straight out of school could have some problems with that. But, I thought about the issue some more, and I think that junior developer is a tricky deal, without mentoring, he can either screw up royally, or just do what's asked. Also, it seems no one is coming to interviews at all, which is weird, or maybe not. What should I suggest them?

    Read the article

  • How should I structure a site with content dependent on visitor type (not user)?

    - by Pedr
    I have a website that displays different content depending on two selections made by a visitor: Whether they are a teacher or student, and their learning level (from 4 options). Everything is public and they don't need to authenticate to access the content. Depending on their selection, different content is displayed across the whole site, other than a contact and about page. The tone of the language changes depending on whether the visitor is a student or teacher and the materials available on each page also change depending on the learning level, however in all cases, the structure of the site is identical. Currently I'm using a cookie to store the visitor's selections and render different content appropriately, so I have a single set of URLs which display different content depending on the cookie, with one of the permutations as default. I appreciate this is far from ideal, but what is the better option? Would I be better using a distinguishing segment for each selection, for example: http://example.com/teacher/lv3/resources/activities http://example.com/teacher/lv4/resources/activities http://example.com/student/lv4/resources/activities etc. What is the most sensible way to handle this situation?

    Read the article

  • Storing simulation results in a persistent manner for Python?

    - by Az
    Background: I'm running multiple simuations on a set of data. For each session, I'm allocating projects to students. The difference between each session is that I'm randomising the order of the students such that all the students get a shot at being assigned a project they want. I was writing out some of the allocations in a spreadsheet (i.e. Excel) and it basically looked like this (tiny snapshot, actual table extends to a few thousand sessions, roughly 100 students). | | Session 1 | Session 2 | Session 3 | |----------|-----------|-----------|-----------| |Stu1 |Proj_AA |Proj_AB |Proj_AB | |----------|-----------|-----------|-----------| |Stu2 |Proj_AB |Proj_AA |Proj_AC | |----------|-----------|-----------|-----------| |Stu3 |Proj_AC |Proj_AC |Proj_AA | |----------|-----------|-----------|-----------| Now, the code that deals with the allocation currently stores a session in an object. The next time the allocation is run, the object is over-written. Thus what I'd really like to do is to store all the allocation results. This is important since I later need to derive from the data, information such as: which project Stu1 got assigned to the most or perhaps how popular Proj_AC was (how many times it was assigned / number of sessions). Question(s): What methods can I possibly use to basically store such session information persistently? Basically, each session output needs to add itself to the repository after ending and before beginning the next allocation cycle. One solution that was suggested by a friend was mapping these results to a relational database using SQLAlchemy. I kind of like the idea since this does give me an opportunity to delve into databases. Now the database structure I was recommended was: |----------|-----------|-----------| |Session |Student |Project | |----------|-----------|-----------| |1 |Stu1 |Proj_AA | |----------|-----------|-----------| |1 |Stu2 |Proj_AB | |----------|-----------|-----------| |1 |Stu3 |Proj_AC | |----------|-----------|-----------| |2 |Stu1 |Proj_AB | |----------|-----------|-----------| |2 |Stu2 |Proj_AA | |----------|-----------|-----------| |2 |Stu3 |Proj_AC | |----------|-----------|-----------| |3 |Stu1 |Proj_AB | |----------|-----------|-----------| |3 |Stu2 |Proj_AC | |----------|-----------|-----------| |3 |Stu3 |Proj_AA | |----------|-----------|-----------| Here, it was suggested that I make the Session and Student columns a composite key. That way I can access a specific record for a particular student for a particular session. Or I can merely get the entire allocation run for a particular session. Questions: Is the idea a good one? How does one implement and query a composite key using SQLAlchemy? What happens to the database if a particular student is not assigned a project (happens if all projects that he wants are taken)? In the code, if a student is not assigned a project, instead of a proj_id he simply gets None for that field/object. I apologise for asking multiple questions but since these are closely-related, I thought I'd ask them in the same space.

    Read the article

  • one to many jpa relationship

    - by user309944
    Hai I have created two table first table as student package com.crimson.rship; import javax.persistence.Basic; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.OneToMany; @Entity(name="student") public class student { @Id private String stumailid; @Basic private String fathername; @Basic private String mothername; @Basic private String doa; @Basic private String dob; public student(String stumailid,String fathername,String mothername,String doa,String dob) { // TODO Auto-generated constructor stub this.stumailid=stumailid; this.fathername=fathername; this.mothername=mothername; this.doa=doa; this.dob=dob; } public void setStumailid(String stumailid) { this.stumailid = stumailid; } public String getStumailid() { return stumailid; } public void setFathername(String fathername) { this.fathername = fathername; } public String getFathername() { return fathername; } public void setMothername(String mothername) { this.mothername = mothername; } public String getMothername() { return mothername; } public void setDoa(String doa) { this.doa = doa; } public String getDoa() { return doa; } public void setDob(String dob) { this.dob = dob; } public String getDob() { return dob; } } Second table as mark package com.crimson.rship; import java.util.Collection; import javax.persistence.Basic; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.OneToMany; @Entity(name="mark") public class mark { @Id private String stumailid; @Basic private String fathername; @Basic private String mothername; @OneToMany(mappedBy="mark",targetEntity=student.class,fetch=FetchType.EAGER) private Collection orders; public mark(String stumailid,String fathername,String mothername) { // TODO Auto-generated constructor stub this.stumailid=stumailid; this.fathername=fathername; this.mothername=mothername; } public void setStumailid(String stumailid) { this.stumailid = stumailid; } public String getStumailid() { return stumailid; } public void setFathername(String fathername) { this.fathername = fathername; } public String getFathername() { return fathername; } public void setMothername(String mothername) { this.mothername = mothername; } public String getMothername() { return mothername; } public void setOrders(Collection orders) { this.orders = orders; } public Collection getOrders() { return orders; } } But this above coding working is not working correctly.can any one help me Thanks in advance

    Read the article

  • Changing backgroundcolor in listview (expandable listview)

    - by Stofke
    I'm trying to dynamically change a backgroundcolor in a part of a listview, I have on example that works fine in a listview when I try to replicate it in another part with an expandable listview it fails This piece of code works and displays a different color if a student is online or not ... map.put(KEY_FIRSTNAME, temp.firstName); map.put(KEY_NAME, temp.name); map.put(KEY_EMAIL, temp.email); map.put(KEY_ISONLINE, temp.isOnLine); // change image if student is online or not Log.d("demo", "is on line= " + temp.isOnLine); if (temp.isOnLine.equalsIgnoreCase("1")) { map.put(KEY_IMAGE_ISONLINE, R.color.greenColor); } else { map.put(KEY_IMAGE_ISONLINE, R.color.greyColor); } listItem.add(map); } myListView = (ListView) findViewById(R.id.listViewTabLeerlingen); SimpleAdapter adapter = new SimpleAdapter(StudentTab.this, listItem, R.layout.list_item_student, new String[] { KEY_FIRSTNAME, KEY_NAME, KEY_IMAGE_ISONLINE }, new int[] { R.id.firstNameTextView, R.id.lastNameTextView, R.id.logo }); myListView.setAdapter(adapter); the xml that goes along with it <ImageView android:id="@+id/logo" android:layout_width="85dp" android:layout_height="match_parent" android:background="@color/greenColor" android:contentDescription="Image if student is online or not" android:src="@drawable/transparent_pixel" /> The above works fine however the following code (just part of the code) ... ArrayList<Map<String, Object>> children = new ArrayList<Map<String, Object>>(); for (int i = 0; i < _data.length(); i++) { try { JSONArray tmp = _data.getJSONArray(i); HashMap<String, Object> map = new HashMap<String, Object>(); // change image if student is online or not if (tmp.getString(3).equalsIgnoreCase("0")) { map.put(KEY_POINTS,R.color.redColor); }else{ map.put(KEY_POINTS,R.color.greenColor); } map.put(KEY_QUESTIONTEXT, tmp.getString(1)); map.put(KEY_ANSWER, tmp.getString(2)); children.add(map); } catch (JSONException e) { e.printStackTrace(); } childData.add(children); ... ... ArrayList<ArrayList<Map<String, Object>>> childData) { SimpleExpandableListAdapter listAdapter = new SimpleExpandableListAdapter( this, groupData, R.layout.list_item_results_students, new String[] { KEY_FIRSTNAME, KEY_NAME, KEY_ISJUIST }, new int[] { R.id.firstnameResults, R.id.nameResults, R.id.resultsTextView }, childData, R.layout.list_item_results_results, new String[] { KEY_QUESTIONTEXT, KEY_ANSWER, KEY_POINTS }, new int[] { R.id.questionTextView, R.id.answerTextTextView, R.id.score }); ExpandableListView myListView = (ExpandableListView) findViewById(R.id.listViewTabResultaten); myListView.setAdapter(listAdapter); with xml: <ImageView android:id="@+id/score" android:layout_width="16dp" android:layout_height="match_parent" android:background="@color/greenColor" android:contentDescription="Image if student has correct answer" android:src="@drawable/transparent_pixel" /> I will get this error: 06-09 10:35:21.490: E/AndroidRuntime(4406): java.lang.ClassCastException: android.widget.ImageView cannot be cast to android.widget.TextView

    Read the article

  • How to navigate to another html page?

    - by newbie
    In my application there's a usual login page sending username and password to the server script, where it needs to be authenticated, and in case of an authentic user, the server should redirect to a page student.html. This is my code var ports = 3000; var portt = 3001; var express = require('express'); var student = require('express')(); var teacher = require('express')(); var server_s = require('http').createServer(student); var server_t = require('http').createServer(teacher); var ios = require('socket.io').listen(server_s); var iot = require('socket.io').listen(server_t); var path = require('path'); server_s.listen(ports); server_t.listen(portt); student.use(express.static(path.join(__dirname, 'public'))); student.get('/', function(req,res){ res.sendfile(__dirname + '/login.html'); }); teacher.use(express.static(path.join(__dirname, 'public'))); teacher.get('/', function(req,res){ res.sendfile(__dirname + '/mytry.html'); }); ios.sockets.on('connection', function(socket){ var username, password; socket.on('check',function(data){ username = data[0]; password = data[1]; //************* Database connection and query ************* var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', user : 'user', password: '*******', database: 'my_db' }); connection.connect(); var qstring = 'SELECT s_id FROM login_student WHERE username='+username+'AND password='+password; connection.query(qstring, function(err, rows, fields) { if (err) { console.log('ERROR: ' + err); socket.emit('login_failure','DB error'); return; } console.log('The solution is: ', rows[0].solution); if (rows>0) //***** Here i want redirection to another page ****** else socket.emit('login_failure','Invalid Username or password'); }); connection.end(); }); }); iot.sockets.on('connection', function(socket){ ; }); }); Can anyone suggest what should I do?

    Read the article

  • 256 Worker Role 3D Rendering Demo is now a Lab on my Azure Course

    - by Alan Smith
    Ever since I came up with the crazy idea of creating an Azure application that would spin up 256 worker roles (please vote if you like it ) to render a 3D animation created using the Kinect depth camera I have been trying to think of something useful to do with it. I have also been busy working on developing training materials for a Windows Azure course that I will be delivering through a training partner in Stockholm, and for customers wanting to learn Windows Azure. I hit on the idea of combining the render demo and a course lab and creating a lab where the students would create and deploy their own mini render farms, which would participate in a single render job, consisting of 2,000 frames. The architecture of the solution is shown below. As students would be creating and deploying their own applications, I thought it would be fun to introduce some competitiveness into the lab. In the 256 worker role demo I capture the rendering statistics for each role, so it was fairly simple to include the students name in these statistics. This allowed the process monitor application to capture the number of frames each student had rendered and display a high-score table. When I demoed the application I deployed one instance that started rendering a frame every few minutes, and the challenge for the students was to deploy and scale their applications, and then overtake my single role instance by the end of the lab time. I had the process monitor running on the projector during the lab so the class could see the progress of their deployments, and how they were performing against my implementation and their classmates. When I tested the lab for the first time in Oslo last week it was a great success, the students were keen to be the first to build and deploy their solution and then watch the frames appear. As the students mostly had MSDN suspicions they were able to scale to the full 20 worker role instances and before long we had over 100 worker roles working on the animation. There were, however, a few issues who the couple of issues caused by the competitive nature of the lab. The first student to scale the application to 20 instances would render the most frames and win; there was no way for others to catch up. Also, as they were competing against each other, there was no incentive to help others on the course get their application up and running. I have now re-written the lab to divide the student into teams that will compete to render the most frames. This means that if one developer on the team can deploy and scale quickly, the other team still has a chance to catch up. It also means that if a student finishes quickly and puts their team in the lead they will have an incentive to help the other developers on their team get up and running. As I was using “Sharks with Lasers” for a lot of my demos, and reserved the sharkswithfreakinlasers namespaces for some of the Azure services (well somebody had to do it), the students came up with some creative alternatives, like “Camels with Cannons” and “Honey Badgers with Homing Missiles”. That gave me the idea for the teams having to choose a creative name involving animals and weapons. The team rendering architecture diagram is shown below.   Render Challenge Rules In order to ensure fair play a number of rules are imposed on the lab. ·         The class will be divided into teams, each team choses a name. ·         The team name must consist of a ferocious animal combined with a hazardous weapon. ·         Teams can allocate as many worker roles as they can muster to the render job. ·         Frame processing statistics and rendered frames will be vigilantly monitored; any cheating, tampering, and other foul play will result in penalties. The screenshot below shows an example of the team render farm in action, Badgers with Bombs have taken a lead over Camels with Cannons, and both are  leaving the Sharks with Lasers standing. If you are interested in attending a scheduled delivery of my Windows Azure or Windows Azure Service bus courses, or would like on-site training, more details are here.

    Read the article

  • Display image from database with p:graphicImage

    - by minhltnt
    I'm trying to display image type byte which saved in database to return StreamedContent to the p:graphicImage, as follows: private StreamedContent content; // getter and setter public StreamedContent getImageF() { if (student.getImage() != null) { InputStream is = new ByteArrayInputStream(student.getImage()); System.out.println("Byte :"+student.getImage()); content = new DefaultStreamedContent(is, "", student.getStuID()); System.out.println("ddd ------------------------------- " + content); return content; } return content; } This return blank image. Can Someone explain why? <p:graphicImage value="#{item.imageF}" width="50" id="grpImage" height="80"/> When i try to print the ouput : INFO: Byte :[B@a2fb48 INFO: ddd ------------------------------- org.primefaces.model.DefaultStreamedContent@b0887b INFO: Byte :[B@a2fb48 INFO: ddd ------------------------------- org.primefaces.model.DefaultStreamedContent@1d06a92 INFO: Byte :[B@d52f0b INFO: ddd ------------------------------- org.primefaces.model.DefaultStreamedContent@39a60 INFO: Byte :[B@d52f0b INFO: ddd ------------------------------- org.primefaces.model.DefaultStreamedContent@8c3daa INFO: Byte :[B@124728a INFO: ddd ------------------------------- org.primefaces.model.DefaultStreamedContent@1dbe05b INFO: Byte :[B@124728a INFO: ddd ------------------------------- org.primefaces.model.DefaultStreamedContent@66a266 INFO: Byte :[B@a2fb48 INFO: ddd ------------------------------- org.primefaces.model.DefaultStreamedContent@1293976 INFO: Byte :[B@a2fb48 INFO: ddd ------------------------------- org.primefaces.model.DefaultStreamedContent@17b7399 INFO: Byte :[B@d52f0b INFO: ddd ------------------------------- org.primefaces.model.DefaultStreamedContent@1e245a5 INFO: Byte :[B@d52f0b INFO: ddd ------------------------------- org.primefaces.model.DefaultStreamedContent@4a7153 INFO: Byte :[B@124728a INFO: ddd ------------------------------- org.primefaces.model.DefaultStreamedContent@1561bfd INFO: Byte :[B@124728a INFO: ddd ------------------------------- org.primefaces.model.DefaultStreamedContent@47a8c2<br/> I don't know the reason why p:grpalicImage return blank.Help me,please

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >