Can I change URL name in Java?

Uncategorized
Question: I want to change My URL name in Java. Example Suppose my URL name is http://www.fotocourtesy.com/join.html I want to this URL in my Address bar. http://www.fotocourtesy.com/register-user Can any body suggest any way to achieve this? Thank You. Answer: You can use a URL shortener. and google had that kind of plugin. Read more
Read More

which is the condition I should use for proper working?

Uncategorized
Question: I am new in developing and new to Stack Overflow too. This is my first question. I'm stuck in a problem that I am describing below:$(document).ready(function() { $(".header").click(function() { if ($(".header-content").is(':visible')) { $(".header-content").slideUp(600); } else { $(this).next(".header-content").slideDown(600); } }); I uploading images of my project. first Image is when we load the page. Second images is when i click on second div named tracking I want to write code for this functionality in which. 1. when I load the page all div with class header should be like same as in first image. when i click on any area of any one of from thee div. the class named header-content should be display block initially it is set display:none in css. when i click on other div except from…
Read More

REPLACE OR DROP PART OF A STRING

Uncategorized
Question: I am looking to drop or replace word(s) in a string. Example:String = PINK LENOVO LAPTOP Desired output = LENOVO And so, I tried, REPLACE(PINK LENOVO LAPTOP', 'LENOVO'). But of course the out put for that will be: PINK LAPTOP Any idea how I can drop PINK and LAPTOP or replace the whole string with just LENOVO. Any help will be greatly appreciated. Thank you! EDIT1: Just to clarify, I am trying to replace a string of words from a sentence with only one or two words. So, for example I'd like to replace "PINK LENOVO LAPTOP - i7 16GB RAM" to "LENOVO - i7 16GB RAM" Answer: According to how I understand your requirements, it could be this one:REGEXP_REPLACE(REGEXP_REPLACE('PINK LENOVO LAPTOP', 'PINK '), ' LAPTOP') Read more
Read More

how does petapoco work

Uncategorized
Question: can i do this without getting the connection string from the web config?` public class DataPetapoco { public Database Db() { string serverName = ".\SQLEXPRESS;"; string dbName = "db"; string username = "user"; string password = "123"; var connectionstring = "Data Source=" + serverName + ";Initial Catalog=" + dbName + ";User ID=" + username + ";Password=" + password + ";Max Pool Size=200;Pooling=true" + ";Connect Timeout=20"; return new Database(connectionstring , "System.Data.SqlClient"); } } and then usage be something like this? var res = DataPetapoco.Db().Fetch("select * from table"); its working fine offline but when you take to the vps server it doesnt do anything. help me please i dont want to change this to get the connection string from web config Answer: Read more
Read More

How to get list of student id which is primary key in mvc dot net application for web application

Uncategorized
Question: I used the database first approach to create Register table with Student_id as primary key,auto-incremented and also asked for DOB,Email ,Name and Contact info. I'm connected it to connect it to an accounts table with foreign key Student_Id which is common in both the tables.In my accounts table Accounts_Id is primary key.Now when i use CRUD operations in the column of StudentID it displays the Student Name instead of the Studentid.Now i want to display list of StudentId from the register table into the Accounts table. My accounts.controller code is public ActionResult Create([Bind(Include = "Account_Id,Student_Id,Student_Name,Course_Id,Course_Name,Certification_Number")] Account account) { if (ModelState.IsValid) { db.Accounts.Add(account); db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.Course_Id = new SelectList(db.Courses, "Course_Id", "Course_Name", account.Course_Id); ViewBag.Student_Id = new SelectList(db.Registers, "Student_ID", "Student_Name", account.Student_Id); return View(account); } I'm using mvc5 and entity framework.…
Read More

SPI as an RPC link between boards

Uncategorized
Question: I want to implement an RPC(remote procedure call) mechanism based on SPI between two ARM SoCs. The two systems which are Cortex A9 and ARM11 respectively run Linux as OS. Currently we use UART as the sole communicating channel for RPC and file transferring (and things like firmware updating). I am trying to use SPI as an alternative data link for better throughput. So far a nearly working prototype is ready though some flow control issues are still haunting, as only one GPIO pin of the board seems not sufficient for reliable flow control. I use the spidev driver for the master and have written a Linux device driver for the slave. An additional userspace program on top of spidev are required for the protocol handling at the master…
Read More