I installed nginx (1.6) in ubuntu server (14.04).
After that, I installed gitlab. I didn't realize it came with its own nginx. I uninstalled gitlab later.
After installing gitlab, my first nginx began to never start at boot as a service. This means:
If I hit sudo netstat -anp I don't see the corresponding entry in 0.0.0.0:80.
If I hit sudo nginx -s reload and then sudo netstat -anp I see the corresponding entry I mentioned.
I thought I could fixing it by doing:
sudo update-rc.d nginx remove
sudo update-rc.d nginx defaults
After removing gitlab, but it did not help me (i.e. after reboot, nginx does not automatically start).
I revised the /etc/init.d/nginx just to see that $DAEMON is still /usr/sbin/nginx.
Question: What should I check to see the problem here (or: what could the problem be)? sudo nginx -s reload works with no problems at all.
hi,
I want to do custom tableview which scrolls horizontally.If you see this URL
If you go to SUPERLIST tab in flash iphone simulator,you can see one column is differed from other columns which scrolls horizontally.any idea to do this?any help please?
I would need some help on how to optimize the query.
select * from transaction where id < 7500001 order by id desc limit 16
when i do an explain plan on this - the type is "range" and rows is "7500000"
According to the some online reference's this is explained as, it took the query 7,500,000 rows to scan and get the data.
Is there any way i can optimize so it uses less rows to scan and get the data. Also, id is the primary key column.
I have a field URL countryURL; in a Country class. I want to store its data into a COUNTRY table in a database through Hibernate.
Which Hibernate type I should use in the hibernate mapping file
<property column="COUNTRY_URL" name="countryURL" type="..."/>
It is not excepting string and text type.
A tough SQL question (I'm using postgres by the way).
I need the first row inserted every day for the past X days. one of my columns is a timestamp, which i hold the time inserted, and another column is the row id.
If it's not possible to get the first row inserted every day, i at least need a unique one; a single row for every day for the past x days.
Any suggestions?
Thanks
okie
How do I map a Version property using conventions (e.g. IClassConvention, AutomapperConfiguration)?
public abstract class Entity
{
...
public virtual int? Version { get; protected set; }
...
}
<class ...>
<version name="Version" column="version" generated="never" type="Int32" unsaved-value="0" />
</class>
Need some help on understanding how to do this; I'm going to be running recursive 'find' on a file system and I want to keep the information in a single DB table - with a self-referencing hierarchial structure:
This is my DB Table structure I want to populate.
DirObject Table:
id int NOT NULL,
name varchar(255) NOT NULL,
parentid int NOT NULL);
Here is the proposed Java Class I want to map (Fields only shown):
public DirObject {
int id;
String name;
DirObject parent;
...
For the 'root' directory was going to use parentid=0; real ids will start at 1, and ideally I want hibernate to autogenerate the ids.
Can somebody provide a suggested mapping file for this please; as a secondary question I thought about doing the Java Class like this instead:
public DirObject {
int id;
String name;
List<DirObject> subdirs;
Could I use the same data model for either of these two methods ? (With a different mapping file of course).
--- UPDATE: so I tried the mapping file suggested below (thanks!), repeated here for reference:
<hibernate-mapping>
<class name="my.proj.DirObject" table="category">
...
<set name="subDirs" lazy="true" inverse="true">
<key column="parentId"/>
<one-to-many class="my.proj.DirObject"/>
</set>
<many-to-one name="parent"
class="my.proj.DirObject"
column="parentId" cascade="all" />
</class>
...and altered my Java class to have BOTH 'parentid' and 'getSubDirs' [returning a 'HashSet'].
This appears to work - thanks, but this is the test code I used to drive this - I think I'm not doing something right here, because I thought Hibernate would take care of saving the subordinate objects in the Set without me having to do this explicitly ?
DirObject dirobject=new DirObject();
dirobject.setName("/files");
dirobject.setParent(dirobject);
DirObject d1, d2;
d1=new DirObject(); d1.setName("subdir1"); d1.setParent(dirobject);
d2=new DirObject(); d2.setName("subdir2"); d2.setParent(dirobject);
HashSet<DirObject> subdirs=new HashSet<DirObject>();
subdirs.add(d1);
subdirs.add(d2);
dirobject.setSubdirs(subdirs);
session.save(dirobject);
session.save(d1);
session.save(d2);
Hello Friends,
Actually I am working on Pdf by using IReport Software. This software provided two detail section but i want this two detail section with Column Header .then say me how i changes it
reply me on [email protected]
Here is the table data with the column name as Ships.
+--------------+
Ships |
+--------------+
Duke of north |
---------------+
Prince of Wales|
---------------+
Baltic |
---------------+
In the Outcomes table, transform names of the ships containing more than one space, as follows:
Replace all characters between the first and the last spaces (excluding these spaces) by symbols
of an asterisk (*). The number of asterisks must be equal to number
I need to create a repeater section that will show 4 columns - First Name, Last Name, a link based off of stored column data that says.
All the data plus some extra not being used is in a players profile. How do I link the data on the code-behind to the repeater control with the databinders?
I am using visual studio 2008, VB.NET for the code behind.
Which of the following is faster, or are they equivalent?
(grabbing recent most records from a TIMESTAMP COLUMN)
SELECT UNIX_TIMESTAMP(`modified`) stamp
FROM `some_table`
HAVING stamp > 127068799
ORDER BY stamp DESC
or
SELECT UNIX_TIMESTAMP(`modified`) stamp
FROM `some_table`
WHERE UNIX_TIMESTAMP(`modified`) > 127068799
ORDER BY `modified` DESC
or even another combination?
I have a fresh copy of Windows 8 Pro installed from MSDN. I have Google Chrome installed (stable channel) and it is set as my default browser. I even went into Control Panel Default Programs to ensure that Chrome had all its defaults.
When other desktop applications try to launch my browser they always fail. For example, while trying to install the Android SDK for Windows the installer accurately detected that I did not have the JDK installed. It provides a friendly button to visit java.oracle.com. When pressing this button, nothing happens at all.
You can see that here: http://youtu.be/XXL8GhuWWg0
If it were only that application that was having issues I wouldn't think anything of it but I have been encountering similar issues all over the place. Probably the most irritating one is when visual studio has updates; clicking the update button does nothing.
http://www.youtube.com/watch?v=zwd1mn3TId0
You can see in that screencast that Visual Studio is not able to launch the browser no matter what I click. The update button doesn't do anything and neither do the two links in the update's description.
Any suggestions? I'm assuming it's a Windows issue since it is happening in multiple applications.
UPDATE: Setting IE as the default browser fixes the issue. So it has something to do with it not being able to launch Chrome programmatically. Is it even possible to workaround this bug or do I have to suffer with IE as default for now?
Hey there
i have a column in the databsePostgreSQL
which contains arabic data
when reading the data from the database in the controller it's read fine, encoding is good
but when sending the data to the jsp page and trying to read it
it appears something like ?????????
any ideas why something like this occur?
In SQL Profiler you can see that very simple updates to a table by primary key take about 10-30ms each. On about every 10th update the write column shows 1, on all other updates it shows 0. This must mean that about every 10th update statement still requires disk IO. I wonder why that is. Would it not be more efficient queue up all IO until the transaction commits?
I need help converting this SQL statement, into EF4:
Select Posts.PostID, Post, Comment
from Posts left join
Comments on posts.PostID = Comments.PostID
Where CommentID not in
(
Select PostID
from Votes
where VoteTypeID = 4 --4 = flagged comment type
)
In my database, the Votes table stores either the PostID of reported posts, or CommentID of reported comments in the column Votes.PostID
Thanks in advance!
Hello...
I have this code
@Column(updatable=false)
@Enumerated(EnumType.STRING)
private ExamType examType;
How ever i can change the value when i update it via merge..
WHY????
I have some code:
@Id
@SequenceGenerator(name = "SOMETHING_SEQ")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SOMETHING_SEQ")
@Column(name = "SOMETHING", nullable = false)
private Long id;
How is hibernate providing my id?
I see in my database there a single sequence named 'hibernate_sequence' and no other hibernate 'special tables'.
There's a table like this one
______________________
| id | title | order |
|----------------------|
| 1 | test1 | 1 |
|-----|--------|-------|
| 2 | test2 | 2 |
|-----|--------|-------|
| 3 | test3 | 3 |
|-----|--------|-------|
| 4 | test4 | 4 |
'----------------------'
when i introduce in my mysql shell a single update to a row
$sql UPDATE `table` SET order=1 WHERE id=3;
And then procedure or method resamples order column in the before update lower values to get its order renewed like this
______________________
| id | title | order |
|----------------------|
| 1 | test1 | 2 |
|-----|--------|-------|
| 2 | test2 | 3 |
|-----|--------|-------|
| 3 | test3 | 1 |
|-----|--------|-------|
| 4 | test4 | 4 |
'----------------------'
Any help would be appreciated, thanks!
Hello,
i need to realize an app for Android using this background image:
Over every cell i have to draw a TextView, but i don't know how to do it with the different screens; i have the background image with 3 resolutions (240x320, 320x480, 480x800) but i don't know what kind of layout to use; i would use GridView but i don't know if i can work with different column size.
Can anyone help me?
Thanks in advance
i m using SQL Server 2008 R2.
i want to update my column CODE_DEST with increment number
CODE_DEST RS_NOM
null qsdf
null sdfqsdfqsdf
null qsdfqsdf
what i want:
CODE_DEST RS_NOM
1 qsdf
2 sdfqsdfqsdf
3 qsdfqsdf
i have try this:
update DESTINATAIRE_TEMP
set CODE_DEST = TheId FROM (SELECT Row_Number() OVER (ORDER BY [RS_NOM]) as TheId from DESTINATAIRE_TEMP)
not work because of )
and this
With DESTINATAIRE_TEMP As
(
SELECT
ROW_NUMBER() OVER (ORDER BY [RS_NOM] DESC) AS RN
FROM DESTINATAIRE_TEMP
)
UPDATE DESTINATAIRE_TEMP SET CODE_DEST=RN
because of union
I have a table company which holds the company_id, company_name and other details.
I have a table subcontracts which has a company_id column that maps to company.company_id.
How can I write a select statement to get all companies which have not been assigned to a subcontract? IE The company_id cannot be found in subcontracts.company_id
I need to track the date and time a user was created in my mysql database. I have column called 'created' and the data type as TIMESTAMP.
The problem is that when a user changes their password or other information the TIMESTAMP value changes. How can I set this to not change????
Just to grok this: If I had a transient property, lets say averagePrice, and I mark that as "transient" in the data modeler: This will not be persistet, and no column will be created in SQLite for that?
And: If I make my own NSManagedObject subclass with an averagePrice property, does it make any sense to model that property in the xcdatamodel file? Would it make a difference if I would simply create a property in my subclass and not model that in the entity?
(I think: yes, it doesn't matter at all ... but not sure)
I am simply taking the data from a Table and insert it into #tempTable then delete the data, and insert it back to the table. I get "Insert Error: Column name or number of supplied values does not match table definition." Error.
Here are the lines I am running.
SELECT * INTO #tempTable FROM dbo.ProductSales
SELECT * FROM #tempTable
DELETE FROM dbo.ProductSales
INSERT INTO dbo.ProductSales SELECT * FROM #tempTable
Any Idea?