Search Results

Search found 10177 results on 408 pages for 'thumbs db'.

Page 112/408 | < Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >

  • How to intialize a variable from another script in bash?

    - by Zombies
    How can I set my intial variables in a re-usable way? I tried to do this by invoking something like this in my child script: ./init.bash And inside init.bash: prod="false" if [ "$prod" == "prod" ] then RUN_DIR=/home/windsor/.scripts/websites JAVA_DIR=/home/windsor/prog/websitechecker OUT_DIR=/tmp/ DB="prod" else if [ ! -a /tmp/test ] then mkdir /tmp/test fi DB="mydb" OUT_DIR=/tmp/test/ RUN_DIR=/home/windsor/workspaces/bash/websites JAVA_DIR=/home/windsor/workspaces/java/testrun fi cd $RUN_DIR

    Read the article

  • how to get the comma seperated values of the column stored in the Sql server

    - by Innova
    how to get the comma separated values stored in the Sql Db into a individual values e.g in sql DB the column is stored with comma values as shown below, EligiblGroup A11,A12,A13 B11,B12,B13 I need to get EligibleGroup A11 A12 A13 B11 B12 ... I have written a query that will fetch me some list of employees with employee name and elibigle group XXX A11 YYY B11 ZZZ C11 I need to check that the employees(XXX,YYY,ZZZ) eligiblegroup falls within this EligiblGroup A11,A12,A13 B11,B12,B13 and retrun me only that rows.

    Read the article

  • @Transactional in Spring+Hibernate

    - by Arun Kumar
    I an using Spring 3.1 + Hibernate 4.x in my web application. In my DAO, i am saving User type object as following sessionFactory.getCurrentSession().save(user); But getting following exception: org.hibernate.HibernateException: save is not valid without active transaction I googled and found similar question on SO, with following solution: Session session=getSessionFactory().getCurrentSession(); Transaction trans=session.beginTransaction(); session.save(entity); trans.commit(); That solves the problem. But in that solution, there is lot of mess of beginning and committing the transactions manually. Can't i use sessionFactory.getCurrentSession().save(user); directly without begin/commit of transactions manually? I try to use @Transactional on my service/dao methods too, but the problem persists. EDIT : Here is my Hibernate Config File: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd"> <!-- enable the configuration of transactional behavior based on annotations --> <tx:annotation-driven transaction-manager="txManager"/> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" p:driverClassName="${db.driverClassName}" p:url="${db.url}" p:username="${db.username}" p:password="${db.password}" /> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="packagesToScan" value="com.myapp.entities" /> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> </bean> <!--Transaction Manager Added --> <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory"> <ref bean="sessionFactory" /> </property> </bean> </beans> Please help.

    Read the article

  • 9gag type of website

    - by awtasdfas
    for something like www.9gag.com , which open source mvc framework can be used? in particular the main page, with highly rated content is what i am looking for.. along with an option for users to thumbs up/heart every article/post/blog/vlog/podcast/link.

    Read the article

  • [solved] call_user_func_array problems

    - by Knarf
    I have a class with this in self::$DB = new PDO("mysql:dbname=$dbname;host:=127.0.0.1" , 'root' , ''); and then this public static function __callStatic($name, $arguments) { return call_user_func_array(array('self::$DB', $name), $arguments); } How does I make it right/work?

    Read the article

  • pdo connection scope

    - by Scarface
    Hey guys I have a connection class I found for pdo. I am calling the connection method on the page that the file is included on. The problem is that within functions the $conn variable is not defined even though I stated the method was public (bare with me I am very new to OOP), and I was wondering if anyone had an elegant solution other then using global in every function. Any suggestions are greatly appreciated. CONNECTION class PDOConnectionFactory{ // receives the connection public $con = null; // swich database? public $dbType = "mysql"; // connection parameters // when it will not be necessary leaves blank only with the double quotations marks "" public $host = "localhost"; public $user = "user"; public $senha = "password"; public $db = "database"; // arrow the persistence of the connection public $persistent = false; // new PDOConnectionFactory( true ) <--- persistent connection // new PDOConnectionFactory() <--- no persistent connection public function PDOConnectionFactory( $persistent=false ){ // it verifies the persistence of the connection if( $persistent != false){ $this->persistent = true; } } public function getConnection(){ try{ // it carries through the connection $this->con = new PDO($this->dbType.":host=".$this->host.";dbname=".$this->db, $this->user, $this->senha, array( PDO::ATTR_PERSISTENT => $this->persistent ) ); // carried through successfully, it returns connected return $this->con; // in case that an error occurs, it returns the error; }catch ( PDOException $ex ){ echo "We are currently experiencing technical difficulties. We have a bunch of monkies working really hard to fix the problem. Check back soon: ".$ex->getMessage(); } } // close connection public function Close(){ if( $this->con != null ) $this->con = null; } } PAGE USED ON include("includes/connection.php"); $db = new PDOConnectionFactory(); $conn = $db->getConnection(); function test(){ try{ $sql = 'SELECT * FROM topic'; $stmt = $conn->prepare($sql); $result=$stmt->execute(); } catch(PDOException $e){ echo $e->getMessage(); } } test();

    Read the article

  • MySql: How to know if an entry is compressed or not

    - by Guy
    I'm working with python and mysql and I want to verify that a certain entry is compressed in the db. Ie: cur = db.getCursor() cur.execute('''select compressed_column from table where id=12345''') res = cur.fetchall() at this point I would like to verify that the entry is compressed (ie in order to work with the data you would have to use select uncompress(compressed_column)..). Ideas?

    Read the article

  • error with linq join

    - by Luca Romagnoli
    I have this linq query: var segreterie = from s in db.USR_Utenti join h in db.USR_Accounts on new {s.ID, settings.GruppoSegreteria} equals new {h.USR_UtentiReference,h.ID_Gruppo} select s; that has this problem: The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join'. how can i do to solve it?

    Read the article

  • how to make a thread of never stop, and write something to database every 10 second..

    - by zjm1126
    i using gae and django this is my code: class LogText(db.Model): content = db.StringProperty(multiline=True) class MyThread(threading.Thread): def __init__(self,threadname): threading.Thread.__init__(self, name=threadname) def run(self,request): log=LogText() log.content=request.POST.get('content',None) log.put() def Log(request): thr = MyThread('haha') thr.run(request) return HttpResponse('')

    Read the article

  • Regarding data storage in ecommerce applications

    - by geeth
    Why is MainFrame better choice to stores data related to customer, orders etc? I work with a online retail store, they use .net technologies for applications and MainFrames for storing product, customer, order etc related data. Is SQL DB server not a good option for these type of applications? How is MainFrames better choice than SQL DB? Please provide your insight.

    Read the article

  • Upload files in Google App Engine

    - by Ngu Soon Hui
    I am planning to create a web app that allows users to downgrade their visual studio project files. However, It seems Google App Engine accepts files uploading and flat file storing on the Google Server through db.TextProperty and db.BlobProperty. I'll be glad anyone can provide code sample ( both the client and the server side) on how this can be done, thanks

    Read the article

  • How to convert SQL Statement with TOP, COUNT and GROUP BY to return an object list with LINQ

    - by Junior Mayhé
    Hello guys does anyone know how to convert this SQL statement to a LINQ to a List? SELECT TOP(5) COUNT(CategoryId), CategoryName FROM Tickets GROUP BY CategoryName The result would be something like public static List<Categories> List() { MyEntities db = new MyEntities(); /* here it should return a list o Category type */; return db.Category.GroupBy(...).OrderBy(...); }

    Read the article

  • Rails: Serializing objects in a database?

    - by keruilin
    I'm looking for some general guidance on serializing objects in a database. What are serialized objects? What are some best-practice scenarios for serializing objects in a DB? What attributes do you use when creating the column in the DB so you can use a serialized object? How to save a serialized object? And how to access the serialized object and its attributes? (Using hashes?)

    Read the article

  • How to Embed thumbnails in images

    - by user198222
    I have a bunch of 200X120 thumbnails and a bunch of high quality images, Apparently when I just resize the thumbnails with img size the quality suffers, so we are loading two images from the server the image thumbnail and the actual, I am just trying to optimize my site for speed a little saw someone mention embedding thumbs in the image, does anyone know a program that does that? Is this the best way to achieve my goal of high quality thumbnails?

    Read the article

  • Grails problem with nullable contraint in domain class

    - by xain
    Hi, I'm having the following problem with grails' 1.2.1 domain classes: When I set a constraint attr(nullable:true) and attr is int or bool, this condition isn't reflected in the db (postgresql 8.4). However, if attr is a String, the DB is consistent with the situation. Any hints ? Thanks

    Read the article

  • Intersection() and Except() is too slow with large collections of custom objects

    - by Theo
    I am importing data from another database. My process is importing data from a remote DB into a List<DataModel> named remoteData and also importing data from the local DB into a List<DataModel> named localData. I am then using LINQ to create a list of records that are different so that I can update the local DB to match the data pulled from remote DB. Like this: var outdatedData = this.localData.Intersect(this.remoteData, new OutdatedDataComparer()).ToList(); I am then using LINQ to create a list of records that no longer exist in remoteData, but do exist in localData, so that I delete them from local database. Like this: var oldData = this.localData.Except(this.remoteData, new MatchingDataComparer()).ToList(); I am then using LINQ to do the opposite of the above to add the new data to the local database. Like this: var newData = this.remoteData.Except(this.localData, new MatchingDataComparer()).ToList(); Each collection imports about 70k records, and each of the 3 LINQ operation take between 5 - 10 minutes to complete. How can I make this faster? Here is the object the collections are using: internal class DataModel { public string Key1{ get; set; } public string Key2{ get; set; } public string Value1{ get; set; } public string Value2{ get; set; } public byte? Value3{ get; set; } } The comparer used to check for outdated records: class OutdatedDataComparer : IEqualityComparer<DataModel> { public bool Equals(DataModel x, DataModel y) { var e = string.Equals(x.Key1, y.Key1) && string.Equals(x.Key2, y.Key2) && ( !string.Equals(x.Value1, y.Value1) || !string.Equals(x.Value2, y.Value2) || x.Value3 != y.Value3 ); return e; } public int GetHashCode(DataModel obj) { return 0; } } The comparer used to find old and new records: internal class MatchingDataComparer : IEqualityComparer<DataModel> { public bool Equals(DataModel x, DataModel y) { return string.Equals(x.Key1, y.Key1) && string.Equals(x.Key2, y.Key2); } public int GetHashCode(DataModel obj) { return 0; } }

    Read the article

  • Transfer values from one selection box to another

    - by Tonya Cash
    I need to populate the first box with the items from a db table. Users would choose from the first box, and either drag value(items) to the second for selection, or would select items, and then click a button to move them over to the 2nd box. After that I need to update the db with the selected values/items.

    Read the article

  • Mysql Windows "mysqldump -t" restore

    - by Glide
    Yes it's Windows sorry. I'm using mysqldump with the option -T which creates a sql and a txt file per table. mysqldump -u user -ppass db -T path I use that option to be able to restore easily one table. Now I'd like to restore all the tables. mysql -u user -ppass db < path/*.sql Obvously doesn't work Also, I don't know where do my funcs/procs go. Thx

    Read the article

< Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >