Search Results

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

Page 151/408 | < Previous Page | 147 148 149 150 151 152 153 154 155 156 157 158  | Next Page >

  • Detecting and reloading updated application parameters at runtime

    - by VeeKayBee
    I am working on an ASP.NET web application(using .NET 4.5 and C#).The application deals with lot of units (for measuring like KG,Litre,KM etc). So based on the selected unit we have to implement some allowed range.This values can be configured without much effort. We identified two solutions for this Keeping a configuration xml. Suppose the values in xml, does it requires an iisreset or any other thing which can take the site down for some time, if we are changing the xml file to change some validation. Keeping in Db, then use SQL dependency caching. So an update to DB can reflect the caching values.SO i believe if we change the values, it will update the cache. How much complex is this and does it effect the performance ? It will be great helpful, if we have some other method to achieve this. Thanks in advance.

    Read the article

  • Problem connecting to remote mysql database

    - by user361024
    I am trying to connect to a mysql db on a shared server. I am using a java application to make the connection. Problem doesn't happen when I connect to localhost db. URL = "jdbc:mysql://SHARED HOST IP:3306/DBNAME"; USER = "dbUSER"; PASS = "dbPASS"; Connection conn = DriverManager.getConnection(URL, USER, PASS); java.sql.SQLException: Access denied for user 'DBUSER'@'mycomputersIP???' (using password: YES) It is strange that it says denied for dbuser@ mycomputersip instead of dbuser@sharedhostIP Is there a setting on my wireless router that is screwing things up?

    Read the article

  • sql - duplicates

    - by Sebastjan
    Hey guys I'm putting data from website (json) to sql base. In db i have these rows. ID | PostId | Name | Message Id is auto-increment primary key. PostId also has a unique values. Name and Message are nothing special. When I run my script / click on the button in form / ... , the program saves all the values into database (lets say there are 25). Next time I'm going to press the button there will be added 25 more records (all duplicates), and so on... Is there a way that the program can check through 'PostIds' if the value already exists before adding it to the db? Thanks

    Read the article

  • Mysql Connection Error from 1.1.1 to 1.2.1

    - by Chromag
    I upgraded from 1.1.1 to 1.2.1 and I seem to be getting the following exception when it attempts to connect to MySQL: The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343) ... Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) I've confirmed that MySQL is indeed running and seems to be working fine. The following is the line from my application.conf file (with user/pass/db replaced): db=mysql:username:password@databasename I also tried using the full JDBC configuration. Did I miss something? This worked just fine in 1.1.1. I'm running MySQL 5.1.41. Thanks.

    Read the article

  • New replicaset resident memory is larger than the existing sets

    - by eded
    From the mongodb tutorial of how to resync a set, I wipe all the files in /data/db and restart the mongod process to resync the data. Everything looks ok, I get the same number of documents as the existing two sets(primary and one secondary). However, when I check the memory on MMS. it shows me my new resynced set/mongod process has a different memory status value than the other two. For existing twos using db.serverStatus.mem shows like the following: "mem" : { "bits" : 64, "resident" : 239, "virtual" : 66348, "supported" : true, "mapped" : 32865, "mappedWithJournal" : 65730 } however, the new resynced set shows like: "mem" : { "bits" : 64, "resident" : 1239, "virtual" : 52447, "supported" : true, "mapped" : 25700, "mappedWithJournal" : 51400 } the resynced resident memory is 6-10 times more than the existing ones. I wouder if it is normal because all data comes in suddenly during the resyncing?? and even virtual and mapped value are different too. Can anyone explain?? thanks

    Read the article

  • Next Identity Key LINQ + SQL Server

    - by user569347
    To represent our course tree structure in our Linq Dataclasses we have 2 columns that could potentially be the same as the PK. My problem is that if I want to Insert a new record and populate 2 other columns with the PK that was generated there is no way I can get the next identity and stop conflict with other administrators who might be doing the same insert at the same time. Case: A Leaf node has right_id and left_id = itself (prereq_id) **dbo.pre_req:** prereq_id left_id right_id op_id course_id is_head is_coreq is_enforced parent_course_id and I basically want to do this: pre_req rec = new pre_req { left_id = prereq_id, right_id = prereq_id, op_id = 3, course_id = query.course_id, is_head = true, is_coreq = false, parent_course_id = curCourse.course_id }; db.courses.InsertOnSubmit(rec); try { db.SubmitChanges(); } Any way to solve my dilemma? Thanks!

    Read the article

  • What is the most "database independent" way of creating a variable length text field in a database

    - by Thibaut Colar
    I want to create a text field in the database, with no specific size (it will store text of length unknown in some case) - the particular text are serialized simple object (~ JSON) What is the most database independent way to do this : - a varchar with no size specified (don't think all db support this) - a 'text' field, this seems to be common, but I don't believe it's a standard - a blob or other object of that kind ? - a varchar of a a very large size (that's inefficient and wastes disk space probably) - Other ? I'm using JDBC, but I'd like to use something that is supported in most DB (oracle, mysql, postgresql, derby, HSQL, H2 etc...) Thanks.

    Read the article

  • Dynamically changing databases in SQL Server 2000

    - by spuppett
    At work we have a number of databases that we need to do the same operations on. I would like to write 1 SP that would loop over operations and set the database at the beginning of the loop (example to follow). I've tried sp_executesql('USE ' + @db_id) but that only sets the DB for the scope of that stored procedure. I don't really want to loop with hard coded database names because we need to do similar things in many different places and it's tough to remember where things need to change if we add another DB. Any thoughts Example: DECLARE zdb_loop CURSOR FAST_FORWARD FOR SELECT distinct db_id from DBS order by db_id OPEN zdb_loop FETCH NEXT FROM zdb_loop INTO @db_id WHILE @@FETCH_STATUS = 0 BEGIN USE @db_id --Do stuff against 3 or 4 different DBs FETCH NEXT FROM zdb_loop INTO @db_id END CLOSE zdb_loop DEALLOCATE zdb_loop

    Read the article

  • Java: Do something on event in SQL Database?

    - by wretrOvian
    Hello I'm building an application with distributed parts. Meaning, while one part (writer) maybe inserting, updating information to a database, the other part (reader) is reading off and acting on that information. Now, i wish to trigger an action event in the reader and reload information from the DB whenever i insert something from the writer. Is there a simple way about this? Would this be a good idea? : // READER while(true) { connect(); // reload info from DB executeQuery("select * from foo"); disconnect(); }

    Read the article

  • How can I optimize this code?

    - by loop0
    Hi, I'm developing a logger daemon to squid to grab the logs on a mongodb database. But I'm experiencing too much cpu utilization. How can I optimize this code? from sys import stdin from pymongo import Connection connection = Connection() db = connection.squid logs = db.logs buffer = [] a = 'timestamp' b = 'resp_time' c = 'src_ip' d = 'cache_status' e = 'reply_size' f = 'req_method' g = 'req_url' h = 'username' i = 'dst_ip' j = 'mime_type' L = 'L' while True: l = stdin.readline() if l[0] == L: l = l[1:].split() buffer.append({ a: float(l[0]), b: int(l[1]), c: l[2], d: l[3], e: int(l[4]), f: l[5], g: l[6], h: l[7], i: l[8], j: l[9] } ) if len(buffer) == 1000: logs.insert(buffer) buffer = [] if not l: break connection.disconnect()

    Read the article

  • Hibernate won't autogenerate sequence table

    - by Jason
    I'm trying to use a sequence table to generate keys for my entities. I notice that if I just use the @GeneratedValue(strategy=GenerationType.TABLE) with no explicit generator, Hibernate will automatically create the hibernate_sequences table in my DB if it doesn't exist. This is great. However, I wanted to make some changes to the sequence table, so I created a @TableGenerator like the following: @GeneratedValue(strategy=GenerationType.TABLE, generator="vdat_seq") @TableGenerator(name="vdat_seq", table="VDAT_SEQ", pkColumnName="seq_name", valueColumnName="seq_next_val", allocationSize=1) This works fine if I manually create the VDAT_SEQ table in my schema; Hibernate won't auto-create it anymore. This causes an issue in my unit tests, since I'd rather not have to manually create a table and maintain it on our testing DB. Is there a configuration variable or some other way to get Hibernate to generate the sequence table?

    Read the article

  • Filter Phrase Query

    - by alsuelo
    I try to filter a phrase to make a search in my website i've this query, this code working with one word but when i type wit more than one isn't working becuase the print is without spaces. $phrase = $this->getState($this->context.".filter_phrase"); printf("Original string: %s\n", $phrase); if(!empty($phrase)) { $escaped = $db->escape($phrase, true); printf("Escaped string: %s\n", $escaped); $quoted = $db->quote("%" . $escaped . "%" , false); $query->where ('a.title LIKE ' .$quoted); } Example i type king and the output is king , when i type the king the output is theking, i want to know if exist any way to conserve the blank spaces.

    Read the article

  • WebSQL Databases between two different pages?

    - by Srikanth Rayabhagi
    Is there any particular way in which we can access the Web SQL Database of one page, by other page. To make it more clear, suppose a.com creates the database DB and store some info. Now b.com comes and want to access the same database DB. Is there a way? Or are there any alternatives to do this? I tried to implement in HTML5 and Javascript but the databases as well as the localStorages are confining only to particular pages, I want this to be cross the pages.

    Read the article

  • on page load clone first image from collection of photos

    - by user313378
    On my page I'm getting collection of photos, and I store them as thumbs below showImage div which needs to be refreshed with cloned image onclick. Basically everything is ok except I need to populate this showImage div onpage load with first image, and then to use this onclick clone which already works. <a href="/Property/GetImage/someIntId"> <img id="someIntId" class="details" width="100" height="100" src="/Property/GetImage/7" alt=""> </a> function onPopUp() { $(".details").click(function (event) { //clone the clicked image var clone = $(this).clone(); clone.height("250px").width("280px"); //place it in the placeholder $('div#showImage').html(clone); }); }

    Read the article

  • Strange python error

    - by Werner
    Hi, I am trying to write a python program that calculates a histogram, given a list of numbers like: 1 3 2 3 4 5 3.2 4 2 2 so the input parameters are the filename and the number of intervals. The program code is: #!/usr/bin/env python import os, sys, re, string, array, math import numpy Lista = [] db = sys.argv[1] db_file = open(db,"r") ic=0 nintervals= int(sys.argv[2]) while 1: line = db_file.readline() if not line: break ll=string.split(line) #print ll[6] Lista.insert(ic,float(ll[0])) ic=ic+1 lmin=min(Lista) print "min= ",lmin lmax=max(Lista) print "max= ",lmax width=666.666 width=(lmax-lmin)/nintervals print "width= ",width nelements=len(Lista) print "nelements= ",nelements print " " Histogram = numpy.zeros(shape=(nintervals)) for item in Lista: #print item int_number = 1 + int((item-lmin)/width) print " " print "item,lmin= ",item,lmin print "(item-lmin)/width= ",(item-lmin)," / ",width," ====== ",(float(item)-float(lmin))/float(width) print "int((item-lmin)/width)= ",int((item-lmin)/width) print item , " belongs to interval ", int_number, " which is from ", lmin+width*(int_number-1), " to ",lmin+width*int_number Histogram[int_number] = Histogram[int_number] + 1 4 but somehow I am completely lost, I get strange errors, can anybody help¿ Thanks

    Read the article

  • Issue with InstalShield

    - by Alnahas
    I Use Installsheild 2009 To Deployment VS2005 Project with Sql express 2005 DB I put my exe and DB files And I typed "/qn SQLAUTOSTART=1 ADDLOCAL=ALL DISABLENETWORKPROTOCOLS=1" in command line to Make Silent Install My problem is that after I build this project and I try using it, it only works if the computer has the requirements just by one click. But if computer needs these requirements after installation, the user must click again on the setup icon to finish the setup. So first click to install requirements and second click to install my project I need the progress does not stop until all the installation is done (the needed requirements and my project)

    Read the article

  • Stop Submit With empty and error Input Values Using PHP

    - by user3615781
    I am using the following code for sending data to database, but it sends the data even the values of the fields are incorrect or empty. So can anyone help me solve this by using php? Here is my code: <?php //Connecting to sql db $connect = mysqli_connect("localhost","root","","form"); /* check connection */ if (!$connect) { die('Connect Error: ' . mysqli_connect_error()); } //Sending data to sql db $result = mysqli_query($connect,"INSERT INTO students(name,email,website,comment,gender) VALUES('$name','$email','$website','$comment','$gender')"); if (!$result) { die('Query Error:'. mysqli_error($connect)); } ?>

    Read the article

  • Can't figure out what's wrong with my php/sql statement

    - by Olegious
    So this is probably a dumb beginner question, but I've been looking at it and can't figure it out. A bit of background: just practicing making a web app, a form on page 1 takes in some values from the user, posts them to the next page which contains the code to connect to the DB and populate the relevant tables. I establish the DB connection successfully, here's the code that contains the query: $conn->query("SET NAMES 'utf9'"); $query_str = "INSERT INTO 'qa'.'users' ('id', 'user_name','password' ,'email' ,'dob' ,'sx') VALUES (NULL, $username, $password, $email, $dob, $sx);"; $result = @$conn->query($query_str); Here's the error that is returned:Insert query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''qa'.'users' ('id', 'user_name' ,'password' ,'email' ,'dob' ,'s' at line 1 Thanks in advance!

    Read the article

  • [PHP] How to unset object's inherited properties ?

    - by vbklv
    I have an Object ( [id] => 1 [parent_id] => 0 [result:Database:private] => [db:Database:private] => mysqli Object ( [affected_rows] => 0 ... ) ) Obviously, the Object has inherited the 'db' and 'result' properties of the parent Database class. unset($object-result) nor unset($object-result:Database) nor unset($object-result:Database:private) work. How could I unset those properties when they are no longer needed (i.e. when the object properties are about to be output)? Is it a generally a good idea to have a database object as an inherited property of other classes (extend one Database class with all other classes that use database connections)?

    Read the article

  • What are these folders for? Can I remove them? How?

    - by Water Cooler v2
    In a folder on the SVN server/repository that is designated for our project, there have appeared the following folders: branches/ conf/ db/ hooks/ locks/ tags/ trunk/ README.txt (file) format (file) We have all the code in the trunk folder. There were, as far as I can remember, only 3 or 4 folders earlier. Within the trunk folder, too, there are now these folders. OurCode/ conf/ db/ hooks/ locks/ README.txt (file) format (file) I understand many of these folders or files are not necessary, but I can't be too sure. My questions are: 1) What are each of these files and/or folders for? 2) Which are the ones that are not necessary? 3) How may I remove them from the server repository?

    Read the article

  • delete row from mysql through generated table with records

    - by HennySmafter
    I am using 2 pages. On one page it generates a table with the records and a delete button. After pressing delete it goes to the second page which should delete the record. But it doesn't. Below is the code that I am using. PS: The code is adapted from a tutorial I found through Google a while ago. delete_overzicht.php <?php // Load Joomla! configuration file require_once('../../../configuration.php'); // Create a JConfig object $config = new JConfig(); // Get the required codes from the configuration file $server = $config->host; $username = $config->user; $password = $config->password; $database = $config->db; // Connect to db $con = mysqli_connect($server,$username,$password,$database); if (!$con){ die('Could not connect: ' . mysqli_error($con)); } mysqli_select_db($con,$database); // Get results $result = mysqli_query($con,"SELECT * FROM cypg8_overzicht"); echo "<table border='1' id='example' class='tablesorter'><thead><tr><th>Formulier Id</th><th>Domeinnaam</th><th>Bedrijfsnaam</th><th>Datum</th><th>Periode</th><th>Subtotaal</th><th>Dealernaam</th><th>Verwijderen</th></tr></thead><tbody>"; while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['formuliernummer'] . "</td>"; echo "<td>" . $row['domeinnaam'] . "</td>"; echo "<td>" . $row['bedrijfsnaam'] . "</td>"; echo "<td>" . $row['datum'] . "</td>"; echo "<td>" . $row['periode'] . "</td>"; echo "<td> &euro; " . $row['subtotaal'] . "</td>"; echo "<td>" . $row['dealercontactpersoon'] . "</td>"; echo "<td><a href='delete.php?id=" . $row['id'] . "'>Verwijderen </a></td>"; echo "</tr>"; } echo "</tbody></table>"; mysqli_close($con); ?> delete.php <?php // Load Joomla! configuration file require_once('../../../configuration.php'); // Create a JConfig object $config = new JConfig(); // Get the required codes from the configuration file $server = $config->host; $username = $config->user; $password = $config->password; $database = $config->db; // Connect to db $con = mysqli_connect($server,$username,$password,$database); if (!$con){ die('Could not connect: ' . mysqli_error($con)); } mysqli_select_db($con,$database); // Check whether the value for id is transmitted if (isset($_GET['id'])) { // Put the value in a separate variable $id = $_GET['id']; // Query the database for the details of the chosen id $result = mysqli_query($con,"DELETE * FROM cypg8_overzicht WHERE id = $id"); } else { die("No valid id specified!"); } ?> Thanks to everyone who is willing to help!

    Read the article

  • SQL: Interrupting a query

    - by NoozNooz42
    I've worked on a project using a proprietary non-SQL DB where queries could be interrupted and in the codebase there were quite some spots where that functionnality was used and made perfect sense (for example to stop a long running query that gets cancelled by the user, or when a more recent query takes place and renders the previous query obsolete, etc.) and I realized I never really saw that kind of "interrupted queries" previously and thought it could make a good SO question (several questions, but they're all related to exactly the same thing): can SQL queries be interrupted? is this part of the SQL standard? if it's not part of the SQL standard, which SQL DBs allow queries to be interrupted (any example most welcome)? is it common to interrupt a DB query (SQL or not) which you'll know you won't care about the result anymore? (in the codebase I've worked on, it sure helps lighten the server's load)

    Read the article

  • MySQLI Prepared Statement Not Binding Properly

    - by Sev
    Any reason why the following code won't work? $dbconnection = db::getInstance(); //this is a singleton db class $stmt = $dbconnection->prepare("SELECT `id` from `table` where `username`=?"); $stmt->bind_param("s", $username); $stmt->execute(); $stmt->bind_result($uid); $stmt->fetch(); echo $uid; The same connection method is used elsewhere, and it works there. The only difference on that other page where it works, is that there are multiple rows fetched, not just one.

    Read the article

  • How to insert into data base using multi threading programming [closed]

    - by user1196650
    I am having a method and that method needs to do the following thing: It has to insert records into a database. No insert is done for the same table again. All inserts are into different tables. I need a multi threading logic which inserts the details into db using different threads. I am using oracle db and driver configuration and remaining stuff are perfect. Please help me with an efficient answer. Can anyone could provide me with a skeleton logic of the program.

    Read the article

  • How to choose programaticaly the column to be queried by Linq using PropertyInfo???

    - by Richard77
    Hello, I would like to control how linq querries my database programaticaly. For instance, I'd like to query the column X, column Y, or column Z, depending on some conditions. First of all, I've created an array of all the properties inside my class called myPropertyInfo. Type MyType = (typeOf(MyClass)); PropertyInfo[] myPropertyInfo = myType.GetProperties( BindingFlags.Public|BindingFlags.Instance); The myPropertyInfo array allows me to access each property details (Name, propertyType, etc) through the index*[i]* Now, how can I use the above information to control how linq queries my DB? Here's a sample of a querry I'd like to exploit. var myVar = from tp in db.MyClass select tp.{expression}; Expression using myPropertyInfo[i] to choose which property(column) to query. I'm not sure if that's the way of doing it, but if there's another way to do so, I'll be glad to learn. Thanks for helping.

    Read the article

< Previous Page | 147 148 149 150 151 152 153 154 155 156 157 158  | Next Page >